Title: Message Title
|
|
|
In maven (at least) with cfx databing and rt-databinding , when using a wsdl with multiple namespaces, the code generator fails with the error : {noformat} Caused by: org.apache.cxf.tools.common.ToolException: Failed to create java parameter for part [parameters] in method [testOperation] - this wsdl is invalid, please use the wsdlvalidator tool to validate this wsdl at org.apache.cxf.tools.common.model.JavaMethod.addParameter(JavaMethod.java:186) at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProcessor.addParameter(ParameterProcessor.java:129) at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProcessor.processInput(ParameterProcessor.java:227) at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProcessor.buildParamModelsWithoutOrdering(ParameterProcessor.java:655) at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProcessor.process(ParameterProcessor.java:87) at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProcessor.processMethod(OperationProcessor.java:141) at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProcessor.process(OperationProcessor.java:62) at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.PortTypeProcessor.process(PortTypeProcessor.java:149) at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.wsdlDefinitionToJavaModel(WSDLToJavaProcessor.java:82) at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.process(WSDLToJavaProcessor.java:59) at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:285) at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164) at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:412) at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103) at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113) at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86) at org.apache.cxf.maven_plugin.wsdl2java.WSDL2JavaMojo.generate(WSDL2JavaMojo.java:427) at org.apache.cxf.maven_plugin.AbstractCodegenMoho.execute(AbstractCodegenMoho.java:310) at org.apache.cxf.maven_plugin.wsdl2java.WSDL2JavaMojo.execute(WSDL2JavaMojo.java:524) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106) {noformat}
When removing the multiple namespaces (replacing "data/in", "data/out" and "data/err") with the unique one "data", it compiles successfully
After investigations, it seems to be linked to the BindingOrganizer Class which is generating an IncludeElement without BindingElement (which only occurs using code gen because when dealing with binding.xml, it is managed by prevalidate during xml loading, as far as I've understood things)...
I've managed to fix it locally by adding the following constructor {code:title=org/jibx/binding/model/IncludeElement.java} /** * Constructor used internally during CodeGen phase * * @param binding element */ public IncludeElement(BindingElement elt) { super(INCLUDE_ELEMENT); m_binding=elt; } {code}
add calling it around line 749 of file {code:title=org/jibx/binding/model/BindingOrganizer.java} IncludeElement include = new IncludeElement(holder.getBinding()); {code}
I hope it helps.
|
|
|
|
|
|
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
jibx-devs mailing list
jibx-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-devs