I tried to look this up online, but all the WSDL examples seem to not really explain if I should mark things as basetype string in the WSDL or int...
Basically, I'm trying to make my WSDL so that I can represent an Enumeration. I have a C# Enum in mind already that I want to match it up to...
public enum MyEnum {
Item1 = 0,
Item2 = 1,
Item3 = 2,
SpecialItem = 99
}
I'm not sure how my WSDL should look... I figure it's one of two, but even then I'm not 100% sure...
<wsdl:types>
<xsd:schema targetNamespace="http://www.mysite.com/MyApp"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
<xsd:simpleType name="MyEnum">
<xsd:restriction base="xsd:int">
<xsd:enumeration value="0" />
<xsd:enumeration value="1" />
<xsd:enumeration value="2" />
<xsd:enumeration value="99" />
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
</wsdl:types>
OR
<wsdl:types>
<xsd:schema targetNamespace="http://www.mysite.com/MyApp"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
<xsd:simpleType name="MyEnum">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Item1" />
<xsd:enumeration value="Item2" />
<xsd:enumeration value="Item3" />
<xsd:enumeration value="SpecialItem" />
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
</wsdl:types>