users@jax-rpc.java.net

Re: smaller size possible?

From: Jitendra Kotamraju <Jitendra.Kotamraju_at_Sun.COM>
Date: Thu, 15 Jul 2004 13:24:27 -0700

Doug Kohlert wrote:
> Brian,
> Hmm, I am not sure why you need mail.jar and activation.jar. When you
> remove these jars, can you tell me what classes are not
> found? I would like to find out what is trying to access them. Stack
> traces would be nice as well.

Doug,

SAAJ's MessageImpl might be using MIME classes. So even you don't use
attachments, since SOAPMessage uses MessageImpl, these jars are
required. Stack Trace will tell us.

Jitu

>
> Thanks
>
> Brian Moffatt wrote:
>
>> 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 remove 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 java.net.URL;
>> 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(
>> "urn:greetingservice.demo",
>> "IGreetingService");
>> URL wsdlLocation = n! ew URL
>>
>> ("http://localhost:8080/axis/services/GreetingService?wsdl");
>> 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) {
>> System.out.println(t.toString());
>> t.printStackTrace();
>> }
>> }
>> }
>>
>>
>> Here are all the JARs I'm having to include for it to run successfully:
>>
>> xercesImpl.jar
>> dom.jar
>> saaj-api.jar
>> saaj-impl.jar
>> jaxrpc-api.jar
>> jaxrpc-impl.jar
>> jax-qname.jar
>> activation.jar
>> mail.jar
>> jaxrpc-spi.jar
>>
>>
>> Doug Kohlert <Doug.Kohlert_at_Sun.COM> wrote:
>>
>> If you are not using attachments you should not need
>> activation.jar and
>> mail.jar.
>>
>> 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.
>> doug.kohlert_at_sun.com
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
>> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>>
>> ------------------------------------------------------------------------
>> Do you Yahoo!?
>> New and Improved Yahoo! Mail
>> <http://us.rd.yahoo.com/mail_us/taglines/10/*http://promotions.yahoo.com/new_mail/static/efficiency.html>
>> - Send 10MB messages!
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net