I run into the same problem and I fixed it with:

<?xml version="1.0" encoding="UTF-8"?>
<jxb:bindings version="2.0"
              xmlns:jxb="http://java.sun.com/xml/ns/jaxb";
              xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";
        >
    <jxb:bindings schemaLocation="Microsoft1.xsd">
        <jxb:globalBindings generateElementProperty="false">
            <xjc:simple/>
        </jxb:globalBindings>
    </jxb:bindings>

</jxb:bindings>



<?xml version="1.0" encoding="UTF-8"?>
<jxb:bindings version="2.0"
              xmlns:jxb="http://java.sun.com/xml/ns/jaxb";
              xmlns:xs="http://www.w3.org/2001/XMLSchema";>

    <jxb:globalBindings>
        <jxb:serializable uid="1"/>
    </jxb:globalBindings>
    <jxb:bindings schemaLocation="schemas1.xsd">
        <jxb:bindings node=".//xs:element" multiple="true">
            <jxb:nameXmlTransform>
                <jxb:elementName suffix="Element"/>
            </jxb:nameXmlTransform>
        </jxb:bindings>
    </jxb:bindings>


</jxb:bindings>

Hope it`s help
David

-----Message d'origine-----
De : Freeman Fang [mailto:[email protected]] 
Envoyé : 24 avril 2013 00:47
À : [email protected]; [email protected]
Objet : Re: Microsoft XSD files causing MANY name collisions

yep, using jaxb binding file to specify the unique name is the way to go
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋

On 2013-4-24, at 上午11:59, kurt-apache-cxf wrote:

> I'm getting a "Two declarations cause a collision in the ObjectFactory class" 
> error.
> 
> Every one of the XSD files exposed by the DotNet webservice I'm trying to 
> connect with has multiple name collisions.  The one below is simplest of the 
> them.
> 
> Is there a simple config/fix to remedy this?   Or, do I need to go in and 
> create an xpath statement to find each of them in a binding file (there are 
> 843 total duplicates in 6 XSD files)?
> 
> <?xml version="1.0" encoding="utf-8"?> <xs:schema 
> elementFormDefault="qualified" 
> targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays"; 
> xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
> xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/Arrays";>
>    <xs:complexType name="ArrayOfstring">
>        <xs:sequence>
>            <xs:element minOccurs="0" maxOccurs="unbounded" name="string" 
> nillable="true" type="xs:string"/>
>        </xs:sequence>
>    </xs:complexType>
>    <xs:element name="ArrayOfstring" nillable="true" 
> type="tns:ArrayOfstring"/> </xs:schema>
> 

Reply via email to