Skip to Content
0

sending zip file to REST API URL

Mar 07 at 04:45 AM

92

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Chih-Chieh Chan Mar 08 at 05:39 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded