Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XML
Password Reminder
Register
| 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 16th, 2007, 10:03 AM
Registered User
 
Join Date: Jun 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default posting form data as XML string problem

Hi folks,

I've been asked to post data from a form to a message broker system being tested by another team. I've been told all I should need to do is post the data using http request in the following format to a server so I tried the following script:

Code:
var http =new HttpClient(); 
var url="http://..."; 
http.contentType = "'text/xml'"; 
http.requestHeader = ['SOAPAction: "http://..."'];  

http.postData =''; 
http.postData +=''; 
http.postData +=''; 
http.postData +=''; 
http.postData +=''; 

http.postData +=''; 
http.postData +=''+firstname+''; 
http.postData +=''+surname+''; 
http.postData +='
'+address+'
'; 
http.postData +=''+county+''; 
http.postData +=''+postcode+''; 
http.postData +=''+emailaddress+''; 
http.postData +=''+telno+''; 
http.postData +=''+requestdetails+''; 
http.postData +=''+requestRef+''; 
http.postData +=''+entryDate+''; 
http.postData +=''; 
http.postData +=''; 
http.postData +=''; 
http.postData +=''; 
//http.postData = escape(http.postData); 

var sendMyRequest = http.sendRequest(url);
It posts but breaks off after the first line of post data.

Basically I need a way to post the xml formatted values from the form to the message broker. The guy who's working with the message broker thinks that using the SOAP client is over the top and we only need to send the values formatted as xml, as in the script but I can't get it to post in that format. The message broker is expecting an XML string formatted in this way.

I'm pretty new to XML and would appreciate anyone's help or at least pointed in the right direction.
Thanks
Reply With Quote
Reply


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
Problem Posting XML data via XMLHTTP steelrose XML 1 November 15th, 2007 05:19 PM
AJAX form posting problem. NisarAhamed Ajax 0 November 21st, 2006 01:09 AM
Problem with Posting an ASP .Net web form eliea ASP.NET 1.0 and 1.1 Basics 4 September 11th, 2006 02:59 AM
ASP.NET not posting form data sqzgnlib ASP.NET 1.0 and 1.1 Basics 2 May 10th, 2005 09:59 AM
problem in posting info frm child form to parent aravwind General .NET 2 July 28th, 2004 06:04 AM



All times are GMT -4. The time now is 01:31 PM.


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