Hi everybody,
I'm having problems with types declaration and class generation with
wsdl.exe. When you declare two types with the same name (whether the types
are the same or not is not important) in two different schemas, wsdl.exe
generates two classes called TypeName and TypeName1.
For example, the
following wsdl types declaration:
<types>
<xsd:schema
targetNamespace="outputtypes.pipo.com"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsd1="inputtypes.pipo.com">
<xsd:complexType
name="PipoType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="responseText"
type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
<xsd:schema
targetNamespace="inputtypes.pipo.com"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsd2="outputtypes.pipo.com">
<xsd:complexType
name="PipoType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="requestText"
type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</types>
will generate the two classes (in C#):
[System.Xml.Serialization.SoapTypeAttribute("PipoType",
"inputtypes.pipo.com")]
public class PipoType {
public string requestText;
}
[System.Xml.Serialization.SoapTypeAttribute("PipoType",
"outputtypes.pipo.com")]
public class PipoType1 {
public string responseText;
}
wsdl.exe indexes the name of the type.
The Apache Axis code generator WSDL2Java creates two packages com.pipo.inputtypes and com.pipo.outputtypes with a PipoType class in them.
Why doesn't wsdl.exe create two namespaces com.pipo.inputtypes and
com.pipo.outputtypes with their respective PipoType class declaration
????
Is there a way of achieving that ?
Any help will be greatly appreciated !!!
