Support Article
Generation of SOAP request XML fails with errors
SA-61612
Summary
Generation of SOAP request XML fails with errors if the Connect-SOAP call has a custom header. This occurs when passing Authorization as a custom header in Connect-SOAP rule.
Error Messages
com.pega.pegarules.pub.services.ConnectorException: Couldn't create OMElement from string value<CR>[0x9]at com.pegarules.generated.activity.ra_action_invokeaxis2_4054e98ba19df03aff55083d242bbf9d.step13_circum0(ra_action_invokeaxis2_4054e98ba19df03aff55083d242bbf9d.java:3630)<CR>[0x9]at com.pegarules.generated.activity.ra_action_invokeaxis2_4054e98ba19df03aff55083d242bbf9d.perform(ra_action_invokeaxis2_4054e98ba19df03aff55083d242bbf9d.java:274)<CR>[0x9]at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3527)<CR>[0x9]at com.pegarules.generated.activity.ra_action_invoke_8171c74e56fb26f2c41f9a69e39e4099.step8_circum0(ra_action_invoke_8171c74e56fb26f2c41f9a69e39e4099.java:1037)<CR>[0x9]at com.pegarules.generated.activity.ra_action_invoke_8171c74e56fb26f2c41f9a69e39e4099.perform(ra_action_invoke_8171c74e56fb26f2c41f9a69e39e4099.java:189)<CR>[0x9]at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3527)<CR>[0x9]at com.pegarules.generated.activity.ra_action_pxcallconnector_1c9eac5d7f1029d7d559dcda227edab8.step14_circum0(ra_action_pxcallconnector_1c9eac5d7f1029d7d559dcda227edab8.java:2306)<CR>[0x9]at com.pegarules.generated.activity.ra_action_pxcallconnector_1c9eac5d7f1029d7d559dcda227edab8.perform(ra_action_pxcallconnector_1c9eac5d7f1029d7d559dcda227edab8.java:328)<CR>[0x9]at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3527)<CR>[0x9]at com.pega.pegarules.exec.internal.declare.infengine.pages.DeclarativePageDirectoryImpl.runRule(DeclarativePageDirectoryImpl.java:1010)<CR>[0x9]at com.pega.pegarules.exec.internal.declare.infengine.pages.DeclarativePageDirectoryImpl.runLoadActivity(DeclarativePageDirectoryImpl.java:437)<"
Steps to Reproduce
- Create a Connect-SOAP rule form
- Add a custom header in the Connect-SOAP rule form with the value for custom header mapped as a clipboard property. For example: Add Authorization, Content-Type, SOAPAction in the request header:
- Authorization: Basic <Key Value>
- Content-Type: text/xml;charset=UTF-8
- SOAPAction: xxx.xx.xxx.xxxx.xx.xxx
Root Cause
An issue in the custom application code or rules. According to the SOAP specification, every header should be namespace qualified. The custom SOAP Header set in Connect-SOAP rule form was passed without namespace.
Resolution
Perform the following local-change:- Map the Custom Header set in Connect-SOAP rule form using XML Stream rule.
- Set Node namespace in XML Stream rule for the element to be mapped as SOAP Request Header in Connect-SOAP rule form
Published July 26, 2018 - 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.