on 2018 Jan 16 4:07 AM
Hi Experts,
how to convert non XML (Entire plain text) file to XML (in Single XML tag) from PO 7.4 to PO 7.5? As Scenario I have is to send non XML file to 3rd party but I have 2 PI System in between
ECC (non-XML File -> (FTP) PO 7.4 (SOAP Receiver) -> (SOAP Sender) PO 7.5 (SFTP) -> Third Party
I tried without converting non XML to XML and it says content is not allowed in prolog, so I guess I need to convert the non- XML to XML (under 1 XML tag) and send it from PO 7.4 to PO 7.5 and then again convert it back to non-XML before sending it to Third Party.
Currently I am trying to use Message Transform Bean with following Module Configuration in SOAP Receiver adapter
fieldSeparator and endSeparator used is '0x1a' is EOF - end of file but does not produce any tag in XML, if I use 'nl' new line then XML is generated but every line is put under new tag, However what we need is all the text data in one XML tag. Please help!
Kindly suggest the configuration on Adapter module to transform the text file to XML and also configuration for XML to text
Regards,
Nitin
use java map in PO 7.4 to create xml message. just add one field and put whole text in it. pass it to soap receiver.
check this blog and modify it as per your requirement
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried your scenario. picking txt and sending via soap does not work. at least for me. because system expects soap message with root tag, missing root tag seems to be breaking the soap protocal rule not sure.
if you have message like below,it works
<soapenv:Body>
<soap:Messagetype>
text file content test
</soap:Messagetype>
</soapenv:Body>
but below one does not work, that is where it is throwing error "content is not allowed in prolog"
<soapenv:Body>
text file content test
</soapenv:Body>
But if you can change from SOAP to REST, then it is possible, it worked for me.
1.File to REST(Points to PI sender rest channel)
2. REST to File
It picks text file and successfully able to send it to receiver rest channel.
keep the interface pattern stateless xi3.0 compatible and receiver rest adapter data format as json. Also i kept data format as xml in the sender rest adapter.
This the REST to File scenario test result.
User | Count |
---|---|
57 | |
11 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.