The widely used MySQL database is used here to outline the steps required to expose a SQL table as a web service.
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/ODBC" (or also "MyODBC").
This HOWTO assumes that
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 and more.
For the purpose of this HOWTO, the world database has been used.
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.
To install MySQL Connector, go to http://www.mysql.com/products/connector/odbc/ and download the MySQL ODBC Connector
The MySQL Connector is now installed. To configure it, follow these steps
On 64-bit Windows 7, you need to start the 32-bit version of this program to add new DSNs. Run the following command directly :
%WINDIR%\SysWOW64\odbcad32.exe
Click Test and ensure the server returns success
Portus must now be configured to access and use this new MySQL DSN
The next dialog prompts you for the the
Show all tables types. If this is selected then all tables types are discovered. Usually this is best left unselected.
Now click Discover
Portus will ask the MySQL database identified by the DSN to display all the tables which match the request. Select the required tables, and click Generate.
Now that the resources have been set up, you can access the Web Service Description Language ( WSDL ) by selecting the 'WSDL URL is ..' in the Properties of the Service:
There are many clients available to consume and use web services, for example soapUI, XMLSpy, and Infopath. Here we will use soapUI.
Hit the green arrow, and the results of the request should be displayed
Congratulations! You have now accessed MySQL using Portus!
![]() ![]() |
![]() |
![]() ![]() |