cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle web service with attachment in PI / XI?

Former Member
0 Kudos

Hello,

I have scenario ws>PI>Abap Proxy. The sender sends message to PI web service (soap adapter or ws adapter in PI7.1) with attachment. I have no idea how PI can hanlde attachment. All PI pipeline or other processes are aimed at the message itself, not the attachment. So when the abap proxy is called, will the attachment automatically sent to the proxy? If yes, how would the proxy get the data? the method generated by the proxy contains only one import parameter which is the incoming message, so how to get the attachment?

Similiar requirement for proxy>PI>ws, the backend sender needs to send attachment along with the message so the the attached can be sent out by the PI by calling the receiver's web service with attachment. How would that work? Myabe I should define an data type with type of HexBinary to enable sender to put attachment into this field, but in PI, how can I put hte data of this field into attachment while calling the receiver's web service/

Any suggestion would be appreciated.

Jayson

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jayson

You need to use Keep attachment feature in soap adapter

ABAP proxy do send soap attachments. Check with Michal blog for understanding proxy attachments

Check these articles as well to understand SOAP attachment

Thanks

Gaurav

Former Member
0 Kudos

Gaurav,

that's exactly what I am looking for.

BTW, to access the attachment in the server proxy would be like:

DATA: lo_server_context TYPE REF TO if_ws_server_context,

lo_payload_protocol TYPE REF TO if_wsprotocol_payload.

lo_attachment_prtcl TYPE REF TO IF_WSPROTOCOL_ATTACHMENTS

lo_server_context = cl_proxy_access=>get_server_context( ).

lo_payload_protocol = lo_server_context->get_protocol( if_wsprotocol=>payload ).

lo_attachment_prtcl = lo_server_context->get_protocol( if_wsprotocol=>ATTACHMENTS ).

Thanks

jayson

Answers (1)

Answers (1)

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

Use SOAP attachment Blog provided by Gaurav.

For Troubleshooting SOAP Message - XI look this