SOAP (Simple Object Access Protocol), a platform- and language-independent protocol based on XML, is used to send messages and data between applications. SOAP defines the structure of messages and describes how messages are to be processed.
If you are using the default connection profile, MyDatabase, you must edit the startDemo.bat file before creating the Web service. See Using the Default Connection Profiles for additional information.
To create a SOAP Web service from an ASA stored procedure:
From the Database Development perspective, select Create Web Service from the pop-up menu for a stored procedure or the Web Services folder.
You are switched to the Database Explorer perspective.
Set the properties in the Object Details view as appropriate.
ASA Web Service Properties
Property | Description |
---|---|
Web Service Name | The name of the Web service. The name cannot be modified after the Web service is saved. |
Stored Procedure | The name of the stored procedure. If you selected Create Web Service from the pop-up menu for a stored procedure, its name is displayed by default. |
Authorization | Select if users must provide a user name and password to use the Web service:
|
Run As User | Select if you have selected Authorization and want to specify that only the user selected from the User drop-down list can use the Web service. Clear if any user can use the Web service. |
User | Select a user from the drop-down list. The default is DBA. |
Secure | Select if security is required for the Web service. When this box is selected, the Web service is processed only if the request is made using a secure (https) connection. If a request is received on the http port, the request is redirected to the https port. |
If the Create SOAP Service checkbox is selected, after the ASA Web service is created, a SOAP service model is created with the new Web service as the endpoint. Clear the checkbox if you do not want to create a SOAP service model.
Select Save Changes from the pop-up menu in the Object Details view.
Specify a name and location for the WSDL file and click OK.
The Web service is added to the Web Services folder in the Database Explorer view. If Create SOAP Service was selected, specify a name and location for the service model. If Authorization was selected, specify a user id and password. The SOAP service model is added to the specified location and displayed in the WorkSpace Navigator.
You can also execute the following actions against an ASA Web service:
Create SOAP Service: Right-click the service and select Create SOAP Service. This creates a SOAP service model if you did not previously do so.
Specify a name and location for the service model.
If the Web service requires authorization, specify a user id and password.
The SOAP service model is added to the specified location and displayed in the WorkSpace Navigator.
Save As: Right-click the service and select Save As to save to a local WSDL file.
Specify a name and location for the WSDL file.
The WSDL file is added to the specified location and displayed in the WorkSpace Navigator.
Publish to UDDI: Right-click the service and select Publish to UDDI to publish the web service to a UDDI registry using the WorkSpace Publish Service wizard.
Test Web Service: Right-click the service and select Test Web Service to test the web service using the WorkSpace Service Testing wizard.
To access the WSDL for the ASA Web service:
You can specify a URL, as shown below, to access the WSDL for an ASA Web service, or to specify it as an endpoint:
http://<host>/<dbname>/<wsname>
for example, http://myasa/asademo/ws_sp_name
Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com