By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,871 Members | 1,046 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,871 IT Pros & Developers. It's quick & easy.

XML: POSTing Form-Data

P: 90
I'm using Access 2003 and I need to send an xml file via POST.
I've got two others set up just the same, both work fine.
The problem is, this one tells me I need to send it as form-data with a name of 'xmlmsg'. I have no idea *how* to set that. Below is the code I'm trying, which removes both of those error messages and just throws <error>-3</error> at me. The people I'm trying to send it too are less than helpful. The one I spoke to doesn't know what it means.
The xml document is fine, it's just the sending it part I need help with.
Would someone please go over this and help me figure out where I've gone wrong?
The only changes between this and the working ones are the headers. The working two don't have/need any headers. So I'm pretty sure my problem lies there.

Expand|Select|Wrap|Line Numbers
  1.     Set myHTTP = CreateObject("msxml2.xmlhttp")
  2.     Set myDom = CreateObject("MSXML2.DOMDocument")
  3.     myDom.async = False
  4.     myDom.loadXML myxml
  6. myHTTP.Open "post", "<--website removed-->", False
  7. myHTTP.setRequestHeader "Content-Type:", "multipart/form-data; boundary=" & Boundary
  8. myHTTP.setRequestHeader "Content-Disposition:", "form-data; name=""xmlmsg"""
  9. myHTTP.send (myDom.Text)

PS: 'Boundary' is a random line (------------46851 kinda thing) that is specified in the code, and myxml is the xml to send, also specified in the code.
Sep 16 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 31,662
Mandi, I'm afraid XML is outside of my experience (along with most HTML if truth be told), so I can do little to help except change your title to, hopefully, attract the attention of our more XML savvy experts.

Good luck & Welcome to Bytes!
Sep 16 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.