Generating a web service proxy client
109
To generate proxy code:
•
Open a command window and enter the following commands:
>cd
jrun_root
\servers\tutorial\travelnet-ear\travelnet-war\WEB-INF\classes
>setenv
Note:
In the setenv.bat file, JRUN_HOME is set to the default JRun installation
directory (
jrun_root
). If you installed JRun in a location other than the default directory,
edit JRUN_HOME in the setenv.bat file.
UNIX users
Add the following to your login, profile file, or shell rc/profile file:
JRUN_HOME=/path/to/JRun4
PATH=$PATH:$JRUN_HOME/bin
CLASSPATH=$CLASSPATH:$JRUN_HOME/lib/jrun.jar:$JRUN_HOME/lib/webservices.jar
>wsdl2java -p compass Trip.wsdl
>wsdl2java -p compass Reservation.wsdl
>cd compass
>javac *.java
For descriptions of the WSDL2Java command-line switches, see JRun Programmer’s
Guide.
In the jrun_root/servers/tutorial/travelnet-ear/travelnet-war/WEB-INF/classes/compass
directory, you find the following .java and .class files:
File
Description
Reservation
(ServicePortName.java for an
encoded WSDL)
The Java interface provided by the service. It contains
method signatures for the web service operations.
ReservationService
(
ServiceName
.java)
A factory interface that the
ServiceNameLocator.java
class implements.
The interface name is derived from the service name in the
WSDL document.
ReservationServiceLocator
(
ServiceName
Locator.java)
A factory for obtaining proxy instances. It implements the
ServiceNameService.java interface. It is generated from
the service name in the WSDL file.
The class name is derived from the service name in the
WSDL document plus the suffix Locator. If you had more
than one service listed in the WSDL file, one class for each
service is generated. You use the
get
methods in this class
to get a stub object that implements the web service
interface.
ReservationSoapBindingStub
(
ServiceBindingName
Stub.java)
The web service proxy class. It implements the
ServicePortName.java interface that uses the Axis client
API to make the web service call.
The class name is derived from the service binding name
plus the suffix Stub.
Trip
(ServicePortName.java for an
encoded WSDL)
The Java interface provided by the service. It contains
method signatures for the web service operations.
TripInfo
A JavaBean generated to handle the returned
getList
and
getInfo
methods of the Trip service.
Содержание 38000382 - Macromedia JRun - Mac
Страница 1: ...Getting Started with JRun...
Страница 16: ......
Страница 68: ...54 Chapter 5 Introduction to EJB...
Страница 82: ......
Страница 110: ...96 Lesson 3 EJB Tutorial...
Страница 128: ...114 Lesson 4 Web Services Tutorial...
Страница 132: ...118 Index...