I don’t if I post on the right place, but I try…
I have a service whose the Input is a *node.
In order to filter the flow, I need to know the size of the input.
The service is invoke by XML/HTTP.
Which routine or code can I use to operate this filter ?
Thanx in advance for your answers.
What do you mean by “filter the Flow”? I don’t know of a way to know the size of an incoming node without loading it into memory in its entireity which defeats the purpose of the filter.
If your service will be receiving large docs, then you would need to use the large document handling approach (pub.xml:getXMLNodeIterator with pub.xml:getNextXMLNode) to process your document a chunk at a time.
Perhaps others have some ideas on this.
Thanx mcarlson for your answer.
In fact, the document can’t be functionaly processed by the EAI application if its size is too large.
Then we must intercept data before they come in the process. The only way we have thought about, is to evaluate the size of the document when it penetrates the EAI, i.e. when the flow service called by the external application receive the document.
So I wonder if it is possible to use a built-in service to evaluate the size of the object node or to write a java service (code ?).
Any idea ?
What EAI application are you referring to? Using the large file handling approach I referred to above will allow you to break up the incoming XML document into logical chunks which can be sent to an application to process.
If the sending app sets the content-length header property, you can access that using the pub.flow:getTransportInfo built-in service. However, you still need an approach for dealing with documents that are larger than some threshhold that you set (unless you plan to reject them entirely).
EAI application = ensemble of processes on an IS (packages).
I try to use pub.flow.getTransportInfo.