Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
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 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 November 15th, 2007, 04:48 PM
Authorized User
 
Join Date: Jun 2006
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:

<tag1>value</tag1>

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


Thanks!
__________________
Thanks!
 
Old November 15th, 2007, 05:19 PM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

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 -/





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





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