Re: xsi:nil=true vs missing element

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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



.



Relevant Pages

  • Re: method interface - hash argument vs. named parameters
    ... differentiate between a hash passed to a method and named parameters. ... I would expect stuck, because the difference seems nothing more than visual. ... I suppose if this method interface is absolutely necessary, ... better into the options hash, which you could then extract it from, inside ...
    (comp.lang.ruby)
  • Re[3]: ipsec packet filtering
    ... > is of no use in many scenarios since higher protocol information (like ... > ports for TCP/UDP) is hidden in encrypted payload. ... And that's what the `man natd' says. ... > interface works for you? ...
    (freebsd-net)
  • Re: Question on abstract classes versus interfaces
    ... using interfaces in some scenarios, I am just not sure what it is. ... abstract classes and interfaces. ... You've got to realize that if you inherit from an abstract class, ... interface: it is always possible to easily mock/stub objects. ...
    (comp.lang.java.programmer)
  • method interface - hash argument vs. named parameters
    ... interface that is quite 'dense', and I need to be able to ... differentiate between a hash passed to a method and named parameters. ... Or am I stuck? ...
    (comp.lang.ruby)
  • Re: Practical uses of UI thread
    ... Forgive me for stating the obvious... ... need your application to interface with the user? ... and the one that pumps the Windows messages. ... I'm looking for some example scenarios where a UI thread would be absolutely ...
    (microsoft.public.vc.mfc)