I think I'll need to see the wsdl.   Looking at the code, I cannot see how a 
NPE could occur there.   The line in question is:
if (names.containsKey(element.getElementName())

names is defined as:
Map<QName, QName> names = new HashMap<QName, QName>();
just a few lines earlier.  Thus, it cannot be null.

element is from a List<WrapperElement>, but I checked the method that 
generates that List and all the adds are of the form:
list.add(new WrapperElement(.....));  
(creating it as part of the add line)
thus, there isn't a way for add(null) to be called.  :-(

Anyway, I'd like to see the wsdl.   
Dan


On Monday 29 September 2008 4:47:27 am _Eric_ wrote:
> When I run the wsdl2java tool I get an NullPointerexception.
>
> E:\Eric\_Projects\TK\wsdl2java>C:\temp\apache-cxf-2.1.2\bin\wsdl2java
> -verbose QesService.wsdl
> Loading FrontEnd jaxws ...
> Loading DataBinding jaxb ...
> wsdl2java -verbose QesService.wsdl
> wsdl2java - Apache CXF 2.1.2
>
>
> 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.validator.WrapperStyleNameCollis
>ionValidator.isValidOperation(WrapperStyleNameCollisionValidator.java:120)
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.validator.WrapperStyleNameCollis
>ionValidator.checkNameColllision(WrapperStyleNameCollisionValidator.java:58)
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.validator.WrapperStyleNameCollis
>ionValidator.isValid(WrapperStyleNameCollisionValidator.java:51) at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.validate(WSDLToJavaContaine
>r.java:547) at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer
>.java:193) at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer
>.java:232) ... 3 more
>
>
> Google brought me some posting that sugest it is a mixture of problem in
> CXF and in the wsdl. How can I find a workaround for the problem?
>
> Grettings
> Eric



-- 
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to