R
Rafia Tapia
Hi
I have defined the following object that is return by my web service
public class MyCustomObj
{
private string ObjID;
private string ObjTitle;
private List<ObjProperty> ObjProperties;
//The above private variables have the corresponding public
properties
}
public struct ObjProperty
{
public string PropertyName;
public string PropertyType;
public StringCollection PropertyValues;
}
when I invoke the web service through the browser, I see my object with all
of its properties including the type List<ObjProperty> but the object that
is returned to the client application does not show the values of the
variable defined in ObjProperty. In other words when I invoke the web
service I get the following xml returned to the brower
<MyCustomObj>
<ObjID>1</ObjID>
<ObjTitle>Web Title</ObjTitle>
<ObjProperties>
<ObjProperty>
<PropertyName>SEOEnabled</PropertyName>
<PropertyType>System.Boolean</PropertyType>
<PropertyValues>
<string>False</string>
</PropertyValues>
</ObjProperty>
<ObjProperty>
<PropertyName>Users</PropertyName>
<PropertyType>System.String</PropertyType>
<PropertyValues>
<string>Ben</string>
<string>John</string>
</PropertyValues>
</ObjProperty>
</ObjProperties>
</MyCustomObj>
but the object return to the client application has count of two for the
List<ObjProperties> variable but all the variables of each of the
ObjProperty is null. Can anyone please tell me what I am doing wrong.
Thanks
I have defined the following object that is return by my web service
public class MyCustomObj
{
private string ObjID;
private string ObjTitle;
private List<ObjProperty> ObjProperties;
//The above private variables have the corresponding public
properties
}
public struct ObjProperty
{
public string PropertyName;
public string PropertyType;
public StringCollection PropertyValues;
}
when I invoke the web service through the browser, I see my object with all
of its properties including the type List<ObjProperty> but the object that
is returned to the client application does not show the values of the
variable defined in ObjProperty. In other words when I invoke the web
service I get the following xml returned to the brower
<MyCustomObj>
<ObjID>1</ObjID>
<ObjTitle>Web Title</ObjTitle>
<ObjProperties>
<ObjProperty>
<PropertyName>SEOEnabled</PropertyName>
<PropertyType>System.Boolean</PropertyType>
<PropertyValues>
<string>False</string>
</PropertyValues>
</ObjProperty>
<ObjProperty>
<PropertyName>Users</PropertyName>
<PropertyType>System.String</PropertyType>
<PropertyValues>
<string>Ben</string>
<string>John</string>
</PropertyValues>
</ObjProperty>
</ObjProperties>
</MyCustomObj>
but the object return to the client application has count of two for the
List<ObjProperties> variable but all the variables of each of the
ObjProperty is null. Can anyone please tell me what I am doing wrong.
Thanks