beautypg.com

Schedule_message.asp – Avaya 16-300272 User Manual

Page 81

background image

Broadcast Server User Guide

Appendix A

Push XML API

Sample ASP Pages

73

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 %>

<%

'Put together some XML to post off

xmlString = "" & vbcrlf

xmlString = xmlString & "" & vbcrlf

xmlString = xmlString & "" & vbcrlf

xmlString = xmlString & " " & vbcrlf

xmlString = xmlString & " Dinner?" & vbcrlf

xmlString = xmlString & " Im still not hungry" & vbcrlf

xmlString = xmlString & " http://192.168.1.16/push_image.png" & vbcrlf

xmlString = xmlString & " " & vbcrlf

xmlString = xmlString & " " & vbcrlf

xmlString = xmlString & " 09/2/2005" & vbcrlf

xmlString = xmlString & " 10/25/2005" & vbcrlf

xmlString = xmlString & "

thursday='1' friday='1' saturday='1'/>" & vbcrlf

xmlString = xmlString & " 10:00:00 AM" & vbcrlf

xmlString = xmlString & " 11:59:50 PM" & vbcrlf

xmlString = xmlString & " " & vbcrlf

xmlString = xmlString & ""

xmlString = xmlString & ""

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