IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Get the Content-Length of a Node object

    Posted Wed November 29, 2006 05:15 PM

    I don’t if I post on the right place, but I try…:wink:

    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 ? :confused:

    Thanx in advance for your answers.


    #Integration-Server-and-ESB
    #webMethods
    #webmethods-Protocol-and-Transport


  • 2.  RE: Get the Content-Length of a Node object

    Posted Wed November 29, 2006 06:37 PM

    Christophe,

    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.

    Mark


    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Get the Content-Length of a Node object

    Posted Thu November 30, 2006 02:17 PM

    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 ?


    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: Get the Content-Length of a Node object

    Posted Thu November 30, 2006 02:27 PM

    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).

    Mark


    #Integration-Server-and-ESB
    #webMethods
    #webmethods-Protocol-and-Transport


  • 5.  RE: Get the Content-Length of a Node object

    Posted Thu November 30, 2006 02:44 PM

    EAI application = ensemble of processes on an IS (packages).

    I try to use pub.flow.getTransportInfo.


    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport
    #webMethods