I just fixed this on trunk. I'll get it merged down to 2.2.x and 2.1.x
branches shortly.
It's a bug in the processing of extensors on the wsdl:fault elements. It
assumes that there is a {http://www.w3.org/2006/05/addressing/wsdl}Action
extensor on it if there are any extensors there. In your case, your action
is in the older 2005/08 namespace and thus it doesn't work.
I DID put a guard there to prevent the NPE. However, that won't result in
the the Action annotations being generated as those are only done for the
2006/05 namespace.
Dan
On Tue June 30 2009 2:25:41 pm Nate Woody wrote:
> Hello,
>
>
>
> I'm getting a NPE while running WSDL2Java on a wsdl. (FYI, this is the
> Windows HPC 2008 services for remote submission of jobs to their
> clustering software, so it's a in-the-wild wsdl). This looks very much
> like the problem reported here:
> http://www.nabble.com/wsdl2java-NullPointer-tp19720254p19720254.html but
> I wasn't able to figure a solution based on the output of that thread.
> Related forum posts suggests it has to do with JAXB binding issues, but
> I'm none too sure.
>
>
>
> Background: I'm using CXF 2.2.2 with JDK 1.6.0_07 and I've verified I
> have no problem building stubs against other WSDLs (my cxf configuration
> is most likely not broken) and I was able to run the axis2 wsdl2java
> against the wsdl (it's likely the WSDL isn't horribly broken).
>
>
>
> The wsdl has two imports, one of which imports additional xsd's. I've
> linked the lot of them below:
>
> Wsdl:
> http://sites.google.com/site/cacviz/webdocs/bes-factory.wsdl?attredirect
> s=0
>
> Bundle with wsdl and all xsds:
> http://sites.google.com/site/cacviz/webdocs/wsdl_bundle.zip?attredirects
> =0
>
>
>
> I figure the zip is less annoying then 6 separate links. I'm not sure
> what direction to go in to resolve this and I'd really like to get this
> working from an CXF client. Can anyone out there give me a hand on what
> might be the problem?
>
>
>
> Thanks in advance,
>
> Nate
>
>
>
>
>
>
>
> Output:
>
> apache-cxf-2.2.2\bin\wsdl2java -verbose -client bes-factory.wsdl
>
> Loading FrontEnd jaxws ...
>
> Loading DataBinding jaxb ...
>
> wsdl2java -verbose -client bes-factory.wsdl
>
> wsdl2java - Apache CXF 2.2.2
>
>
>
>
>
> WSDLToJava Error: java.lang.NullPointerException
>
>
>
> org.apache.cxf.tools.common.ToolException:
> java.lang.NullPointerException
>
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCon
>
> tainer.java:260)
>
> at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.ja
>
> va: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.annotat
>
> or.WSActionAnnotator.annotate(WSActionAnnotator.java:97)
>
> at
> org.apache.cxf.tools.common.model.JavaMethod.annotate(JavaMethod.java
>
> :368)
>
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.Operati
>
> onProcessor.process(OperationProcessor.java:68)
>
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.PortTyp
>
> eProcessor.process(PortTypeProcessor.java:143)
>
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProces
>
> sor.wsdlDefinitionToJavaModel(WSDLToJavaProcessor.java:88)
>
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProces
>
> sor.process(WSDLToJavaProcessor.java:60)
>
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJav
>
> aContainer.java:218)
>
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCon
>
> tainer.java:127)
>
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCon
>
> tainer.java:252)
>
> ... 3 more
--
Daniel Kulp
[email protected]
http://www.dankulp.com/blog