Skip to Content

Merging different messages of wsdl into one SOAP message

Hi,

I am calling a third party SOAP webservice and when I import the wsdl, I get 5 different messages to select.

The first message is for the body with different fields. The rest of the 4 messages account to different fields in the header.

As we can only have 1 message in the message mapping, how can I use all the messages in order to provide a single SOAP structure they want? i.e., a SOAP message with Header and Body?

Many thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Sep 12, 2011 at 11:43 AM

    Experts,

    I found it out myself that adding messages in the "Messages" tab of message mapping gives me all the fields required .e., both the header and body fields.

    But my new problem is after mapping, I get the message as:

    <?xml version="1.0" encoding="UTF-8"?>

    http://sap.com/xi/XI/account_check">

    message 2

    message 3

    message 4

    message 5

    message 1

    Which is ok to some extent. But I need to mention which fields are header and which fields are body. So the output should be something like this:

    <?xml version="1.0" encoding="UTF-8"?>

    http://test.xmlsoap.org/soap/envelope/">

    <soapenv:Header>

    message 2

    message 3

    message 4

    message 5

    </soapenv:Header>

    <soapenv:Body>

    message 5

    </soapenv:Body>

    </soapenv:Envelope>

    Is it possible to do anything from our side or is it purely on the webservices people to provide that in the wsdl?

    Many thanks.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hello Ramesh,

      By default, you can only have the messages for SOAP Body in SAP XI/PI. When there are fields that are needed in the header, you need to:

      1. Build your soap envelope using java/xslt mapping

      2. Use the Do Not Use SOAP Envelope option in your SOAP receiver comm channel

      Just to make sure you are building the correct SOAP request, load your wsdl into a third-party program such as SOAP UI.

      Hope this helps,

      Mark

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.