Re: [xsl] Supposed to post XML variables to a Servlet via HTTP using XML Post

Subject: Re: [xsl] Supposed to post XML variables to a Servlet via HTTP using XML Post
From: Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx>
Date: 18 Nov 2005 05:40:30 +0000
>>>>> "Bruso" == Bruso, John <jbruso@xxxxxxxxxxxx> writes:

    Bruso> I'm passing credentials from one app to another...  
    Bruso> Can someone help me understand what an XML Post is? 

It's an HTTP POST.
This is one of the methods in the HTTP protocol. It is designed for
sending data to a server.
For more information see http://www.faqs.org/rfcs/rfc2616.html section
9.5.
 
    Bruso> And how I pass variables to a Java servlet 
    Bruso> using an XML Post via HTTP?

That depends what your starting point is. If you are starting from
Javascript running within a web browser, then you can use the
XmlHttpRequest object  See
http://developer.apple.com/internet/webcontent/xmlhttpreq.html.

    Bruso> Do I use XSL?

It is possible in principle, and in practice it does work with my own
gestalt XSLT 2.0 processor.
I have not been able to get it to work with Saxon, which simply passes
the request to the Java runtime environment. The implication is that
it would not work with other Java-based XSLT 2.0 processors either (if
there are any).
But I haven't tried with a 1.6 JDK - if this is available in a beta
version, and you can use it, then you might want to try it.

What you do is construct the XML data that you want to pass to the
servlet using xsl:result-document. You code the URI of the Java
Servlet as the value of the href attribute on the xsl:result-document.
-- 
Colin Adams
Preston Lancashire

Current Thread