Hi Andersen,

As you know the Endpoint.publish(address1, implementor1) 's address1 can be any string, and it will take no effect if you just use the jms transport.
Because the JMS endpoint address information is got from the wsdl.

So back to your question. I just checked the codes, and found the server-routing.html is out of date :(
You can find the latest codes here.
(in Server.java , you can set the information to the endpoints for the MediatorInInterceptor to look up)

https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/versioning/Server.java
https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/versioning/MediatorInInterceptor.java


If you like you can try the trunk version or latest snapshot with these code.

Willem.


mr.andersen wrote:
Hi

I'm trying to setup a simple server running in a main method.
My goal is to have atleast 2 services, having their own wsdl definition, but
both using the same request and reply JMS queue.

I have tested that both services can be executed and response with correct
information seperatly, but I have some problems when I publishing 2
services.
First I tried to follow the example in the Users Guide - http://cwiki.apache.org/CXF20DOC/service-routing.html Service Routing , but
each time the MediatorInInterceptor have found the correct targetServer, no
MessageObserver was available to handle the message (MessageObserver mo =
targetServer.getMessageObserver(); returned a null mo).

My second implementation is like the below, but the server is picking out a
random service to handle the incoming message.

Is there something I have missed? Or does CXF not support multi services
over JMS yet?

Object implementor1 = new OneImpl();
String address1 =
"{http://cxf.apache.org/jms_endpt}OnePort.jms-destination";;
Endpoint.publish(address1, implementor1);

Object implementor2 = new AnotherImpl();
String address2 =
"{http://cxf.apache.org/jms_endpt}AnotherPort.jms-destination";;
Endpoint.publish(address2, implementor2);

Reply via email to