Appendix A Push XML API

Sample ASP Pages

'Load the XML into an XMLDOM object

Set SendDoc = server.createobject("Microsoft.XMLDOM") SendDoc.ValidateOnParse= True SendDoc.LoadXML(xmlString)

'Set the URL of the receiver

sURL = "http://192.168.1.201:9998/"

'Call the XML Send function (defined below)

set NewDoc = xmlSend (sURL, SendDoc)'xmlString) 'We receive back another XML DOM object!

'Tell the user what happened

response.Write "<b>XML DOC posted off:</b><br>" response.write SendDoc.XML & "<br>" response.write "<b>Target URL:</b> " & sURL & "<br>" response.write "<b>XML DOC Received back: </b><br>" response.write (NewDoc.Xml)

private function xmlsend(url, docSubmit)

Set poster = Server.CreateObject("MSXML2.ServerXMLHTTP") poster.open "POST", url, false poster.setRequestHeader "CONTENT_TYPE", "text/xml" poster.send docSubmit

Set NewDoc = server.createobject("Microsoft.XMLDOM") newDoc.ValidateOnParse= True newDoc.LoadXML(poster.responseTEXT)

Set XMLSend = NewDoc Set poster = Nothing end function

%>

72Broadcast Server User Guide

Page 80
Image 80
Nortel Networks Broadcast Server warranty Load the XML into an Xmldom object