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

Subject: Re: [xsl] Problem while calling Web service through XSL code
From: Abel Braaksma <>
Date: Sun, 13 Jan 2008 22:15:06 +0100
Kavita Surana wrote:
Thank you, Mike for your quick reply.

Also thank you for pointing out my mistake of calling FOP as XSLT processor.

As you mentioned, when call to document() fails, it returns empty-set and
in my case there was no way for me to get the exact reason of failure
as I was testing locally using XMLSpy.

However, when I tried the code by changing packet size using DrTCP tool, it worked fine. Really don't know the reason behind it as I don't have much idea about things that happens in background when we make call to document() function, i just know its Http GET request. But one thing I would like to mention here is that one of the request parameters that I was passing was large(more than 1k). So is a limitation of GET call on length of url string applies here? If so, what can be the solution in such cases? Can we specify POST instead of GET by some way?

GET is part of the HTTP protocol. The length of the GET request is by definition unlimited (see RFC 2616), but practically I believe the limits are around 64K. However, many servers and browsers tend to limit GET requests around 4K already (and with the escaping involved you can sometimes hit that mark quicker than expected). As an example of other limits: IE has a limit of 2K, see

Another limit is implied by SGML that states that a URL can only be 1024 characters max. Specific schemes may have their own limits. An older URI specification (RFC 2068) said "Servers should be cautious about depending on URI lengths above 255 bytes, because some older client or proxy implementations may not properly support these lengths."

Of course, if you specify a URI of the http scheme it is quite likely that an HTTP request (of the form GET) will be issued, but this is not defined by the XSLT standard, which only states that the URI must be valid. I.e., if you use the file scheme or the jar scheme something completely different may go on in the background.

So, in summary, XSLT does not limit the lengths, but the server serving your document may.

XSLT does not provide support for HTTP POST requests, though an XSLT processor may do so by a special scheme or an extension instruction/function. You can yourself create a way for a POST request by registering your own scheme and use it with, for instance, URIResolver in Saxon/Java.

-- Abel Braaksma

Current Thread