Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Caused by: org.jboss.ws.WSException: Cannot obtain java type mapping for:

843833Jun 25 2007
hi

i am very new to web services.
I am exposing my ejb3.0 components as web services.
I am using myeclipse ide 5.5 that prvides service explorer utility where i could test my web services.web methods works fine.i am using JBOSS 4.0.5GA app server
But when tried to access web services using client application,it throws following exception,

Caused by: org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://wb1-329:8080}validateUser
at org.jboss.ws.deployment.JSR109MetaDataBuilder.buildParameterMetaDataDoc(JSR109MetaDataBuilder.java:451)
at org.jboss.ws.deployment.JSR109MetaDataBuilder.setupOperationsFromWSDL(JSR109MetaDataBuilder.java:200)
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaDataInternal(JSR109ClientMetaDataBuilder.java:208)
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:126)
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:82)
at org.jboss.ws.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:96)
at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
at client.UserBean.loginUser(UserBean.java:90)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)


can anybody tell me where i went wrong?

following is my client application code snippet,

String namespace="http://wb1-329:8080";
String service="CustomerRegisteration";
String wsdl="http://localhost:8080/CustomerRegistrationEJB?wsdl";

//ctx=new InitialContext();
//customerSessionRemote remote=(customerSessionRemote)ctx.lookup("customer/remote");
//String user=remote.validateUser(getUserName(), getPassword());

try {
URL defurl = new URL(wsdl);
System.out.println(defurl);
ServiceFactory serviceFactory=ServiceFactory.newInstance();
System.out.println("service fact");
Service remoteService=serviceFactory.createService(defurl, new QName(namespace,service));
System.out.println(remoteService);

customerSessionRemote invoker=(customerSessionRemote)remoteService.getPort(customerSessionRemote.class);
System.out.println(invoker);
String user=invoker.validateUser(getUserName(), getPassword());
if(user!=null)
{
if(user.equals("manager"))
{
res="manager";
}
else
{
res="executive";
}
}
else
{
res="failure";
}
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

} catch (ServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}



thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2007
Added on Jun 25 2007
0 comments
312 views