Support Article
PRPC62SP2ML1[Int]Soap Connector Request header mappings
SA-3717
Summary
Platform: vPRPC62SP2ML1.
In a Connect SOAP rule, the Request tab has been configured with Request Header options using XML Stream option.
The XML Stream MapFrom rule has the following content:
<wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing"><pega:reference name=".RequestABFHeader.MessageId" mode="normal"/></wsa:MessageID> <pega:when java="<%= tools.getStepPage().getIfPresent(".RequestABFHeader.ReplyTo.Address") != null %>"> <pega:withEmbedded name=".RequestABFHeader.ReplyTo"><wsa:ReplyTo xmlns:wsa="http://www.w3.org/2005/08/addressing"> <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing"><pega:reference name=".Address" mode="normal"/></wsa:Address> </wsa:ReplyTo></pega:withEmbedded> </pega:when> <pega:when java="<%= tools.getStepPage().getIfPresent(".RequestABFHeader.To") != null %>"><wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing"><pega:reference name=".RequestABFHeader.To" mode="normal"/></wsa:To></pega:when>
When the SOAP Connector runs, the following SOAP envelop is being created:
<soapenv:Header>
.......
</wsse:UsernameToken>
</wsse:Security>
<wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">xxxxxxxx-xxxx-xxx-xxxx-xxxxxxx</wsa:MessageID>
</soapenv:Header>
<soapenv:Body>
.......................
</soapenv:Body>
</soapenv:Envelope>
The issue is that not all tags defined in the custom XML stream rule are streamed correctly. The expectation is the SOAP Header should contain all the defined elements defined XML Stream rules. However, PRPC only taking the very first element in the MapFrom rule.
Error Messages
No error message, just unexpected behaviour
Steps to Reproduce
Include the following in a MAPFrom:
<wsa:note xmlns:wsa="http://www.w3.org/2005/08/addressing"><to>simon</to><from>sammi</from><body>How are you</body>
</wsa:note>
<wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing"><town>a town</town><street>street a</street></wsa:Address>
<wsa:occupation xmlns:wsa="http://www.w3.org/2005/08/addressing"><employeer>pegasystems</employeer><jobtitle>software engineer</jobtitle></wsa:occupation>
The generated SOAP Envelop is as following:
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header><wsa:note xmlns:wsa="http://www.w3.org/2005/08/addressing"><to>simon</to><from>sammi</from><body>How are you</body></wsa:note></soapenv:Header><soapenv:Body><ns1:GetCitiesByCountry xmlns:ns1="http://www.webserviceX.NET"> <ns1:CountryName>Canada</ns1:CountryName> </ns1:GetCitiesByCountry></soapenv:Body></soapenv:Envelope>
Please note that soapenv:Header only takes the very first element in the MAPFrom rule.
Root Cause
Connect SOAP in PRPC has been designed to retrieve one single root node per XML stream. To overcome the issue, it is required to have one Request Header field and XML Stream rule per node.
Resolution
The explanation for this behavior is as follows: Connect SOAP in PRPC has been designed to retrieve one single root node per XML stream. To overcome the issue, it is required to have one Request Header field and XML Stream rule per node
Published January 31, 2016 - 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.