Ask a Question related to ASP.NET Web Services, Design and Development.
-
Patrick #1
Relation between XmlNode and WSDL minoccurs or type
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
Patrick Guest
-
Problem with minOccurs="0" in client WSDL
I have created a web service for a client to consume. The element I am having trouble with is, as described in their WSDL: <xsd:element... -
XmlDocument Web method returns type XmlNode
I developed a web method that returns type XmlDocument. But a client calling the web method will only accept the return value as datatype... -
generating minoccurs=1 for strings in wsdl ?
If I have string types in my object in my web service. In wsdl file it always comes as minoccurs=0. Is there a way to fix this ? Regards, AK -
PROBLEM: webservice, XmlNode return value, XMLSchema and WSDL
Is there a way to make the following: 1. we have a webmethod, that should return an xml document that is valid respect an XmlSchema. 2. the web... -
controlling minOccurs and maxOccurs in wsdl
I was wondering if there was an attribute that I could apply to an array that would allow the minOccurs and maxOccurs to be specified in the...



Reply With Quote

