Forum Discussion

banerjees's avatar
12 years ago

DispatchException : Failed to dispatch using script

Hi ,
When I'm executing my groovy script I'm getting below error.It a simple program . I could not find any answer in the previous posts however there are so many posts for the same reason/Can somebody help me out on this.The program is also same as provided in SOAP Site.

com.eviware.soapui.impl.wsdl.mock.DispatchException: Failed to dispatch using script; java.lang.NullPointerException: Cannot get property 'requestContent' on null object

def holder = new com.eviware.soapui.support.XmlHolder( mockRequest.requestContent )

// get arguments

def arg1 = holder["//User"]

def arg2 = holder["//Password"]

if( !com.eviware.soapui.support.StringUtils.hasContent( arg1 ) ||

!com.eviware.soapui.support.StringUtils.hasContent( arg2 ))

return "Response 1"


try

{

String.parseString( arg1 )

String.parseString( arg2 )

}

catch( e )

{

return "Response 1"

}

Thanks,
Banerjee S
No RepliesBe the first to reply