DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   RSS, Web Services and SOAP (http://www.daniweb.com/forums/forum151.html)
-   -   posting data from a form to msg broker fail (http://www.daniweb.com/forums/thread83641.html)

Cragdo Jul 16th, 2007 7:13 am
posting data from a form to msg broker fail
 
1 Attachment(s)
Hi folks,

I been asked to post data from a form to a msg broker system being tested by an external team. I have been told that all I should do is post the data using http request in the following format to a server.

var http =new HttpClient(); 
var url="http://P510-4.nottscc.gov.uk:7080/FOI";
http.contentType = "'text/xml'";
http.requestHeader = ['SOAPAction: "http://P510-4.nottscc.gov.uk:7080/
FOI"'];

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 the post data

The form is on:
http://www.nottinghamshire.gov.uk/ho...roker-form.htm

The msg broker system expects a package of XML. I'm being told it just needs to send a normal http post and doesn't need to use web services.

I've tried posting as he says (see attached - the variables are from request strings from the form) but it doesn't accept it.

Can anyone tell me why this does not work please. I am fairly new to XML and would appreciate any help.

Thanks


All times are GMT -4. The time now is 3:44 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC