The widely used MySQL database is used here to outline the steps required to expose a SQL table as a web service.
Microsoft SQL Server is a relational database management system (RDBMS) produced by Microsoft.
This HOWTO assumes that the Portus and SQL Server database are both running on Windows.
It is assumed that the SQL Server has the ODBC Connector installed.
For the purpose of this HOWTO, we've installed the "AdventureWorks" sample that is provided with the SQL Server installation. See here for more information about AdventureWorks and other SQL Server sample databases.
Previously (here) we showed how to create a Service based on an MS SQL stored procedure, uspGetManagerEmployees. The following steps show what needs to be done to execute it.
This WSDL is the starting point to invoking your stored procedures using Portus. There are many clients available to consume and use web services, for example soapUi, XMLSpy, and Infopath. For this example we are using soapUi.
If you are unfamiliar with soapUI a tutorial on using it is available here.
Add the Manager ID value as the content of the <ManagerID> element ( same as exec uspGetManagerEmployees 6; ), e.g.
At this point you need to decide which of the resultset columns you want returned. As the resultsets of stored procedures can vary depending on the parameters being passed it is important to know what is expected. In this example you can see the results from executing the uspGetManagerEmployees stored procedure in Microsoft SQL Server Studio.
For illustration in soapUi hit the green arrow, and the results of the request should be displayed as:
Return to soapUI and hit the green arrow, and the results of the request should be displayed as :
![]() ![]() |
![]() |
![]() ![]() |