5 Replies Latest reply on Sep 21, 2007 9:30 AM by swapnil_jboss

    Salesforce client stub generation fails

      I'm trying to move away from Axis due to what appear to be classloading issues when Axis is included in a deployed webapp, and exposing portions of the webapp are exposed using JBOSSWS. So I figured I would just convert the Axis stubs to JBOSSWS stubs using wsconsume.

      I've tried JBOSS AS 4.0.5, 4.2.0 with the native JBOSSWS and upgrades to 1.2.0SP1 to no avail.

      With the latest, 1.2.0SP1 I get the following exception

      [wsconsume] Command invoked: org.jboss.ws.tools.jaxws.command.wsconsume -k -o "C:\Documents and Settings\adalessandro\Workspace\AxaptaSOAPClient" -s "C:\Documents and Settings\adalessandro\Workspace\AxaptaSOAPClient\src" -t enterprise.wsdl
      [wsconsume] warning: src-resolve: Cannot resolve the name 'ens:sObject' to a(n) 'type definition' component.
      [wsconsume] line ? of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema2
      [wsconsume] error: A class/interface with the same name "com.sforce.soap.enterprise.DescribeLayout" is already in use. Use a class customization to resolve this conflict.
      [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema2
      [wsconsume] error: (Relevant to above error) another "DescribeLayout" is generated from here.
      [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema2
      [wsconsume] error: Two declarations cause a collision in the ObjectFactory class.
      [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema2
      [wsconsume] error: (Related to above error) This is the other declaration.
      [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema2
      [wsconsume] error: Two declarations cause a collision in the ObjectFactory class.
      [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
      [wsconsume] error: (Related to above error) This is the other declaration.
      [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
      [wsconsume] error: Two declarations cause a collision in the ObjectFactory class.
      [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
      [wsconsume] error: (Related to above error) This is the other declaration.
      [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
      [wsconsume] error: Two declarations cause a collision in the ObjectFactory class.
      [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
      [wsconsume] error: (Related to above error) This is the other declaration.
      [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
      [wsconsume] error: Two declarations cause a collision in the ObjectFactory class.
      [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
      [wsconsume] error: (Related to above error) This is the other declaration.
      [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
      [wsconsume] error: Two declarations cause a collision in the ObjectFactory class.
      [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
      [wsconsume] error: (Related to above error) This is the other declaration.
      [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
      [wsconsume] error: Two declarations cause a collision in the ObjectFactory class.
      [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
      [wsconsume] error: (Related to above error) This is the other declaration.
      [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
      [wsconsume] error: Two declarations cause a collision in the ObjectFactory class.
      [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
      [wsconsume] error: (Related to above error) This is the other declaration.
      [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
      [wsconsume] com.sun.istack.SAXParseException2: (Related to above error) This is the other declaration.
      [wsconsume] at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:213)
      [wsconsume] at org.jboss.com.sun.tools.ws.processor.config.ModelInfo.buildModel(ModelInfo.java:88)
      [wsconsume] at org.jboss.com.sun.tools.ws.processor.Processor.runModeler(Processor.java:82)
      [wsconsume] at org.jboss.com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:543)
      [wsconsume] at org.jboss.com.sun.tools.ws.util.ToolBase.run(ToolBase.java:57)
      [wsconsume] at org.jboss.ws.tools.jaxws.impl.WSContractConsumerImpl$1.run(WSContractConsumerImpl.java:163)
      [wsconsume] at org.jboss.ws.tools.jaxws.impl.WSContractConsumerImpl.consume(WSContractConsumerImpl.java:166)
      [wsconsume] at org.jboss.ws.tools.jaxws.command.wsconsume.importServices(wsconsume.java:194)
      [wsconsume] at org.jboss.ws.tools.jaxws.command.wsconsume.main(wsconsume.java:77)
      [wsconsume] Caused by: com.sun.istack.SAXParseException2: (Related to above error) This is the other declaration.
      [wsconsume] at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:128)
      [wsconsume] at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2207)
      [wsconsume] at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:224)
      [wsconsume] at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:181)
      [wsconsume] ... 8 more
      [wsconsume] Caused by: com.sun.istack.SAXParseException2: (Related to above error) This is the other declaration.
      [wsconsume] at com.sun.tools.xjc.ErrorReceiver.error(ErrorReceiver.java:66)
      [wsconsume] at com.sun.tools.xjc.generator.bean.ObjectFactoryGeneratorImpl.populate(ObjectFactoryGeneratorImpl.java:152)
      [wsconsume] at com.sun.tools.xjc.generator.bean.PublicObjectFactoryGenerator.populate(PublicObjectFactoryGenerator.java:19)
      [wsconsume] at com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:210)
      [wsconsume] at com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:151)
      [wsconsume] at com.sun.tools.xjc.model.Model.generateCode(Model.java:230)
      [wsconsume] at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:217)
      [wsconsume] at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:67)
      [wsconsume] at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:126)
      [wsconsume] ... 11 more
      [wsconsume] error: com.sun.istack.SAXParseException2: (Related to above error) This is the other declaration.
      


      Any suggestions on how to resolve? I couldn't find any exact JIRA issues on this.