[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Problem while calling Web service through XSL code

Subject: Re: Problem while calling Web service through XSL code
From: Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx>
Date: Sat, 19 Jan 2008 19:24:40 +0000
Re:  Problem while calling Web service through XSL code
>>>>> "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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.