Hi, i think your mapping file is not working. cause generated files are wrapper style (altought i want a wrapper style, but in your mapping is said opposite) and do not have dom bindings. Or am i wrong?
dkulp wrote: > > > It's definitely the DOM thing. JAXB isn't giving us the parameter > list if one of them is mapped to a DOM. The JAX-WS RI detects this > and automatically drops down to BARE mode which is something we should > probably do as well instead of the NPE. You can get this to work if > you change your binding file to: > > > <?xml version="1.0" encoding="UTF-8"?> > <jaxws:bindings > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:jxb="http://java.sun.com/xml/ns/jaxb" > jxb:version="2.0" > xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" > wsdlLocation="descmgr.wsdl"> > > <!-- PACKAGE BINDING --> > > <jxb:bindings schemaLocation="service.xsd" node="/xsd:schema"> > <jxb:schemaBindings> > <jxb:package name="com.foo.service"/> > </jxb:schemaBindings> > </jxb:bindings> > <jxb:bindings schemaLocation="descriptor.xsd" node="/xsd:schema"> > <jxb:schemaBindings> > <jxb:package name="com.foo.descriptor"/> > </jxb:schemaBindings> > </jxb:bindings> > > > <!-- DOM BINDING --> > <jxb:bindings schemaLocation="service.xsd" node="// > xsd:[EMAIL PROTECTED]'ServiceDescriptorType']"> > <jxb:dom/> > </jxb:bindings> > <jxb:bindings schemaLocation="descriptor.xsd" node="// > xsd:[EMAIL PROTECTED]'DescriptorType']"> > <jxb:dom/> > </jxb:bindings> > > <jaxws:bindings > > <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle> > </jaxws:bindings> > </jaxws:bindings> > > > > Dan > > > > > On Jul 30, 2008, at 8:33 AM, sedo wrote: > >> >> No one can't help me? >> I don't understand where is the problem >> >> >> >> >> >> sedo wrote: >>> >>> Hi there, >>> i can't solve this problem, hope you can help me :) >>> >>> I attached this problem wsdl in zip file here: >>> http://www.nabble.com/file/p18688976/WSDLwithImports.zip >>> WSDLwithImports.zip >>> >>> >>> I have one wsdl, this wsdl imports 2 schemas. >>> This wsdl pass validation. When i use wsdl2java tool it generates all >>> classes right, anything goes good (starting server, client request, >>> response..). All works fine >>> >>> But after that i wrote binding file for jaxb customization. Use >>> command: >>> wsdl2java -b jaxb-binding.xml descmgr.wsdl >>> >>> It throws exception: >>> 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 >>> .databinding >>> .jaxb.JAXBDataBinding.getWrappedElementType(JAXBDataBinding.java:365) >>> at >>> org >>> .apache >>> .cxf >>> .tools >>> .wsdlto >>> .frontend >>> .jaxws >>> .processor >>> .internal >>> .ParameterProcessor.getParameterFromQName(ParameterProcessor.java: >>> 428) >>> at >>> org >>> .apache >>> .cxf >>> .tools >>> .wsdlto >>> .frontend >>> .jaxws >>> .processor >>> .internal >>> .ParameterProcessor >>> .processWrappedAbstractOutput(ParameterProcessor.java:394) >>> at >>> org >>> .apache >>> .cxf >>> .tools >>> .wsdlto >>> .frontend >>> .jaxws >>> .processor >>> .internal >>> .ParameterProcessor.processWrappedOutput(ParameterProcessor.java:285) >>> at >>> org >>> .apache >>> .cxf >>> .tools >>> .wsdlto >>> .frontend >>> .jaxws >>> .processor >>> .internal >>> .ParameterProcessor >>> .buildParamModelsWithoutOrdering(ParameterProcessor.java:504) >>> at >>> org >>> .apache >>> .cxf >>> .tools >>> .wsdlto >>> .frontend >>> .jaxws >>> .processor >>> .internal.ParameterProcessor.process(ParameterProcessor.java:81) >>> at >>> org >>> .apache >>> .cxf >>> .tools >>> .wsdlto >>> .frontend >>> .jaxws >>> .processor >>> .internal.OperationProcessor.processMethod(OperationProcessor.java: >>> 91) >>> at >>> org >>> .apache >>> .cxf >>> .tools >>> .wsdlto >>> .frontend >>> .jaxws >>> .processor >>> .internal.OperationProcessor.process(OperationProcessor.java:63) >>> at >>> org >>> .apache >>> .cxf >>> .tools >>> .wsdlto >>> .frontend >>> .jaxws >>> .processor >>> .internal.PortTypeProcessor.process(PortTypeProcessor.java:128) >>> at >>> org >>> .apache >>> .cxf >>> .tools >>> .wsdlto >>> .frontend >>> .jaxws >>> .processor >>> .WSDLToJavaProcessor >>> .wsdlDefinitionToJavaModel(WSDLToJavaProcessor.java:88) >>> 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 >>> >>> >>> Interesting is that it generates the code, which also works, but >>> can i >>> rely on this code? >>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/NullPointerException-with-wsdl2java%2C-binding-file-and-imported-schemas-tp18688976p18732210.html >> Sent from the cxf-user mailing list archive at Nabble.com. >> > > --- > Daniel Kulp > [EMAIL PROTECTED] > http://www.dankulp.com/blog > > > > > > -- View this message in context: http://www.nabble.com/NullPointerException-with-wsdl2java%2C-binding-file-and-imported-schemas-tp18688976p18829452.html Sent from the cxf-user mailing list archive at Nabble.com.
