Assume that my XSD defines MiddleNames as minOccurs=0, maxOccurs=1,
nillable=true. From my XSD and WSDL, I am using WSDL.EXE to create a Server
Interface which I can then implement. All ok so far. But, I need to be
able to differentiate between these three scenarios of incoming data:
<Record>
<FirstName>Fred</FirstName>
<MiddleNames>George Oliver</MiddleNames>
<Record>
<Record>
<FirstName>Fred</FirstName>
<Record>
<Record>
<FirstName>Fred</FirstName>
<MiddleNames xsi:nil="true" />
<Record>
The intention is that the first example will update the MiddleNames value,
the second will leave it unchanged and the third will remove it. I had
rather hoped that the generated VB .NET code would provide a property value
allowing me to differentiate between the second and third examples. It
seems that such a property is not generated, making it impossible to tell
the two examples apart.
Am I missing something? Alternatively is there a better way to do the
"leave it unchanged" scenario (my second example)? I don't really want to
go down the line of having all the elements passed in every time.
Thanks
Nick Locke - 20 Feb 2008 17:50 GMT
Adding a little info - I can follow the guidance here
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2657167&SiteID=1 to
add xxxxSpecified as a property. That works, but entails manual editing of
the Interface Class which does not seem like something I should be doing.
There does not seem to be a way to persuade WSDL.EXE to add those
properties?
> Assume that my XSD defines MiddleNames as minOccurs=0, maxOccurs=1,
> nillable=true. From my XSD and WSDL, I am using WSDL.EXE to create a
[quoted text clipped - 28 lines]
>
> Thanks