CXF
  1. CXF
  2. CXF-2227

WSDLToJava Error: Thrown by JAXB : "http://localhost:8080/MyService/TestService?wsdl" is not a part of this compilation. Is this a mistake for "http://localhost:8080/MyService/TestService?wsdl#types3"? at line 5 column 95 of schema file:

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Won't Fix
    • Affects Version/s: 2.2.1
    • Fix Version/s: Invalid
    • Component/s: None
    • Labels:
      None
    • Environment:

      Java WebService Application using CXF , JDK 1.5

      Description

      I upgraded my project to CXF 2.2.1 from 2.1.4 and have started to experience the below error while generating the java stub for the WSDL
      This issue happens only when my client is on 2.2.1. Seems like the latest version of CXF has a mismatch with the jaxb data bindings. Also turning on the log didnt give much info.

      Java bindings:

      <jaxb:bindings version="2.0"
      xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
      xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
      xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <jaxb:bindings schemaLocation="@WSDL@">
      <jaxb:bindings node="/xs:schema">
      <jaxb:globalBindings>
      <xjc:generateElementProperty>false</xjc:generateElementProperty>
      </jaxb:globalBindings>
      </jaxb:bindings>
      </jaxb:bindings>
      </jaxb:bindings>

      StackTrace - > WSDLtoJAVA for Client

      [java] Loading FrontEnd jaxws ...
      [java] Loading DataBinding jaxb ...
      [java] wsdl2java -client -verbose -impl -keep -autoNameResolution -d C:\workspace\testclient/src -validate -b C:\workspace\testclient/build/java-bindings.xml http://localhost:8080/MyService/TestService?wsdl
      [java] wsdl2java - Apache CXF 2.2.1
      [java] WSDLToJava Error: Thrown by JAXB : "http://localhost:8080/MyService/TestService?wsdl" is not a part of this compilation. Is this a mistake for "http://localhost:8080/MyService/TestService?wsdl#types3"? at line 5 column 95 of schema file:/C:/workspace/testclient/build/java-bindings.xml
      [java] org.apache.cxf.tools.common.ToolException: Thrown by JAXB : "http://localhost:8080/MyService/TestService?wsdl" is not a part of this compilation. Is this a mistake for "http://localhost:8080/MyService/TestService?wsdl#types3"? at line 5 column 95 of schema file:/C:/workspace/testclient/build/java-bindings.xml
      [java] at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBBindErrorListener.error(JAXBBindErrorListener.java:35)
      [java] at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerImpl.java:285)
      [java] at com.sun.tools.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java:504)
      [java] at com.sun.tools.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java:495)
      [java] at com.sun.tools.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalizer.java:205)
      [java] at com.sun.tools.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalizer.java:289)
      [java] at com.sun.tools.xjc.reader.internalizer.Internalizer.transform(Internalizer.java:134)
      [java] at com.sun.tools.xjc.reader.internalizer.Internalizer.transform(Internalizer.java:96)
      [java] at com.sun.tools.xjc.reader.internalizer.DOMForest.transform(DOMForest.java:448)
      [java] at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:221)
      [java] at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)
      [java] at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:331)
      [java] at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:557)
      [java] at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:208)
      [java] at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:127)
      [java] at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:252)
      [java] at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:83)
      [java] at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:103)
      [java] at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:173)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      [java] at java.lang.reflect.Method.invoke(Unknown Source)
      [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
      [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
      [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:747)
      [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:201)
      [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:104)
      [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
      [java] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      [java] at java.lang.reflect.Method.invoke(Unknown Source)
      [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
      [java] at org.apache.tools.ant.Task.perform(Task.java:348)
      [java] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
      [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
      [java] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      [java] at java.lang.reflect.Method.invoke(Unknown Source)
      [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
      [java] at org.apache.tools.ant.Task.perform(Task.java:348)
      [java] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:391)
      [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
      [java] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      [java] at java.lang.reflect.Method.invoke(Unknown Source)
      [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
      [java] at org.apache.tools.ant.Task.perform(Task.java:348)
      [java] at org.apache.tools.ant.Target.execute(Target.java:357)
      [java] at org.apache.tools.ant.Target.performTasks(Target.java:385)
      [java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
      [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
      [java] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      [java] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
      [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
      [java] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
      [java] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
      [java] Caused by: com.sun.istack.SAXParseException2: "http://localhost:8080/MyService/TestService?wsdl" is not a part of this compilation. Is this a mistake for "http://localhost:8080/MyService/TestService?wsdl#types3"?
      [java] at com.sun.tools.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java:501)
      [java] ... 54 more

        Activity

        Mark Thomas made changes -
        Workflow jira [ 12463951 ] Default workflow, editable Closed status [ 12604585 ]
        Daniel Kulp made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Daniel Kulp made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s Invalid [ 12312706 ]
        Fix Version/s 2.2.1 [ 12313720 ]
        Resolution Won't Fix [ 2 ]
        CXFUser made changes -
        Field Original Value New Value
        Fix Version/s 2.2.1 [ 12313720 ]
        Affects Version/s 2.2.1 [ 12313720 ]
        Priority Major [ 3 ] Blocker [ 1 ]
        CXFUser created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            CXFUser
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development