3rd Party Runtime Hosting
HO-S-3 Sending an SMS message through an ASP .NET SOAP Client to update a table
Demonstrating the use of C# to create Virtuoso hosted Stored Procedures and Triggers. In this demo the database events trigger SMS messages that are relayed via C# based SOAP Client.
Overview
The following tutorial demonstrates how a C# based Managed SOAP Client is used to create SMS based database notification services inside Virtuoso. This demo executes a database trigger every time a new Supplier record is added, updated or deleted. In this example a C# class acts as a SOAP client to a 3rd party XML Web Service that provides the SMS (Short Message Services) delivery to mobile phones. Note, this demo will work with any phone that is capable of receiving SMS (TEXT) messages.
Prerequisites
This demo currently works only on a Virtuoso server running under Microsoft Windows with following components installed:
- Windows
- .NET Runtime and Frameworks
- .Net Runtime and Framework SDK (if you seek to write your own Objects for integration with Virtuoso)
- Virtuoso Universal Server for Windows with .NET CLR Hosting.
Tutorial Example
Please follow the steps below to maximize the value of this tutorial:
- Click on the "Set Initial State" link which registers the "redcoalsmssvc" service with Virtuoso. Click on the "ho_s_3.sql" link to see the code behind this step
- Click on the "Run" links to actually experience the demo
Demo Breakdown
- "ho_s_3.sql" performs the following steps
- Registers the "redcoalsmssvc" class with Virtuoso. Click on the "redcoalsms.cs" and "redcoalsmsref.cs" links to see the C# source code. Note that the class "redcoalsmssvc" is part of an assembly that has the namespace "redcoalsms"
- Creates the "Suppliers" table
- Creates a stored procedure "redcoal_send_sms" which demonstrates the syntax for creating an instance variable which includes the assembly namespace in the type reference. Specifically, note the use of an underscore instead of a dot when making this assignment
- Creates a Trigger named "send_sms_to_mgr_new_supp" that sends an SMS message each time a new "Supplier" table record is inserted
- Creates a Trigger named "send_sms_to_mgr_mod_supp" that sends an SMS message each time a "Supplier" record is updated
- Creates a Trigger named "send_sms_to_mgr_mod_supp" that sends an SMS message each time a supplier record is deleted
- "setup_sms.vsp" sets up all of the base data and verifies that SMS service connectivity required by this demo is available.
- "handler.vsp" is the actual interface through which you add or delete supplier records which result in SMS notifications being sent to your mobile phone.
In order to run this example you need Virtuoso Universal Server for Windows with .NET CLR Hosting.
| View the source | Action |
|---|---|
| 1. ho_s_3.sql | Set the initial state |
| 2. handler.vsp | Run |
| 3. redcoalsms.cs | |
| 4. redcoalsmsref.cs | |
| 5. setup_sms.vsp | Run |
OpenLink Home
Technical Support