cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Blue Cat <javasubscri...@gmail.com>
Subject NullPointerException while using wsdl2java with asynchronous binding
Date Fri, 06 Mar 2009 00:04:26 GMT
Hi,

I followed the instructions on:

http://cwiki.apache.org/CXF20DOC/developing-a-consumer.html

to generate asynchronous client stub code. I took the wsdl example on the
page, make this change:

<wsdl:operation name="greetMeSometime">
           <soap:operation style="document"/>
           <wsdl:input>
               <soap:body use="literal"/>
           </wsdl:input>
           <wsdl:output>
               <soap:body use="literal"/>
               <soap:header message="tns:HEADER"
                    part="header" use="literal"/>
           </wsdl:output>
       </wsdl:operation>

I defined the "HEADER" wsdl message in this file and it is correct.

Then I run this:

wsdl2java -ant -client -d ClientDir -b async_binding.xml hello_world.wsdl

and got null pointer exception error:

WSDLToJava Error: java.lang.NullPointerException

org.apache.cxf.tools.common.ToolException: java.lang.NullPointerException
        at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:240)
        at
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:83)
        at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:103)
        at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:173)
Caused by: java.lang.NullPointerException
        at
org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ServiceProcessor.processParameter(ServiceProcessor.java:457)
        at
org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ServiceProcessor.processOperation(ServiceProcessor.java:401)
        at
org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ServiceProcessor.processPort(ServiceProcessor.java:280)
        at
org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ServiceProcessor.processService(ServiceProcessor.java:201)
        at
org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ServiceProcessor.process(ServiceProcessor.java:100)
        at
org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.wsdlDefinitionToJavaModel(WSDLToJavaProcessor.java:91)
        at
org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.process(WSDLToJavaProcessor.java:60)
        at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:197)
        at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:232)
        ... 3 more


Looks like wsdl2java cannot generate asynchronous client when there is a
soap:header defined in output.

Thanks,

Bluecat

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message