Does anyone has a sample Java service that can read non XML file format. I want to FTP from a ftp client to that Java service. Besides, what should I define for the input/output of that service ?
The service signature depends what kind of data you have and what ContentHandler you are using.
For instance, “text/xml” files get sent to the XML parser and an XML parse tree object is put into the pipeline.
There is a ContentHandler that puts the input into the pipeline as a Java InputStream object called
In Integration Server the file extension of an FTPed file is used to figure out the mime type, which is then used to figure out what ContentHandler to use.
The file extension of your file should be in the server mime.types file mapping it to a mime type that the “com.wm.app.b2b.server.DefaultCoder” is setup to handle, such as “text/plain”.
Your service should have the Object field called “contentStream”, which you can cast to a java.io.InputStream in your service.
IDataCursor ic = pipeline.getCursor();
InputStream is = (InputStream)IDataUtil.get(ic, “contentStream”);
There is a sample ContentHandler in WmSamples.