RE: [xsl] Problem while calling Web service through XSL code

Subject: RE: [xsl] Problem while calling Web service through XSL code
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 7 Jan 2008 10:01:18 -0000
If a call to document() fails, then either the failure is reported, or the
processor returns an empty node-set, at processor discretion. It looks as if
your processor is returning an empty node-set, which would account for
string-length() being 0.

Without further information, it's impossible to tell why it's failing. See
if there is an option in your XSLT processor that allows you to get hold of
diagnostic information of some kind. Without it, you can only work by trial
and error. There are all sorts of reasons a request can succeed from your
browser but fail from your XSLT processor, for example it can be due to the
proxy settings being correct in your browser but incorrect in the Java VM. 

> 
> Below is the snippet of XSL code for calling a Web service :-
> 
> <xsl:variable name="params" select="concat('param1=',$value1, 
> '&param2=',value2, '&param3=',value3, '&param4=',value4)" />

I'm surprised to see this since it isn't well-formed XML and will be
rejected by a conforming XML parser. & must always be escaped as &amp;
> 
> I am also taking care of encoding parameter values before 
> passing it to the service and removing special characters 
> like '#' if present in any parameter value.

So there are lots of opportunities for bugs to be present in the code that
you haven't shown us?
> 
> XSLT Processor : - FOP 0.93 version
> 

FOP 0.93 is not an XSLT processor!

Michael Kay
http://www.saxonica.com/

Current Thread