XML Server Getting Started
Accessing server side objects from the client code with XML over HTTP calls
XMLSP technology enables developers to implement a great deal of presentation specific code within the browser without
overwhelming the server with the straight GUI related tasks. However, when it comes to server specific tasks, be that an
implementation of business rules that should not be exposed to the users for security reasons, or be that a file access which is
object (/xmlsp/htc/xmlapi.htc) facilitates direct HTTP request from your client
ASP page simply as a remote function taking parameters and returning values:
xmlOutObj = xmlapi.XM LHTTPRequest(url,[ xmInObj[, encoding]])
is a convenience method built on top of
requires one argument URL to invoke on the Application Server side. Optionally you may submit
XML object or string containing well formed XML as parameters envelope to be parse by the URL. The third optional
argument is the encoding of the parameters' data, which defaults to utf 8 .
expects URL to return
results as a well formed XML stream. The method may throw exceptions if it fails opening socket to specified URL or if the
URL times out or returns a non well formed XML.
executes synchronously: the first statement after
is not executed until a response from URL has been processed.
The return value of
containing well formed XML returned by the URL. The whole
idea of using JSPs or ASPs as simply for the purposes of fetching data is a major departure from the way people typically
think of URLs. Unlike regular Server Pages , JSPs or ASPs called via
are not returning HTML to be
rendered, but raw XML data to be processed by application logic on the client.
As an example, let's assume you designed a logon screen which contains input elements
with buttons OK and Cancel (
The following script, which, according to our practice we place right after closing
tag validates the user via