to help you with this, I have to ask you to provide two XSD fragments: Aegis and Other.
On Thu, Sep 24, 2009 at 10:44 AM, skuramshin <[email protected]>wrote: > > Hi All. My question is about integration between CXF-based Java web service > and a C# .NET client. > > Service: CXF 2.2.3 with Aegis databinding > Client: C#, .NET 3.5 SP1 > > For some reason Visual Studio generates two C# proxy enums for each Java > enum. The generated C# classes do not compile. I'm using "Java first" > approach, so the WSDL is generated by CXF. > > For example, this Java enum: > > public enum SqlDialect { > GENERIC, SYBASE, SQL_SERVER, ORACLE; > } > > Produces this WSDL: > > <xsd:simpleType name="SqlDialect"> > <xsd:restriction base="xsd:string"> > <xsd:enumeration value="GENERIC" /> > <xsd:enumeration value="SYBASE" /> > <xsd:enumeration value="SQL_SERVER" /> > <xsd:enumeration value="ORACLE" /> > </xsd:restriction> > </xsd:simpleType> > > For this WSDL Visual Studio generates two partial C# classes (generated > comments removed): > > > > [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", > "3.0.0.0")] > [System.Runtime.Serialization.DataContractAttribute(Name="SqlDialect", > Namespace="http://datasource.view.model.archibus.com")] > public enum SqlDialect : int { > > [System.Runtime.Serialization.EnumMemberAttribute()] > GENERIC = 0, > > [System.Runtime.Serialization.EnumMemberAttribute()] > SYBASE = 1, > > [System.Runtime.Serialization.EnumMemberAttribute()] > SQL_SERVER = 2, > > [System.Runtime.Serialization.EnumMemberAttribute()] > ORACLE = 3, > } > ... > [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", > "2.0.50727.3082")] > [System.SerializableAttribute()] > > [System.Xml.Serialization.XmlTypeAttribute(Namespace=" > http://datasource.view.model.archibus.com")] > public enum SqlDialect { > GENERIC, > SYBASE, > SQL_SERVER, > ORACLE, > } > > The resulting C# code does not compile: > > The namespace 'xxx' already contains a definition for 'SqlDialect' > > This issue does not happen when the default CXF databinding is used instead > of Aegis. In that case, only the second C# enum is generated. > > I will appreciate any ideas... > -- > View this message in context: > http://www.nabble.com/Aegis-databinding----Duplicate-C--proxy-classes-generated-for-Java-classes-tp25573591p25573591.html > Sent from the cxf-user mailing list archive at Nabble.com. > >
