Re: [xsl] Web-sevices in xslt

Subject: Re: [xsl] Web-sevices in xslt
From: bryan rasmussen <rasmussen.bryan@xxxxxxxxx>
Date: Thu, 12 Jan 2006 10:37:35 +0100
It looks to me from your javascript that you may be based in Windows
Jscript (running on IE, Wscript, in ASP?)
If so, and you're using MSXML as your processor you should be able to
translate your script rather easily to it as an extension function.

The same situation will apply to other processors, i.e. will need to
write an extension function or find one targetting that processor.

XSLT processors tend to support HTTP Get, although I don't think this
is actually required by the 1.0 spec, may be wrong haven't checked in
a while, but at any rate have not found one yet that does not support
it to some extent via use of the document function.




On 1/11/06, Antsnio Mota <amsmota@xxxxxxxxx> wrote:
> Because, as per my example, i need to set some request headers and
> send some xml envelope in a post, and the examples only show how to do
> a get with parameters on the url...
>
> I'm now trying to look at calling REST Web Services from xsl, it seems
> that works "with the four well-defined verbs: GET, POST, PUT, and
> DELETE"...
>
> Anyone knows anuthing about this?
>
>
> Thanks again.
>
>
> ------------------------------
>
> Date: Tue, 10 Jan 2006 21:34:32 +0100 (CET)
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> From: Florent Georges <darkman_spam@xxxxxxxx>
> Subject: RE: [xsl] Web-sevices in xslt
> Message-ID: <20060110203432.27545.qmail@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
>
> Antsnio Mota wrote:
>
> > 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.
>
>  Why?
>
> --drkm
>
>
>
>
> Date: Tue, 10 Jan 2006 18:48:54 +0000
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> From: =?ISO-8859-1?Q?Ant=F3nio_Mota?= <amsmota@xxxxxxxxx>
> Subject: Web-sevices in xslt
> Message-ID: <2fa554470601101048o5c19dbd5j@xxxxxxxxxxxxxx>
>
> 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
>
> =09var uri=3D"http://portosanto/todows/service1.asmx";
> =09var xmlhttp =3D new XMLHttpRequest();=09
> =09xmlhttp.open("POST", uri, true);
> =09xmlhttp.setRequestHeader("Content-type", "text/xml");
> =09xmlhttp.setRequestHeader("SOAPAction", "http://tempuri.org/HelloWorld";);
> =09xmlhttp.onreadystatechange =3D function()
> =09{
> =09=09if(xmlhttp.readyState =3D=3D 4){
> =09=09//debugger
> =09=09=09FRAME_MAIN.document.body.innerText =3D xmlhttp.responseBody;
> =09=09}
> =09}
> =09var sopa =3D '<?xml version=3D"1.0" encoding=3D"utf-16"?>'+
> =09=09'<soap:Envelope
> xmlns:soap=3D"http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance";
> xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema";>'+
> =09=09'<soap:Body>'+
> =09=09'<'+name+' xmlns=3D"http://tempuri.org/"; />'+
> =09=09'</soap:Body>'+
> =09=09'</soap:Envelope>';
> =09xmlhttp.send(sopa);
>
> So i have to set some headers and some content.
>
> Is there a way to do this?
>
> Thanks.

Current Thread