1 Reply Latest reply: Oct 19, 2012 8:45 AM by User696-Oracle RSS

    Unable to generate JAX-WS from ANT

    user8742475
      Here's my ANT script in JDeveloper 11g. My WLS is 10.3.5. JDK is jdk160_24.

      The wsdl I downloaded is self-contained. I was able to generate JAX-RPC fine.

      <?xml version="1.0" encoding="windows-1252" ?>
      <project default="build_client">
      <taskdef name="clientgen"
      classname="weblogic.wsee.tools.anttasks.ClientGenTask"/>
      <target name="build_WS_client">
      <clientgen wsdl="C:\temp\CustomObject13.wsdl"
      destDir="C:\temp\customobject13\proxy"
      packageName="com.customobject13"
      type="JAXWS"/>
      </target>
      </project>

      Here's the error I got

      [clientgen] Consider using <depends>/<produces> so that wsimport won't do unnecessary compilation
      [clientgen] parsing WSDL...
      [clientgen]
      [clientgen]
      [clientgen] [WARNING] src-resolve: Cannot resolve the name 'xsdLocal1:ListOfCustomObject13' to a(n) 'element declaration' component.
      [clientgen] line 1 of file:/C:/temp/CustomObject13.wsdl#types?schema2
      [clientgen]
      [clientgen] [WARNING] src-resolve: Cannot resolve the name 'xsdLocal2:ListOfCustomObject13' to a(n) 'element declaration' component.
      [clientgen] line 1 of file:/C:/temp/CustomObject13.wsdl#types?schema2
      [clientgen]
      [clientgen] [ERROR] Two declarations cause a collision in the ObjectFactory class.
      [clientgen] line 1 of file:/C:/temp/CustomObject13.wsdl
      [clientgen]
      [clientgen] [ERROR] (Related to above error) This is the other declaration.
      [clientgen] line 1 of file:/C:/temp/CustomObject13.wsdl
      [clientgen]

      BUILD FAILED
      weblogic.wsee.tools.WsBuildException: Error running JAX-WS clientgen: null
           at weblogic.wsee.tools.clientgen.jaxws.ClientGenImpl.execute(ClientGenImpl.java:175)
           at weblogic.wsee.tools.anttasks.ClientGenFacadeTask.execute(ClientGenFacadeTask.java:251)
           at weblogic.wsee.tools.anttasks.ClientGenTask.execute(ClientGenTask.java:365)
           at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
           at org.apache.tools.ant.Task.perform(Task.java:348)
           at org.apache.tools.ant.Target.execute(Target.java:357)
           at org.apache.tools.ant.Target.performTasks(Target.java:385)
           at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
           at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
           at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
           at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
           at org.apache.tools.ant.Main.runBuild(Main.java:758)
           at org.apache.tools.ant.Main.startAnt(Main.java:217)
           at org.apache.tools.ant.Main.start(Main.java:179)
           at org.apache.tools.ant.Main.main(Main.java:268)
      Caused by: Error starting wsimport:
           at com.sun.tools.ws.ant.WsImport2.execute(WsImport2.java:757)
           at weblogic.wsee.tools.clientgen.jaxws.ClientGenImpl.execute(ClientGenImpl.java:169)
           ... 19 more
      Caused by: com.sun.tools.ws.wscompile.AbortException
           at com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:136)
           at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2255)
           at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:194)
           at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:140)
           at com.sun.tools.ws.wscompile.WsimportTool.buildWsdlModel(WsimportTool.java:261)
           at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:203)
           at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:188)
           at com.sun.tools.ws.ant.WsImport2.execute(WsImport2.java:738)
           ... 20 more

      Total time: 17 seconds
        • 1. Re: Unable to generate JAX-WS from ANT
          User696-Oracle
          One thing you can try is running out of Jdeveloper, Set Weblogic Environment by %WL_home%\wlserver_10.3\server\bin\setWLSEnv.cmd and try running your ant task if you not see any error there might some issue with class-path setting in jdev

          This might require more debugging I would suggest you to open SR with WLS WebService team with providing complete Test case to debug further.

          HTH
          Regards,
          Sunil P