Creating VS with WS Security SOAP envelope causing security processing failed error

Document ID : KB000095128
Last Modified Date : 08/05/2018
Show Technical Document Details
Issue:
While creating a VS simulator where the RR pairs are contained in a SOAP envelope with ws security headers , we are encountering the following error:  We have the .jks files verified for send - receive signature verification, the passwords all work out fine. 

<html><body><b><u>Fault</u></b><br>faultcode: soapenv:Server.generalException<br>faultstring: WSDoAllReceiver: security processing failed; nested exception is: &#10;&#9;org.apache.ws.security.WSSecurityException: The signature or decryption was invalid<br>detail_hostname: ABC01<br>detail_Envelope_Header_Security_Signature_SignedInfo_CanonicalizationMethod: &lt;null&gt;br>detail_Envelope_Header_Security_Signature_SignedInfo_SignatureMethod: &lt;null&gt;<br>detail_Envelope_Header_Security_Signature_SignedInfo_Reference_Transforms_Transform: &lt;null&gt;<br>detail_Envelope_Header_Security_Signature_SignedInfo_Reference_DigestMethod: &lt;null&gt;<br>detail_Envelope_Header_Security_Signature_SignedInfo_Reference_DigestValue: VhmBbc/Yq6BW0h/L5nzhjXd2rSw=<br>detail_Envelope_Header_Security_Signature_SignatureValue: N1d9U7nfJaD2NhfZwjvs1i4poJKPhWjT/Xn1CB6LeOPM/SZWg9Bnvw==<br>detail_Envelope_Header_Security_Signature_KeyInfo_SecurityTokenReference_X509Data_X509IssuerSerial_X509IssuerName: CN=Test User,OU=Development,O=iTKO,L=Dallas,ST=TX,C=US<br>detail_Envelope_Header_Security_Signature_KeyInfo_SecurityTokenReference_X509Data_X509IssuerSerial_X509SerialNumber: 980394201<br>detail_Envelope_Header_Security_Timestamp_Created: 2018-04-19T21:03:02.046Z<br>detail_Envelope_Header_Security_Timestamp_Expires: 2018-04-19T21:08:02.046Z<br>detail_Envelope_Body_add_i1: 2<br>detail_Envelope_Body_add_i2: 3</body></html>
Environment:
All supported DevTest environments
Cause:
Pretty printing the soap message in DevTest is invalidating the signature when the request is sent.  The XML  request/response pair should be in it’s original form
Resolution:
For SOAP based VS (with WS-Security headers that need to be processed) that is created using RR pairs, the SOAP messages must be in their original condition (no formatting changes) for signatures to be valid.

To send Soap request with un-formatted Xml , Add the property `lisa.ws.call.xml.format=false`  to project.config.  This will get DevTest to not format the XML.