views:

1344

answers:

1

When I use wsdl.exe to create a client from my wsdl, it finishes O.K., but inserts the following comment in the file:

// CODEGEN: Parameter 'VerificationData' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlArrayItemAttribute'.

I can't figure out where 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?

+1  A: 

I can't tell from the snippet of the WSDL you've provided, but I wonder if you need a namespace on the type used in the Item element, e.g., 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 with the wsdl.exe that comes with VisualStudio 2008, I get the error message

  - The datatype 'http://schemas.xmlsoap.org/wsdl/:VerificationItemType' is missing.

Adding the namespace gets rid of the message.

David Norman
That's right. He was referring to "`VerificationItemType`" in the default namespace, and there is no such thing.
John Saunders