Re: smaller size possible?

From: Brian Moffatt <>
Date: Thu, 15 Jul 2004 10:53:13 -0700 (PDT)

I have a similar question as the one below. I have a simple web service that I've successfully deployed on Tomcat 5.0.25 using Apache Axis 1.1. It is based on a class with one method that takes a String and returns a String. Then I wrote a JAX-RPC dynamic proxy client based on techniques I found in Sun tutorials and other articles on the subject. It all works fine but I too was wondering why I need to have so many JAR files in my classpath for the client to work. What follows is the code for the client and the list of JARs I have had to include for it to work. Removing any one of them causes a NoClassDefFoundError exception at some point in the processing. Based on what's been posted I wouldn't think I would need activation.jar or mail.jar since I'm not (intentionally) "using attachments". My question is basically this: Should I need all the listed JARs to run my client or is there anything about my client or service I could change to retain the functionality and re!
move the
 client's dependence on any of the listed JARs? I can provide more information such as WSDL or anything else if desired. Thanks in advance.

Here's the client source:
package demo.client;
import demo.greetingservice.IGreeting;
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceFactory;
public class GreetingClient {
public static void main(String args[]) {
        try {
            ServiceFactory factory = ServiceFactory.newInstance();
            // Create a service class with WSDL information.
            QName serviceName = new QName(
            URL wsdlLocation = new URL
              Service service = factory.createService( wsdlLocation, serviceName);
            // Get an implementation for the SEI for the given port
            QName portName = new QName("urn:greetingservice.demo", "GreetingService");
            IGreeting greeter = (IGreeting) service.getPort(portName, IGreeting.class);
           // Invoke the operation
              String greeting = greeter.getGreeting("Brian");
              System.out.println("Greeting = " + greeting);
        catch (Throwable t) {
Here are all the JARs I'm having to include for it to run successfully:

Doug Kohlert <Doug.Kohlert_at_Sun.COM> wrote:
If you are not using attachments you should not need activation.jar and

Zhan Yi wrote:

> Hi,
> In my jax-rpc client applet, user must download:
> jaxrpc-api.jar
> jaxrpc-impl.jar
> saaj-api.jar
> saaj-impl.jar
> activation.jar
> mail.jar
> jax-qname.jar
> dom.jar
> xercesImpl.jar
> A total size of 7.87M, any comment on how to make it smaller?
> Regards
> Zhan Yi

Doug Kohlert
Sun Microsystems, Inc.
To unsubscribe, e-mail:
For additional commands, e-mail:
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!