cancel
Showing results for 
Search instead for 
Did you mean: 

Merging different messages of wsdl into one SOAP message

former_member190543
Participant
0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member190543
Participant
0 Kudos

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"?>

<ns0:Messages xmlns:ns0="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"?>

<soapenv:Envelope xmlns:soapenv="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.

markangelo_dihiansan
Active Contributor
0 Kudos

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