Re: xsi:nil=true vs missing element
- From: "Nick Locke" <nick@xxxxxxxxxxxxxxx>
- Date: Wed, 20 Feb 2008 17:50:41 -0000
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?
"Nick Locke" <nick@xxxxxxxxxxxxxxx> wrote in message
news:CaudnYNs0PD1zyHanZ2dneKdnZydnZ2d@xxxxxxxxxxxxxxxxx
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
.
- References:
- xsi:nil=true vs missing element
- From: Nick Locke
- xsi:nil=true vs missing element
- Prev by Date: xsi:nil=true vs missing element
- Next by Date: Accessing intranet Business Layer using web services
- Previous by thread: xsi:nil=true vs missing element
- Next by thread: Accessing intranet Business Layer using web services
- Index(es):
Relevant Pages
|