Using ServerXMLHTTP Directly | Microsoft Docs

 

Using the ServerXMLHTTP object directly offers much greater procedural control than that of the setProperty method of DOMDocument. Instead of merely retrieving XML responses from a remote sever, the ServerXMLHTTP object allows developers to use the HTTP methods, GET and POST, as well as the ability to handle basic security logons.

Using ServerXMLHTTP to GET XML results from an ASP page

In the following example, ServerXMLHTTP retrieves an XML response from an ASP page over HTTP. By using GET, the example is able to send a request without actually transferring any data to the Web server.

The responseXML property of the objSrvHTTP object contains the XML response from the Web server. The example program writes this response to the browser's output by first informing the browser that the response to be received is XML ("text/xml"). Next, the program passes the response directly to the Response object for displaying onscreen.

Example

<%@language=JScript%>  
<%  
   var objSrvHTTP;  
   objSrvHTTP = Server.CreateObject ("Msxml2.ServerXMLHTTP.6.0");  
   objSrvHTTP.open ("GET","http://someotherserver/respond.asp", false);  
   objSrvHTTP.send ();  
   Response.ContentType = "text/xml";  
   Response.Write (objSrvHTTP.responseXML.xml);  
%>  
  

Using ServerXMLHTTP to POST XML to an ASP page

In the following example, ServerXMLHTTP uses HTTP to send XML data to an Active Server Page (ASP) page. Unlike the preceding example that used GET, this example uses POST. The POST method sends data, along with the request, to the Web server.

As in the previous example, the program writes the response to the browser's output by setting the ContentType to "text/xml" and passing the response to the Response object.

Example

<%@language=JScript%>  
<%  
   var objSrvHTTP;  
   var objXMLDocument;  
   objSrvHTTP = Server.CreateObject ("Msxml2.ServerXMLHTTP.6.0");  
   objXMLDocument = Server.CreateObject ("Msxml2.DOMDocument.6.0");  
  
   objXMLDocument.async= false;  
   objXMLDocument.loadXML ("<msg><id>1</id></msg>");  
  
   objSrvHTTP.open ("POST","http://someotherserver/respond.asp",false);  
   objSrvHTTP.send (objXMLDocument);  
   Response.ContentType = "text/xml";  
   Response.Write (objSrvHTTP.responseXML.xml);  
%>  
  

Using ServerXMLHTTP to POST and Process XML

In the following example, ServerXMLHTTP sends an XML document to an ASP page on a Web server and passes its XML response to a waiting DOMDocument for processing.

Example

<%@language=Jscript%><%  
   var objSrvHTTP;  
   var objXMLSend;  
   var objXMLReceive;  
   objSrvHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP.6.0");  
   objXMLSend = Server.CreateObject("Msxml2.DOMDocument.6.0");  
   objXMLReceive = Server.CreateObject("Msxml2.DOMDocument.6.0");  
  
   objXMLSend.async = false;  
   objXMLSend.loadXML ("<msg><id>2</id></msg>");  
  
   objSrvHTTP.open ("POST","http://someotherserver/respond.asp",false);  
   objSrvHTTP.send (objXMLSend);  
   objXMLReceive = objSrvHTTP.responseXML;  
   Response.ContentType = "text/xml";  
   Response.Write (objXMLReceive.xml);  
%>
keywords

 

Using the ServerXMLHTTP object directly offers much greater procedural control than that of the setProperty method of DOMDocument. Instead of merely retrieving XML responses from a remote sever, the ServerXMLHTTP object allows developers to use the HTTP methods, GET and POST, as well as the ability to handle basic security logons.

Using ServerXMLHTTP to GET XML results from an ASP page

In the following example, ServerXMLHTTP retrieves an XML response from an ASP page over HTTP. By using GET, the example is able to send a request without actually transferring any data to the Web server.

The responseXML property of the objSrvHTTP object contains the XML response from the Web server. The example program writes this response to the browser's output by first informing the browser that the response to be received is XML ("text/xml"). Next, the program passes the response directly to the Response object for displaying onscreen.

Example

<%@language=JScript%>  
<%  
   var objSrvHTTP;  
   objSrvHTTP = Server.CreateObject ("Msxml2.ServerXMLHTTP.6.0");  
   objSrvHTTP.open ("GET","http://someotherserver/respond.asp", false);  
   objSrvHTTP.send ();  
   Response.ContentType = "text/xml";  
   Response.Write (objSrvHTTP.responseXML.xml);  
