Forum Discussion

robjahn's avatar
robjahn
Contributor
15 years ago

issue with NS http://www.soapui.org/sample/ ??

I have found that some of tests in the "sample projects" are failing when the datasource is needing to to get to NS http://www.soapui.org/sample/

i.e.
declare namespace sam='http://www.soapui.org/sample/';
//sam:searchResponse[1]/item

This results in a java.lang.NullPointerException withing the groovyscript test step "ShowInfoMessage" for it refers to the sam NS.

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder ("Test Request: buy#Response")

//log.info ("Value: " + holder.getPropertyValue ("Items") )
com.eviware.soapui.support.UISupport.showInfoMessage (
"Item: -" + holder.getNodeValue("//sam:buyResponse/purchasestatus/id") + "-" +
" In Stock: -" + holder.getNodeValue("//sam:buyResponse/purchasestatus/stockStatus") +"-" +
" Expected Delivery: -" + holder.getNodeValue("//sam:buyResponse/purchasestatus/expectedDelivery")+ "-"
No RepliesBe the first to reply