[WebInvoke( Method="POST" ,UriTemplate = "Login?lName={loginName}&lPWD={password}&sID={sessionID}&domain={domain}")]
[OperationContract]
public ResultInfo Login(string loginName, string password,string sessionID,string domain)
{
return new ResultInfo()
{
Message = loginName,
OptType = ResultType.FAILED
};
}
and i call service like this:
PostSubmitter post = new PostSubmitter();
post.Url = Constants.SSOCenterURL + "/Login";
post.PostItems.Add("lName", "kkdhf123456");
post.PostItems.Add("lPWD", "edU7qiWjrTzy764cZ7ahEg==");
post.PostItems.Add("sID", "rx543e12xc54235dhd23");
post.PostItems.Add("domain", "localhost");
post.Type = PostSubmitter.PostTypeEnum.Post;
string result = post.Post();
but service NOT get parametes . The 'loginName' will eques NULL.
am i missing something? how to let WCF REST get the post data?
thx your view.