1 Web Services Part II Based on Sun Java Tutorial at
2 Netprog 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 Netprog HTTP HelloWorld Example
4 Netprog 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: tutorial/doc/JAXRPC3.html
5 Netprog HTTP Java Web Services Developer Pack (WSDP) What are all these directories and files?What are all these directories and files?
6 Netprog 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 Netprog 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 Netprog 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.