SOA Gateway Version 2010-05-31
 —  Administration  —

Using the SOA Gateway to access MySQL database

The widely used MySQL database is used here to outline the steps required to expose a SQL table as a web service.


Introduction

MySQL is a multithreaded, multi-user SQL database management system (DBMS) which has, according to MySQL AB, more than 10 million installations. The ODBC interface is called "MySQL Connector".

This HOWTO assumes that the SOA Gateway and MySQL database are both running on Windows.

It is assumed that MySQL is up and running on the local machine and is accessible.

For the purpose of this HOWTO, the following table has been set up and populated. This table is based on examples that are available in the Tutorial section of the MySQL Documentation. Check your MySQL Manual for more information.

Top of page

MySQL Connector

If you already have the MySQL Connector driver installed, then skip this step.

You can check is it installed by selecting Start Control Panel Add/Remove programs and look for MySQL Connector ODBC 3.xx / 5.xx in the list of installed programs.

The MySQL Connector is now installed. To configure it, follow these steps

Top of page

SOA Gateway Configuration

The SOA Gateway must now be configured to access and use this new MySQL DSN

Top of page

Accessing MySQL

Now that the resource has been set up, you can access the Web Service Description Language ( WSDL ) by selecting the following URL: http://<host>:<port>/mysql_pets?WSDL

This WSDL is the starting point to accessing the pets table using the SOA Gateway. There are many clients available to consume and use web services, for example soapUi, XMLSpy, and Infopath.

A tutorial on how to access Adabas data through soap ui is available here. The follow examples is based on that tutorial, and shows how to access the pets table web service.

Congratulations! You have now accessed MySQL using the SOA Gateway!

Top of page

Further MySQL Examples

There are many freely available demo databases available online. One of the best known ones is the the MySQL World database. It contains statistics about countries around the world.

See here for more information about the world database.

You can use the World Database with the SOA Gateway using the same procedure as you used to import the pets table above.

Top of page