Classic ASP, SOAP Requests, Digital Signage – Oh my!

This is an article about Classic ASP.  This is also an article about SOAP Requests and EMS Calender.

It’s also about how YOU can make them play nice together to achieve digital signage bliss with Haivision CoolSigns!

Recently we had a client who had an existing Haivision Coolsigns platform setup and running.  They also had a group of conference rooms and wanted to use their existing calender software to have the digital signage display who was in which conference room that day.

No problem – here’s how it works!

It’s worth noting that to eliminate CORS (Cross-Origin Resource Sharing) issues – it is best practice to have the page you will be using to call data with, exist on the server itself. This ensures you do not need to do advanced server configuration to enable CORS.

The following is performed on the same server that is hosting the EMS Calender (in our case – it was an older IIS6 server).

For our purposes we created a directory in the root web directory called ‘coolsign’ (e.g. //server/C:/Inetpub/wwwroot/yourdirectory) and that is where our .asp file will reside.

We will name our .asp file: SoapRequest.asp (as that is the request we use to access the EMS API) – clever, right?

Here is the code we will put in that file (it is very important to note: you absolutely must include the opening <% and closing %> as that declares the beginning and end of ASP code)

You will need to fill in the highlighted bits with the appropriate information for your organization (currently displaying generic data)

What is with those replacements at the end of the file?  You will notice at the end there is some string replacement going on – this is because by default the API returns one giant string that is escaped.  We need to unescape < and > in the string so it will appear to Coolsigns to be a valid JSON response.

The code above gets all the room bookings for a particular building. If you wanted to change it to make some other API function call – you would need to change the following lines of code:

The first chunk tells the API which function you’re looking to call.  The second section must be reflected (the actual SOAP request) to request the appropriate information.  You will have to reference the EMS Calender API for the required information for each function.

In our example above we are using the function ‘GetAllBookings’ – which according to the API will give us all the bookings for a particular building and its rooms based on a range of days. For examples sake, we will change this to display all the bookings for just one particular room (instead of a whole building).  This is API function ‘GetAllRoomBookings’.

We need to change our code in order to reflect the different items needed for this different API function

For convenience I will display both the ‘original code’ and the ‘modified code’ so you can compare the differences immediately.

Old Code:

New Code:

I highlighted the pieces that need changed so you could easily see it reflected in the new code.

Now that we’re getting the appropriate information in a nicely formatted response – we need to setup our Coolsign Data Watcher to interpret the information appropriately.

Note: This document makes the assertion that you are integrating this into a working/existing Coolsign player.

First, we need to create our Data Watcher that will check in with the EMS Calendar to get the information. No problem.

  • Open Coolsign Manager
  • Select ‘Data Watcher’ on the left hand menu
  • Right click on ‘CoolSignNetwork’ -> ‘Create New Data Watcher…’

Coolsign New Data Watcher Screen

  • Enter the name of your Data Watcher

Double-click the Data Watcher you just created to edit it

  • Click on the ‘Data Source’ tab
  • Ensure that Type is set to ‘URL’
  • Under ‘URL Data Source Properties’ – enter the URL to your SoapRequest.asp file you created (//server/directory/SoapRequest.asp)

Coolsigns data source tab

  • Click on the ‘Data Parser’ tab
  • Ensure that ‘Parser’ is set to XML
  • Click on ‘Suggest Default Record Path’ – it should populate with the appropriate XML structure of our earlier SOAP request, if it does not then the ASP code has to be reviewed

Coolsign data parser screen

  • Click on the ‘Field Mapping’ tab
  • Click ‘Populate Fields’ in the lower right hand corner – this should populate with the list of returned items per the EMS API Documentation. If it does not check the Data Parser to be sure it is looking at the appropriate XML Node.
  • Click on the ‘Data Table’ tab
  • Under ‘Update Frequency’ set it to 5 minutes (or however quickly or slowly you wish to refresh your signage)

Coolsigns data table screen

  • Click ‘Save’
  • Click ‘Test Configuration’

At this point – you should see data that matches what is scheduled in the EMS Calendar for the appropriate date.

If you see this data – then all we have to do next is to put that data in a piece of content styled how we want it to display on the screen.

While creating content is beyond the scope of this tutorial, it is important to note that the EMS Calender date for Events is formatted in ISO 8601 format (YYYY-MM-DDThh:mm (e.g. 1997-07-16T19:20:00).

Because of this – there is some programming required in order to get into a more user friendly format to be displayed on digital signage.

Using the following code (Javascript is the language that the Coolsign Content Wizard utilizes in its expression builders) the EMS Calendar time will be displayed as MM-DD-YYYY HH:MM AM/PM

Put that in the Expression for the DataFieldItem in the Content Creator and it will format it appropriately.


That’s it!  Now you’ve got your EMS Calender Items displaying on your Haivision Coolsign Digital Signage without issue.  The date and time look nice, all the items are there and people can quickly/easily see what’s going on in your organization.

I hope some who have struggled with some apparent complexities of these two systems find this article useful.  If you do – leave some comments below!


Posted on: May 14, 2015

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">