You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by eg...@apache.org on 2007/05/03 14:36:08 UTC
svn commit: r534822 - in /incubator/cxf/trunk:
rt/core/src/main/java/org/apache/cxf/transport/
rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/
rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/
systests/src/test/java/org/apache/cxf/systest/cl...
Author: eglynn
Date: Thu May 3 05:36:07 2007
New Revision: 534822
URL: http://svn.apache.org/viewvc?view=rev&rev=534822
Log:
Added a couple more failover test cases.
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplA.java
- copied, changed from r534385, incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImpl.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplB.java (with props)
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplC.java (with props)
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplD.java (with props)
Removed:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImpl.java
Modified:
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractObservable.java
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/AddressingPropertiesImpl.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/ControlImpl.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/Server.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/failover.xml
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/coloc/coloc_rpc.xml
incubator/cxf/trunk/testutils/src/main/resources/wsdl/greeter_control.wsdl
Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractObservable.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractObservable.java?view=diff&rev=534822&r1=534821&r2=534822
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractObservable.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractObservable.java Thu May 3 05:36:07 2007
@@ -97,7 +97,7 @@
} else {
ref = t;
}
- return EndpointReferenceUtils.resolve(ref, bus);
+ return ref;
}
/**
Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java?view=diff&rev=534822&r1=534821&r2=534822
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java Thu May 3 05:36:07 2007
@@ -242,6 +242,7 @@
public <T> T getPort(EndpointReferenceType endpointReference,
Class<T> type) {
+ endpointReference = EndpointReferenceUtils.resolve(endpointReference, bus);
QName serviceQName = EndpointReferenceUtils.getServiceName(endpointReference);
String portName = EndpointReferenceUtils.getPortName(endpointReference);
Modified: incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/AddressingPropertiesImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/AddressingPropertiesImpl.java?view=diff&rev=534822&r1=534821&r2=534822
==============================================================================
--- incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/AddressingPropertiesImpl.java (original)
+++ incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/AddressingPropertiesImpl.java Thu May 3 05:36:07 2007
@@ -210,6 +210,13 @@
buf.append(address.getValue());
}
}
+ if (null != relatesTo) {
+ if (buf.length() > 1) {
+ buf.append(", ");
+ }
+ buf.append("RelatesTo: ");
+ buf.append(relatesTo.getValue());
+ }
buf.append("]");
return buf.toString();
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/ControlImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/ControlImpl.java?view=diff&rev=534822&r1=534821&r2=534822
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/ControlImpl.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/ControlImpl.java Thu May 3 05:36:07 2007
@@ -31,6 +31,7 @@
import javax.xml.ws.Response;
import org.apache.cxf.greeter_control.Control;
+import org.apache.cxf.greeter_control.Greeter;
import org.apache.cxf.greeter_control.types.FaultLocation;
import org.apache.cxf.greeter_control.types.StartGreeterResponse;
import org.apache.cxf.greeter_control.types.StopGreeterResponse;
@@ -43,11 +44,22 @@
public class ControlImpl implements Control {
private static final Logger LOG = Logger.getLogger(ControlImpl.class.getName());
- private Map<String, Endpoint> endpoints = new HashMap<String, Endpoint>();
+
+ private Map<String, Greeter> implementors;
+ private Map<String, Endpoint> endpoints;
+
+ ControlImpl() {
+ implementors = new HashMap<String, Greeter>();
+ implementors.put(FailoverTest.REPLICA_A, new GreeterImplA());
+ implementors.put(FailoverTest.REPLICA_B, new GreeterImplB());
+ implementors.put(FailoverTest.REPLICA_C, new GreeterImplC());
+ implementors.put(FailoverTest.REPLICA_D, new GreeterImplD());
+ endpoints = new HashMap<String, Endpoint>();
+ }
public boolean startGreeter(String address) {
- GreeterImpl implementor = new GreeterImpl(address);
- endpoints.put(address, Endpoint.publish(address, implementor));
+ endpoints.put(address,
+ Endpoint.publish(address, implementors.get(address)));
LOG.info("Published greeter endpoint on: " + address);
return true;
}
@@ -89,5 +101,5 @@
AsyncHandler<StopGreeterResponse> asyncHandler) {
// never called
return null;
- }
+ }
}
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java?view=diff&rev=534822&r1=534821&r2=534822
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java Thu May 3 05:36:07 2007
@@ -28,12 +28,16 @@
import org.apache.cxf.BusFactory;
import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.clustering.FailoverTargetSelector;
+import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.frontend.ClientProxy;
import org.apache.cxf.greeter_control.ClusteredGreeterService;
import org.apache.cxf.greeter_control.Control;
import org.apache.cxf.greeter_control.ControlService;
import org.apache.cxf.greeter_control.Greeter;
+import org.apache.cxf.greeter_control.PingMeFault;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.ws.addressing.MAPAggregator;
+import org.apache.cxf.ws.addressing.soap.MAPCodec;
import org.junit.After;
import org.junit.Before;
@@ -46,24 +50,26 @@
*/
public class FailoverTest extends AbstractBusClientServerTestBase {
+ protected static final String REPLICA_A =
+ "http://localhost:9051/SoapContext/ReplicatedPortA";
+ protected static final String REPLICA_B =
+ "http://localhost:9052/SoapContext/ReplicatedPortB";
+ protected static final String REPLICA_C =
+ "http://localhost:9053/SoapContext/ReplicatedPortC";
+ protected static final String REPLICA_D =
+ "http://localhost:9054/SoapContext/ReplicatedPortD";
private static final Logger LOG =
Logger.getLogger(FailoverTest.class.getName());
private static final String FAILOVER_CONFIG =
"org/apache/cxf/systest/clustering/failover.xml";
- private static final String REPLICA_A =
- "http://localhost:9051/SoapContext/GreeterPort";
- private static final String REPLICA_B =
- "http://localhost:9052/SoapContext/GreeterPort";
- private static final String REPLICA_C =
- "http://localhost:9053/SoapContext/GreeterPort";
- private static final String REPLICA_D =
- "http://localhost:9054/SoapContext/GreeterPort";
-
private Bus bus;
private Control control;
private Greeter greeter;
private List<String> targets;
+ private MAPAggregator mapAggregator;
+ private MAPCodec mapCodec;
+
@BeforeClass
public static void startServers() throws Exception {
@@ -147,16 +153,34 @@
response = greeter.greetMe("fred");
assertNotNull("expected non-null response", response);
- assertTrue("response unexpected unexpected target: " + response,
+ assertTrue("response from unexpected target: " + response,
response.endsWith(REPLICA_C));
verifyCurrentEndpoint(REPLICA_C);
response = greeter.greetMe("joe");
assertNotNull("expected non-null response", response);
- assertTrue("response unexpected unexpected target: " + response,
+ assertTrue("response from unexpected target: " + response,
response.endsWith(REPLICA_C));
}
+
+ @Test
+ public void testNoFailoverOnApplicationFault() throws Exception {
+ startTarget(REPLICA_C);
+ setupGreeter();
+
+ greeter.pingMe();
+ verifyCurrentEndpoint(REPLICA_C);
+
+ startTarget(REPLICA_B);
+
+ try {
+ greeter.pingMe();
+ } catch (PingMeFault pmf) {
+ verifyCurrentEndpoint(REPLICA_C);
+ }
+ }
+
@Test
public void testFailoverOnCurrentReplicaDeath() throws Exception {
startTarget(REPLICA_C);
@@ -165,7 +189,7 @@
response = greeter.greetMe("fred");
assertNotNull("expected non-null response", response);
- assertTrue("response unexpected unexpected target: " + response,
+ assertTrue("response from unexpected target: " + response,
response.endsWith(REPLICA_C));
verifyCurrentEndpoint(REPLICA_C);
@@ -174,7 +198,7 @@
response = greeter.greetMe("joe");
assertNotNull("expected non-null response", response);
- assertTrue("response unexpected unexpected target: " + response,
+ assertTrue("response from unexpected target: " + response,
response.endsWith(REPLICA_B));
verifyCurrentEndpoint(REPLICA_B);
}
@@ -187,37 +211,70 @@
response = greeter.greetMe("fred");
assertNotNull("expected non-null response", response);
- assertTrue("response unexpected unexpected target: " + response,
+ assertTrue("response from unexpected target: " + response,
response.endsWith(REPLICA_C));
verifyCurrentEndpoint(REPLICA_C);
startTarget(REPLICA_A);
response = greeter.greetMe("joe");
assertNotNull("expected non-null response", response);
- assertTrue("response unexpected unexpected target: " + response,
+ assertTrue("response from unexpected target: " + response,
response.endsWith(REPLICA_C));
verifyCurrentEndpoint(REPLICA_C);
startTarget(REPLICA_B);
response = greeter.greetMe("bob");
assertNotNull("expected non-null response", response);
- assertTrue("response unexpected unexpected target: " + response,
+ assertTrue("response from unexpected target: " + response,
response.endsWith(REPLICA_C));
verifyCurrentEndpoint(REPLICA_C);
stopTarget(REPLICA_B);
response = greeter.greetMe("john");
assertNotNull("expected non-null response", response);
- assertTrue("response unexpected unexpected target: " + response,
+ assertTrue("response from unexpected target: " + response,
+ response.endsWith(REPLICA_C));
+ verifyCurrentEndpoint(REPLICA_C);
+
+ stopTarget(REPLICA_A);
+ response = greeter.greetMe("mike");
+ assertNotNull("expected non-null response", response);
+ assertTrue("response from unexpected target: " + response,
response.endsWith(REPLICA_C));
verifyCurrentEndpoint(REPLICA_C);
+ }
+
+ @Test
+ public void testEndpointSpecificInterceptorsDoNotPersistAcrossFailover()
+ throws Exception {
+ startTarget(REPLICA_A);
+ setupGreeter();
+ String response = null;
+
+ enableWSAForCurrentEndpoint();
+
+ response = greeter.greetMe("fred");
+ assertNotNull("expected non-null response", response);
+ assertTrue("response from unexpected target: " + response,
+ response.endsWith(REPLICA_A));
+ assertTrue("response expected to include WS-A messageID",
+ response.indexOf("message: urn:uuid") != -1);
+ verifyCurrentEndpoint(REPLICA_A);
+ assertTrue("expected WSA enabled for current endpoint",
+ isWSAEnabledForCurrentEndpoint());
stopTarget(REPLICA_A);
+ startTarget(REPLICA_C);
+
response = greeter.greetMe("mike");
assertNotNull("expected non-null response", response);
- assertTrue("response unexpected unexpected target: " + response,
+ assertTrue("response from unexpected target: " + response,
response.endsWith(REPLICA_C));
+ assertTrue("response not expected to include WS-A messageID",
+ response.indexOf("message: urn:uuid") == -1);
verifyCurrentEndpoint(REPLICA_C);
+ assertFalse("unexpected WSA enabled for current endpoint",
+ isWSAEnabledForCurrentEndpoint());
}
private void startTarget(String address) {
@@ -252,5 +309,37 @@
assertTrue("unexpected conduit slector",
ClientProxy.getClient(greeter).getConduitSelector()
instanceof FailoverTargetSelector);
+ }
+
+ protected void enableWSAForCurrentEndpoint() {
+ Endpoint provider = ClientProxy.getClient(greeter).getEndpoint();
+ mapAggregator = new MAPAggregator();
+ mapCodec = new MAPCodec();
+ provider.getInInterceptors().add(mapAggregator);
+ provider.getInInterceptors().add(mapCodec);
+
+ provider.getOutInterceptors().add(mapAggregator);
+ provider.getOutInterceptors().add(mapCodec);
+
+ provider.getInFaultInterceptors().add(mapAggregator);
+ provider.getInFaultInterceptors().add(mapCodec);
+
+ provider.getOutFaultInterceptors().add(mapAggregator);
+ provider.getOutFaultInterceptors().add(mapCodec);
+ }
+
+ protected boolean isWSAEnabledForCurrentEndpoint() {
+ Endpoint provider = ClientProxy.getClient(greeter).getEndpoint();
+ boolean enabledIn =
+ provider.getInInterceptors().contains(mapAggregator)
+ && provider.getInInterceptors().contains(mapCodec)
+ && provider.getInFaultInterceptors().contains(mapAggregator)
+ && provider.getInFaultInterceptors().contains(mapCodec);
+ boolean enabledOut =
+ provider.getOutInterceptors().contains(mapAggregator)
+ && provider.getOutInterceptors().contains(mapCodec)
+ && provider.getOutFaultInterceptors().contains(mapAggregator)
+ && provider.getOutFaultInterceptors().contains(mapCodec);
+ return enabledIn && enabledOut;
}
}
Copied: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplA.java (from r534385, incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImpl.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplA.java?view=diff&rev=534822&p1=incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImpl.java&r1=534385&p2=incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplA.java&r2=534822
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImpl.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplA.java Thu May 3 05:36:07 2007
@@ -19,23 +19,46 @@
package org.apache.cxf.systest.clustering;
+import javax.annotation.Resource;
import javax.jws.WebService;
+import javax.xml.ws.WebServiceContext;
import org.apache.cxf.greeter_control.AbstractGreeterImpl;
+import org.apache.cxf.ws.addressing.AddressingProperties;
+import org.apache.cxf.ws.addressing.JAXWSAConstants;
@WebService(serviceName = "GreeterService",
- portName = "GreeterPort",
+ portName = "ReplicatedPortA",
endpointInterface = "org.apache.cxf.greeter_control.Greeter",
targetNamespace = "http://cxf.apache.org/greeter_control",
wsdlLocation = "testutils/greeter_control.wsdl")
-public class GreeterImpl extends AbstractGreeterImpl {
+public class GreeterImplA extends AbstractGreeterImpl {
+ @Resource
+ private WebServiceContext context;
+
private String address;
- GreeterImpl(String addr) {
- address = addr;
+ GreeterImplA() {
+ address = FailoverTest.REPLICA_A;
}
public String greetMe(String s) {
- return super.greetMe(s) + " from: " + address;
+ return super.greetMe(s)
+ + " on message: " + getMessageID()
+ + " from: " + address;
+ }
+
+ private String getMessageID() {
+ String id = null;
+ if (context.getMessageContext() != null) {
+ String property =
+ JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND;
+ AddressingProperties maps = (AddressingProperties)
+ context.getMessageContext().get(property);
+ id = maps != null && maps.getMessageID() != null
+ ? maps.getMessageID().getValue()
+ : null;
+ }
+ return id;
}
}
Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplB.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplB.java?view=auto&rev=534822
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplB.java (added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplB.java Thu May 3 05:36:07 2007
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.clustering;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.greeter_control.AbstractGreeterImpl;
+
+@WebService(serviceName = "GreeterService",
+ portName = "ReplicatedPortB",
+ endpointInterface = "org.apache.cxf.greeter_control.Greeter",
+ targetNamespace = "http://cxf.apache.org/greeter_control",
+ wsdlLocation = "testutils/greeter_control.wsdl")
+public class GreeterImplB extends AbstractGreeterImpl {
+
+ private String address;
+
+ GreeterImplB() {
+ address = FailoverTest.REPLICA_B;
+ }
+
+ public String greetMe(String s) {
+ return super.greetMe(s)
+ + " from: " + address;
+ }
+}
Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplC.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplC.java?view=auto&rev=534822
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplC.java (added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplC.java Thu May 3 05:36:07 2007
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.clustering;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.greeter_control.AbstractGreeterImpl;
+
+@WebService(serviceName = "GreeterService",
+ portName = "ReplicatedPortC",
+ endpointInterface = "org.apache.cxf.greeter_control.Greeter",
+ targetNamespace = "http://cxf.apache.org/greeter_control",
+ wsdlLocation = "testutils/greeter_control.wsdl")
+public class GreeterImplC extends AbstractGreeterImpl {
+
+ private String address;
+
+ GreeterImplC() {
+ address = FailoverTest.REPLICA_C;
+ }
+
+ public String greetMe(String s) {
+ return super.greetMe(s)
+ + " from: " + address;
+ }
+}
Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplC.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplD.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplD.java?view=auto&rev=534822
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplD.java (added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplD.java Thu May 3 05:36:07 2007
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.clustering;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.greeter_control.AbstractGreeterImpl;
+
+@WebService(serviceName = "GreeterService",
+ portName = "ReplicatedPortD",
+ endpointInterface = "org.apache.cxf.greeter_control.Greeter",
+ targetNamespace = "http://cxf.apache.org/greeter_control",
+ wsdlLocation = "testutils/greeter_control.wsdl")
+public class GreeterImplD extends AbstractGreeterImpl {
+
+ private String address;
+
+ GreeterImplD() {
+ address = FailoverTest.REPLICA_D;
+ }
+
+ public String greetMe(String s) {
+ return super.greetMe(s)
+ + " from: " + address;
+ }
+}
Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/GreeterImplD.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/Server.java?view=diff&rev=534822&r1=534821&r2=534822
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/Server.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/Server.java Thu May 3 05:36:07 2007
@@ -29,12 +29,15 @@
public class Server extends AbstractBusTestServerBase {
- private static final String ADDRESS = "http://localhost:9001/SoapContext/ControlPort";
-
+ private static final String ADDRESS =
+ "http://localhost:9001/SoapContext/ControlPort";
+ private static final String TARGETS_CONFIG =
+ "org/apache/cxf/systest/clustering/targets.xml";
+
protected void run() {
SpringBusFactory factory = new SpringBusFactory();
- Bus bus = factory.createBus();
+ Bus bus = factory.createBus(TARGETS_CONFIG);
BusFactory.setDefaultBus(bus);
setBus(bus);
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/failover.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/failover.xml?view=diff&rev=534822&r1=534821&r2=534822
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/failover.xml (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/failover.xml Thu May 3 05:36:07 2007
@@ -23,7 +23,7 @@
xmlns:clustering="http://cxf.apache.org/clustering"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-
+
<jaxws:client id="{http://cxf.apache.org/greeter_control}ReplicatedPortA"
createdFromAPI="true">
<jaxws:features>
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/coloc/coloc_rpc.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/coloc/coloc_rpc.xml?view=diff&rev=534822&r1=534821&r2=534822
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/coloc/coloc_rpc.xml (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/coloc/coloc_rpc.xml Thu May 3 05:36:07 2007
@@ -56,10 +56,5 @@
<jaxws:features>
<coloc:enableColoc/>
</jaxws:features>
- <!--
- <jaxws:conduitSelector>
- <bean class="org.apache.cxf.endpoint.DeferredConduitSelector"/>
- </jaxws:conduitSelector>
- -->
</jaxws:client>
</beans>
Modified: incubator/cxf/trunk/testutils/src/main/resources/wsdl/greeter_control.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/resources/wsdl/greeter_control.wsdl?view=diff&rev=534822&r1=534821&r2=534822
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/resources/wsdl/greeter_control.wsdl (original)
+++ incubator/cxf/trunk/testutils/src/main/resources/wsdl/greeter_control.wsdl Thu May 3 05:36:07 2007
@@ -302,16 +302,17 @@
<wsdl:service name="ClusteredGreeterService">
<wsdl:port binding="tns:GreeterSOAPBinding" name="ReplicatedPortA">
- <soap:address location="http://localhost:9051/SoapContext/GreeterPort"/>
+ <soap:address location="http://localhost:9051/SoapContext/ReplicatedPortA"/>
+ <wswa:UsingAddressing xmlns:wswa="http://www.w3.org/2005/08/addressing/wsdl"/>
</wsdl:port>
<wsdl:port binding="tns:GreeterSOAPBinding" name="ReplicatedPortB">
- <soap:address location="http://localhost:9052/SoapContext/GreeterPort"/>
+ <soap:address location="http://localhost:9052/SoapContext/ReplicatedPortB"/>
</wsdl:port>
<wsdl:port binding="tns:GreeterSOAPBinding" name="ReplicatedPortC">
- <soap:address location="http://localhost:9053/SoapContext/GreeterPort"/>
+ <soap:address location="http://localhost:9053/SoapContext/ReplicatedPortC"/>
</wsdl:port>
- <wsdl:port binding="tns:ControlSOAPBinding" name="ReplicatedPortD">
- <soap:address location="http://localhost:9054/SoapContext/GreeterPort"/>
+ <wsdl:port binding="tns:ControlSOAPBinding" name="ReplicatedPortD">
+ <soap:address location="http://localhost:9054/SoapContext/ReplicatedPortD"/>
</wsdl:port>
</wsdl:service>