Skip to Content
avatar image
Former Member

SOAP (Axis) message is being wrapped with an additional envelope/header/body


We send a synchronous SOAP message to a third party that we are trying to change because the third party are migrating their web service from one server to another, and also from SOAP 1.1 to SOAP 1.2.

To this end, we have amended our SOAP Receiver Adapter to use Transport Protocol of "HTTP (Axis)" to allow us to use SOAP 1.2 (Originally, it was using the standard SOAP HTTP - SOAP 1.1 settings in PI).

However, on testing, the third party has noticed that we are sending two envelopes/body/header elements. This is what they are seeing (notice "soapenv" and "env" elements)...

<?xml version="1.0"?>
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
  <s:Header xmlns:s="http://www.w3.org/2003/05/soap-envelope"/>
  <soapenv:Body>
    <env:Envelope xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/03/addressing">
      <env:Header>
        ...
      </env:Header>
      <env:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Id-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"/>
    </env:Envelope>
  </soapenv:Body>
</soapenv:Envelope>

Within SXMB_MONI in our PI system we see this in the Payload MainDocument leaving PI (notice just the "env" elements)...

<?xml version="1.0"?>
<env:Envelope xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:a="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
  <env:Header>
    ...
  </env:Header>
  <env:Body wsu:Id="Id-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
</env:Envelope>

This has been created by Java Mapping and is what is currently used with the current webservice (using standard SOAP Adapter with HTTP SOAP 1.1).

So, somehow, the XML we believe is leaving PI is being wrapped up in an additional Envelope, Header and Body? (i.e. the "soapenv" elements seem to be added to our "env" elements).

The settings of our Communication Channel (Parameters tab) are as follows:

  • Adapter Type: SOAP
  • Sender/Receiver: Receiver
  • Transport Protocol: HTTP (Axis)
  • Message Protocol: Axis
  • Adapter Engine: Central Adapter Engine
  • Connection Parameters URL: https address of third party webservice
  • Authentication: None
  • Outbound Parameters
  • SOAP Version: 1.2
  • SOAP Action: action required for third party webservice
  • Encapsulation Format: MIME
  • XI Parameters
  • Keep XI Headers: unchecked
  • Keep Attachments: ticked
  • Payload Extraction: SOAP Body Child

The Identifiers and Module tabs of the Communication Channel are as default - so no changes made here.

We tried changing the XI Parameters settings to see if that makes a difference and what we have found is that if we set Payload Extraction to "SOAP Envelope" then the third party does only see one Envelope, Header and Body, as shown here:

<?xml version="1.0"?>
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
  <soapenv:Header>
    ...
  </soapenv:Header>
  <soapenv:Body/>
</soapenv:Envelope>

At first, we thought that this had fixed the issue, but on double checking the Envelope tag, we notice that this seems to be the envelope that is somehow added after the message leaves SXMB_MONI (i.e. its the "soapenv" elements but we want the "env" elements).

Has anyone else seen this and know how to resolve please?

Many Thanks,

Gareth

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 08 at 10:54 AM

    Hi Gareth,

    based on your description you need to apply SAP Note 2616936 - Axis adapter returns the complete SOAP envelope instead of SOAP Body Child element.


    Best regards,
    Mate

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you for your response Mate.

      I checked SAP Note 2616936 and it says that the behaviour is a side effect from SAP Note 2590102. However, I don't believe we have SAP Note 2590102 applied since it refers to 7.31 SP017 thru SP023, and we have 7.31 SP014.

      So if we haven't had SAP Note 2590102 applied to our system, would SAP Note 2616936 fix the issue we are experiencing?

      Many Thanks,
      Gareth