Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

SOAP service works with SOAP 1.1 but not 1.2

SA-31299

Summary



Implemented SOAP service with enabled MTOM (Message Transmission Optimization Mechanism).

Uploaded service WSDL in SOAP UI and see the two operations in SOAP UI, one is for SOAP 1.1 version and another is for 1.2 version. In SOAP 1.1 the service is working fine, but its not working fine in version SOAP 1.2.


Error Messages



<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:soapenc="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<soap:Code>
<soap:Value>soap:Receiver</soap:Value>
</soap:Code>
<soap:Reason>
<soap:Text xml:lang="en-US">Failed to retrieve Rule-Service-SOAP instance <servicename>.<operationname>.<request name></soap:Text>
</soap:Reason>
</soap:Fault>
</soap:Body>
</soap:Envelope>


Steps to Reproduce



1) Create Soap Service and enable MTOM.
2) Upload the SOAP WSDL in SOAP UI.
3) Test with SOAP Binding Version 1.1 with attachments and it works fine.
4) Test with SOAP Binding Version 1.2 with attachments and it does not work.


Root Cause



'action' parameter is missing in 'Content-type' header causing service lookup failure. 
Below are the request samples from working & non-working use cases 

Working case (without attachment): 
POST https://host:port/prweb/PRSOAPServlet/SOAP/SampleApp/Services?WSDL HTTP/1.1 
Accept-Encoding: gzip,deflate 
Content-Type: application/soap+xml;charset=UTF-8;action="urn:PegaRULES:SOAP:SampleApp:Services#methodname" 
Content-Length: 403 
Host: lsingr9win:9191 
Connection: Keep-Alive 
User-Agent: Apache-HttpClient/4.1.1 (java 1.5) 
Cookie: JSESSIONID=A0FC510A066102453D5AC0E961144C2F 
Cookie2: $Version=1 
Authorization: Basic YWRtaW5AZ2NzYXU6cnVsZXM= 

Non-working case (with attachment): 
POST https://host:port/prweb/PRSOAPServlet/SOAP/IntSampleLoanApp/Services?WSDL HTTP/1.1 
Accept-Encoding: gzip,deflate 
Content-Type: multipart/related; type="application/soap+xml"; start="<[email protected]>"; boundary="----=_Part_31_1980001109.1481177257119" 
MIME-Version: 1.0 
Content-Length: 841 
Host: lsingr9win:9191 
Connection: Keep-Alive 
User-Agent: Apache-HttpClient/4.1.1 (java 1.5) 

As 'action' parameter is missing, service lookup is failing. 

Resolution



This is bug in SOAP 1.2 feature.

If required to work on SOAP 1.2 with MTOM, one must add "action" attribute in request header by taking the value from wsdl operation's soapAction attribute and that can be done at client side (who is consuming the web service) through customizing the code.
 

Published January 2, 2017 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us