Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

error while invoking a webservice :java.lang.InstantiationException

hi,
I have to access a webservice from a client code. I have created a simple java class,deployed it as a web service in WSAD5.1.1 and generated the client code for it.Then I am accessing it from a java file. I am getting this exception while running the service from the client code:

faultCode: Server.generalException
faultString: java.lang.InstantiationException: trialpkg.Trialwebservice
faultActor: null
faultDetail:

java.lang.InstantiationException: trialpkg.Trialwebservice
at com.ibm.ws.webservices.engine.WebServicesFault.makeFault(WebServicesFault.java:156)
at com.ibm.ws.webservices.engine.providers.java.JavaProvider.invoke(JavaProvider.java:294)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:212)
at com.ibm.ws.webservices.engine.handlers.WrappedHandler.invoke(WrappedHandler.java:61)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:212)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:212)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:255)
at com.ibm.ws.webservices.engine.transport.http.WebServicesServlet.doPost(WebServicesServlet.java:893)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)



The follwoing is the code I am writing in the clent java file:

public class ejbRMLQ {
public static void callEJB(){
try {
Webservicenew_SEI webnewWS=() new WebservicenewServiceLocator();
java.net.URL url=new URL("http://localhost:9080/prototype/services/Webservicenew");
String s = webnewWS.concatstring("testing the app");
System.out.println(s);
}
catch(Exception exception)
{
System.out.println(exception.toString());
}
}
public static void main(String atr[])
{
callEJB();
}
}

The concatstring method simply returns the string being passed to it.
Please let me know if anyone has come across such an error.

thanks

Sign In or Register to comment.