2 Replies Latest reply on Aug 18, 2010 12:29 AM by albertwilson

    Problem with wsdl2java codegen tool  & jaxb episodes

    marcelcasado

      Hi,

       

      I'm generating jaxb bindings with episodes for all schemas included/imported for a "wsdl" so I have a more modular project structure and better dependency reusability. Then I pass the jaxb episodes to the "wsdl2java" so it does not have to generate any the bindings again. Then when it tries to resolve the message parts on the wsdl to create the service artifacts it crashes :

       

      ./wsdl2java -d /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/target/generated-sources/src -b file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/jaxb/xmlBindings.xml -b file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/episodes/gml-v_3_1_1.episode -b file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/episodes/ows-v_1_1_0.episode -b file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/episodes/wcs-v_1_1_2.episode -verbose /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/wsdl/wcs/1.1.2/wcs1_1_2.wsdl

      Loading FrontEnd jaxws ...

      Loading DataBinding jaxb ...

      wsdl2java -d /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/target/generated-sources/src -b file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/jaxb/xmlBindings.xml -b file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/episodes/gml-v_3_1_1.episode -b file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/episodes/ows-v_1_1_0.episode -b file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/episodes/wcs-v_1_1_2.episode -verbose /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/wsdl/wcs/1.1.2/wcs1_1_2.wsdl

      wsdl2java - Apache CXF 2.2.6

       

      Xalan: org.apache.xml.serializer.XMLEntities

       

      WSDLToJava Error: Failed to create java parameter for part in method - this wsdl is invalid, please use the wsdlvalidator tool to validate this wsdl

       

      org.apache.cxf.tools.common.ToolException: Failed to create java parameter for part in method - 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:126)

           at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProcessor.processInput(ParameterProcessor.java:221)

           at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProcessor.buildParamModelsWithoutOrdering(ParameterProcessor.java:650)

           at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProcessor.process(ParameterProcessor.java:86)

           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:62)

           at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.PortTypeProcessor.process(PortTypeProcessor.java:139)

           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.processWsdl(WSDLToJavaContainer.java:238)

           at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:128)

           at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:271)

           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.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)

       

       

      But the wsdl validator says is a valid wsdl :

       

      ./wsdlvalidator /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/wsdl/wcs/1.1.2/wcs1_1_2.wsdlPassed Validation : Valid WSDL

       

       

      It seems to me that "wsdl2java" does not work properly when jaxb episodes are used for the elements defined on the messages part on the wsdl.

       

       

      Thanks,

       

      -Marcel