0 Replies Latest reply on May 6, 2008 10:05 AM by Tobi Felle

    Using the same Remote Interface for different services????

    Tobi Felle Newbie

      Hi all,

      Is it possible to use the same remote interface for different services within one application. I have two services with the same interface using JAX-WS. They are in two different jars but in one EAR. Of course there are different implementations for the beans. One is a publish-subscribe component and the other is a subscriber but they both should implement the same consumer interface.
      I use different namespaces and service names and when I deploy them, I get different endpoints.

      @WebService(name="ConsumerTest", targetNamespace="http://xyz.com/sii/testconsumer")
      @Remote
      public interface ConsumerRemote {
      
       @WebMethod(operationName="notify")
       @WebResult(name = "result")
       public String notify(@WebParam(name="topic")
       String topic,@WebParam(name="message")
       Object message);
      
      }

      @WebService(name="ConsumerService", targetNamespace="http://xyz.com/sii/pubsub/consumer")
      @Remote
      public interface ConsumerRemote {
      
       @WebMethod(operationName="notify")
       @WebResult(name = "result")
       public String notify(@WebParam(name="topic")
       String topic,@WebParam(name="message")
       Object message);
      
      }

      But behind that endpoint the wsdls for both are the same with the same namespace and service name. Hence the service invocation is done by the same bean implementation. I have to change the package or class name of one interface (and bean) to get different wsdls.
      Any solutions for that?