Skip to content

Instantly share code, notes, and snippets.

@code
Created December 10, 2009 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save code/253227 to your computer and use it in GitHub Desktop.
Save code/253227 to your computer and use it in GitHub Desktop.
var soap_raw_data = escape('<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><TestDB xmlns="http://itstechservices.com/" /></soap:Body></soap:Envelope>');
new Ajax.Request('http://ws.itstechservices.com/TruckServices.asmx',
{
method:'post',
postData: soap_raw_data,
requestHeaders: {SOAPAction: "http://itstechservices.com/TestDB", "Content-Type": "text/xml; charset=utf-8"},
onSuccess: function(transport){
var response = transport.responseText || "no response text";
//alert("Success! \n\n" + response);
},
onFailure: function(){ alert('Something went wrong...') }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment