Skip to Content
avatar image
Former Member

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


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.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 25, 2008 at 09:57 PM

    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

    How-to create a web service with attachments (SOAP With Attachments)

    Basic Testing of SOAP with attachments approach via Standalone Proxy



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member


      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_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 ).



  • Nov 26, 2008 at 04:06 AM


    Use SOAP attachment Blog provided by Gaurav.

    For Troubleshooting SOAP Message - XI look this

    Troubleshooting SOAP Message - XI

    Add comment
    10|10000 characters needed characters exceeded