Skip to Content

A multi-operation web service scenario

Dear,

We have a simple synchronous scenario: SOAP <-> SAP PI <-> ABAP proxy.

In the outbound and inbound service interfaces, we have multiple operations.

The exact same scenario, using a single operation, works very fine.

Now the question is: is there something wrong with my configuration or it this a little bug in our SAP PI 7.11 SP11?

ESR

Outbound service interface with multiple operations

  • All based on external definitions
  • interface pattern is stateless because we have multiple operations

Inbound service interface with multiple operations

  • all based on created data types/ message types
  • interface pattern is stateless because we have mulriple operations

Operation mappings and message mappings created accordingly.

Please note that I use a XSLT mapping to read the SOAP header too.

ID

Sender Agreement

  • linked to sender SOAP adapter with Do Not Use SOAP Envelope used.
  • SWCV of sender interface indicated

Receiver Determination

  • SWCV indicated
  • type of receiver determination is standard
  • operation-specific

Interface Determination

  • SWCV of sender interface indicated
  • Operation mappings indicated

Receiver Agreement

  • points to a receiver XI adapter for proxy communication with the back end system.

Error

Test message in soapUI:

Thanks a lot!

error.jpg (138.0 kB)
testmsg.jpg (29.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Jun 24, 2014 at 02:16 AM

    Hi Dimitri

    The issue is caused by the combination of "Do not use SOAP Envelope" and the sender service interface with multiple operations.

    Because of the "Do not use SOAP Envelope" setting, the main document payload will have <soapenv:Envelope> as the root.

    For multiple operations interface, during runtime, the determination is performed based on the root node. In order for multiple operations to work, all the operations must have different root nodes, i.e. <Operation1>, <Operation2>.

    However, for your case, the root node will always be the soap envelope instead of <Operation1>, <Operation2>. If you look at the logs, it says that it failed to look for an operation with the root node Envelope.

    For single operation, it does not check against the root node during Receiver Determination.

    One alternative approach that I could think of is to combine all the definitions for the different operation into a single operation, and then use XPath condition based routing to determine the receiver.

    Rgds

    Eng Swee

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 24, 2014 at 03:48 AM

    Hi Dimitri,

    Eng is right, there will only be one root when Do Not Use SOAP Envelope is checked. There are two ways to solve this in receiver determination:

    1. Do not select a software component or you can check not-operation specific (needs confirmation)

    2. Use xPath for your condition as what is suggested here http://scn.sap.com/thread/3479420

    In Interface determination this will get tricky, this time you have to use xPath to find the correct operation mapping. Since you are reading the header via XSLT, you might need an additional field in your intermediate mapping (via Operation Mapping) to place the values there e.g

    1st Mapping - Whole Soap Envelope to Message Type with the additional field

    2nd Mapping - Message Type with the additional field to the Message Type in target Service Interface.

    Hope this helps,

    Mark

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Dimitri,

      Technically if the service interface is XI 3.0 compatible, it will not care about the input message at all 😊 In your case, there would only be one operation and it is generic (just to generate wsdl). The SOAP Body can be replaced with different message types as per requirement and the XSLT mapping can still be used.

      Regards,

      Mark