Wrox Programmer Forums
|
Classic ASP XML Using ASP 3 and XML. See also the XML category for more XML discussions not relating to ASP. NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 10th, 2004, 02:09 PM
Authorized User
 
Join Date: Sep 2004
Posts: 62
Thanks: 0
Thanked 1 Time in 1 Post
Default PROBLEMS! Posting Form Fields with XMLHTTP

Ok -- I can not figure this out. I am trying to post a large XML string to another url. I have been doing this previously in cold fusion but am trying to get all of my code up to date and it wont work in ASP. It should be very simple:

xml = Server.URLEncode(refi1_doc)

pingUrl = "https://xxx.xxxxxxx.com/b2b/incoming.asp"

set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlHttp.Open "POST", pingUrl, False
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlHttp.Send xml

This should just be URLEncoding the xml document and posting it. I am getting a "Bad XML" response - line 0, position 0 -- but I KNOW the xml string is well formed -- have already tested that. The guy on that end who was trying to help me stated that the string MUST be in a form field named "xml" (all lowercase) and it has to be a post -- that's it! Isn't that what I am doing? I even tried adding to the end of the URL:

pingUrl = "https://xxx.xxxxxxx.com/b2b/incoming.asp?xml="

Nothing is working. How do I specify that the data being sent is in a form field called "xml"? Anyone know what is going on here?
 
Old September 13th, 2004, 04:28 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

No, you aren't sending the xml=... part. Any data you send using this content type must be in name/value pairs. You are sending the value but not the name.
xmlHttp.Send "xml=" & xml
 
Old December 7th, 2006, 03:43 PM
Registered User
 
Join Date: Dec 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello ,

I'm Having the same problem on my MSXML2.ServerXMLHTTP
It is appearing the same message but intermitently, Sometimes works fine and some time it not ....

Could please tell me how do you solve your issue ??

Thanks






Similar Threads
Thread Thread Starter Forum Replies Last Post
Posting XML to an ASP page using XMLHTTP Kells Classic ASP XML 5 April 24th, 2014 05:54 AM
form.submit (PUT) via XMLHTTP maximax Javascript 0 February 20th, 2008 12:32 PM
Problem Posting XML data via XMLHTTP steelrose XML 1 November 15th, 2007 05:19 PM
Encoding problems with XMLHTTP boris Classic ASP XML 6 June 14th, 2006 08:24 AM
Using XMLHTTP to POST form data channer Classic ASP XML 8 January 6th, 2004 05:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.