0 Replies Latest reply: Feb 22, 2012 12:38 PM by 919309 RSS

    Error running jaxb2-maven-plugin on Lead.wsdl

    919309
      I'm running into the error, com.sun.istack.SAXParseException2: Two declarations cause a collision in the ObjectFactory class, when trying to generate jaxb beans from Lead.wsdl. According to the error message, the duplicate declarations are:

      <xsd:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xsdLocal1="urn:/crmondemand/xml/Lead/Data" targetNamespace="urn:/crmondemand/xml/Lead/Data" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      ...
      *<xsd:element name="ListOfLead" type="xsdLocal1:ListOfLeadData"/>*

      and
      <xsd:schema elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="urn:/crmondemand/xml/Lead/Query" xmlns:xsdLocal2="urn:/crmondemand/xml/Lead/Query" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      ...
      *<xsd:element name="ListOfLead" type="xsdLocal2:ListOfLeadQuery"/>*

      My plugin is defined as:
      <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>jaxb2-maven-plugin</artifactId>
      <version>1.3.1</version>
      <executions>
      <execution>
      <goals>
      <goal>xjc</goal>
      </goals>
      </execution>
      </executions>
      <configuration>
           <schemaDirectory>src/main/resources/wsdl</schemaDirectory>
      <schemaFiles>lead.wsdl</schemaFiles>
           <packageName>my.package.crmod.client</packageName>
      <wsdl>true</wsdl>
      <xmlschema>false</xmlschema>
      </configuration>
      </plugin>

      Any ideas on what I can do to resolve this?

      Edit: I downloaded the Lead v2.0 custom wsdl.

      Edited by: 916306 on Feb 22, 2012 10:38 AM