Passing files to IS from an External Java Client

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(”, “”,

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

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.


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.

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

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.