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.  Sending flat files to IS6 services via FTP

    Posted Thu November 20, 2003 10:07 AM

    Hi,
    I’d like to send flat file (text or xml, doesn’t matter now) to IS service via FTP but I have problems with extracting the content of a file. I’m definitely sure that the Receiver service is really invoked by FTP client, because I execute savePipelineToFile at the very start of it and I can see dumped pipeline each time. It looks like this:
    <idataxmlcoder>
    <record>
    <value>dump.txt</value>
    </record>
    </idataxmlcoder>

    As you see there is no trace of either node (text/xml), contentStream (text/plain) or ffdata (application/x-wmflatfile) object. I wrote very simple Java service to be sure of the pipeline content:
    IDataHashCursor pipc = pipeline.getHashCursor();
    pipc.first();
    String content = (String) pipc.getKey();
    Object obiekt = pipc.getValue();
    pipc.insertAfter(“content”, content);

    When I execute above service at the start of the Receiver service, I get the name of object with data (e.g. ffdata or node), but the value of this object is always null.
    Now the question: why can’t I get the content of a file? I probably miss something very obvious.
    I’d appreciate any help
    Marcin


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Sending flat files to IS6 services via FTP

    Posted Thu November 20, 2003 11:55 AM

    Hi Marcin,

    When you read it in a file server you should use the getFile service and load the file content as bytes, then invoke the bytesToString service.
    In this case, I think the input data type must be an object and then invoke the xmlNodeToDocument service to convert it into the internal webMethods document type you previously defined.

    HTH


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 3.  RE: Sending flat files to IS6 services via FTP

    Posted Thu November 20, 2003 01:11 PM

    Hi Renato,

    I’m putting the file into the Receiver service namespace, not into filesystem, so I don’t think I’m able to get it with getFile function. As I understand, the content of my file should appear as an input to the Receiver service.

    Marcin


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 4.  RE: Sending flat files to IS6 services via FTP

    Posted Thu November 20, 2003 02:15 PM

    in your receiver service have contentStream as an input string.
    Then the first thing you do in your services is use streamToBytes, from there bytesToString and away you go.

    HTH


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 5.  RE: Sending flat files to IS6 services via FTP

    Posted Thu November 20, 2003 02:31 PM

    Ha! It works! What makes me wonder is why contentStream is not included in Pipeline dump.

    Thanks a lot
    Marcin


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 6.  RE: Sending flat files to IS6 services via FTP

    Posted Thu November 20, 2003 03:16 PM

    Hi,

    contentStream is a Stream. As a result, it never gets reported in pipeline.

    Regards,

    Chirag.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: Sending flat files to IS6 services via FTP

    Posted Thu November 20, 2003 03:43 PM

    So everything is clear now… I wish I always had my issues solved so quickly.

    Thank you guys
    Marcin


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB