1) Any chance you can try with 2.1.3 (released yesterday)?

2) If not, can you send the wsdl/schemas?   We can then run it in the debugger 
to figure out what is going on.

Dan


On Tuesday 21 October 2008 10:35:27 am _Eric_ wrote:
> good hint, but does'nt help anything :-(
>
> Andrew Clegg wrote:
> > My first thought is, how can you have a 'choice' between two elements
> > with the same name and type?
> >
> > Does it still cause the error if you change the name and/or type of one
> > of them?
> >
> > Andrew.
> >
> > 2008/10/21 _Eric_ <[EMAIL PROTECTED]>:
> >> Sorry for answering so late, other important things could'nt wait in the
> >> cue.
> >>
> >> howerver, it seems to be a problem of JAXB.
> >> <xs:complexType name="ExecuteType">
> >>                <xs:sequence>
> >>                        <xs:element name="Payload" >
> >>                                <xs:complexType>
> >>                                                <xs:choice>
> >>                                                        <xs:element
> >> name="test" type="xs:string" />
> >>                                                        <xs:element
> >> name="test" type="xs:string" />
> >>                                                </xs:choice>
> >>                                </xs:complexType>
> >>                        </xs:element>
> >>                </xs:sequence>
> >>        </xs:complexType>
> >>
> >> If I replace the complex type of Payload to a simple type like string.
> >> It works well. Are there any sugestions how to solve this problem?
> >>
> >> dkulp wrote:
> >>> 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(WSDLToJavaCont
> >>>>ainer .java:240) at
> >>>> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.jav
> >>>>a: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.WrapperStyleNameC
> >>>>ollis
> >>>> ionValidator.isValidOperation(WrapperStyleNameCollisionValidator.java:
> >>>>120) at
> >>>> org.apache.cxf.tools.wsdlto.frontend.jaxws.validator.WrapperStyleNameC
> >>>>ollis
> >>>> ionValidator.checkNameColllision(WrapperStyleNameCollisionValidator.ja
> >>>>va:58) at
> >>>> org.apache.cxf.tools.wsdlto.frontend.jaxws.validator.WrapperStyleNameC
> >>>>ollis ionValidator.isValid(WrapperStyleNameCollisionValidator.java:51)
> >>>> at
> >>>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.validate(WSDLToJavaCon
> >>>>taine r.java:547) at
> >>>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCont
> >>>>ainer .java:193) at
> >>>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCont
> >>>>ainer .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
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/wsdl2java-NullPointer-tp19720254p20090683.html
> >> Sent from the cxf-user mailing list archive at Nabble.com.



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

Reply via email to