Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

158 lines
5.3 KiB

<HTML>
<HEAD>
<STYLE>
BODY { font-family:Verdana; font-size:9pt; margin:0px; color:teal; }
.instructions { font-style:italic; text-align:right; color:gray; margin-left:.5em; }
.headline { background-color:teal; color:white; font-family:Arial Black; font-size:16pt;
text-align:center; padding-top:1em; }
.group { font-family:Arial Black; font-size:14pt; margin-top:.5em; margin-left:.5em;
margin-bottom:.5em; }
.button { font-family:Verdana; font-size:10pt; font-weight:bold; text-align:right;
color:gray; }
.arrow { font-family:Webdings; }
</STYLE>
</HEAD>
<SCRIPT>
var source;
var style;
var theRequest;
var sourceURL;
var styleURL;
var oldXSLitem;
// ----- Scripts to control XSL Processing ------
function update(xmlDocument)
{
parent.results.display(xmlDocument.transformNode(style));
}
function changeXSL(xsldoc)
{
styleURL = xsldoc;
style.load(styleURL);
update();
}
// ----- Scripts to activate buttons ------
function over(item)
{
item.style.color = "black";
}
function out(item) {
item.style.color = "gray";
}
function select(group, item) {
oldXSLitem.style.textDecoration = "";
oldXSLitem = item;
item.style.textDecoration = "underline";
}
// called by parent frame when the whole frameset is ready
function init()
{
style = new ActiveXObject("Microsoft.XMLDOM");
style.async = false;
theRequest = new ActiveXObject("Microsoft.XMLHTTP");
oldXSLitem = document.all.item("first-XSL-item");
select("xsl", oldXSLitem);
}
function GetClass()
{
var theBody;
theRequest.open("M-POST", document.all.urlbox.value, false);
theRequest.setRequestHeader("Content-Type", "application/xml;charset=\"utf-8\"");
theRequest.setRequestHeader("Man", "http://www.dmtf.org/cim/operation;ns=73");
theRequest.setRequestHeader("73-CIMOperation", "MethodCall");
theRequest.setRequestHeader("73-CIMMethod", "GetClass");
theRequest.setRequestHeader("73-CIMObject", document.all.namespacebox.value);
theBody = "<?xml version=\"1.0\" ?>" +
"<CIM CIMVERSION=\"2.0\" DTDVERSION=\"2.0\">" +
"<MESSAGE ID=\"877\" PROTOCOLVERSION=\"1.0\">" +
"<SIMPLEREQ>" +
"<IMETHODCALL NAME=\"GetClass\">" +
"<LOCALNAMESPACEPATH> <NAMESPACE NAME=\"" +
"root\\cimv2" + "\" />" +
"</LOCALNAMESPACEPATH>" +
"<PARAMVALUE NAME=\"ClassName\">" +
document.all.classbox.value + "</PARAMVALUE>" +
"<PARAMVALUE NAME=\"LocalOnly\">FALSE</PARAMVALUE>" +
"</IMETHODCALL>" +
"</SIMPLEREQ>" +
"</MESSAGE>" +
"</CIM>";
ShowResults(theRequest, theBody);
}
function ShowResults(theXMLRequest, theXMLBody)
{
// RequestXMLBox.Text = xmlBody
document.all.querybox.value = theXMLBody
theXMLRequest.send (theXMLBody)
update(theXMLRequest.responseXML);
}
</SCRIPT>
<BODY>
<DIV CLASS="headline">XML Client</DIV>
<DIV CLASS="instructions">
Use this client to perform CIM Operations </DIV>
<DIV CLASS="group">
<LABEL>CIM Server URL</LABEL><INPUT ID="urlbox" SIZE=35 VALUE="http://rajeshr31/cimhttp/cim2xml.dll"/>
<BR>
<LABEL>Namespace</LABEL><INPUT ID="namespacebox" VALUE="root\cimv2"/>
<HR>
<LABEL>Class</LABEL><INPUT ID="classbox" VALUE="Win32_Processor"/>
<BUTTON id="getclassButton" onClick='GetClass()'> Get Class </BUTTON>
<HR>
<LABEL>Query</LABEL><TEXTAREA ID="querybox" ROWS=5>select * from win32_processor</TEXTAREA>
<BUTTON id="execQueryButton" onClick='ExecQuery()'> ExecuteQuery </BUTTON>
</DIV>
<DIV CLASS="instructions">
The XML data displayed here is
taken from live data captured from Microsoft's implementation of CIM. </DIV>
<DIV CLASS="group">XSL Stylesheets
<DIV CLASS="button" ID="first-XSL-item"
onMouseOver="over(this)"
onMouseOut="out(this)"
onClick='changeXSL("raw-xml.xsl"); select("xsl",this)'>
<SPAN CLASS="arrow"><FONT face=Verdana>Raw
XML</FONT>4</SPAN> </DIV>
<DIV CLASS="button"
onMouseOver="over(this)"
onMouseOut="out(this)"
onClick='changeXSL("wmimof.xsl"); select("xsl",this)'>
<SPAN CLASS="arrow"><FONT face=Verdana>Managed
Object Format (MOF)</FONT>4</SPAN> </DIV>
<DIV CLASS="button"
onMouseOver="over(this)"
onMouseOut="out(this)"
onClick='changeXSL("property-table.xsl"); select("xsl",this)'>
<SPAN CLASS="arrow"><FONT face=Verdana>Property Type Table</FONT>4</SPAN> </DIV>
<DIV CLASS="button"
onMouseOver="over(this)"
onMouseOut="out(this)"
onClick='changeXSL("value-table.xsl"); select("xsl",this)'>
<SPAN CLASS="arrow"><FONT face=Verdana>Property Value Table</FONT>4</SPAN> </DIV>
<DIV CLASS="button"
onMouseOver="over(this)"
onMouseOut="out(this)"
onClick='changeXSL("summary.xsl"); select("xsl",this)'>
<SPAN CLASS="arrow"><FONT face=Verdana>At-a-Glance</FONT>4</SPAN> </DIV>
<DIV CLASS="button"
onMouseOver="over(this)"
onMouseOut="out(this)"
onClick='changeXSL("price-graph.xsl"); select("xsl",this)'>&nbsp;</DIV></DIV>
</BODY>
</HTML>