Using Portus to access the Sybase EAServer database Adaptive Server Anywhere.
The EAServer product set from Sybase includes Adaptive Server Anywhere. Adaptive Server Anywhere provides a full-featured SQL database for EAServer applications. It is designed to operate in environments with limited physical and database administration resources. Adaptive Server Anywhere is a transaction-processing relational database management system (RDBMS) with full recovery capabilities, online backup, referential integrity actions, stored procedures, triggers, row-level concurrency control, and a rich SQL language.
Go to here to download the Sybase EAServer Developer Edition which is used in this example.
This HOWTO assumes that the Portus and the Sybase database are both running on Windows.
For the purpose of this HOWTO, we will be using one of the sample databases provided by Sybase, "Jaguar SVU Sample".
By default, the Sybase installation sets the DSN information required for accessing the sample database:
Check that the login details are correct.
Select the Configure... button having first highlighted the sample database as shown above.
Select the Login tab:
If the User ID and Password is not set set them to dba and sql respectively.
Portus must now be configured to access and use this DSN
Start the Portus Control Center and add a Portus Server (if necessary). See here for more information.
If you do not have an Sybaser driver, add one now. See here for more information.
See here for how to add/discover a Service.
From the next dialog choose Sybase_Driver and click
The next dialog prompts you for the the
: e.g. "Jaguar SVU Sample"
UserId / Password. If this has been set via the DSN then there is no need to suuply any values here..
: This will be a pattern match value passed to the SQL Command. The search pattern characters are: an underscore (_), which represents any single character and a percent sign (%), which represents any sequence of zero or more characters.
Enter a% here to return tables starting with the letter a.
: This is a hard-limit on the amount of tables Portus will attempt to discover.
Options for generated Service name. By default the Service has the odbc dsn name prepended to the table name. By selecting this option you can change the name to suit you requirements.
Show all tables types. If this is selected then all tables types are discovered. Usually this is best left unselected.
Now click
Portus will ask the Sybase Server database ( identified by the Jaguar SVU Sample DSN) to display all the tables which match the request. In our case, the number of tables starting with 'a' were returned.
Select table allbooks, and click
The results of the import will be displayed in the Status pane.
Click
to finish the Service creationYou have now created a Service based on table allbooks from the Sybase database!
Now that the Web Services have been set up, you can access the Web Service Description Language ( WSDL ) by clicking in the WSDL URL link in the Control Centre.
This WSDL is the starting point to accessing the your tables and stored procedures using Portus. 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 soapUI is available here. The follow example is based on that tutorial, and shows how to access the allbooks table we have just enabled.
Start soapUI and create a new WSDL project.
Import using the WSDL
Edit the list request
Completely remove the <all:allbooks_DBAGroupHeader> element from the <soap:Header> element
In the <Security> element, add Username and Password for accessing the allbooks table if required. Otherwise, the <Security> element, and indeed the rest of the <Header> element can be removed as shown below.
Add "*" as the content of the <book_id> element ( same as
SELECT * from allbooks;
)
E.g
Hit the green arrow, and the results of the request should be displayed
Congratulations! You have now accessed a Sybase table using Portus!