Archive of UserLand's first discussion group, started October 5, 1998.
Re: XML-RPC from a script in an HTML page?
Author: David Shinpaugh Posted: 5/27/1999; 5:22:37 PM Topic: XML-RPC from a script in an HTML page? Msg #: 6821 (In response to 6745) Prev/Next: 6820 / 6822
Yes MSIE5 has a builtin active-X control that works well with Frontier XML-RPC.It's called the IXML-HTTP Request Object
Here's where the documentation is:
XML RPC Request Object
http://msdn.microsoft.com/xml/reference/scriptref/XMLHttpRequest_object.asp
XMLDOM Document Object (This is what you get back) http://msdn.microsoft.com/xml/reference/scriptref/XMLDOMDocument_object.asp
XMLDOC Node Object (Elements inside the XMLDOM Document object) http://msdn.microsoft.com/xml/reference/scriptref/XMLDOMNode_object.asp
Basically you instantiate the request Object, call send method with a string containing an XML-RPC request, adhering to the Userland XML-RPC Spec, and read the response object.
// Declare Request
var xmlrpcrequest = new ActiveXObject ("microsoft.xmlhttp");
function executeRequest(pStrXMLRequest)
{ xmlrpcrequest.open ("POST", "...url for the XMLRPC server...", false);
xmlrpcrequest.setRequestHeader ("Content-type", "text/xml");
xmlrpcrequest.send (pStrXMLRequest);
return xmlrpcrequest.responseXML;
}
Then you walk the XML-Document object you get back to get the response data. You will have to refer to sample app referenced below or use MS docs to figure that out.
You can use this with VBScript too.
Check out http://broadband.mailtothefuture.com you'll see how it's done.
This should give you some good ideas,
David
This page was archived on 6/13/2001; 4:50:30 PM.
© Copyright 1998-2001 UserLand Software, Inc.