[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: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Sun, 13 Jan 2008 22:15:06 +0100
Re:  Problem while calling Web service through XSL code
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 http://support.microsoft.com/kb/208427.


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.

HTH,
Cheers,
-- Abel Braaksma

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.