[jboss-user] [JBossWS] - Using the same Remote Interface for different services????

felle82 do-not-reply at jboss.com
Tue May 6 10:05:45 EDT 2008


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, at 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, at 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?

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

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



More information about the jboss-user mailing list