Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - XML Reference

IServerXMLHTTPRequest/ServerXMLHTTP

Provides methods and properties that enable you to establish an HTTP connection between files or objects on different Web servers.

The ServerXMLHTTP object offers functionality similar to that of the XMLHTTP object. Unlike XMLHTTP, however, the ServerXMLHTTP object does not rely on the WinInet control for HTTP access to remote XML documents. ServerXMLHTTP uses a new HTTP client stack. Designed for server applications, this server-safe subset of WinInet offers the following advantages:

Usage

The ServerXMLHTTP object is commonly used to:

You can use the ServerXMLHTTP object either indirectly using the setProperty method of DOMDocument or directly using the ServerXMLHTTP object itself. For examples of these two approaches, as well as examples of how to use the ServerXMLHTTP security options and how to use ServerXMLHTTP in a multitiered environment, see IServerXMLHTTPRequest/ServerXMLHTTP Examples.

Remarks

The ServerXMLHTTP open method makes the connection between servers and the send method sends the request.

You can read the response using one of the four following properties: responseBody, responseStream, responseText, and responseXML.

[C/C++]

With ServerXMLHTTP, the usual sequence is to call the open method, set any custom header information through the setRequestHeader method, call the send method, and then check one of the four response properties.

For example, an ASP, Microsoft® Visual Basic®, or C++ component on a server computer can send an HTTP request to another server and then receive the response as a stream or XML document object. The response can then be fed to downstream clients, saved to a file on the server, or combined with other XML data (potentially collected from other Web servers).

ServerXMLHTTP offers additional benefits for transporting XML data:

ServerXMLHTTP offers backward compatibility with XMLHTTP. Source code (JScript, Visual Basic Scripting Edition, Visual Basic, or C++) that uses the XMLHTTP component can be easily modified to use the new ServerXMLHTTP component.

The number of instances of ServerXMLHTTP that can exist simultaneously within a single process primarily depends upon the amount of memory available for applications on the system. However, other factors, such as CPU processing capacity, or available socket connections can further limit the number of instances that can be active simultaneously.

The IServerXMLHTTPRequest interface inherits from IXMLHTTPRequest and extends it with the following four new methods: getOption, setOption, waitForResponse, and setTimeouts.

Versioning

MSXML 3.0 and later

Requirements

Supported platforms include Microsoft Windows® 2000, or Microsoft Windows NT® 4.0 with Microsoft Internet Explorer 5.01 (or later) installed. ServerXMLHTTP fails on other platforms, such as Microsoft Windows 98.

Implementation: msxml5.dll, msxml2.lib

[C/C++]

Header and IDL files: msxml2.h, msxml2.idl

Version-Dependent ProgID: Msxml2.ServerXMLHTTP.5.0

Version-Dependent CLSID: 88D969C6-F192-11D4-A65F-0040963251E5

See Also

IXMLHTTPRequest | IServerXMLHTTPRequest/ServerXMLHTTP Members