Showing posts with label soap. Show all posts
Showing posts with label soap. Show all posts

Wednesday, 4 January 2012

Creating a Web Service Reference Manually

To create a Web service reference manually:
  1. Navigate to the Web Service References page. See "Accessing the Web Service References Page".
  2. Click Create.
  3. Select Manual and click Next.
    The Create/Edit Web Service page appears.
  4. In Name, enter a name to identify the reference.
  5. Under Service Description:
    1. URL - Enter the URL used to post the SOAP request over HTTP. This corresponds to the soap:address location of a service port in the WSDL.
    2. Action - Enter the intent of the SOAP HTTP request (optional). The value is a URI identifying the intent. SOAP places no restrictions on the format or specificity of the URI or requires that it is resolvable.
    3. Proxy - Enter a proxy to override the application proxy for this service.
    4. SOAP Version - Select 1.1 or 1.2.
    5. Basic Authentication - Choose whether the Web service requires authentication. Select Yes or No.
  6. For SOAP Envelope, enter the SOAP envelope to be used for the SOAP request to the Web service.
    Note:
    You can reference items from session state in the SOAP envelope by using #ITEM_NAME# syntax.
  7. For Store Response in Collection, enter the name of a collection to store the response (optional). The response is stored in the CLOB001 column.
  8. Click Create.
The Web service reference is added to the Web Service References Repository.

Understanding Web Service References

To utilize Web services in Oracle Application Express, you create a Web service reference using a wizard. Web service references can be based on a Web Services Description Language (WSDL) document, RESTful style, or created manually by supplying information about the service.
When you create a Web service reference based on a WSDL, the wizard analyzes the WSDL and collects all the necessary information to create a valid SOAP message, including:
  • The URL used to post the SOAP request over HTTP(S)
  • A Universal Resource Identifier (URI) identifying the SOAP HTTP request
  • Operations of the Web Service
  • Input parameters for each operation
  • Output parameters for each operation
When you create a Web service reference manually, you supply the necessary information to create a valid SOAP request, including:
  • The URL used to post the SOAP request over HTTP(S)
  • A Universal Resource Identifier (URI) identifying the SOAP HTTP request
  • The SOAP envelope for the request, including any item substitutions
  • Optionally the name of a collection to store the response from the Web service
When you create a RESTful Web service reference, you supply the necessary information about the structure of the request and response including:
  • A Universal Resource Identifier (URI) identifying the RESTful request
  • The HTTP method identifying the method of the Web service
  • HTTP Headers, if required, that are part of the request
  • The type of input expected by the Web service
  • The format of the response and how to identify the response parameters

    Accessing the Web Service References Page

    You manage Web service references on the Web Service References page.
    To access the Web Service References page:
    1. On the Workspace home page, click the Application Builder icon.
    2. Select an application.
    3. Click Shared Components.
      The Shared Components page appears.
    4. Under Logic, click Web Service References.
      The Web Service References page appears.

    Specifying an Application Proxy Server Address

    If your environment requires a proxy server to access the Internet, you must specify a proxy server address on the Application Attributes page before you can create a Web service reference.
    To specify a proxy address for an application:
    1. On the Workspace home page, click the Application Builder icon.
    2. Select an application.
      Application home page appears.
    3. Click the Edit Application Properties button.
    4. Under Name, enter the proxy server in the Proxy Server field.
    5. Click Apply Changes.

Sunday, 1 January 2012

Features of the Database as a Web Service Consumer

Using the database as a Web Service consumer offers the following features:
  • Consuming Web Services form Java-in-the-database - Provides an easy-to-use interface for calling-out web services, thereby insulating developers from low-level SOAP programming. Java classes running in the database can simply and directly invoke external web services by using the previously loaded Java proxy or dynamic invocation.
  • Consuming Web Services from SQL and PL/SQL - Allows any SQL-enabled tool or application to transparently and easily consume dynamic data from external web services. After Exposing Web Services methods as Java Stored PRocedures, A PL/SQL wrapper on top of a Java stored procedures hides all Java and SOAP programming details from the SQL client.
  • Web Services Data Source - Enables Application and Data integration by turning external web service into an SQL data source, making external Web services appear as regular SQL tables. This table function represents the output of calling external web services and can be used in an SQL query.

Web Service Data Sources (Virtual Table Support)

To access data (returned from single or multiple Web service invocations) through a database table, create a virtual table through a Web service data source. This table function allows you to query a set of returned rows as though it were a table.

The client invokes a Web service and the results are stored in a virtual table in the database. You can pass result sets from function to function, allowing you to set up a sequence of transformation without a table holding intermediate results. To reduce memory usage, you can return the result set rows a few at a time within a function.

By using Web services with the table function, you can manipulate a range of input values (from single or multiple Web services) as a real table. In the following example, the inner SELECT creates rows whose columns are used as arguments for invoking the CALL_WS Web service call-out. The table expression could be used in other SQL queries, for constructing views, and so on.

SELECT <some-columns> 
FROM
  TABLE(WS_TABFUN(CURSOR(SELECT
 s FROM <some_table>))),
WHERE...