I need to send XML to a home grown web server on port 80 that "sort of kind of" understands XML serialization. Will eventually need to be able to write to many of them at the same time. (up to 1000)
The HTTP protocol for the home grown server is tight and not an issue, but I will need to use their library for the XML parsing and serialization.
What library/approach for web should I use for the HTTP communication?
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
I would use HttpClient as well (not sure what you are using on the server side). In particular you have extension methods to handle JSON or XML serialization for you so if done properly your only concern should be to post objects and serialization/deserialization
could be done for you...
Member
129 Points
314 Posts
questions about which dot net library and methods to use
Sep 29, 2017 10:27 PM|talldaniel|LINK
I need to send XML to a home grown web server on port 80 that "sort of kind of" understands XML serialization. Will eventually need to be able to write to many of them at the same time. (up to 1000)
The HTTP protocol for the home grown server is tight and not an issue, but I will need to use their library for the XML parsing and serialization.
What library/approach for web should I use for the HTTP communication?
thanks
All-Star
53041 Points
23613 Posts
Re: questions about which dot net library and methods to use
Sep 30, 2017 04:09 PM|mgebhard|LINK
I would use the HttpClient.
https://msdn.microsoft.com/en-us/library/system.net.http.httpclient(v=vs.118).aspx
Contributor
3310 Points
1607 Posts
Re: questions about which dot net library and methods to use
Oct 02, 2017 02:04 AM|Edward Z|LINK
Hi talldaneil,
Did the suggestion from mgebhard work for you? If not, it would be helpful if you could share us your current issue.
I suggest you try another option “WebClient”.
# Send XML via HTTP Post to IP:Port
https://stackoverflow.com/questions/1099021/send-xml-via-http-post-to-ipport
Best Regards,
Edward
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
129 Points
314 Posts
Re: questions about which dot net library and methods to use
Oct 02, 2017 01:37 PM|talldaniel|LINK
I will try this today and let you know.
All-Star
48510 Points
18072 Posts
Re: questions about which dot net library and methods to use
Oct 02, 2017 02:00 PM|PatriceSc|LINK
Hi,
I would use HttpClient as well (not sure what you are using on the server side). In particular you have extension methods to handle JSON or XML serialization for you so if done properly your only concern should be to post objects and serialization/deserialization could be done for you...