getXmlHolder is generating a nullPointerException
Hi Smartbears,
The following code is not working in Ready API v3.9.1. The issue is with the groovyUtils.getXmlHolder statement, it is throwing an error.
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = context.expand( '${SOAPRequest#Response}' )
def requestHolder = groovyUtils.getXmlHolder( holder )
The context.expand is retrieving the request's response (first few lines below):
holder= <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<wsse:Security soap:mustUnderstand="true" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<ds:Signature Id="SIG-8e536e7f-6d9c-406b-b84e-6f90e5d1db1f" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
Error displayed:
java.lang.NullPointerException: Cannot invoke "java.util.Set.iterator()" because the return value of "java.util.Map.entrySet()" is null See Error Log for details.
From the Error Log:
Wed Jan 26 12:00:31 EST 2022: ERROR: An error occurred in the script of the Groovy Script test step [Groovy Script - Value Retrieval]:
Wed Jan 26 12:00:31 EST 2022: ERROR: java.lang.NullPointerException: Cannot invoke "java.util.Set.iterator()" because the return value of "java.util.Map.entrySet()" is null
java.lang.NullPointerException: Cannot invoke "java.util.Set.iterator()" because the return value of "java.util.Map.entrySet()" is null
This is a silly question, but could this error be related to my response having an WS-Security error? If it is related to the WS-Security error, is there anyway to get around this? I am working in our test environment.
WS-Security error:
- org.apache.ws.security.WSSecurityException: The signature or decryption was invalid
Thank you,
Angie