How pass multiple body parameters in wcf rest
using webinvoke method(Post or PUT)xmlns="" in the request body ... ( see the pictures below )Whithout xmlns="" in the request body , problems can appear
[OperationContract]
[WebInvoke(Method = "POST",
ResponseFormat = WebMessageFormat.Xml,
RequestFormat = WebMessageFormat.Xml,
BodyStyle = WebMessageBodyStyle.Bare,
UriTemplate = "testpersondatapost")]
PersonData TestPersonDataPost(PersonData pd);
[DataContract(Namespace = "")]
public class PersonData
{
[DataMember]
public string Name { get; set; }
[DataMember]
public string User { get; set; }
[DataMember]
public string Email { get; set; }
[DataMember]
public string Password { get; set; }
}
public PersonData TestPersonDataPost(PersonData pd)
{
var response = new PersonData
{
Name = pd.Name,
User = pd.User,
Email = pd.Email,
Password = pd.Password
};
return response;
// return pd;
}
Strikingly sports fans are potentially at an unbelievable reasonable position. You can locate the standard distractions channels on the web. Today you can watch international sporting events online with video gushing. medios independientes
ReplyDelete