Skip to Content
avatar image
Former Member

Help converting or reading SOAP XML-attachment instead of payload


I have to setup a webservice that excepts an xml-file as an attachment and read that xml-file as if it where the main payload of the message.

The messages we receive holds all the data I need in the attachment instead of the data being in the SOAP-body itself. This isnt something I can change since this is a solution provided by amadeus e-travel and I have no chance of changing how they send data to us.

I have searched and searched the forums but havent been able to find a solution(that I understand) to how I can access the xml-file either in a mapping-routine or by simply swapping the payload with the attachment all together.

As of now I have a webservice that is functional and receives the call from the source(amadeus e-travel) without a problem. I can also see the attachment in SXMB_MONI where it looks like a perfect xml-structure. But I have no idea on how to access the attachment so that I can use the data inside it in an abap-proxy in our ECC-system.

As far as I have read on the forums I cannot use the payloadswapbean in the SOAP senderadapter so that option is out. I have seen mention of a java-class for reading attachements in mapping-routines but sadly I'm not much of a Java-programmer and dont have access to one either at the moment. I would need a detailed explanation in order for a java-program to be a viable solution for me.

Is there some trick I have missed here or blog that shows how to read xml-attachments in a soap-message?

Is there any standard Java-code I can use to read the whole xml-structure from the attachment in a mapping-routine?

Any help would be very much appreciated!

Thanks in advance ,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Oct 31, 2009 at 04:52 AM


    This might be a crude way, but you can acheive by a 2 step process...

    Step1 (Scenario-1) - Receive XML-Msg + Attachment using SOAP Sender adapter. As we have payloadwaapbean module limitation in sender adapter. Let it be a passthru to receiver SOAP adapter. (Don't do any processing in integration engine, like msg mapping or thything). In Rx SOAP adapter,use payloadswapbean to swap XML msg with Payload and resent it to 2nd integration scenario...

    Step2(Scenario-2) - As you have the Attachment as main-payload, you can continue ur normal msg processing on it.


    SOAP messages can also be processed using AXIS-SOAP Adapter.. you can add XI module in it Check it if it might help you...


    Siva Maranani

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Siva,

      this sounds promising! I'll give this a try.

      Thanks a lot.

      PS! I forgot to mention that I'm working with PI 7.10 and ECC 603.


      I have now tried Option 1 as described by Siva and it worked flawlessly!

      Thanks a lot Siva 😊

      Edited by: Halvor Leirvåg on Nov 3, 2009 3:01 PM