Re: [xsl] Webservices and XSLT

Subject: Re: [xsl] Webservices and XSLT
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Fri, 3 Feb 2012 08:57:32 +0000 (GMT)
"Szabo, Patrick (LNG-VIE)" wrote:


> I was looking online and found
several possibilities to work
> with soap and xslt but I can't wrap my head
around how this
> really works.

  Well, as with any other client (if we
restrict the discussion
to synchronous SOAP-over-HTTP Web services),
technically you
have to send POST requests (with the XML message as the
and you get the operation's XML response as the payload of the

  XSLT is very well suited to construct the XML request and
the XML response, but you'll need an extension to send
HTTP POST requests.
 The EXPath HTTP Client is implemented for
several processor, check your
processor to see if it does support
it.  More infos in the following pages
(including an example of
consuming a SOAP Web service):

> In no example online I see where the URL
to the wsdl is
> configured.

  If you expect more automated support in XSLT
from a WSDL,
that's another story.  I wrote once a WSDL compiler, that
"compiled" a WSDL to a stylesheet defining a function for each
Web service
operation, hiding all the communication technical
details for the user.  So
the user can just call a function by
passing directly the payload, and getting
back the response.

  With the WSDL in the above example, the generated
could be called like:

xmlns:tns=""; ...>

       <!-- import the library
generated from the WSDL -->

       <!-- the service operation request
       <xsl:variable name="request">
             <wsx:PlaceName>NEW YORK</wsx:PlaceName>

       <!-- invoke the
service operation -->
       <xsl:template name="main">
<xsl:sequence select="


  Unfortunately the WSDL
compiler was never released, but I can
send you a copy if you want...  Of
course, it relies on the
EXPath HTTP Client in order to send HTTP requests
under the hood.


Florent Georges

Current Thread