2 Replies Latest reply on Nov 15, 2008 2:29 PM by Emil Nilimaa

    A client using both EJB3 (RMI) and JBossWS Soap

    Emil Nilimaa Newbie

      We're using a client that has the option to select between using EJB (RMI) or SOAP to connect to the server.

      Our EJB3s are deployed as webservices as well in jboss with the @WebService annotation.

      How can we do this easily? Previously we used axis to create classes for this.
      It created

      MyServiceBindingImpl (implements MyService)

      The locator class had a method to get the MyService interface.

      So basically we had a method to get the MyService interface and let the client execute methods on it. And the method look somewhat like:

      If (ejb){
       return new MyServiceBindingImpl();
      else if (soap){
       return myServiceLocator.getMyService()

      But now we deploy the EJB3 bean MyBean and have a remote interface MyBeanRemote.

      And with JBossWS we get a service endpoint MyBean (interface) that we can access through jbossws.

      But now these two things don't implement the same interface. Previously (with EJB2) it was MyService that extended java.rmi.Remote. So the functionality of the method above can't be used... since the ws endpoint and the bean remote interface aren't relative...

      Any clues on how to work around this easily?