|
Subject: Re: [xsl] Problem while calling Web service through XSL code From: Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx> Date: Sat, 19 Jan 2008 19:24:40 +0000 |
>>>>> "Florent" == Florent Georges <lists@xxxxxxxxxxxx> writes:
Florent> Colin Adams wrote:
>> On 14/01/2008, Andrew Welch wrote:
>>> http://www.andrewjwelch.com/code/xslt/soap/xslt-soap-extension.html
>> It is interesting.
>> The last bit on making several calls could be problematic if
>> the evaluation order of Saxon were to change in the future to
>> be less predictable (for instance, with parallel processing).
Florent> The point is IMHO to not do something not guaranteed by
Florent> the XSLT processing model. For instance calling only
Florent> stateless web services (or at least web services whose
Florent> the state will not interfere). Or stateful services but
Florent> with guarantee from the XSLT processing model:
Florent> <xsl:variable name="id" select=" soap:request($arg1,
Florent> 'http://to.be/startProcess')/proc-id"/>
Florent> <xsl:variable name="arg2"> <soapenv:Envelope> ...
Florent> <xsl:value-of select="$id"/> ... <soapenv:Envelope>
Florent> </xsl:variable>
Florent> <xsl:sequence select=" soap:request($arg2,
Florent> 'http://to.be/continueProcess')"/>
Florent> I think that this could be useful to get few data
Florent> within a single transform (several transforms being
Florent> orchestrated by time-aware languages). My guess that
Florent> XProc will be maybe more appropriated for the general
Florent> case.
I agree wholeheartedly. I wish I had time to implement it.
Anyway, I have added an extension attribute and an extension function
to Gestalt for performing such things as SOAP, XML-RPC, and database
requests.
The extension attribute is to xsl:result-document. Gexslt:method
specifies the method used to store the result. For http: URIs, only
PUT and POST are acceptable (the former being the default).
The extension function is gexslt:response-body. It takes a single
string as the sole required argument, which is interpreted as the
(resolved) value of the href attribute on an xsl:document instruction,
and returns any available response body (or an error).
I tested it with Andrew's SOAP example above, and got back an
appropriate SOAP error response.
Maybe an additional extension function is needed to get the
content-type of the response body.
Florent> _____________________________________________________________________________
Florent> Ne gardez plus qu'une seule adresse mail ! Copiez vos
Florent> mails vers Yahoo! Mail http://mail.yahoo.fr
--
Colin Adams
Preston Lancashire
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Problem while calling Web, Florent Georges | Thread | Re: [xsl] Problem while calling Web, Abel Braaksma |
| Re: [xsl] xpath query, Martin Honnen | Date | RE: [xsl] xpath query, Michael Kay |
| Month |