Hi i am developing a restful webservice in wcf. i have created a method in service file which takes a vuser(entity class) and process it and register that the user. The requirement is to send the vuser in xml format to the creatuser method. my question is how do i send the vuser to test my method in the xml format to the uri.Please help me.Thank you.
namespace Authentication
{
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Single)]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class Authenticate : IAuthenticate
{
#region IAuthenticate members
public string CreateUser(VUser user)
{
if (user == null)
{
}
}
namespace Authentication
{
[ServiceContract]
public interface IAuthenticate
{
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = AuthenticateUriTemplate.CreateUser)]
string CreateUser(VUser user);
//[OperationContract]
//[WebInvoke(Method = "POST", UriTemplate = AuthenticateUriTemplate.Login)]
//string Login(string userid,string password);
//[OperationContract]
//[WebGet]
//void Logout(string AuthToken);
//[OperationContract]
//[WebInvoke(Method="PUT", UriTemplate=BlogUriTemplates.AdminPost)]
//string ChangePassword(string AuthToken,string oldPassword, string newPassword);
//[OperationContract]
//[WebGet]
//string RetrievePassword(string AuthToken, string emailid);
}
}
#endregion IAuthenticate
}
}