|
WebLogic Server 6.1 Code Examples, BEA Systems, Inc. | |||||
This example illustrates how to create an RPC-style WebLogic Web service and how to invoke it from a variety of client applications.
See:
Description
This example illustrates how to create an RPC-style WebLogic Web service and how to invoke it from a variety of client applications.
The example demonstrates how to:
| Additional Resources for examples.webservices.rpc | |
| weatherEJB/Weather.java | The public interface of the Weather EJB. |
| weatherEJB/WeatherBean.java | The actual implementation class of the Weather EJB. |
| weatherEJB/WeatherHome.java | The Home interface of the Weather EJB. |
| weatherEJB/build-ejb.xml | The Java Ant build script for assembling the Weather EJB. |
| weatherEJB/build-ws.xml | The Java Ant build script for assembling the Weather Web Service. |
| weatherEJB/build.xml | The Java Ant build script that calls the build-ejb.xml and build-ws.xml build scripts |
| javaClient/Client.java | The static Java client that invokes the Weather Web service by directly referencing its WSDL and methods. |
| javaClient/DClient.java | The dynamic Java client that invokes the Weather Web service by directly referencing its WSDL but indirectly referencing its methods via the WebServiceProxy class. |
| javaClient/XMethodClient.java | The Java client that invokes the a Weather Web service hosted by the http://www.xmethods.net Web site. |
| javaClient/XMethodClient.java | The Java client that invokes the a Weather Web service hosted by the http://www.xmethods.net Web site. |
| javaClient/build.xml | The Java Ant build script for compiling the Java clients. |
The following sections describe how to build and run the example.
$ cd %WL_HOME%\samples\examples\webservices\rpc\weatherEJB
$ ant
The build script builds the example weather EJB, generates a Weather Web service, and places the resulting .ear files in the deployment directory of the examples server.
http://host:port/weatherwhere host refers to the computer on which WebLogic Server is running and port refers to the port number WebLogic Server is listening to.
$ cd %WL_HOME%\samples\examples\webservices\rpc\javaClient
$ ant
$ java examples.webservices.rpc.javaClient.Client http://host:port
where host refers to the computer on which WebLogic Server is running and port refers to the port number WebLogic Server is listening to. Specify http://localhost:7001 for WebLogic Server running on the local computer at the default port.
$ java examples.webservices.rpc.javaClient.DClient http://host:port
where host refers to the computer on which WebLogic Server is running and port refers to the port number WebLogic Server is listening to. Specify http://localhost:7001 for WebLogic Server running on the local computer at the default port.
$ java examples.webservices.rpc.javaClient.XMethodClient
$ VBClient.exe
Enter a zip code in the text field and click Get Temperature.
NOTE: For the sake of simplicity, the actual Weather EJB is hardcoded to return a temperature of 77 for the 90210 zip code, and -273.15 for all other zip codes.
|
Documentation is available at http://e-docs.bea.com/wls/docs61 |
|||||