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