Creating Oracle ADF Data Controls for Web Services

If you use web services as your business service technology, model information will be exposed to the view and controller layers through ADF data control interfaces implemented by thin, Oracle-provided adapter classes.

JDeveloper creates Oracle ADF data controls for a web service by generating a stub or proxy to the service, and creating the data controls from the stub. Any web service is available to be exposed as a data control in JDeveloper as long as the design time can create a stub for that web service. For more information, see About Creating Stubs to Web Services.

You can create data controls for web services that you have created in JDeveloper as part of your application with just one mouse-click. The process of creating data controls for external web services, that is web services somewhere on the Web, is different in that you have to make the WSDL document available in the navigator first. Creating data controls is described for both these cases below:

Finally, you can view the business services you have registered for use with your client application.

Creating Data Controls for Web Services Created in JDeveloper

You can incorporate the functionality of a web service that you have created in JDeveloper in your application. This can be either a SOAP web service or a J2EE web service, and in either case the service should be deployed in the usual manner before creating data controls. When you have created a web service in JDeveloper, the web service container is listed in the navigator.

To create data controls for a web service created in JDeveloper:

Creating Data Controls for External Web Services

When you know the URL of the WSDL document, you need to make the WSDL available in the Application Navigator before you can create data controls for the service. There are two ways to do this:

Another way of using an external web service in an Oracle ADF application is to locate the service in a UDDI registry, and create the data controls from the Connection Navigator.

These three cases are described below.

To create data controls for an external web service by creating a new WSDL document:

  1. Create a new WSDL document, accepting the defaults.
  2. In a browser, open the WSDL document of the external web service you want to use as the service provider. View the source of the document, and copy the XML source of the WSDL.
  3. Replace the contents of the WSDL document you have just created with the source from the WSDL document of the web service you want to create data controls for.
  4. Right-click the WSDL document and choose Create Data Control. Alternatively, drag the WSDL node from the navigator to the Data Control Palette.

To create data controls for an external web service using a wizard:

  1. Create a stub to the web service, and paste the WSDL URL into the W SDL Document URL field on the Select Web Service Description page. On the same page, select Import WSDL URL Into Project, and complete the wizard.
  2. With the WSDL document selected, choose Creat e Data Control from the context menu. Alternatively, drag the WSDL node from the navigator to the Data Control Palette.

To create data controls for a web service located in a UDDI registry:

  1. Locate the web service in the UDDI registry. The service is listed in the Connection Navigator under the UDDI registry node.
  2. Right-click the web service and choose Creat e Data Control, as shown in the following figure

    Web service listed under UDDI registry connection node

To view the business services you have registered for use with your client application:


Registering Business Services with Oracle ADF Data Controls
About the Oracle ADF Data Controls for Web Services
Working with Web Services in the Model Project

Using Web Services in Applications

 

Copyright © 1997, 2004, Oracle. All rights reserved.