Skip to Content
avatar image
Former Member

sending zip file to REST API URL

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 08 at 05:39 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded