Relation between XmlNode and WSDL minoccurs or type

Posted: 10-15-2003, 12:26 PM
I have a WSDL-file that looks like the following (Part of it)

- <s:complexType name="Persoonslijst">
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Persoon"
type="s0:CAT01type" />
</s:sequence>
</s:complexType>

- <s:complexType name="CAT01type">
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Geboorte"
type="s0:GR03type" />
</s:sequence>
</s:complexType>

- <s:complexType name="GR03type">
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Geboortedatum"
type="s:unsignedInt" />
<s:element minOccurs="0" maxOccurs="1" name="Geboorteplaats"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Geboorteland"
type="s:integer" />
</s:sequence>
</s:complexType>

-------------------------------------------------------------------------

I have a XMLDataDocument where I have specified a node
[Geboortedatum].
As long as it has a value like

<Persoonslijst>
<Persoon>
<Geboortedatum>19800305</Geboortedatum>
</Persoon>
</Persoonslijst

Deserialization works fine.

But when the <Geboortedatum> is empty like <Geboortedatum />,
deserialization fails.

Question...

In my first WSDL the value of minoccurs of Geboortedatum was set to 1
In my last WSDL i set the minoccurs to 0, expecting (and hoping!) that
it was possible to leave the Geboortedatum node empty. But this fails.

I'm expecting now that because the type = unsignedInt, it validates
the value I'm want to deserialize against this type. And a value of
empty is not valid.
(We I change the type from unsignedInt to string, there is no problem)

So can anyone please tell me what the true story is.

Kind regards Patrick
Reply With Quote

Responses to "Relation between XmlNode and WSDL minoccurs or type"

 
LinkBack Thread Tools Search this Thread Display Modes
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PROBLEM: webservice, XmlNode return value, XMLSchema and WSDL g.fiorentini ASP.NET Web Services 0 09-10-2003 08:05 AM
WSDL.EXE: WSDL Import Directive Stephen Edgecombe ASP.NET Web Services 0 08-13-2003 06:38 AM
controlling minOccurs and maxOccurs in wsdl Brad Quinn ASP.NET Web Services 1 08-01-2003 09:09 PM
XmlNode -> Schema -> Object Brad Quinn ASP.NET Web Services 1 07-30-2003 03:33 AM
one to many relation writing to Access database Dan Brussee ASP 2 07-02-2003 07:38 AM