cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SOAP request syntax in content modifier

Former Member
0 Likes
1,932

I'm getting this error while making a simple soap call in request-reply step. request is captured using Content modifier.

java.lang.IllegalArgumentException: The PayLoad elements cannot fit with the message parts of the BindingOperation. Please check the BindingOperation and PayLoadMessage. Please let me know the syntax of the request in the content modifier step? see attached/below screenshots.

Accepted Solutions (1)

Accepted Solutions (1)

former_member666312
Active Participant

Hi,

seems the Namespaces are missing that's why it is failing. Please check the below payload which is working with the timer.

<web:NumberToDollars xmlns:web="http://www.dataaccess.com/webservicesserver/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<web:dNum>10</web:dNum>
</web:NumberToDollars>
Former Member
0 Likes

Tried with Namespace, didn't work. The following below are the different options that I tried. Getting same error.

1.**************************************************

<web:NumberToDollars>
<web:dNum>1000000</web:dNum>
</web:NumberToDollars>

2.**************************************************

<web:dNum>1000000</web:dNum>

3.**************************************************

1000000

4.**************************************************

<web:NumberToDollars xmlns:web="http://www.dataaccess.com/webservicesserver/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<web:dNum>1000000</web:dNum>
</web:NumberToDollars>

5. Changed the Type to Constant vs Expression within the modifier. Per say, tried 8-9 combinations with the above.

Former Member
0 Likes

Thanks, it worked with your content. There was a type mistake in my earlier code. This piece ":web" was missing in my namespace which killed me around 2 days in troubleshooting :(. Searched everywhere(google, forums and etc) for help.

xmlns="http://www.dataaccess.com/webservicesserver/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:web="http://www.dataaccess.com/webservicesserver/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

Answers (1)

Answers (1)

Sriprasadsbhat
Active Contributor
0 Likes

Hello Craig,

Best way is to make simple one to one mapping before request reply ( use message mapping ) to get rid of this error.

Step 1:

Add Content modifier with body

<Root>
	<NumberToDollars>100000</NumberToDollars>
</Root>

Step 2:

Create schema for your input XML( you can leverage Freeformatter or any other tool as its simple XML ) and import it to SAP CPI.

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Root">
    <xs:complexType>
      <xs:sequence>
        <xs:element type="xs:int" name="NumberToDollars" maxOccurs="unbounded" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

Step 3:

Add Message Mapping from pallet.Use above schema for input and use your wsdl for target.

Step 4:

Then add Request Reply to get the response from your web service.

Regards,

Sriprasad Shivaram Bhat

Former Member
0 Likes

Thank you for your significant effort and response. I like the design approach but somehow it didn't work,