Forum Discussion

finsterwalder's avatar
finsterwalder
Occasional Contributor
17 years ago

[RESOLVED]NullPointerException when trying to create a new request

Hi!

I just tried to generate a new Request for one of my Web services.
Every time I try that, I get "Request creation failed" and the attached Exception is in the error log.
My WSDL defines an operation without parameters:






name="xyz"
element="tns:someElement" />










Any Ideas? Is this a bug? Is there a workaround?

Greetings,
    Malte


Thu Sep 24 12:08:24 CEST 2009:ERROR:java.lang.NullPointerException
   java.lang.NullPointerException
    at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlUtils.getInputParts(WsdlUtils.java:403)
    at com.eviware.soapui.impl.wsdl.support.soap.SoapMessageBuilder.buildDocumentRequest(SoapMessageBuilder.java:311)
    at com.eviware.soapui.impl.wsdl.support.soap.SoapMessageBuilder.buildSoapMessageFromInput(SoapMessageBuilder.java:204)
    at com.eviware.soapui.impl.wsdl.support.soap.SoapMessageBuilder.buildSoapMessageFromInput(SoapMessageBuilder.java:171)
    at com.eviware.soapui.impl.wsdl.WsdlOperation.createRequest(WsdlOperation.java:204)
    at com.eviware.soapui.impl.wsdl.actions.request.RecreateRequestAction.actionPerformed(RecreateRequestAction.java:59)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
    at java.awt.Component.processMouseEvent(Component.java:6216)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
    at java.awt.Component.processEvent(Component.java:5981)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4583)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4413)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2475)
    at java.awt.Component.dispatchEvent(Component.java:4413)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

10 Replies

  • Hi,

    hmm.. looks like a bug, but could be an "anomaly" in your WSDL.. can you attach it? Which soapUI version are you using?

    regards!

    /Ole
    eviware.com
  • Thanks,

    I've started a nightly build that hopefully handles this better.. please check it out in about 45 minutes!

    regards,

    /Ole
    eviware.com
  • Hi!

    ok.. this looks correct if the bindingoperation is document-literal (for rpc-literal you should at least get a root element named after the operation).

    regards!

    /Ole
    eviware.com
  • BenX's avatar
    BenX
    Contributor
    Hi!

    I have some problems with null pointer exception as well.

    If i create very simple test case with 2 methods, the second will not be sent untill i choose "Maintain HTTP session" in tese case options.
    The problem is that this has to be choosen on some computers and not on mine for example.
    What could be reason for this?

    soapUI log from mine computer:
    Fri Sep 25 09:51:45 CEST 2009:DEBUG:HttpConnectionManager.getConnection:  config = HostConfiguration[host=http://www.ecubicle.net], timeout = 0
    Fri Sep 25 09:51:45 CEST 2009:DEBUG:Getting free connection, hostConfig=HostConfiguration[host=http://www.ecubicle.net]
    Fri Sep 25 09:51:47 CEST 2009:DEBUG:Freeing connection, hostConfig=HostConfiguration[host=http://www.ecubicle.net]
    Fri Sep 25 09:51:47 CEST 2009:DEBUG:Notifying no-one, there are no waiting threads
    Fri Sep 25 09:51:47 CEST 2009:DEBUG:HttpConnectionManager.getConnection:  config = HostConfiguration[host=http://www.ecubicle.net], timeout = 0
    Fri Sep 25 09:51:47 CEST 2009:DEBUG:Getting free connection, hostConfig=HostConfiguration[host=http://www.ecubicle.net]
    Fri Sep 25 09:51:47 CEST 2009:DEBUG:Freeing connection, hostConfig=HostConfiguration[host=http://www.ecubicle.net]
    Fri Sep 25 09:51:47 CEST 2009:DEBUG:Notifying no-one, there are no waiting threads

    soapUi log from another computer:
    Fri Sep 25 09:44:31 CEST 2009:DEBUG:HttpConnectionManager.getConnection:  config = HostConfiguration[host=http://www.ecubicle.net], timeout = 0
    Fri Sep 25 09:44:31 CEST 2009:DEBUG:Getting free connection, hostConfig=HostConfiguration[host=http://www.ecubicle.net]
    Fri Sep 25 09:44:32 CEST 2009:DEBUG:Freeing connection, hostConfig=HostConfiguration[host=http://www.ecubicle.net]
    Fri Sep 25 09:44:32 CEST 2009:DEBUG:Notifying no-one, there are no waiting threads
    Fri Sep 25 09:44:32 CEST 2009:ERROR:Exception in request: java.lang.NullPointerException
    Fri Sep 25 09:44:32 CEST 2009:ERROR:An error occured [java.lang.NullPointerException], see error log for details

    error log from "amother" computer:
    Fri Sep 25 09:44:32 CEST 2009: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.getProperty(AbstractSubmitContext.java:69)
      at com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext.getProperty(WsdlTestRunContext.java:135)
      at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:93)
      at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:122)
      at com.eviware.soapui.impl.wsdl.WsdlSubmit.submitRequest(WsdlSubmit.java:75)
      at com.eviware.soapui.impl.wsdl.WsdlRequest.submit(WsdlRequest.java:222)
      at com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.run(WsdlTestRequestStep.java:323)
      at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runTestStep(WsdlTestCaseRunner.java:197)
      at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.internalRun(WsdlTestCaseRunner.java:128)
      at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.internalRun(WsdlTestCaseRunner.java:39)
      at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:137)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      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)


    wsdl for project can be found here: http://www.ecubicle.net/iptocountry.asmx?wsdl

    Thanks!
  • Hi,

    Reason is (probably) that the other computers are not running latest nightly build (this was a bug fixed after 3.0.1 release)..

    can you check?

    regards!

    /Ole
    eviware.com
  • BenX's avatar
    BenX
    Contributor
    I want my money back!

    hehe... not really...

    Thanks Ole!

    You were right again. It works with latest nightly build.

    Case closed.

    With best regards,
    Beno