jwright
16 years agoOccasional Contributor
responseHolder.declareNamespace
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def responseHolder = groovyUtils.getXmlHolder( "getContract#response" )
//This code works
log.info("first: " + responseHolder.getNodeValue("//p359:ContractIdNotFoundException/errorMessage"));
log.info("first: " + responseHolder.getNodeValue("//soapenv:Fault/faultstring"));
//This code does not work
responseHolder.declareNamespace( 'ns1', 'http://types.contract.svc.lhs.principal.com/ContractService_1_2/');
log.info(responseHolder.getNodeValue("//ns1:faultstring"));
I am trying to declare a namespace and the access the nodes. This seems to not be working. I have managed to access them by the full path as you can see above. Below is the sml response that i am getting.
p359:>ContractIdNotFoundException
com.principal.lhs.svc.contract.types.ContractIdNotFoundException
Contract Id Not Found
Any help on why my code may not be working would be helpful. Thanks!!
def responseHolder = groovyUtils.getXmlHolder( "getContract#response" )
//This code works
log.info("first: " + responseHolder.getNodeValue("//p359:ContractIdNotFoundException/errorMessage"));
log.info("first: " + responseHolder.getNodeValue("//soapenv:Fault/faultstring"));
//This code does not work
responseHolder.declareNamespace( 'ns1', 'http://types.contract.svc.lhs.principal.com/ContractService_1_2/');
log.info(responseHolder.getNodeValue("//ns1:faultstring"));
I am trying to declare a namespace and the access the nodes. This seems to not be working. I have managed to access them by the full path as you can see above. Below is the sml response that i am getting.
Any help on why my code may not be working would be helpful. Thanks!!