12 years ago
getnodevalue returning error
hi
My soap response is :
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header ver:CPIIDA-BUILD="build-56919" ver:CPIIDA-BUILD-TIME="2014-03-26_17-08-57" ver:CPIISRV-BUILD="build-56919" ver:CPIISRV-BUILD-TIME="2014-03-26_17-10-05" ver:CPIIWSRV-BUILD="build-56919" ver:CPIIWSRV-BUILD-TIME="2014-03-26_17-11-48" xmlns:ver="http://nationalpayment.net/ws/schemas/header/version"/>
<SOAP-ENV:Body>
<ns3:CreateClientResponse xmlns:ns3="http://nationalpayment.net/ws/schemas/messages" xmlns:ns2="http://nationalpayment.net/ws/schemas/types" xmlns:ns4="http://ws.enrollment.nationalpayment.net/enrollment/" xmlns:ns5="http://ws.npn.com/auto/" xmlns:ns6="http://ws.npn.com/mortgage/">
<ns3:clientId>4320</ns3:clientId>
<ns3:enrollmentId>363666</ns3:enrollmentId>
<ns3:commandStatus>1</ns3:commandStatus>
<ns3:errorMessage xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</ns3:CreateClientResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I need to pick clientId value i.e 4320 and then enrollmentId and so on for each parameter.
I am using this code:-
here holder contains above response code
def ActualResponseValue=holder.getNodeValue("//ns3:CreateClientResponse/ns3:clientId");
log.info"Actual Response value:"+ActualResponseValue;
However I am getting error:groovy.lang.MissingMethodException: No signature of method: java.lang.String.getNodeValue() is applicable for argument types: (java.lang.String) values: [//ns3:CreateClientResponse/ns3:clientId]
My soap response is :
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header ver:CPIIDA-BUILD="build-56919" ver:CPIIDA-BUILD-TIME="2014-03-26_17-08-57" ver:CPIISRV-BUILD="build-56919" ver:CPIISRV-BUILD-TIME="2014-03-26_17-10-05" ver:CPIIWSRV-BUILD="build-56919" ver:CPIIWSRV-BUILD-TIME="2014-03-26_17-11-48" xmlns:ver="http://nationalpayment.net/ws/schemas/header/version"/>
<SOAP-ENV:Body>
<ns3:CreateClientResponse xmlns:ns3="http://nationalpayment.net/ws/schemas/messages" xmlns:ns2="http://nationalpayment.net/ws/schemas/types" xmlns:ns4="http://ws.enrollment.nationalpayment.net/enrollment/" xmlns:ns5="http://ws.npn.com/auto/" xmlns:ns6="http://ws.npn.com/mortgage/">
<ns3:clientId>4320</ns3:clientId>
<ns3:enrollmentId>363666</ns3:enrollmentId>
<ns3:commandStatus>1</ns3:commandStatus>
<ns3:errorMessage xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</ns3:CreateClientResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I need to pick clientId value i.e 4320 and then enrollmentId and so on for each parameter.
I am using this code:-
here holder contains above response code
def ActualResponseValue=holder.getNodeValue("//ns3:CreateClientResponse/ns3:clientId");
log.info"Actual Response value:"+ActualResponseValue;
However I am getting error:groovy.lang.MissingMethodException: No signature of method: java.lang.String.getNodeValue() is applicable for argument types: (java.lang.String) values: [//ns3:CreateClientResponse/ns3:clientId]