Appendix A Push XML API

Sample ASP Pages

schedule_message.asp

The following sample code shows how to write the XML required to create and schedule an alert, send the alert to the Application Gateway, and then send report status to the application from the Application Gateway.

The image paths and IP addresses in schedule_message.asp are examples.

<%@ Language=VBScript %> <HTML>

<HEAD>

</HEAD>

<%

'Put together some XML to

post off

xmlString

=

"<?xml version=""1.0""?>" & vbcrlf

xmlString

=

xmlString

&

"<ManagePushMessage>" & vbcrlf

xmlString

=

xmlString

&

"<PushMessage message_id='7' priority='1' action='bcs'>" & vbcrlf

xmlString

=

xmlString

&

"

<Recipient id='1' type='distribution'/>" & vbcrlf

xmlString

=

xmlString

&

"

<Subject>Dinner?</Subject>" & vbcrlf

xmlString

=

xmlString

&

"

<Body>Im still not hungry</Body>" & vbcrlf

xmlString

=

xmlString

&

"

<Image>http://192.168.1.16/push_image.png</Image>" & vbcrlf

xmlString

=

xmlString

&

"

<Audio>http://192.168.1.16/moo.wav</Audio>" & vbcrlf

xmlString

=

xmlString

&

"

<Schedule>" & vbcrlf

xmlString

=

xmlString

&

"

<BeginDate>09/2/2005</BeginDate>" & vbcrlf

xmlString

=

xmlString

&

"

<EndDate>10/25/2005</EndDate>" & vbcrlf

xmlString

=

xmlString

&

"

<Days sunday='1' monday='1' tuesday='1' wednesday='1'

thursday='1' friday='1'

saturday='1'/>" & vbcrlf

xmlString

=

xmlString

&

"

<BeginTime>10:00:00 AM</BeginTime>" & vbcrlf

xmlString

=

xmlString

&

"

<EndTime>11:59:50 PM</EndTime>" & vbcrlf

xmlString

=

xmlString

&

"

</Schedule>" & vbcrlf

xmlString

=

xmlString

&

"</PushMessage>"

xmlString

=

xmlString

&

"</ManagePushMessage>"

'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!

Broadcast Server User Guide

73

Page 81
Image 81
Nortel Networks Broadcast Server warranty Schedulemessage.asp