Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function beginTest()
- {
- var mess = '<?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><Echo xmlns="http://blahblah.com/Services/"><s>string</s></Echo></soap:Body></soap:Envelope>';
- var service = '/services-1.0/Test.asmx/Echo';
- $.ajax({
- url: service,
- type: "POST",
- dataType: "xml",
- data: mess,
- complete: endTest,
- error: processError,
- contentType: "text/xml"
- });
- return false;
- }
- function endTest(xmlHttpRequest, status)
- {
- $(xmlHttpRequest.responseXML).find('string').each(function()
- {
- var name = $(this).text();
- document.getElementById("myDiv").innerHTML = name;
- }
- );
- }
- function processError(data, status, req) {
- document.getElementById("myDiv").innerHTML = req.responseText + " " + status + " " + req;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement