Support Article
Pega wraps additional tabs in Connect-SOAP 'MIME' response type
SA-12701
Summary
An external web service is to be called using Connect-SOAP. The Connect-SOAP rule is configured with request and response mapping tabs.
The response tab is configured with a Parse-XML rule to parse the response of the call.
It is observed that in case the response has the MIME type set to 'application/xml' then PRPC is wrapping the response again with one more envelope and the respective body tags, eventually makes the Parse-XML rule does not work.
Error Messages
Below is the response captured in one of the activity steps during tracing. There are two SOAP envelopes here where the outer one is being added by PRPC code.
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="https://zato.io/ns/20130518">
<soap:Body>
<cancelOrderResponse xmlns="http://www.blabla.org.uk/ala_1.0.xsd">
....
</cancelOrderResponse>
</soap:Body>
</soap:Envelope>
</soapenv:Body>
</soapenv:Envelope>
Steps to Reproduce
Call a web service that returns a response with MIME type set to 'application/xml'.
Root Cause
Incorrect Mime Type used.
Resolution
The SOAP response must not contain a mime type of application/xml.
Check the specification of the SOAP 1.1 protocol that you are using in your SOAP connector rule:
http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383526
Here is an extract of the relevant information:
HTTP applications MUST use the media type "text/xml" according to RFC 2376 [3] when including SOAP entity bodies in HTTP messages.
So the issue lies in the SOAP service must be corrected to send the proper mime type.
Published July 31, 2015 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.