Forum Discussion

foremans's avatar
foremans
New Contributor
16 years ago

Send two SOAP request in a groovy step, second one doesn't work

Hi
  I use SOAP ui and I have the following situation
  I have one groovy test step,and I have write some code to invoke some SOAP request from other test suite\test case
  the code is simple:

  def step = testRunner.testCase.testSuite.project.testSuites["Common"].testCases["testcase"].testSteps["soapstep"]
  step.run(testRunner,context) // run the test step

  and i will run it again in the same groovy step, so one step send two request (or even more)

the problem is that the second request didn't work, always get nullpointerexception as following
so, before I call teststep.run, is there anything I need to do to remove this error, like reset or something? thanks!

  Tue Feb 09 19:09:12 CST 2010:ERROR:java.lang.NullPointerException
  java.lang.NullPointerException
  at com.eviware.soapui.impl.wsdl.WsdlProjectPro.getXmlTemplatesList(SourceFile:692)
  at com.eviware.soapui.impl.wsdl.WsdlProjectPro.getXmlTemplates(SourceFile:681)
  at com.eviware.soapui.model.propertyexpansion.resolvers.ReportTemplateExpansionResolver.resolveProperty(SourceFile:23)
  at com.eviware.soapui.model.propertyexpansion.PropertyExpander.expand(PropertyExpander.java:151)
  at com.eviware.soapui.model.propertyexpansion.PropertyExpander.expandProperties(PropertyExpander.java:92)
  at com.eviware.soapui.model.propertyexpansion.DefaultPropertyExpansionContext.expand(DefaultPropertyExpansionContext.java:30)
  at com.eviware.soapui.model.propertyexpansion.DefaultPropertyExpansionContext.get(DefaultPropertyExpansionContext.java:58)
  at com.eviware.soapui.model.support.AbstractSubmitContext.get(AbstractSubmitContext.java:185)
  at com.eviware.soapui.impl.wsdl.panels.support.MockTestRunContext.get(MockTestRunContext.java:88)
  at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1082)
  at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1051)
  at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:880)
  at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:44)
  at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:121)

1 Reply

  • foremans's avatar
    foremans
    New Contributor
    I have resolved this but please let me know if there is better way to do this
    use testRunner.runTestStep instead of teststep.run