Lesson 1: Setting Up a Web Server to Receive SOAP Requests and Send SOAP Responses

In this lesson, you set up an SAP Sybase IQ web server running SOAP and DISH web services that handles Visual C# client application requests.

Prerequisites

A recent version of Visual Studio is required.

This lesson assumes that you have the roles and privileges listed in the Privileges section at the start of this tutorial: Tutorial: Using Visual C# to access a SOAP/DISH web service.

Task
  1. Start the SAP Sybase IQ demonstration database using the following command:
    iqsrv16 -xs http(port=8082) iqdemo.db

    This command indicates that the HTTP web server should listen on port 8082 for requests. Use a different port number if 8082 is disallowed on your network.

  2. Connect to the database server in Interactive SQL using the following command:
    dbisql -c "UID=<user_id>;PWD=<password>;SERVER=demo"
  3. Create a new SOAP service to accept incoming requests.

    Execute the following SQL statement in Interactive SQL:

    CREATE SERVICE "SASoapTest/EmployeeList"
        TYPE 'SOAP'
        DATATYPE ON
        AUTHORIZATION OFF
        SECURE OFF
        USER DBA
        AS SELECT * FROM Employees;

    This statement creates a new SOAP web service named SASoapTest/EmployeeList that generates a SOAP type as output. It selects all columns from the Employees table and returns the result set to the client. The service name is surrounded by quotation marks because of the slash character (/) that appears in the service name.

    DATATYPE ON indicates that explicit data type information is generated in the XML result set response and the input parameters. This option does not affect the WSDL document that is generated.

    The FORMAT clause is not specified so the SOAP service format is dictated by the associated DISH service format which is declared in the next step.

  4. Create a new DISH service to act as a proxy for the SOAP service and to generate the WSDL document.

    Execute the following SQL statement in Interactive SQL:

    CREATE SERVICE SASoapTest_DNET
        TYPE 'DISH'
        GROUP SASoapTest
        FORMAT 'DNET'
        AUTHORIZATION OFF
        SECURE OFF
        USER DBA;

    DISH web services accessed from .NET should be declared with the FORMAT 'DNET' clause. The GROUP clause identifies the SOAP services that should be handled by the DISH service. The EmployeeList service created in the previous step is part of the GROUP SASoapTest because it is declared as SASoapTest/EmployeeList.

  5. Verify that the DISH web service is functional by accessing the associated WSDL document through a web browser.

    Open your web browser and go to http://localhost:8082/demo/SASoapTest_DNET.

    The DISH service automatically generates a WSDL document that appears in the browser window.

You have set up an SAP Sybase IQ web server running SOAP and DISH web services that can handle Visual C# client application requests.

Next

In the next lesson, you create a Visual C# application to communicate with the web server.