In our application we are forced to consume several WebServices. In the beginning we used just the \"Add Service Reference\" menu option, in order to create a WCF proxy.
I had to get rid of the use of "element" and much rather just used the "complexType"s.
So I removed the enclosing elements on the DataContracts and in the Messages, I set the type attribute instead of the element attribute. Now it works, thank you very much. :)
The schema used by the wsdl does not conform to the Data Contract Serializer's Schema Reference.
Problems:
"All elements must be qualified for a schema to be supported by DataContractSerializer".
Your schema omits the elementFormDefault attribute on the tag so the default, "unqualified" is in effect. You need to add the following attribute name/value pair to the <schema> element so that the Data Contract Serializer (DCS) can resolve the local elements/types.
elementFormDefault="qualified"
maxOccurs and minOccurs attributes on <sequence> tag must be 1 or omitted (default is 1).
So, remove maxOccurs="unbounded" on the <sequence>.
Add maxOccurs="unbounded" on the <row> tag to get a nested collection data contract generated for the DataSet field.
For example,
<xsd:element name="DataSet">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="row" minOccurs="0" maxOccurs="unbounded"/>
Hey I'm not sure how you generated your wsdl and stuff, but datasets has a few oddities.
When generating my proxy with a ds I need to reference this assembly:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll
Cheers, Stian