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> wrote:
However, when I tried the code by changing packet size using DrTCP tool, it worked fine.
"<xsl:variable name="params" select="concat('param1=',$value1,'¶m2=',value2, '¶m3=',value3, '¶m4=',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 & 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 http://www.oreillynet.com/xml/blog/2007/12/question_does_the_uri_length_r.htm l and in particular one of the follow-up comments @ http://www.oreillynet.com/xml/blog/2007/12/question_does_the_uri_length_r.htm 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.
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 > http://ajwelch.blogspot.com/2007/02/soap-extension-function.html. 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 @ http://nuxleus.googlecode.com/svn/trunk/nuxleus/Source/Xameleon/Function/Http 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.
M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david@xxxxxxxxxxxxxxx | m.david@xxxxxx Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354