Download presentation
Presentation is loading. Please wait.
1
1 Web Services Part II Based on Sun Java Tutorial at http://java.sun.com/webservices/
2
2 Netprog 2002 - HTTP JAX-RPC -- Java API for XML-based RPC A JAX-RPC client can access a Web service that is not running on the Java platform and vice versa.A JAX-RPC client can access a Web service that is not running on the Java platform and vice versa. This flexibility is possible because JAX- RPC uses technologies defined by the World Wide Web Consortium (W3C): HTTP, SOAP, and WSDL.This flexibility is possible because JAX- RPC uses technologies defined by the World Wide Web Consortium (W3C): HTTP, SOAP, and WSDL.
3
3 Netprog 2002 - HTTP HelloWorld Example
4
4 Netprog 2002 - HTTP Downloading and Running the HelloWorld Example Detailed instructions for running the HelloWorld example can be found at:Detailed instructions for running the HelloWorld example can be found at: http://java.sun.com/webservices/docs/1.0/ tutorial/doc/JAXRPC3.html
5
5 Netprog 2002 - HTTP Java Web Services Developer Pack (WSDP) What are all these directories and files?What are all these directories and files?
6
6 Netprog 2002 - HTTP jwsdp-1_0_01 directories bin Binaries for “ant”, “wscompile”, “wsdeploy”, etc… conf Configuration files: “tomcat-users.xml” Managers, users,… “server.xml” Catalina Web services configuration “web.xml” Tomcat Web server configuration docs\tutorials\ex amples\jaxrpc Tutorial examples using JAX-RPC: “hello”, “dynamic”, “security”… “common” has files used by all of them, e.g. “targets.xml” logs Log information for web server and services. “jwsdp_log*” for web services deployment messages. work\StandardE ngine\localhost Where web services are deployed for this server, e.g. hello-jaxrpc\WEB-INF\classes\hello
7
7 Netprog 2002 - HTTP Another Web Service Example A quote service.A quote service. –An application requires a randomly generated quote, the web service returns it. –If there is no “quotes” file, it serves the current date and time.
8
8 Netprog 2002 - HTTP A stateful service QuoteIF.javaQuoteIF.java –Simple “String getQuote()” method. QuoteImpl.javaQuoteImpl.java –Implementation reads quotes from a file. The implementation constructor reads the file and starts the service.The implementation constructor reads the file and starts the service. New service invocations keep state from client to client.New service invocations keep state from client to client. QuoteClient.javaQuoteClient.java –A sample client.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.