%>  
  

Using ServerXMLHTTP to POST XML to an ASP page

In the following example, ServerXMLHTTP uses HTTP to send XML data to an Active Server Page (ASP) page. Unlike the preceding example that used GET, this example uses POST. The POST method sends data, along with the request, to the Web server.

As in the previous example, the program writes the response to the browser's output by setting the ContentType to "text/xml" and passing the response to the Response object.

Example

<%@language=JScript%>  
<%  
   var objSrvHTTP;  
   var objXMLDocument;  
   objSrvHTTP = Server.CreateObject ("Msxml2.ServerXMLHTTP.6.0");  
   objXMLDocument = Server.CreateObject ("Msxml2.DOMDocument.6.0");  
  
   objXMLDocument.async= false;  
   objXMLDocument.loadXML ("<msg><id>1</id></msg>");  
  
   objSrvHTTP.open ("POST","http://someotherserver/respond.asp",false);  
   objSrvHTTP.send (objXMLDocument);  
   Response.ContentType = "text/xml";  
   Response.Write (objSrvHTTP.responseXML.xml);  
%>  
  

Using ServerXMLHTTP to POST and Process XML

In the following example, ServerXMLHTTP sends an XML document to an ASP page on a Web server and passes its XML response to a waiting DOMDocument for processing.

Example

<%@language=Jscript%><%  
   var objSrvHTTP;  
   var objXMLSend;  
   var objXMLReceive;  
   objSrvHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP.6.0");  
   objXMLSend = Server.CreateObject("Msxml2.DOMDocument.6.0");  
   objXMLReceive = Server.CreateObject("Msxml2.DOMDocument.6.0");  
  
   objXMLSend.async = false;  
   objXMLSend.loadXML ("<msg><id>2</id></msg>");  
  
   objSrvHTTP.open ("POST","http://someotherserver/respond.asp",false);  
   objSrvHTTP.send (objXMLSend);  
   objXMLReceive = objSrvHTTP.responseXML;  
   Response.ContentType = "text/xml";  
   Response.Write (objXMLReceive.xml);  
%>

title: Using ServerXMLHTTP Directly | Microsoft Docs
summary:
category: asp
keywords:
link: https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ms766431(v=vs.85)

-->

No Items Found.

Add Comment
Type in a Nick Name here
 
Search Linx
Search Linx by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

You could also follow me on twitter. I have a couple of youtube channels if you want to see some video related content. RuneScape 3, Minecraft and also a coding channel here Web Dev.

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote

"Olivia, my eldest daughter, caught measles when she was seven years old. As the illness took its usual course I can remember reading to her often in bed and not feeling particularly alarmed about it. Then one morning, when she was well on the road to recovery, I was sitting on her bed showing her how to fashion little animals out of coloured pipe-cleaners, and when it came to her turn to make one herself, I noticed that her fingers and her mind were not working together and she couldn’t do anything. 'Are you feeling all right?' I asked her. 'I feel all sleepy,' she said. In an hour, she was unconscious. In twelve hours she was dead. The measles had turned into a terrible thing called measles encephalitis and there was nothing the doctors could do to save her. That was...in 1962, but even now, if a child with measles happens to develop the same deadly reaction from measles as Olivia did, there would still be nothing the doctors could do to help her. On the other hand, there is today something that parents can do to make sure that this sort of tragedy does not happen to a child of theirs. They can insist that their child is immunised against measles. ...I dedicated two of my books to Olivia, the first was ‘James and the Giant Peach’. That was when she was still alive. The second was ‘The BFG’, dedicated to her memory after she had died from measles. You will see her name at the beginning of each of these books. And I know how happy she would be if only she could know that her death had helped to save a good deal of illness and death among other children."

I just checked google books for BFG, and the dedication is there. 

https://www.google.com.au/books/edition/_/quybcXrFhCIC?hl=en&gbpv=1 


Roald Dahl, 1986
Random CSS Property

scroll-margin-inline

The scroll-margin-inline shorthand property sets the scroll margins of an element in the inline dimension.
scroll-margin-inline css reference