on 03-07-2018 4:45 AM
Hi Experts
I am working on File-PI-REST scenario.
PI has to pick up .zip file and sent it to REST API URL via PUT. But REST receiver channel accepts only xml or JSON format ('Data Format' Tab).
I get following error when I read zip file and select xml data format in Rest Receiver channel
'MP: exception caught with cause com.sap.aii.adapter.rest.ejb.sender.InterfaceExtensionFailedException: Could not parse message content to add interface element'
I get following error when select JSON data format in REST receiver channel
'MP: exception caught with cause java.net.SocketException: errno: 32 (There is no process to read data written to a pipe.), error: Write failed'
For picking up zip file, I am using dummy interface as I don't want to know/transform the contents. Also I cannot unzip the .zip file as its very very big xml file. We are on SAP PI 7.4 SP 12.
Can any one please suggest solution?
Thanks
Sunit
Hi Sunit,
In your sender channel use payloadzip bean to unzip the file then convert the XML inside the zip file to JSON using the receiver rest adapter.
payloadzipbean -
https://blogs.sap.com/2007/02/20/working-with-the-payloadzipbean-module-of-the-xi-adapter-framework/
Thanks
Sugata
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I guess you probably directly stream the bits and bytes to the REST receiver channel in a for format, which causing the exception.
The commonly usage to deal with this kind of situation would be Base64 Encode the binary code of Zip file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.