[jboss-user] [JBossWS] - ejb3, jbossws and exceptions

600114046 do-not-reply at jboss.com
Thu Oct 12 09:09:51 EDT 2006


Hi,

I have an ejb which is exposed over a webservice. The methods on the ejb that have no chance of throwing exceptions work fine. As soon as I put in a new method which can throw an application exception (and generate is as a web method) none of my methods work over web services... i get this error:

Exception in thread "main" java.rmi.RemoteException: Call invocation failed with code [Client] because of: javax.xml.rpc.JAXRPCException: Cannot create or send response message; nested exception is: 
	javax.xml.rpc.soap.SOAPFaultException: javax.xml.rpc.JAXRPCException: Cannot create or send response message
	at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:715)
	at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:398)
                ....(then the class where the method gets invoked)

I've tried various techniques -even wrapping the exception in a remoteException just to see if i could get it working. Any ideas what i might be doing wrong?

Thanks.


CODE:
-----------------
My Bean:

//Annotations left out
public class MMAPIBean implements MMAPI
{
   


   public GetEchoResult getEcho(String echo){
	   
       GetEchoResult ge = new GetEchoResult();
       ge.setEchoInString(echo); 
       return ge;
   }
   
   
   public ReferenceTypeResult getStatusCodes() throws RemoteException {
     try {
       ReferenceTypes rt = new ReferenceTypes();
       return rt.getStatusCodes();
     } catch (MMAPIException e) {
        throw new RemoteException(e.getMessage());
     }	  
   }
}


------------
Remote and local interface:

@Local
@Remote

public interface MMAPI 
{
	public GetEchoResult getEcho(String echo);
	public ReferenceTypeResult getStatusCodes() throws RemoteException; 
}

----------------
Service endpoint:

// Annotations left out
public interface MMAPIsei extends Remote {
  

  @WebMethod
  public GetEchoResult getEcho(String echo) throws RemoteException;
  
  @WebMethod
  public ReferenceTypeResult getStatusCodes() throws RemoteException;
}

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977870#3977870

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977870



More information about the jboss-user mailing list