Hi Johann,

but I do have jaxrpc.jar in the lib directory.

Regards,
Juliane.

-----Original Message-----
From: Johann RENEL [mailto:[EMAIL PROTECTED] 
Sent: Dienstag, 3. Januar 2006 18:12
To: [email protected]
Subject: Re: Can't call a Web Service from a Servlet

Hi,

Your import are correct, just the jaxrpc.jar is a dependance for Axis. 
jaxrpc.jar must be in the same directory as axis.jar etc.

BR,

Johann

Harbarth, Juliane a écrit :
> 
> 
> Hi Johann,
> 
> that is strange indeed. 
> I do have jaxrpc.jar and it does contain a class Service, 
> javax.xml.rpc.Service to be precise.
> But may be here is the problem, my Servlet contains the following
> imports:
> 
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
> import java.net.URL;
> import org.apache.axis.client.Call;
> import org.apache.axis.client.Service;
> 
> Doesn't that mean that it interprets the Service in the code as being 
> of class org.apache.axis.client.Service instead of 
> javax.xml.rpc.Service as I intended (though in these details I am not 
> completely sure what I really intend) ?
> The axis Service class is also there (in axis.jar).
> 
> Thanks & regards,
> Juliane.
> 
>   
> 
> -----Original Message-----
> From: Johann RENEL [mailto:[EMAIL PROTECTED]
> Sent: Dienstag, 3. Januar 2006 12:19
> To: [email protected]
> Subject: Re: Can't call a Web Service from a Servlet
> 
> Hello,
> 
> Harbarth, Juliane a écrit :
> 
>> 
>>
>>Hi all,
>> 
>>I am trying to invoke a Web service from a servlet. Since the servlet 
>>is supposed to be able to be dynamic w.r.t. the Web service's name, I 
>>am using a generic way to invoke the service as follows:
>> 
>>      Service service = new Service();
>>      Object ret;
>>      try
>>      {
>>          Call    call    = (Call)service.createCall();
>>          call.setTargetEndpointAddress(new URL(wsEndpoint));
>>          call.setOperationName( new
>>javax.xml.namespace.QName(wsNamespace,wsMethod));
>>          ret = call.invoke(val);
>> 
>>The service is deployed and accessible by a Java application using the 
>>same invoke method.
>>When running the servlet, I am getting an NoClassDefFoundError error 
>>pointing to the line that contains the new Service() statement (the 
>>full error report is attached below).
> 
> 
> This message indicates the jaxrpc jar is missing. Axis needs the Service 
> interface (of jaxrpc) to implement the Service class.
> 
> 
>>have failed to understand how to make archives known to a servlet. 
>>Isn't it enough to get the servlet compiled and provide the jars in 
>>the Web application's lib sub-directory ?
> 
> 
> yes, generaly that's the way
> 
> BR,
> 
> Johann
> 

Reply via email to