Hi all,

I use CXF in ServiceMix to perform a proxy to my EJBs.

Currently, I have create a delegator class which looks like this :

package net.nanthrax.smx.sample:

import javax.jws.WebService;

import net.nanthrax.ejb.MyServiceSession;

@WebService(serviceName = "MyServiceEJBService", targetNamespace = 
"http://www.nanthrax.net/smx/my-service-ejb-service";)
public class MyServiceEJBDelegator {

  private MyServiceSession proxy;

  public void setProxy(MyServiceSession proxy) {
    this.proxy = proxy;
  }

  // delegate methods to the EJB side
  public String echo(String message) {
    return proxy.echo(message);
   }

   // same for all EJB methods

}

This solution works (I inject my EJB proxy using Spring 
SimpleRemoteStatelessSessionProxyFactoryBean bean).

I had to create the delegator bean only to add the @WebService annotation. The 
problem is that this is very static : when the EJB change (for exemple adding 
new method, changing a method signature, etc)
the delegator class must be updated to take care of this change. Of course, my 
delegator can implements the EJB interface but the problem is quite the same.

Is it possible to use directly the EJB interface (MyServiceSession in my case) 
by CXF to dynamically generate the WSDL ?

Thanks,
Regards
-- 
Jean-Baptiste Onofré
[EMAIL PROTECTED]
BuildProcess/AutoDeploy Project Leader
http://buildprocess.sourceforge.net
 

Reply via email to