The Web Service Discovery Dialog allows you to discover
a web service that exists online or in your workspace, create a proxy
to the web service, and then place the methods of the proxy on a Faces
JSP file.
Before you begin
You must have a Faces JSP file on which you will place the
proxy methods.
About this task
To discover a web service and create a proxy for it:
Procedure
- Open your Faces JSP file in an editor by double-clicking
it.
- The Data tab should be visible in the Palette.
- In the Data tab, select Web Service,
right-click and select Insert.
- In the Web Service Discovery Dialog, select how you want
to find a web service:
| Option |
Description |
| Searching a public or private UDDI registry. |
If you select this option the UDDI Registry page displays.- Enter the URL of a public or private UDDI registry, or select
from the registries supplied.
- Enter the text with which you want to search the registry. This
can include either the partial or full name or key (UUID) of the service.
- Select if you want to search by the name of the web service, or
by the key that is associated with a published web service, and click Go.
- The UDDI Services table is populated with a list of available
web services that match your criteria, including their name, description,
and a URL where their WSDL file is located.
- To see additional information about the service, click Details.
This will launch the web service in the Web Services Explorer. For
more information about using the Web Services Explorer, refer to Testing WSDL documents and web services using the WSDL
Explorer.
- Click a WSDL file to continue creating your web service proxy.
Go to step 5.
|
| From a known URL. This can include known WSDL, WSIL, DISCO,
and HTML URLs. |
When you select this option, the URL page displays. Enter
the URL to a WSDL, WSIL, DISCO or HTML file that references a web
service, and click Go.- If you entered a URL to a WSIL, HMTL, or DISCO file, a list of
web services available from the URL are displayed. Select one of the
web services by clicking on the WSDL file, and go to step 5.
- If you entered a URL to a WSDL file, go to step 5.
|
| Selecting from web services that are deployed and running
in your workspace. |
If you selected to discover web services that are in your
workspace, the Workspace page displays. It contains a list of the
web services available in your workspace. Select a web service by
clicking on the appropriate WSDL file and go to step 5. |
- Once you have selected a WSDL file, a
table displays the web service name and location, any documentation
included in the web service, and lists the available ports.
- If there is more than one port, select the port for
which you want to create the proxy.
- To test the web service and to see additional information
about it, click Details. This will launch the web service in the Web
Services Explorer. For more information about using the
Web Services Explorer, refer to Testing WSDL documents and web services using the WSDL
Explorer.
- Once you have ensured that the chosen web service is
the correct one, click Add to Project. This generates your
proxy bean.
- The web service you selected is now listed in the list
of existing web services. When you select it the only method available
for this web service is listed in the methods list. Click Finish to
add it to your JSP.
- The proxy should now be shown in the Page Data view. If
the Page Data view is not displayed you can open it by clicking . Additionally, the method and the action
to invoke it have been added to the JSP file.
Results
The proxy for the web service is now on a Faces JSP. Save
the Faces JSP and run it on a server to test your web service.