Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XML
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 15th, 2007, 04:48 PM
Authorized User
Join Date: Jun 2006
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem Posting XML data via XMLHTTP

Hello. Not sure if this is best asked here or in a VB forum, but I'll try here first.

I think this issue has to do with the header. I can send:


but when I add the XML header tag:
<?xml version="1.0" encoding="UTF-8"?><tag1>value</tag1>

it's hanging my program.

The VB code I'm using is:
Set oHttp = CreateObject("Microsoft.XmlHttp")
sInxml = "<?xml version=" & Chr(34) & "1.0" & Chr(34) & " encoding=" & Chr(34) & "UTF-8" & Chr(34) & "?><tag1>value</tag1>"
oHttp.Open "POST", sURL, False
oHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"
oHttp.send sInxml

Reply With Quote
  #2 (permalink)  
Old November 15th, 2007, 05:19 PM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts

If its hanging, its likely on the server side that the problem resides.

However the Content-Type line looks wrong - you're not submitting form data are you, but xml, so either text/xml or application/xml should be used.

/- Sam Judson : Wrox Technical Editor -/
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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
Problem with greek characters while posting data f abiprojects Flash (all versions) 2 August 23rd, 2007 09:46 AM
posting form data as XML string problem Cragdo XML 0 July 16th, 2007 10:03 AM
PROBLEMS! Posting Form Fields with XMLHTTP kevorkian Classic ASP XML 2 December 7th, 2006 03:43 PM
XML Post using microsoft.XMLHTTP csmajor231 XML 0 April 5th, 2004 03:06 PM

All times are GMT -4. The time now is 12:04 AM.

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