Returning NULL to C#-client
| From: | Michael Gelnar | Date: | Thu, 25 Sep 2003 15:32:11 +0000 |
| Subject: | Returning NULL to C#-client | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-1077@lists.php.net to get a copy of this message | ||
Hi!
I wrote a PEAR:SOAP webservice reading data out of a database and returning
it in form of a struct to a C#-client.
The problem is, that C# can't read NULL values for datatypes like INT,
DOUBLE etc.
When I use the attribute "nil=true" on an element of the struct it works
fine, but only with strings.
In C# the string in the struct is NULL. But INT, DOUBLE etc are initialized
with "0" by C#.
How can I return NULL values to the client?
I thought about using the SqlTypes, because these are able to get the value
NULL.
But how can I implement these Types in my PEAR:SOAP webservice?
Where do I get such a schema?
Or is there any other solution for this problem?
Thanks!