File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes NoClassDefFoundError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "NoClassDefFoundError" Watch "NoClassDefFoundError" New topic
Author

NoClassDefFoundError

Matt Hoffman
Ranch Hand

Joined: Jun 03, 2004
Posts: 83
I am getting this error when trying to run a client for my WS. Here is the client code:

package helloserver;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;

public class Client1 {
public static void main(String[] args) throws Exception {
String endpoint = "http://localhost:8080/axis/services/HelloService";

Service service = new Service();
Call call = (Call) service.createCall();

call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName("sayHelloTo");
String ret = (String) call.invoke(args);
printRequestAndResponseSOAP(call);

System.out.println(ret);
}

public static void printRequestAndResponseSOAP(Call call) throws Exception {
String request = call.getMessageContext().getRequestMessage()
.getSOAPPartAsString();
String response = call.getMessageContext().getResponseMessage()
.getSOAPPartAsString();

System.out.println("SOAP REQUEST:\n" + request);
System.out.println("SOAP RESPONSE:\n" + response);
}
}


I have the commons-logging-1.0.4.jar file installed. Any ideas?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39530
    
  27
I am getting this error

And what error is that? Post the full mesage and stack trace, and indicate in which line of your source the error occurs.


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NoClassDefFoundError
 
Similar Threads
Webservices : Writing a client
Soap client giving error
Java client connect to soap server
SOAPMessage: SAXParseException
My first webservice call