J
Jiho Han
Here's the issue.
You have a class,
Class Person
{
public int id;
public string firstname;
public string lastname;
}
when you expose it via webservice,
[WebMethod]
public void UpdatePerson(Person)
{
...
}
How do I know whether a field value has been specified or not? For value
types, there is that matching XXXXSpecified buddy field, but for string type,
there doesn't seem to be one.
So if incoming Xml looks something like this:
<Person>
<firstname>Jiho</firstname>
</Person>
when deserialized into a Person object, lastname field will contain null,
which doesn't tell me whether the field is simply missing (thus safely ignored)
or lastname field should be set to null (in the database, for example).
Any idea how to go about this?
Thanks in advance.
Jiho Han
Senior Software Engineer
Infinity Info Systems
The Sales Technology Experts
Tel: 212.563.4400 x216
Fax: 212.760.0540
(e-mail address removed)
www.infinityinfo.com
You have a class,
Class Person
{
public int id;
public string firstname;
public string lastname;
}
when you expose it via webservice,
[WebMethod]
public void UpdatePerson(Person)
{
...
}
How do I know whether a field value has been specified or not? For value
types, there is that matching XXXXSpecified buddy field, but for string type,
there doesn't seem to be one.
So if incoming Xml looks something like this:
<Person>
<firstname>Jiho</firstname>
</Person>
when deserialized into a Person object, lastname field will contain null,
which doesn't tell me whether the field is simply missing (thus safely ignored)
or lastname field should be set to null (in the database, for example).
Any idea how to go about this?
Thanks in advance.
Jiho Han
Senior Software Engineer
Infinity Info Systems
The Sales Technology Experts
Tel: 212.563.4400 x216
Fax: 212.760.0540
(e-mail address removed)
www.infinityinfo.com