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

Subject: Re: [xsl] Problem while calling Web service through XSL code
From: "M. David Peterson" <m.david@xxxxxxxxxxxxx>
Date: Sun, 13 Jan 2008 14:04:43 -0700
On Sun, 13 Jan 2008 13:08:38 -0700, Kavita Surana <kavitass2@xxxxxxxxxxx>

However, when I tried the code by changing packet size using DrTCP tool,
it worked fine.

Strange. One thing I did notice in looking at your original post,

	"<xsl:variable name="params"
select="concat('param1=',$value1,'&param2=',value2, '&param3=',value3,
'&param4=',value4)" />"

How are you getting the &'s past the XML parser without escaping?  Is this
just a copy/paste issue where your email client converted the &amp; to &?

So is a limitation of GET call on length of url string applies here?

Yes. Well, it can, anyway. And that limitation can be set in multiple locations. See l and in particular one of the follow-up comments @ l#comment-2129447 which highlights that it's not just the client software that can get in the way of lengthy URI's.

If so, what can be the solution in such cases? Can we specify POST
instead of GET by some way?

Not without writing an extension function in another language and then calling that function inside of your XSLT.

Please suggest.

If you have access to an EXSLT or XSLT 2.0 processor, write an extension function in a supported language. Andrew welch has a nice example of making a SOAP request using an extension function written in Java > In gleaning from your original post it would seem you have access to Altova's XSLT 2.0 processor which means you *should* be able to write an extension function in C# or any other .NET language and call it from within an XSLT 2.0 transformation. You can find an example of making an HTTP POST request via a C# extension function @ WebRequest.cs. But I've never worked with Altova's XSLT 2.0 implementation, so I am unsure of the required syntax for invoking a .NET-based extension function, but hopefully that information is readily available as part of their documentation.

Hope this helps!


M. David Peterson
Co-Founder & Chief Architect, 3rd&Urban, LLC
Email: m.david@xxxxxxxxxxxxxxx | m.david@xxxxxx
Mobile: (206) 418-9027 | |

Current Thread