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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Passing files to IS from an External Java Client

    Posted 06/15/09 06:04 PM

    Is there a way to pass in a file to an IS from an External Java client.

    I am trying using the following code but I can only the IS only recognises String values. The ffdata input is defined as an Object of type BufferedInputStream when the pipeline is viewed following a File Poller Port call to trigger the service.

    [SIZE=1] Object iDataRaw = new Object[2][2];
    iDataRaw[0][0] = “source”;
    iDataRaw[0][1] = “Java External Client”;
    iDataRaw[1][0] = “ffdata”;
    iDataRaw[1][1] = new BufferedInputStream(new FileInputStream (“c://temp//myfile.txt”));

        IData inputPipeline = IDataFactory.create(iDataRaw);[/size]
    

    TestClient client = new TestClient(
    7613sis0001.stbc2.jstest2.net:14000”, “”,
    “”);

    IData outputPipeline = client.invoke(“Package.test”, “aSimpleService”,
    inputPipeline);

    The example is based on some sample code psted in the forums and works fine with Strings - any pointers in the right direction would be useful.

    thanks


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


  • 2.  RE: Passing files to IS from an External Java Client

    Posted 06/16/09 04:51 AM

    Instead of using the IS Java API you might consider using just HTTP or FTP protocols. You can post/put files to IS using these standard protocols. Be sure to set the content-type correctly in either case.


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


  • 3.  RE: Passing files to IS from an External Java Client

    Posted 06/16/09 10:01 AM

    It would be useful to know if the IS can process non-String data from the IS API. The ideas is to provide inputs for externally called test scripts. I can get the data in as a String and convert it in the rule but this is additional functionality outside of the formal application functionality. thanks


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


  • 4.  RE: Passing files to IS from an External Java Client

    Posted 06/17/09 06:00 AM

    What sort of non-String data do you have in mind?

    For Java objects to traverse the network they must be Serializable. I see in your example you’re trying to pass an InputStream–that won’t work as streams are not serializable.


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