Hi, These elements share the same name, and the same namespace, so there is a conflict, you should have a look at this:
http://docs.oracle.com/cd/E17802_01/webservices/webservices/docs/2.0/tutorial/doc/JAXBUsing4.html here a quick sample: <jaxb:bindings schemaLocation="myFile.xsd"> <jaxb:bindings node="//xsd:element[@name='XpathOfYourNode']"> <jaxb:class name="XpathOfYourNodeWithANewName" /> </jaxb:bindings> </jaxb:bindings> Adrien. 2012/3/20 Pasqualino Imbemba <[email protected]> > Hello, > > I'm using CXF 2.5.2. > When I try to run wsdl2Java against this WSDL ( > http://cooperazione.sian.it/wspdd/services/AllineamentoGIS?wsdl) I get > this > following error: > WSDLToJava Error: Thrown by JAXB: > Thrown by JAXB: > Two declarations cause a collision in the ObjectFactory class. > at line 21 column 3 of schema > file:/tmp/tempdir769259763399432743.tmp/feature.xsd > > (Related to above error) This is the other declaration. > at line 20 column 3 of schema > file:/tmp/tempdir769259763399432743.tmp/feature.xsd > > org.apache.cxf.tools.common.ToolException: Thrown by JAXB: > Thrown by JAXB: > Two declarations cause a collision in the ObjectFactory class. > at line 21 column 3 of schema > file:/tmp/tempdir769259763399432743.tmp/feature.xsd > > (Related to above error) This is the other declaration. > at line 20 column 3 of schema > file:/tmp/tempdir769259763399432743.tmp/feature.xsd > > (...) > > Caused by: com.sun.istack.SAXParseException2: Two declarations cause a > collision in the ObjectFactory class. > > The above WSDL refers to http://schemas.opengis.net/gml/2.0.0/feature.xsd. > Lines 20 and 21 of this schema relate to the following: > > <element name="_geometryProperty" type="gml:GeometryPropertyType" > abstract="true"/> > <element name="geometryProperty" type="gml:GeometryPropertyType"/> > > Could you please help me in getting me wsdl2Java work in this case? > > Thanks, > ~pasquale >
