You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by da...@apache.org on 2007/04/17 01:01:54 UTC
svn commit: r529436 [2/2] - in /incubator/cxf/trunk:
api/src/main/java/org/apache/cxf/binding/
api/src/main/java/org/apache/cxf/endpoint/
api/src/main/java/org/apache/cxf/interceptor/
api/src/main/java/org/apache/cxf/phase/ api/src/main/java/org/apache...
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/versioning/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/versioning/Server.java?view=diff&rev=529436&r1=529435&r2=529436
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/versioning/Server.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/versioning/Server.java Mon Apr 16 16:01:51 2007
@@ -23,31 +23,30 @@
import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.transport.MultipleEndpointObserver;
import org.apache.hello_world_mixedstyle.GreeterImplMixedStyle;
public class Server extends AbstractBusTestServerBase {
protected void run() {
- //implementor1 and implementor2 are published using local transport
+ String address = "http://localhost:9027/SoapContext/SoapPort";
+
Object implementor1 = new GreeterImplMixedStyle();
- String address1 = "local://SoapContext/version1/SoapPort";
- Endpoint.publish(address1, implementor1);
+ EndpointImpl ep1 = (EndpointImpl) Endpoint.publish(address, implementor1);
- Object implementor2 = new GreeterImplMixedStyle();
- String address2 = "local://SoapContext/version2/SoapPort";
- Endpoint.publish(address2, implementor2);
+ ep1.getServer().getEndpoint().put("version", "1");
- //A dummy service that acts as a routing mediator
- Object implementor = new GreeterImplMixedStyle();
- String address = "http://localhost:9027/SoapContext/SoapPort";
- javax.xml.ws.Endpoint jaxwsEndpoint = Endpoint.publish(address, implementor);
+ Object implementor2 = new GreeterImplMixedStyle();
+ EndpointImpl ep2 = (EndpointImpl) Endpoint.publish(address, implementor2);
+ ep2.getServer().getEndpoint().put("version", "2");
//Register a MediatorInInterceptor on this dummy service
- EndpointImpl jaxwsEndpointImpl = (EndpointImpl)jaxwsEndpoint;
- org.apache.cxf.endpoint.Server server = jaxwsEndpointImpl.getServer();
- org.apache.cxf.endpoint.Endpoint endpoint = server.getEndpoint();
- endpoint.getInInterceptors().add(new MediatorInInterceptor());
+
+ MultipleEndpointObserver meo = (MultipleEndpointObserver)
+ ep2.getServer().getDestination().getMessageObserver();
+ meo.getRoutingInterceptors().clear();
+ meo.getRoutingInterceptors().add(new MediatorInInterceptor());
}
public static void main(String[] args) {