Eliad Ayehu Eliad Ayehu - 2 months ago 8x
C# Question

send list<xmldocument> to wcf, how to do it?

I'm trying to send List to wcf.
i want to send it as json, is there a way ?

when I'm trying to serialize, i get empty string, why ?

public string ImportXml(List<XmlDocument> docs,string token)
Account user = GetCurrentUser(token);
string url = string.Format("{0}ImportXml/{1}", ServiceUrl, user.Unumber);
string contentType = "text/json";
x.Serialize(Console.Out, docs);
string jsonReq = _serializer.Serialize(docs);
bool response = false;
HttpRequestHandler handler = new HttpRequestHandler();
string result = handler.HttpPostWithToken(url, jsonReq, contentType, token);
return result ;


finnally i got list of strings with xml in it.

it is much better, because that way we can work with anyone, and not only C#.

and i moved to newtonsoft instead JSS.