Skip to main content


developerWorks  >  Java technology | SOA and Web services  >

Customize JAX-RPC Web services and clients with advanced tools

Use Apache Axis tools to generate Web services and clients and configure advanced options

developerWorks

Level: Intermediate

Brett McLaughlin (brett@newInstance.com), Author/editor, O'Reilly Media

19 Aug 2008

Register now or sign in using your IBM ID and password.

This tutorial takes you beyond the basics of the JAX-RPC and shows how to customize your JAX-RPC Web services and clients with the help of Apache Axis. On the client side, you can autogenerate much of the code required to connect with new JAX-RPC Web services, focusing your time on the interactions themselves rather than on routine Web service calls. On the server side, you can add additional options, limit the methods you expose, and restrict parameters you'll accept. All of this is possible with a little customization and a deeper understanding of the Apache Axis toolset.

In this tutorial

This tutorial is a guide to the more advanced feature set of Apache Axis and its JAX-RPC capabilities. You'll learn how to autogenerate client programs from a Web Services Description Language (WSDL) file, making consumption of JAX-RPC services simple. You'll also learn how to deploy your Web service restrictively, limiting the methods and parameters available for other users to work with. Along the way, you'll gain a deeper and more thorough understanding of Apache Axis and how it configures, sends, and receives JAX-RPC requests and responses.


Objectives

  • Become familiar with the various command-line code-generation tools that Axis offers

  • Learn how to construct Web services that protect both private and public methods from Web access

  • See which Java idioms do not translate well to a Web service environment

Prerequisites

This tutorial is a follow-on to "Build an RPC service and client using JAX-RPC." It is highly recommended that readers who are unfamiliar with JAX-RPC programming complete that tutorial before beginning this one. Regardless of your JAX-RPC experience, you'll find it easier to follow this tutorial if you work through that one first.

This tutorial is written for Java programmers. You should be comfortable coding Java applications and working with standard and third-party Java APIs and toolkits. You should be comfortable writing simple Web services and clients that consume them. You should also have deployed at least one Web service via dropping a Java class into Apache Axis' webapps/axis directory. This autodeployment feature is the basis of much of this tutorial's advanced discussion, so familiarity with that deployment mechanism is critical.

Basic familiarity with WSDL is helpful but not required. In fact, you can avoid many of the details surrounding WSDL by using the techniques detailed in this tutorial for code autogeneration.


System requirements

You need a Web server that's capable of hosting server-side Java applications (servlets). You can use any Java-capable Web servlet container, application server, or hosting provider. One of the most popular solutions is Apache Tomcat, which is both free and well-documented. It's also up to you whether you test out your programs on a remote server (at your company or an ISP), or on your local machine. You just need to have the server installed and running on an accessible machine.

You should have Apache Axis installed and configured on your servlet engine/Web server. If you're unsure how to get Apache Axis running, you should refer to "Build an RPC service and client using JAX-RPC."



Duration

1 hour


Formats

html, pdf


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!


Back to top


Document options

Document options requiring JavaScript are not displayed


My developerWorks needs you!

Connect to your technical community