Visual Studio wsdl.exe cannot find any information in my schema. Not sure if this is a bug
When I use wsdl.exe to create a client from my wsdl, it ends up OK but inserts the following comment into the file:
// CODEGEN: The "VerificationData" parameter requires additional schema information that cannot be captured using parameter mode. The specific attribute is "System.Xml.Serialization.XmlArrayItemAttribute".
I can't figure out where the additional information should go in the wsdl, the relevant part of which looks like this:
<xsd:complexType name="VerificationDataType">
<xsd:sequence>
<xsd:element name="Item" type="VerificationItemType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="VerificationItemType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="type" type="xsd:string" use="required" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
Any ideas?
source to share
I can't tell from the WSDL snippet you provided, but I'm wondering if a namespace is needed for the type used in the Item, for example something like
<xsd:element name="Item" type="ns:VerificationItemType" minOccurs="0" maxOccurs="unbounded" />
where ns is a namespace alias.
When I tried to reproduce your problem using the wsdl.exe that comes with VisualStudio 2008, I get the error
- The datatype 'http://schemas.xmlsoap.org/wsdl/:VerificationItemType' is missing.
Adding a namespace gets rid of the message.
source to share