Following exception is received when I tried to parse response within a soapUI test step.Also tried getXMLHolder method. Still no luck.
Am I missing an import or library?
groovy.lang.MissingMethodException: No signature of method: java.lang.String.getNodeValue() is applicable for argument types: (java.lang.String) values: [//ConversionRateResponse/ConversionRateResult] error at line: 16
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context);
project = testRunner.getTestCase().getTestSuite().getProject().getWorkspace().getProjectByName("FirstProject")
testSuite = project.getTestSuiteByName("TestSuite 1");
testCase = testSuite.getTestCaseByName("TestCase 1");
testCase.setPropertyValue("fromCurrency","EUR")
testCase.setPropertyValue("toCurrency","TRL")
testStep=testCase.testSteps["SOAP Request1"]
def responseHolder=testStep.getPropertyValue("response");
def refNum = responseHolder.getNodeValue("//ConversionRateResponse/ConversionRateResult")
And the response is as follows
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<ConversionRateResponse xmlns="http://www.webserviceX.NET/">
<ConversionRateResult>-1</ConversionRateResult>
</ConversionRateResponse>
</soap:Body>
</soap:Envelope>