Forum Discussion

pleuraXeraphim's avatar
pleuraXeraphim
Occasional Contributor
15 years ago

Difference in getting Respinse from AMF Request vs HTTP ?

Hi

I am using the following to get back the XML returned from an AMF Request.

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( "GetAllUserTypes#Response" )

log.info holder.xml;

However I am getting a Null pointer exception.

However If I run the same code on another Test Step which is a HTTP step. It works fine.
Is there a difference in accessing the Responses for an AMF call ?


The format of the AMF response looks like as follows:


 
   
     
     
       
          0.75
          12
       

        16
        4
        typeName
        Default
        id
        1.0
        isDefault
        true
        description
        Default
     

     
       
          false
          falseetc etc ....
  • Hi!

    are you using the latest version / build? Can you show the stacktrace in the errorlog tab?

    regards!

    /Ole
    eviware.com
  • pleuraXeraphim's avatar
    pleuraXeraphim
    Occasional Contributor
    Hi

    Thanks for the reply. I will update the to latest version now but here is the error log

    Thanks Dave


    Fri Apr 16 11:11:00 BST 2010:ERROR:java.lang.NullPointerException
      java.lang.NullPointerException
      at com.eviware.soapui.support.XmlHolder.(XmlHolder.java:52)
      at com.eviware.soapui.support.GroovyUtils.getXmlHolder(GroovyUtils.java:54)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
      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:125)
      at Script28.run(Script28.groovy:2)
      at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:93)
      at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:148)
      at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:274)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  • Hi

    oh sorry, I should have seen this the first time.. use the "ResponseAsXml" property instead of "Response" (and the latest release)..

    does that help?

    regards!

    /Ole
    eviware.com