Write a Java EE
application that can be
run outside of the application server to make web service invocations
against an external web service. This application acts as a lightweight
publisher, or a pull type consumer by invoking web service operations
against another web service such as the NotificationBroker provided
by WebSphere® Application Server.
Before you begin
This
task assumes that you have the following resources:
- An installed
and functioning copy of IBM® Rational® Application Developer, Rational Software
Architect or equivalent tooling.
- Knowledge of where to find
the WSDL file for the service that
is to be invoked.
About this task
To write a WS-Notification
application that does not expose
a web service endpoint, follow the method provided by your tooling
for creating a web service implementation from a WSDL file. As an
illustration, the following steps describe the method provided by Rational Software
Architect for writing a JAX-RPC application. The steps are very similar
for writing a JAX-WS application. For examples of JAX-WS publisher
and subscriber client applications that do not expose a web service
endpoint, see
Writing JAX-WS applications
for WS-Notification.
Procedure
- Get the WSDL
files for the service that you want to invoke. If the target
service is the notification broker service that
was generated by WebSphere Application Server, use the administrative console
to publish the WSDL files for the service to a compressed file.
- Create a Dynamic Web Project with a name of your
choice.
- Choose File > New >
Other > Web services > Web
services Client.
- Select Java
Proxy.
- Enter or select the WSDL
you obtained earlier.
- Choose a Client Type
of "Application Client" or "Java" depending
upon your requirements.
- Select your required
security configuration.
- Click Finish.
- Use the generated proxy and stubs to make calls
against
the remote web service. For detailed coding examples, see Developing applications that use WS-Notification.
What to do next
You are now ready to deploy the application for use
in the Java EE application client container as described
in
Running a Java EE client application with launchClient.