Start Free Trial
What steps should I use to implement HTTP POST of an XML document?
Requirement: We have been given the ability to create Orders by creating an XML document. One of the methods available is "HTTP POST of an XML document".
What steps or tools can I use to create the "HTTP POST of an XML document"?
8/22/2022 - Mon
Well, let's assume your xml is in a file and you are writing a C# DotNET console application.
You can run this application from a command line and pass the filename as the first argument.
The program should read the xml as a string rather than load it into an XDocument since you want to post the xml to a destination url.
The program would then instantiate a WebClient and call the UploadString() method passing the url to the server and the xml string. This will do the post.
Also, there is an UploadFile() method that may make this even easier since it will read the file for you.
Thanks for your response.
Are there any sample pieces of code that I can use & then plugin my XML data using the C# DotNET console application ?
I'm not an expert in C# ?
ASKER CERTIFIED SOLUTION
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Thanks for the code. I'll give it a shot & ask more questions if I get stuck later.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
Plans and Pricing
Certified Expert Program
© 1996-2023 Experts Exchange, LLC. All rights reserved. Covered by US Patent