advertisement
javaboutique
Search Tips
Articles  |   Tutorials  |   Reviews  |   Tools  |   by Category  |   by Date  |   by Name  |   Submit  |   Source  |   Forums  |  
javaboutique
Browse DevX


Partners & Affiliates











advertisement

Tutorials : Using Apache Axis version 1 to build Web Services :

Looking at the wire

The tcpmon utility is used to look at the HTTP communication between the Axis client and server. In my first article about Axis I showed how it was used, and how it worked. In order to use it you’ll have to direct your requests from your client to another port, for example 8081. You then tell tcpmon to listen to port 8081. It shows what comes in, and then redirects to the Axis port, which is 8080 in a default Tomcat setup. We’ve already made a bat-file for running tcpmon, so we simply issue:

  tcpmon 8081 localhost 8080

Here’s part of what you see when a request for the DVD titles come in (click on the picture to see the whole screen):

A hint on restarting Axis

If you, for some reason, want to restart Axis you don’t have to restart Tomcat. Here’s what you must do:

  • in Tomcat’s conf/tomcat-users.xml file add a line like this:
    <user name="java" password="axis" roles="manager" />
  • enter this URL in your browser:
    http://localhost:8080/manager/reload?path=/axis
    When you’re prompted for username and password then enter the values from the users-file.

Where to go from here

In my next article I’ll look into some of the Axis features we haven’t covered yet:

  • the SoapMonitor, which resembles tcpmon but is sitting on the server side
  • the automatic code generation tools. They can take your service class (in our case the DVDService class) and generate both client and server code for you.
  • session management, a feature we know from servlets

We’ll also look more into error handling and "Interoperability", which has to do with what we must consider if different platforms and SOAP implementations should be able to talk to each other.

Finally we’ll modify the Struts DVD browser application to use web services.

Installation of the examples

In the resources section below you’ll find a link where you can download a zip file with all the programs and files shown in this article. Here are some tips on how to install the DVD web service:

File

Purpose

Comments

dvds.xml

Contains the data for the DVDs in the collection

The DVDService class contains the location of this file. Be sure to insert the correct location for your computer.

setcp.bat

Set up CLASSPATH

Place it in WEB-INF

adminclient.bat

Run the Axis Admin Client

etc.

tcpmon.bat

Run the Axis tcpmon utility

etc.

deploy.wsdd

Deploy DVDService

etc.

undeploy.wsdd

Undeploy DVDService

etc.

*.java and
*.class

Java programs

Place in WEB-INF/classes/hansen/playground

All files, except the dvds.xml file, must be placed in Tomcat’s webapps/axis directory.

The DVDManager class uses the JDOM package. You must therefore have downloaded JDOM and placed the jdom.jar file in Tomcat’s common/lib directory. The setcp.bat file contains the location of the jdom.jar file.

All examples have been developed using JDK 1.4, and please note, that the DVDClient uses features from this JDK, which are not present in prior versions of the JDK.

Resources

 

How to Add Java Applets to Your Site

New on the Java Boutique:

New Review:

Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling API boasts simplicity, ease-of-integration, a well-rounded feature set, and it's free!

New Applet:

Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA sequences into three useful formats.

Elsewhere on internet.com:

WebDeveloper Java
Lots of Java information on webdeveloper.com

WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.

ScriptSearch Java
Hundreds of free Java code files to download.

jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.

 BlackBerry Application Development Resources
 Microsoft Visual Studio 2010 Showcase
 MSDN Spotlight
 PHP for Windows Showcase
XML error: undefined entity at line 39
advertisement
Receive Articles via our XML/RSS feed
Receive Articles via our XML/RSS feed

JavaBytes
Internet Cyclone
This powerful, easy-to-use, internet optimizer is for Windows 95, 98, ME, NT, 2000 and XP. It's designed to automatically optimize your Windows settings, boosting your Internet connection up to 200%.

ActiveState Debuts Open Source Business Suite
Salesforce Offers Visual App Builder
Codesion Steps Out From CVS's Shadow
Facebook Makes Major PHP Push With HipHop
Free Ride Over for Microsoft Azure Users
Drupal Opens the Garden to Boost CMS
Oracle Talks Plans for Linux, Solaris
Azure Makes Cloud Computing Innovation Safe
Red Hat's JBoss Looks Ahead
Microsoft Readies Two Windows Phone Systems?

Apple Surveying iPhone Developers? Happiness With The App Store
HTML 5 Leaves Client Storage Open to Web Attacks
Basic Market Forecasting with Encog Neural Networks
Location-Aware App Review
The Future of Web Content -- HTML5, Flash, and Mobile Apps
Moonlight 3.0 Preview Offered For Rich Internet Apps on Linux and Unix
Why a Moderator is Key in the Engineering Review Process, Part II
Windows 7 Features Your Clients Will Need on Day One
What Your Clients Will Ask About Windows 7
Melissa Data Helps Developers Improve the Quality of Business Data

Advertising Info  |   Member Services  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers