Xml File polling

In flat file polling we use input variable name as ‘ffdata’ type ‘Object’ in the service input.
what do we use( variable name and type) if the file is XML and not flat file?

Rana,

use variable “contentStream” type object as the input for filepolling (XML).

HTH,

Rana,

When you set up the file polling port, there is an option to set the content type there. If you set the content type to text/xml, then it will invoke the xml content handler. In this case, the receiving flow will need a node object to receive the data.

If you decide to use the default, it requires a java input stream named ffdata.

You can do a real simple test to see if this works by creating a flow with the input of ffdata as an object.

Then use pub.io:streamToBytes to convert it to bytes. Then, use pub.string:bytesToString to convert to string.

Map this string to the message input to pub.flow:debugLog and it should write the entire message to the server log as a test.

I used this procedure to determine initially how the file polling mechanism worked. It is mainly used for flat files. The reason the content type input box is available is in case you decide to create, register and use your own custom content handler.

Hope this helps.

Ray

Hi,

In processing service, is there any way to refer the filename that is being processed?

Regards,
Abdul

I got it. I can get it using pub.flow:getTransportInfo service.

Thanks Will.

Regards,
Abdul.

Hi,

Its not working with the object - ContentStream. I’m on version 8.0

What is the use if getTransportInfo() ??may i know??

Are you trying to save the stream in pipeline? Stream cannot be saved and restored.

getTransportInfo() Retrieves information about the protocol from which the current service was invoked.
We can get the infomation regarding protocols .
FTP
HTTP
SMTP
Filepolling
Also we can get additional headers sent from the invoking application.
I suspect if we can get SOAP info using this service?
For more info please refer 7-1-1_Integration_Server_Built-In_Services_Reference
Thanks,
Amol.