Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7695

wsdl2java client jar generation fails if jaxws binding is used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.4
    • 3.2.5
    • None
    • None
    • Unknown

    Description

      The following exception is thrown by wsdl2java tool if I use option -clientjar and my wsdl contains a jaxws binding. The same error also happens if I use wsdl without jaxws binding but  provide a jaxws binding file with option -b:

      C:\Tools\apache-cxf-3.2.4\bin>wsdl2java -d out -clientjar client.jar jxb/StockQuoteService.xml
      Apr 03, 2018 3:15:49 PM org.apache.cxf.tools.wsdlto.WSDLToJavaContainer generateLocalWSDL
      SCHWERWIEGEND: Failed to generate local wsdl for clientjar
      java.lang.ClassCastException: org.apache.cxf.tools.wsdlto.frontend.jaxws.customization.JAXWSBinding cannot be cast to javax.wsdl.extensions.UnknownExtensibilityElement
              at javax.wsdl.extensions.UnknownExtensionSerializer.marshall(UnknownExtensionSerializer.java:34)
              at com.ibm.wsdl.xml.WSDLWriterImpl.printExtensibilityElements(WSDLWriterImpl.java:998)
              at com.ibm.wsdl.xml.WSDLWriterImpl.printPortTypes(WSDLWriterImpl.java:474)
              at com.ibm.wsdl.xml.WSDLWriterImpl.printDefinition(WSDLWriterImpl.java:133)
              at com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(WSDLWriterImpl.java:1073)
              at com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(WSDLWriterImpl.java:1098)
              at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateLocalWSDL(WSDLToJavaContainer.java:833)
              at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processClientJar(WSDLToJavaContainer.java:348)
              at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:314)
              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:105)
              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:185)
      
      
      WSDLToJava Error: Failed to generate local wsdl for clientjar
      

      This works fine with 3.1.9. Seems the error was introduced by commit: bcb6385a095dcaaf8390ecfc33e9e22b9149daad

      because the class JAXWSBindingSerializer was deleted and removed from class JAXWSDefinitionBuilder.

       

      Attachments

        1. noWrappersBinding.xml
          0.3 kB
          Reto Weiss
        2. StockQuoteService.xml
          11 kB
          Reto Weiss

        Issue Links

          Activity

            People

              dkulp Daniel Kulp
              reto.weiss@ivyteam.ch Reto Weiss
              Votes:
              4 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: