Exclude property fron Webservice

M

mindflower

lets say i have a User with three properties, ID, Name and InternalName and i
have a WebMethod UpdateUser(User u). Now I would like to ignore the property
InternalName in the WDSL definition. Is there a possibilty to do that, e.g.
by an attribute on the property definition? The background is that i would
like to use my business object definitions in the webservices, but hide some
of the properties from the outside.

Thanks for any hint

Stefan
 
R

RYoung

I think if you add the XmlIgnore attribute to the property it will do what
you need.

class User
{
[XmlIgnore]
public string InternalName;

public string ID;
}

Ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top