Encoded string coming out null in WCF request

Elison

New Member
I am facing a weird issues while fetching base64 encoded string sent from client to WCF Service at server. This string is always coming null in my WCF service method. The Business class I am having is:\[code\][DataContract(Namespace = "")]public class Test{ [DataMember] public int Id { get; set; } [DataMember] public int Name { get; set; } [DataMember] public int Age { get; set; } [DataMember] public string MyString { get; set; }}\[/code\]I am sending the post data in xml for to my WCF service:\[code\] string data = http://stackoverflow.com/questions/12693581/string.Format("<Test><Id>{0}</Id><Name>{1}</Name><Age>{2}</Age><MyString>{3}</MyString></Test>", 1, "name", 20, Convert.ToBase64String(image));//image is in bytes\[/code\]Above "image" is in bytes.While receiving the client data at server in MyTestService.svc.cs:\[code\] public void CreateTest(Test test) {\[/code\]in the "test" object I am getting the values of all properties which I sent from client except "MyString" property. It is always coming null. I double checked in Fiddler the "MyString" tag in xml contains the base64 encoded string. Can you help me fixing this?Is there any limit for length of property value in xml tag. The encoded string of image is long enough.
 
Back
Top