I'm using a standard wsdl (located here) to communicate with a service (OpenXDS). I created a service reference from it, which generated a very large Reference.cs file. There is a type hierarchy in the file like this:
public partial class ExtrinsicObjectType : RegistryObjectType
. . .
[System.Xml.Serialization.XmlIncludeAttribute(typeof(ExtrinsicObjectType))]
public partial class RegistryObjectType : IdentifiableType
. . .
[System.Xml.Serialization.XmlIncludeAttribute(typeof(RegistryObjectType))]
[System.Xml.Serialization.XmlIncludeAttribute(typeof(ExtrinsicObjectType))]
public partial class IdentifiableType : object
All three types have the same XmlType:
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0")]
There is a collection in the Response type of IdentifiableType objects:
[System.Xml.Serialization.XmlArrayAttribute(Namespace="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0", Order=0)]
[System.Xml.Serialization.XmlArrayItemAttribute("Identifiable", IsNullable=false)]
public IdentifiableType[] RegistryObjectList {
When the service actually responds, it gives a collection of ExtrinsicObject elements:
<rim:RegistryObjectList xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0">
<ns1:ExtrinsicObject xmlns:ns1="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" ...
<ns1:ExtrinsicObject xmlns:ns1="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" ...
<ns1:ExtrinsicObject xmlns:ns1="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" ...
<ns1:ExtrinsicObject xmlns:ns1="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" ...
<ns1:ExtrinsicObject xmlns:ns1="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" ...
</rim:RegistryObjectList>
I see these elements in the trace log and I can get the same answer in SoapUI. But when I get the deserialized response back from the client proxy, the RegistryObjectList is empty. It completely ignores the ExtrinsicObject elements.
I can't change the server, and the client is generated by VS2012. It seems like this should just work and I'm missing some setting or something.
Here's the theories I have so far:
- There's some setting on the service reference, and if I checked it and updated the code everything would just work.
- The wsdl I'm using is different than the wsdl they have agreed to.
- I'm going to have to figure out how to manually deserialize the responses.
Any help is appreciated. I've tried to include what I thought was pertinent, but there was a lot of editing since the wsdl, xsd's, and Reference.cs are all fairly large.