[xsl] Web-sevices in xslt

Subject: [xsl] Web-sevices in xslt
From: António Mota <amsmota@xxxxxxxxx>
Date: Tue, 10 Jan 2006 18:48:54 +0000
Hello:

I've been googling for this, but the results i've got are not
satisafactory (e.g. http://www.xml.com/pub/a/2004/12/01/tr.html),
because they call the web-service as a URL with parameters.

However, i wanted to do something in the lines of what i'm doing now
with Javascript/ajax

	var uri="http://portosanto/todows/service1.asmx";
	var xmlhttp = new XMLHttpRequest();
	xmlhttp.open("POST", uri, true);
	xmlhttp.setRequestHeader("Content-type", "text/xml");
	xmlhttp.setRequestHeader("SOAPAction", "http://tempuri.org/HelloWorld";);
	xmlhttp.onreadystatechange = function()
	{
		if(xmlhttp.readyState == 4){
		//debugger
			FRAME_MAIN.document.body.innerText = xmlhttp.responseBody;
		}
	}
	var sopa = '<?xml version="1.0" encoding="utf-16"?>'+
		'<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>'+
		'<soap:Body>'+
		'<'+name+' xmlns="http://tempuri.org/"; />'+
		'</soap:Body>'+
		'</soap:Envelope>';
	xmlhttp.send(sopa);

So i have to set some headers and some content.

Is there a way to do this?

Thanks.

Current Thread