You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by dk...@apache.org on 2011/06/29 15:25:00 UTC
svn commit: r1141094 [2/2] - in /camel/trunk/components/camel-cxf: ./
src/test/java/org/apache/camel/component/cxf/
src/test/java/org/apache/camel/component/cxf/jaxrs/
src/test/java/org/apache/camel/component/cxf/spring/
src/test/java/org/apache/camel/...
Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfNonWrapperTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfNonWrapperTest.java?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfNonWrapperTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfNonWrapperTest.java Wed Jun 29 13:24:58 2011
@@ -19,6 +19,7 @@ package org.apache.camel.component.cxf;
import java.net.URL;
import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
import org.apache.camel.CamelContext;
import org.apache.camel.non_wrapper.Person;
@@ -26,13 +27,16 @@ import org.apache.camel.non_wrapper.Pers
import org.apache.camel.non_wrapper.UnknownPersonFault;
import org.apache.camel.non_wrapper.types.GetPerson;
import org.apache.camel.non_wrapper.types.GetPersonResponse;
+import org.apache.camel.test.AvailablePortFinder;
import org.apache.camel.test.junit4.CamelSpringTestSupport;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class CxfNonWrapperTest extends CamelSpringTestSupport {
-
+ int port1 = AvailablePortFinder.getNextAvailable();
+
protected ClassPathXmlApplicationContext createApplicationContext() {
+ System.setProperty("CxfNonWrapperTest.port1", Integer.toString(port1));
return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/nonWrapperProcessor.xml");
}
@@ -46,6 +50,10 @@ public class CxfNonWrapperTest extends C
URL wsdlURL = getClass().getClassLoader().getResource("person-non-wrapper.wsdl");
PersonService ss = new PersonService(wsdlURL, new QName("http://camel.apache.org/non-wrapper", "PersonService"));
Person client = ss.getSoap();
+ ((BindingProvider)client).getRequestContext()
+ .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ "http://localhost:" + port1 + "/PersonService/");
+
GetPerson request = new GetPerson();
request.setPersonId("hello");
GetPersonResponse response = client.getPerson(request);
Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadCustomizedExceptionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadCustomizedExceptionTest.java?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadCustomizedExceptionTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadCustomizedExceptionTest.java Wed Jun 29 13:24:58 2011
@@ -27,7 +27,7 @@ public class CxfPayLoadCustomizedExcepti
@Before
@Override
public void setUp() throws Exception {
- routerEndpointURI = "cxf://" + ROUTER_ADDRESS + "?" + SERVICE_CLASS + "&DataFormat=PAYLOAD";
+ routerEndpointURI = "cxf://" + routerAddress + "?" + SERVICE_CLASS + "&DataFormat=PAYLOAD";
super.setUp();
}
Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java Wed Jun 29 13:24:58 2011
@@ -60,7 +60,7 @@ public class CxfSpringRouterTest extends
protected ClassPathXmlApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/CxfEndpointBeans.xml");
+ return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/CxfSpringRouterBeans.xml");
}
}
Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstPayloadModeTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstPayloadModeTest.java?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstPayloadModeTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstPayloadModeTest.java Wed Jun 29 13:24:58 2011
@@ -19,79 +19,49 @@ package org.apache.camel.component.cxf;
import java.net.URL;
import javax.xml.namespace.QName;
+import javax.xml.ws.Endpoint;
import javax.xml.ws.Holder;
+import org.apache.camel.test.AvailablePortFinder;
import org.apache.camel.wsdl_first.JaxwsTestHandler;
import org.apache.camel.wsdl_first.Person;
+import org.apache.camel.wsdl_first.PersonImpl;
import org.apache.camel.wsdl_first.PersonService;
import org.apache.camel.wsdl_first.UnknownPersonFault;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
-public class CxfWsdlFirstPayloadModeTest extends CxfWsdlFirstTest {
+public class CxfWsdlFirstPayloadModeTest extends AbstractCxfWsdlFirstTest {
+ private static int port1 = AvailablePortFinder.getNextAvailable();
+ private static int port2 = AvailablePortFinder.getNextAvailable();
+ static {
+ System.setProperty("CxfWsdlFirstPayloadModeTest.port1", Integer.toString(port1));
+ System.setProperty("CxfWsdlFirstPayloadModeTest.port2", Integer.toString(port2));
+ }
+
+ public String getPort() {
+ return Integer.toString(port2);
+ }
+
+ @BeforeClass
+ public static void startService() {
+ Object implementor = new PersonImpl();
+ String address = "http://localhost:" + port1 + "/PersonService/";
+ Endpoint.publish(address, implementor);
+ }
@Override
protected ClassPathXmlApplicationContext createApplicationContext() {
return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/WsdlFirstBeansPayloadMode.xml");
}
- @Test
- @Override
- public void testInvokingServiceFromCXFClient() throws Exception {
-
- JaxwsTestHandler fromHandler = getMandatoryBean(JaxwsTestHandler.class, "fromEndpointJaxwsHandler");
- fromHandler.reset();
-
- JaxwsTestHandler toHandler = getMandatoryBean(JaxwsTestHandler.class, "toEndpointJaxwsHandler");
- toHandler.reset();
-
- URL wsdlURL = getClass().getClassLoader().getResource("person.wsdl");
- PersonService ss = new PersonService(wsdlURL, new QName("http://camel.apache.org/wsdl-first", "PersonService"));
- Person client = ss.getSoap();
- Holder<String> personId = new Holder<String>();
- personId.value = "hello";
- Holder<String> ssn = new Holder<String>();
- Holder<String> name = new Holder<String>();
-
- client.getPerson(personId, ssn, name);
- assertEquals("we should get the right answer from router", "Bonjour", name.value);
-
- Throwable t = null;
- personId.value = "";
- try {
- client.getPerson(personId, ssn, name);
- fail("We expect to get the UnknowPersonFault here");
- } catch (UnknownPersonFault fault) {
- // We expect to get fault here
- t = fault;
- }
-
- assertTrue(t instanceof UnknownPersonFault);
-
- // schema validation will throw a parse exception
- personId.value = "Invoking getPerson with invalid length string, expecting exception...xxxxxxxxx";
- try {
- client.getPerson(personId, ssn, name);
- fail("We expect to get a message schema validation failure");
- } catch (Exception ex) {
- assertEquals("Could not parse the XML stream.", ex.getMessage());
- }
-
- verifyJaxwsHandlers(fromHandler, toHandler);
- }
@Test
public void testInvokingServiceWithCamelProducer() throws Exception {
// this test does not apply to PAYLOAD mode
}
- @Override
- protected void verifyJaxwsHandlers(JaxwsTestHandler fromHandler, JaxwsTestHandler toHandler) {
- assertEquals(2, fromHandler.getFaultCount());
- assertEquals(4, fromHandler.getMessageCount());
- // Changed to use noErrorhandler and now the message will not be sent again.
- assertEquals(3, toHandler.getMessageCount());
- assertEquals(1, toHandler.getFaultCount());
- }
+
}
Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstProcessorTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstProcessorTest.java?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstProcessorTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstProcessorTest.java Wed Jun 29 13:24:58 2011
@@ -16,15 +16,36 @@
*/
package org.apache.camel.component.cxf;
+import javax.xml.ws.Endpoint;
+
+import org.apache.camel.test.AvailablePortFinder;
import org.apache.camel.wsdl_first.JaxwsTestHandler;
+import org.apache.camel.wsdl_first.PersonImpl;
+import org.junit.BeforeClass;
import org.springframework.context.support.ClassPathXmlApplicationContext;
-public class CxfWsdlFirstProcessorTest extends CxfWsdlFirstTest {
+public class CxfWsdlFirstProcessorTest extends AbstractCxfWsdlFirstTest {
+ private static int port1 = AvailablePortFinder.getNextAvailable();
+ private static int port2 = AvailablePortFinder.getNextAvailable();
+ static {
+ System.setProperty("CxfWsdlFirstProcessorTest.port1", Integer.toString(port1));
+ System.setProperty("CxfWsdlFirstProcessorTest.port2", Integer.toString(port2));
+ }
+ public String getPort() {
+ return Integer.toString(port2);
+ }
protected ClassPathXmlApplicationContext createApplicationContext() {
return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/WsdlFirstProcessor.xml");
}
+ @BeforeClass
+ public static void startService() {
+ Object implementor = new PersonImpl();
+ String address = "http://localhost:" + port1 + "/PersonService/";
+ Endpoint.publish(address, implementor);
+ }
+
@Override
protected void verifyJaxwsHandlers(JaxwsTestHandler fromHandler, JaxwsTestHandler toHandler) {
assertEquals(2, fromHandler.getFaultCount());
Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstTest.java?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstTest.java Wed Jun 29 13:24:58 2011
@@ -21,6 +21,7 @@ import java.util.ArrayList;
import java.util.List;
import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
import javax.xml.ws.Endpoint;
import javax.xml.ws.Holder;
import javax.xml.ws.WebServiceException;
@@ -28,6 +29,7 @@ import javax.xml.ws.WebServiceException;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.component.cxf.common.message.CxfConstants;
+import org.apache.camel.test.AvailablePortFinder;
import org.apache.camel.test.junit4.CamelSpringTestSupport;
import org.apache.camel.wsdl_first.JaxwsTestHandler;
import org.apache.camel.wsdl_first.Person;
@@ -38,8 +40,17 @@ import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
-public class CxfWsdlFirstTest extends CamelSpringTestSupport {
+public class CxfWsdlFirstTest extends AbstractCxfWsdlFirstTest {
+ private static int port1 = AvailablePortFinder.getNextAvailable();
+ private static int port2 = AvailablePortFinder.getNextAvailable();
+ static {
+ System.setProperty("CxfWsdlFirstTest.port1", Integer.toString(port1));
+ System.setProperty("CxfWsdlFirstTest.port2", Integer.toString(port2));
+ }
+ public String getPort() {
+ return Integer.toString(port2);
+ }
protected ClassPathXmlApplicationContext createApplicationContext() {
return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/WsdlFirstBeans.xml");
}
@@ -47,90 +58,8 @@ public class CxfWsdlFirstTest extends Ca
@BeforeClass
public static void startService() {
Object implementor = new PersonImpl();
- String address = "http://localhost:9000/PersonService/";
+ String address = "http://localhost:" + port1 + "/PersonService/";
Endpoint.publish(address, implementor);
}
- @Test
- public void testInvokingServiceFromCXFClient() throws Exception {
-
- JaxwsTestHandler fromHandler = getMandatoryBean(JaxwsTestHandler.class, "fromEndpointJaxwsHandler");
- fromHandler.reset();
-
- JaxwsTestHandler toHandler = getMandatoryBean(JaxwsTestHandler.class, "toEndpointJaxwsHandler");
- toHandler.reset();
-
- URL wsdlURL = getClass().getClassLoader().getResource("person.wsdl");
- PersonService ss = new PersonService(wsdlURL, new QName("http://camel.apache.org/wsdl-first", "PersonService"));
- Person client = ss.getSoap();
- Holder<String> personId = new Holder<String>();
- personId.value = "hello";
- Holder<String> ssn = new Holder<String>();
- Holder<String> name = new Holder<String>();
- client.getPerson(personId, ssn, name);
- assertEquals("we should get the right answer from router", "Bonjour", name.value);
-
- personId.value = "";
- try {
- client.getPerson(personId, ssn, name);
- fail("We expect to get the UnknowPersonFault here");
- } catch (UnknownPersonFault fault) {
- // We expect to get fault here
- }
-
- personId.value = "Invoking getPerson with invalid length string, expecting exception...xxxxxxxxx";
- try {
- client.getPerson(personId, ssn, name);
- fail("We expect to get the WebSerivceException here");
- } catch (WebServiceException ex) {
- // Caught expected WebServiceException here
- assertTrue("Should get the xml vaildate error!", ex.getMessage().indexOf("MyStringType") > 0);
- }
-
- verifyJaxwsHandlers(fromHandler, toHandler);
- }
-
- protected void verifyJaxwsHandlers(JaxwsTestHandler fromHandler, JaxwsTestHandler toHandler) {
- assertEquals(2, fromHandler.getFaultCount());
- assertEquals(4, fromHandler.getMessageCount());
- // Changed to use noErrorhandler and now the message will not be sent again.
- assertEquals(3, toHandler.getMessageCount());
- assertEquals(1, toHandler.getFaultCount());
- }
-
- @Test
- @SuppressWarnings("unchecked")
- public void testInvokingServiceWithCamelProducer() throws Exception {
- Exchange exchange = sendJaxWsMessageWithHolders("hello");
- assertEquals("The request should be handled sucessfully ", exchange.isFailed(), false);
- org.apache.camel.Message out = exchange.getOut();
- List result = out.getBody(List.class);
- assertEquals("The result list should not be empty", result.size(), 4);
- Holder<String> name = (Holder<String>) result.get(3);
- assertEquals("we should get the right answer from router", "Bonjour", name.value);
-
- exchange = sendJaxWsMessageWithHolders("");
- assertEquals("We should get a fault here", exchange.isFailed(), true);
- Throwable ex = exchange.getException();
- assertTrue("We should get the UnknowPersonFault here", ex instanceof UnknownPersonFault);
- }
-
- protected Exchange sendJaxWsMessageWithHolders(final String personIdString) {
- Exchange exchange = template.send("direct:producer", new Processor() {
- @SuppressWarnings("unchecked")
- public void process(final Exchange exchange) {
- final List params = new ArrayList();
- Holder<String> personId = new Holder<String>();
- personId.value = personIdString;
- params.add(personId);
- Holder<String> ssn = new Holder<String>();
- Holder<String> name = new Holder<String>();
- params.add(ssn);
- params.add(name);
- exchange.getIn().setBody(params);
- exchange.getIn().setHeader(CxfConstants.OPERATION_NAME, "GetPerson");
- }
- });
- return exchange;
- }
}
Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/LoggingInterceptorInMessageModeTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/LoggingInterceptorInMessageModeTest.java?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/LoggingInterceptorInMessageModeTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/LoggingInterceptorInMessageModeTest.java Wed Jun 29 13:24:58 2011
@@ -20,6 +20,7 @@ import java.io.PrintWriter;
import java.io.StringWriter;
import org.apache.camel.CamelContext;
+import org.apache.camel.test.AvailablePortFinder;
import org.apache.cxf.frontend.ClientFactoryBean;
import org.apache.cxf.frontend.ClientProxyFactoryBean;
import org.apache.cxf.frontend.ServerFactoryBean;
@@ -42,9 +43,15 @@ import static org.junit.Assert.assertNot
*/
@ContextConfiguration
public class LoggingInterceptorInMessageModeTest extends AbstractJUnit4SpringContextTests {
-
- protected static final String ROUTER_ADDRESS = "http://localhost:9000/router";
- protected static final String SERVICE_ADDRESS = "http://localhost:9002/helloworld";
+ protected static int port1 = AvailablePortFinder.getNextAvailable();
+ protected static int port2 = AvailablePortFinder.getNextAvailable();
+ static {
+ System.setProperty("LoggingInterceptorInMessageModeTest.port1", Integer.toString(port1));
+ System.setProperty("LoggingInterceptorInMessageModeTest.port2", Integer.toString(port2));
+ }
+
+ protected static final String ROUTER_ADDRESS = "http://localhost:" + port1 + "/router";
+ protected static final String SERVICE_ADDRESS = "http://localhost:" + port2 + "/helloworld";
@Autowired
protected CamelContext context;
Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerAddressOverrideTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerAddressOverrideTest.java?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerAddressOverrideTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerAddressOverrideTest.java Wed Jun 29 13:24:58 2011
@@ -18,17 +18,31 @@ package org.apache.camel.component.cxf.j
import org.apache.camel.Exchange;
import org.apache.camel.Message;
+import org.apache.camel.test.AvailablePortFinder;
import org.springframework.context.support.AbstractXmlApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class CxfRsProducerAddressOverrideTest extends CxfRsProducerTest {
+ private static int port1 = AvailablePortFinder.getNextAvailable();
+ private static int port2 = AvailablePortFinder.getNextAvailable();
+
+ public int getPort1() {
+ return port1;
+ }
+ public int getPort2() {
+ return port2;
+ }
+
+
@Override
- protected AbstractXmlApplicationContext createApplicationContext() {
+ protected AbstractXmlApplicationContext createApplicationContext() {
+ System.setProperty("CxfRsProducerAddressOverrideTest.port1", Integer.toString(port1));
+ System.setProperty("CxfRsProducerAddressOverrideTest.port2", Integer.toString(port2));
return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/jaxrs/CxfRsSpringProducerAddressOverride.xml");
}
protected void setupDestinationURL(Message inMessage) {
inMessage.setHeader(Exchange.DESTINATION_OVERRIDE_URL,
- "http://localhost:9002");
+ "http://localhost:" + port1);
}
}
Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java Wed Jun 29 13:24:58 2011
@@ -29,6 +29,7 @@ import org.apache.camel.Message;
import org.apache.camel.Processor;
import org.apache.camel.component.cxf.common.message.CxfConstants;
import org.apache.camel.component.cxf.jaxrs.testbean.Customer;
+import org.apache.camel.test.AvailablePortFinder;
import org.apache.camel.test.junit4.CamelSpringTestSupport;
import org.apache.camel.util.CastUtils;
import org.apache.http.util.EntityUtils;
@@ -37,6 +38,8 @@ import org.springframework.context.suppo
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class CxfRsProducerTest extends CamelSpringTestSupport {
+ private static int port1 = AvailablePortFinder.getNextAvailable();
+ private static int port2 = AvailablePortFinder.getNextAvailable();
public static class JettyProcessor implements Processor {
public void process(Exchange exchange) throws Exception {
@@ -46,8 +49,17 @@ public class CxfRsProducerTest extends C
}
}
+ public int getPort1() {
+ return port1;
+ }
+ public int getPort2() {
+ return port2;
+ }
+
@Override
- protected AbstractXmlApplicationContext createApplicationContext() {
+ protected AbstractXmlApplicationContext createApplicationContext() {
+ System.setProperty("CxfRsProducerTest.port1", Integer.toString(port1));
+ System.setProperty("CxfRsProducerTest.port2", Integer.toString(port2));
return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/jaxrs/CxfRsSpringProducer.xml");
}
@@ -142,20 +154,21 @@ public class CxfRsProducerTest extends C
@Test
public void testGetConstumerWithCxfRsEndpoint() {
- Exchange exchange = template.send("cxfrs://http://localhost:9002?httpClientAPI=true", new Processor() {
- public void process(Exchange exchange) throws Exception {
- exchange.setPattern(ExchangePattern.InOut);
- Message inMessage = exchange.getIn();
- // set the Http method
- inMessage.setHeader(Exchange.HTTP_METHOD, "GET");
- // set the relative path
- inMessage.setHeader(Exchange.HTTP_PATH, "/customerservice/customers/123");
- // Specify the response class , cxfrs will use InputStream as the response object type
- inMessage.setHeader(CxfConstants.CAMEL_CXF_RS_RESPONSE_CLASS, Customer.class);
- // since we use the Get method, so we don't need to set the message body
- inMessage.setBody(null);
- }
- });
+ Exchange exchange
+ = template.send("cxfrs://http://localhost:" + getPort1() + "?httpClientAPI=true", new Processor() {
+ public void process(Exchange exchange) throws Exception {
+ exchange.setPattern(ExchangePattern.InOut);
+ Message inMessage = exchange.getIn();
+ // set the Http method
+ inMessage.setHeader(Exchange.HTTP_METHOD, "GET");
+ // set the relative path
+ inMessage.setHeader(Exchange.HTTP_PATH, "/customerservice/customers/123");
+ // Specify the response class , cxfrs will use InputStream as the response object type
+ inMessage.setHeader(CxfConstants.CAMEL_CXF_RS_RESPONSE_CLASS, Customer.class);
+ // since we use the Get method, so we don't need to set the message body
+ inMessage.setBody(null);
+ }
+ });
// get the response message
Customer response = (Customer) exchange.getOut().getBody();
@@ -167,21 +180,22 @@ public class CxfRsProducerTest extends C
@Test
public void testAddCustomerUniqueResponseCodeWithHttpClientAPI() {
- Exchange exchange = template.send("cxfrs://http://localhost:9002?httpClientAPI=true", new Processor() {
- public void process(Exchange exchange) throws Exception {
- exchange.setPattern(ExchangePattern.InOut);
- Message inMessage = exchange.getIn();
- // set the Http method
- inMessage.setHeader(Exchange.HTTP_METHOD, "POST");
- // set the relative path
- inMessage.setHeader(Exchange.HTTP_PATH, "/customerservice/customersUniqueResponseCode");
- // create a new customer object
- Customer customer = new Customer();
- customer.setId(9999);
- customer.setName("HttpClient");
- inMessage.setBody(customer);
- }
- });
+ Exchange exchange
+ = template.send("cxfrs://http://localhost:" + getPort1() + "?httpClientAPI=true", new Processor() {
+ public void process(Exchange exchange) throws Exception {
+ exchange.setPattern(ExchangePattern.InOut);
+ Message inMessage = exchange.getIn();
+ // set the Http method
+ inMessage.setHeader(Exchange.HTTP_METHOD, "POST");
+ // set the relative path
+ inMessage.setHeader(Exchange.HTTP_PATH, "/customerservice/customersUniqueResponseCode");
+ // create a new customer object
+ Customer customer = new Customer();
+ customer.setId(9999);
+ customer.setName("HttpClient");
+ inMessage.setBody(customer);
+ }
+ });
// get the response message
Response response = (Response) exchange.getOut().getBody();
@@ -226,23 +240,24 @@ public class CxfRsProducerTest extends C
@Test
public void testAddCustomerUniqueResponseCode() {
- Exchange exchange = template.send("cxfrs://http://localhost:9002?httpClientAPI=true", new Processor() {
- public void process(Exchange exchange) throws Exception {
- exchange.setPattern(ExchangePattern.InOut);
- Message inMessage = exchange.getIn();
- // set the Http method
- inMessage.setHeader(Exchange.HTTP_METHOD, "POST");
- // set the relative path
- inMessage.setHeader(Exchange.HTTP_PATH, "/customerservice/customersUniqueResponseCode");
- // put the response's entity into out message body
- inMessage.setHeader(CxfConstants.CAMEL_CXF_RS_RESPONSE_CLASS, Customer.class);
- // create a new customer object
- Customer customer = new Customer();
- customer.setId(8888);
- customer.setName("Willem");
- inMessage.setBody(customer);
- }
- });
+ Exchange exchange
+ = template.send("cxfrs://http://localhost:" + getPort1() + "?httpClientAPI=true", new Processor() {
+ public void process(Exchange exchange) throws Exception {
+ exchange.setPattern(ExchangePattern.InOut);
+ Message inMessage = exchange.getIn();
+ // set the Http method
+ inMessage.setHeader(Exchange.HTTP_METHOD, "POST");
+ // set the relative path
+ inMessage.setHeader(Exchange.HTTP_PATH, "/customerservice/customersUniqueResponseCode");
+ // put the response's entity into out message body
+ inMessage.setHeader(CxfConstants.CAMEL_CXF_RS_RESPONSE_CLASS, Customer.class);
+ // create a new customer object
+ Customer customer = new Customer();
+ customer.setId(8888);
+ customer.setName("Willem");
+ inMessage.setBody(customer);
+ }
+ });
// get the response message
Customer response = (Customer) exchange.getOut().getBody();
@@ -255,7 +270,7 @@ public class CxfRsProducerTest extends C
@Test
public void testProducerWithQueryParameters() {
// START SNIPPET: QueryExample
- Exchange exchange = template.send("cxfrs://http://localhost:9003/testQuery?httpClientAPI=true&q1=12&q2=13"
+ Exchange exchange = template.send("cxfrs://http://localhost:" + getPort2() + "/testQuery?httpClientAPI=true&q1=12&q2=13"
// END SNIPPET: QueryExample
, new Processor() {
public void process(Exchange exchange) throws Exception {
@@ -277,7 +292,7 @@ public class CxfRsProducerTest extends C
@Test
public void testProducerWithQueryParametersHeader() {
- Exchange exchange = template.send("cxfrs://http://localhost:9003/testQuery?httpClientAPI=true&q1=12&q2=13"
+ Exchange exchange = template.send("cxfrs://http://localhost:" + getPort2() + "/testQuery?httpClientAPI=true&q1=12&q2=13"
, new Processor() {
public void process(Exchange exchange) throws Exception {
exchange.setPattern(ExchangePattern.InOut);
@@ -308,7 +323,7 @@ public class CxfRsProducerTest extends C
@Test
public void testRestServerDirectlyGetCustomer() {
// we cannot convert directly to Customer as we need camel-jaxb
- String response = template.requestBodyAndHeader("cxfrs:http://localhost:9002/customerservice/customers/123",
+ String response = template.requestBodyAndHeader("cxfrs:http://localhost:" + getPort1() + "/customerservice/customers/123",
null, Exchange.HTTP_METHOD, "GET", String.class);
assertNotNull("The response should not be null ", response);
@@ -320,7 +335,7 @@ public class CxfRsProducerTest extends C
input.setName("Donald Duck");
// we cannot convert directly to Customer as we need camel-jaxb
- String response = template.requestBodyAndHeader("cxfrs:http://localhost:9002/customerservice/customers",
+ String response = template.requestBodyAndHeader("cxfrs:http://localhost:" + getPort1() + "/customerservice/customers",
input, Exchange.HTTP_METHOD, "POST", String.class);
assertNotNull(response);
Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanTest.java?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanTest.java Wed Jun 29 13:24:58 2011
@@ -17,10 +17,19 @@
package org.apache.camel.component.cxf.spring;
import org.apache.camel.component.cxf.CxfEndpoint;
+import org.apache.camel.test.AvailablePortFinder;
import org.junit.Test;
public class CxfEndpointBeanTest extends AbstractSpringBeanTestSupport {
+ private static int port1 = AvailablePortFinder.getNextAvailable();
+ private static int port2 = AvailablePortFinder.getNextAvailable();
+
+ static {
+ System.setProperty("CxfEndpointBeanTest.port1", Integer.toString(port1));
+ System.setProperty("CxfEndpointBeanTest.port2", Integer.toString(port2));
+ }
+
protected String[] getApplicationContextFiles() {
return new String[]{"org/apache/camel/component/cxf/spring/CxfEndpointBeans.xml"};
}
@@ -28,7 +37,7 @@ public class CxfEndpointBeanTest extends
@Test
public void testCxfEndpointBeanDefinitionParser() {
CxfEndpoint routerEndpoint = (CxfEndpoint)ctx.getBean("routerEndpoint");
- assertEquals("Got the wrong endpoint address", "http://localhost:9000/router", routerEndpoint.getAddress());
+ assertEquals("Got the wrong endpoint address", "http://localhost:" + port1 + "/router", routerEndpoint.getAddress());
assertEquals("Got the wrong endpont service class", "org.apache.camel.component.cxf.HelloService",
routerEndpoint.getServiceClass().getName());
assertEquals("Got the wrong handlers size", 1, routerEndpoint.getHandlers().size());
Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/FileToCxfMessageDataFormatTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/FileToCxfMessageDataFormatTest.java?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/FileToCxfMessageDataFormatTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/FileToCxfMessageDataFormatTest.java Wed Jun 29 13:24:58 2011
@@ -20,6 +20,7 @@ import org.apache.camel.Exchange;
import org.apache.camel.component.cxf.HelloService;
import org.apache.camel.component.cxf.HelloServiceImpl;
import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.AvailablePortFinder;
import org.apache.camel.test.junit4.CamelSpringTestSupport;
import org.apache.cxf.endpoint.Server;
import org.apache.cxf.frontend.ServerFactoryBean;
@@ -31,6 +32,7 @@ import org.springframework.context.suppo
* @version
*/
public class FileToCxfMessageDataFormatTest extends CamelSpringTestSupport {
+ private static int port1 = AvailablePortFinder.getNextAvailable();
private Server server;
@@ -41,7 +43,7 @@ public class FileToCxfMessageDataFormatT
// set CXF
ServerFactoryBean factory = new ServerFactoryBean();
- factory.setAddress("http://localhost:9001/router");
+ factory.setAddress("http://localhost:" + port1 + "/router");
factory.setServiceClass(HelloService.class);
factory.setServiceBean(new HelloServiceImpl());
@@ -61,6 +63,7 @@ public class FileToCxfMessageDataFormatT
@Override
protected AbstractApplicationContext createApplicationContext() {
+ System.setProperty("FileToCxfMessageDataFormatTest.port1", Integer.toString(port1));
return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/spring/FileToCxfMessageDataFormatTest.xml");
}
Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/wsa/WSAddressingTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/wsa/WSAddressingTest.java?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/wsa/WSAddressingTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/wsa/WSAddressingTest.java Wed Jun 29 13:24:58 2011
@@ -22,6 +22,7 @@ import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.ProducerTemplate;
+import org.apache.camel.test.AvailablePortFinder;
import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.common.classloader.ClassLoaderUtils;
import org.apache.cxf.endpoint.Server;
@@ -45,6 +46,15 @@ import static org.junit.Assert.assertEqu
*/
@ContextConfiguration
public class WSAddressingTest extends AbstractJUnit4SpringContextTests {
+ protected static int port0 = AvailablePortFinder.getNextAvailable();
+ protected static int port1 = AvailablePortFinder.getNextAvailable();
+ protected static int port2 = AvailablePortFinder.getNextAvailable();
+ static {
+ System.setProperty("WSAddressingTest.port0", Integer.toString(port0));
+ System.setProperty("WSAddressingTest.port1", Integer.toString(port1));
+ System.setProperty("WSAddressingTest.port2", Integer.toString(port2));
+ }
+
@Autowired
protected CamelContext context;
@@ -53,10 +63,11 @@ public class WSAddressingTest extends Ab
private Server serviceEndpoint;
@Before
- public void setUp() throws Exception {
+ public void setUp() throws Exception {
+
template = context.createProducerTemplate();
JaxWsServerFactoryBean svrBean = new JaxWsServerFactoryBean();
- svrBean.setAddress("http://localhost:9001/SoapContext/SoapPort");
+ svrBean.setAddress("http://localhost:" + port1 + "/SoapContext/SoapPort");
svrBean.setServiceClass(Greeter.class);
svrBean.setServiceBean(new GreeterImpl());
SpringBusFactory bf = new SpringBusFactory();
@@ -81,7 +92,7 @@ public class WSAddressingTest extends Ab
public void testWSAddressing() throws Exception {
JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean();
ClientFactoryBean clientBean = proxyFactory.getClientFactoryBean();
- clientBean.setAddress("http://localhost:9000/SoapContext/SoapPort");
+ clientBean.setAddress("http://localhost:" + port0 + "/SoapContext/SoapPort");
clientBean.setServiceClass(Greeter.class);
SpringBusFactory bf = new SpringBusFactory();
URL cxfConfig = null;
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CamelCxfConsumerContext.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CamelCxfConsumerContext.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CamelCxfConsumerContext.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CamelCxfConsumerContext.xml Wed Jun 29 13:24:58 2011
@@ -25,8 +25,10 @@
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
<import resource="classpath:META-INF/cxf/cxf.xml"/>
-
- <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:9003/CamelContext/RouterPort"
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+ <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:${CamelCxfConsumerContext.port2}/CamelContext/RouterPort"
serviceClass="org.apache.hello_world_soap_http.GreeterImpl">
</cxf:cxfEndpoint>
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfDispatchMessageBeans.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfDispatchMessageBeans.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfDispatchMessageBeans.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfDispatchMessageBeans.xml Wed Jun 29 13:24:58 2011
@@ -24,14 +24,12 @@
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<import resource="classpath:META-INF/cxf/cxf.xml"/>
- <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
- <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
-
<cxf:cxfEndpoint id="serviceEndpoint" xmlns:s="http://apache.org/hello_world_soap_http"
- address="http://localhost:9000/SoapContext/GreeterPort"
+ address="http://localhost:${CxfDispatchMessageTest.port}/SoapContext/GreeterPort"
endpointName="s:GreeterPort"
serviceName="s:GreeterService"
bus="#bus">
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfDispatchPayloadBeans.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfDispatchPayloadBeans.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfDispatchPayloadBeans.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfDispatchPayloadBeans.xml Wed Jun 29 13:24:58 2011
@@ -24,14 +24,13 @@
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<import resource="classpath:META-INF/cxf/cxf.xml"/>
- <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
- <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
<cxf:cxfEndpoint id="serviceEndpoint" xmlns:s="http://apache.org/hello_world_soap_http"
- address="http://localhost:9000/SoapContext/GreeterPort"
+ address="http://localhost:${CxfDispatchPayloadTest.port}/SoapContext/GreeterPort"
endpointName="s:GreeterPort"
serviceName="s:GreeterService"
bus="#bus">
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfEndpointBeans.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfEndpointBeans.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfEndpointBeans.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfEndpointBeans.xml Wed Jun 29 13:24:58 2011
@@ -26,12 +26,18 @@
<bean id="fromEndpointJaxwsHandler" class="org.apache.camel.wsdl_first.JaxwsTestHandler"/>
- <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:9000/router"
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+ <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:${CxfEndpointTest.port1}/router"
serviceClass="org.apache.camel.component.cxf.HelloService">
+ <cxf:schemaLocations>
+ <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
+ </cxf:schemaLocations>
+ <cxf:handlers><ref bean="fromEndpointJaxwsHandler"/></cxf:handlers>
</cxf:cxfEndpoint>
- <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:9002/helloworld"
+ <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CxfEndpointTest.port2}/helloworld"
serviceClass="org.apache.camel.component.cxf.HelloService"/>
</beans>
Copied: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfSpringRouterBeans.xml (from r1141062, camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfEndpointBeans.xml)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfSpringRouterBeans.xml?p2=camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfSpringRouterBeans.xml&p1=camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfEndpointBeans.xml&r1=1141062&r2=1141094&rev=1141094&view=diff
==============================================================================
(empty)
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterConverterEndpointsRouterContext.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterConverterEndpointsRouterContext.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterConverterEndpointsRouterContext.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterConverterEndpointsRouterContext.xml Wed Jun 29 13:24:58 2011
@@ -24,13 +24,13 @@
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
- <import resource="classpath:META-INF/cxf/cxf.xml"/>
- <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
- <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+ <import resource="classpath:META-INF/cxf/cxf.xml"/>
<!-- Added the import for testing the CAMEL-329 -->
- <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:9003/CamelContext/RouterPort"
+ <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:${CxfGreeterConverterRouterTest.port2}/CamelContext/RouterPort"
serviceClass="org.apache.hello_world_soap_http.Greeter"
endpointName="s:SoapPort"
serviceName="s:SOAPService"
@@ -41,7 +41,7 @@
</cxf:cxfEndpoint>
- <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:9000/SoapContext/SoapPort"
+ <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CxfGreeterConverterRouterTest.port1}/SoapContext/SoapPort"
wsdlURL="testutils/hello_world.wsdl"
serviceClass="org.apache.hello_world_soap_http.Greeter"
endpointName="s:SoapPort"
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointBeans.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointBeans.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointBeans.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointBeans.xml Wed Jun 29 13:24:58 2011
@@ -24,16 +24,17 @@
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
<import resource="classpath:META-INF/cxf/cxf.xml"/>
- <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
- <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
<!-- Added the import for testing the CAMEL-329 -->
- <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:9003/CamelContext/RouterPort"
+ <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:${CxfGreeterMessageRouterTest.port2}/CamelContext/RouterPort"
serviceClass="org.apache.hello_world_soap_http.GreeterImpl"/>
- <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:9000/SoapContext/SoapPort"
+ <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CxfGreeterMessageRouterTest.port1}/SoapContext/SoapPort"
wsdlURL="testutils/hello_world.wsdl"
serviceClass="org.apache.hello_world_soap_http.Greeter"
endpointName="s:SoapPort"
Copied: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointPayloadBeans.xml (from r1141062, camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointBeans.xml)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointPayloadBeans.xml?p2=camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointPayloadBeans.xml&p1=camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointBeans.xml&r1=1141062&r2=1141094&rev=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointBeans.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointPayloadBeans.xml Wed Jun 29 13:24:58 2011
@@ -24,16 +24,17 @@
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
<import resource="classpath:META-INF/cxf/cxf.xml"/>
- <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
- <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
<!-- Added the import for testing the CAMEL-329 -->
- <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:9003/CamelContext/RouterPort"
+ <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:${CxfGreeterPayloadRouterTest.port2}/CamelContext/RouterPort"
serviceClass="org.apache.hello_world_soap_http.GreeterImpl"/>
- <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:9000/SoapContext/SoapPort"
+ <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CxfGreeterPayloadRouterTest.port1}/SoapContext/SoapPort"
wsdlURL="testutils/hello_world.wsdl"
serviceClass="org.apache.hello_world_soap_http.Greeter"
endpointName="s:SoapPort"
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointWithFeatureBeans.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointWithFeatureBeans.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointWithFeatureBeans.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointWithFeatureBeans.xml Wed Jun 29 13:24:58 2011
@@ -24,16 +24,17 @@
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
<import resource="classpath:META-INF/cxf/cxf.xml"/>
- <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
- <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
<!-- Added the import for testing the CAMEL-329 -->
- <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:9003/CamelContext/RouterPort"
+ <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:${CxfGreeterPayLoadWithFeatureRouterTest.port2}/CamelContext/RouterPort"
serviceClass="org.apache.hello_world_soap_http.GreeterImpl"/>
- <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:9000/SoapContext/SoapPort"
+ <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CxfGreeterPayLoadWithFeatureRouterTest.port1}/SoapContext/SoapPort"
wsdlURL="testutils/hello_world.wsdl"
serviceClass="org.apache.hello_world_soap_http.Greeter"
endpointName="s:SoapPort"
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointsForProducer.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointsForProducer.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointsForProducer.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointsForProducer.xml Wed Jun 29 13:24:58 2011
@@ -24,9 +24,10 @@
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
<import resource="classpath:META-INF/cxf/cxf.xml"/>
- <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
- <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
<cxf:cxfEndpoint id="producerEndpoint" address="http://localhost:9001/SoapContext/SoapPort"
serviceClass="org.apache.hello_world_soap_http.Greeter"
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointsRouterContext.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointsRouterContext.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointsRouterContext.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointsRouterContext.xml Wed Jun 29 13:24:58 2011
@@ -25,12 +25,12 @@
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
<import resource="classpath:META-INF/cxf/cxf.xml"/>
- <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
- <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
<!-- Added the import for testing the CAMEL-329 -->
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
<!-- START SNIPPET: example -->
- <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:9003/CamelContext/RouterPort"
+ <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:${CXFGreeterRouterTest.port2}/CamelContext/RouterPort"
serviceClass="org.apache.hello_world_soap_http.GreeterImpl">
<cxf:outInterceptors>
<!-- This interceptor will force the CXF server send the XML start document to client -->
@@ -43,7 +43,7 @@
</cxf:cxfEndpoint>
<!-- END SNIPPET: example -->
- <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:9000/SoapContext/SoapPort"
+ <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CXFGreeterRouterTest.port1}/SoapContext/SoapPort"
wsdlURL="testutils/hello_world.wsdl"
serviceClass="org.apache.hello_world_soap_http.Greeter"
endpointName="s:SoapPort"
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/LoggingInterceptorInMessageModeTest-context.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/LoggingInterceptorInMessageModeTest-context.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/LoggingInterceptorInMessageModeTest-context.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/LoggingInterceptorInMessageModeTest-context.xml Wed Jun 29 13:24:58 2011
@@ -20,8 +20,9 @@
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
- <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:9000/router"
+ <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:${LoggingInterceptorInMessageModeTest.port1}/router"
serviceClass="org.apache.camel.component.cxf.HelloService">
<cxf:properties>
<entry key="dataFormat" value="MESSAGE"/>
@@ -34,7 +35,7 @@
<constructor-arg value="write"/>
</bean>
- <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:9002/helloworld"
+ <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${LoggingInterceptorInMessageModeTest.port2}/helloworld"
serviceClass="org.apache.camel.component.cxf.HelloService">
<cxf:outInterceptors>
<ref bean="loggingOutInterceptor"/>
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstBeans.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstBeans.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstBeans.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstBeans.xml Wed Jun 29 13:24:58 2011
@@ -15,8 +15,9 @@
limitations under the License.
--><beans xmlns="http://www.springframework.org/schema/beans" xmlns:camel="http://camel.apache.org/schema/spring" xmlns:cxf="http://camel.apache.org/schema/cxf" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd ">
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
- <cxf:cxfEndpoint xmlns:person="http://camel.apache.org/wsdl-first" address="http://localhost:8092/PersonService/" endpointName="person:soap" id="routerEndpoint" serviceClass="org.apache.camel.wsdl_first.Person" serviceName="person:PersonService" wsdlURL="person.wsdl">
+ <cxf:cxfEndpoint xmlns:person="http://camel.apache.org/wsdl-first" address="http://localhost:${CxfWsdlFirstTest.port2}/PersonService/" endpointName="person:soap" id="routerEndpoint" serviceClass="org.apache.camel.wsdl_first.Person" serviceName="person:PersonService" wsdlURL="person.wsdl">
<cxf:properties>
<entry key="schema-validation-enabled" value="true"/>
</cxf:properties>
@@ -26,7 +27,7 @@
</cxf:cxfEndpoint>
- <cxf:cxfEndpoint xmlns:person="http://camel.apache.org/wsdl-first" address="http://localhost:9000/PersonService/" endpointName="person:soap" id="serviceEndpoint" serviceClass="org.apache.camel.wsdl_first.Person" serviceName="person:PersonService">
+ <cxf:cxfEndpoint xmlns:person="http://camel.apache.org/wsdl-first" address="http://localhost:${CxfWsdlFirstTest.port1}/PersonService/" endpointName="person:soap" id="serviceEndpoint" serviceClass="org.apache.camel.wsdl_first.Person" serviceName="person:PersonService">
<cxf:handlers>
<ref bean="toEndpointJaxwsHandler"/>
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstBeansPayloadMode.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstBeansPayloadMode.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstBeansPayloadMode.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstBeansPayloadMode.xml Wed Jun 29 13:24:58 2011
@@ -12,7 +12,15 @@
the specific language governing permissions and limitations under the
License.
--><beans xmlns="http://www.springframework.org/schema/beans" xmlns:camel="http://camel.apache.org/schema/spring" xmlns:cxf="http://camel.apache.org/schema/cxf" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd ">
- <cxf:cxfEndpoint xmlns:person="http://camel.apache.org/wsdl-first" endpointName="person:soap" id="routerEndpoint" serviceClass="org.apache.camel.wsdl_first.Person" serviceName="person:PersonService" wsdlURL="person.wsdl">
+
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+
+ <cxf:cxfEndpoint xmlns:person="http://camel.apache.org/wsdl-first"
+ address="http://localhost:${CxfWsdlFirstPayloadModeTest.port2}/PersonService/"
+ endpointName="person:soap" id="routerEndpoint" serviceClass="org.apache.camel.wsdl_first.Person"
+ serviceName="person:PersonService" wsdlURL="person.wsdl">
<cxf:properties>
<entry key="schema-validation-enabled" value="true"/>
</cxf:properties>
@@ -27,7 +35,8 @@
</cxf:outInterceptors>
</cxf:cxfEndpoint>
- <cxf:cxfEndpoint xmlns:person="http://camel.apache.org/wsdl-first" address="http://localhost:9000/PersonService/" endpointName="person:soap" id="serviceEndpoint" serviceClass="org.apache.camel.wsdl_first.Person" serviceName="person:PersonService">
+ <cxf:cxfEndpoint xmlns:person="http://camel.apache.org/wsdl-first" address="http://localhost:${CxfWsdlFirstPayloadModeTest.port1}/PersonService/"
+ endpointName="person:soap" id="serviceEndpoint" serviceClass="org.apache.camel.wsdl_first.Person" serviceName="person:PersonService">
<cxf:handlers>
<ref bean="toEndpointJaxwsHandler"/>
</cxf:handlers>
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstProcessor.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstProcessor.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstProcessor.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstProcessor.xml Wed Jun 29 13:24:58 2011
@@ -24,9 +24,11 @@
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<cxf:cxfEndpoint id="routerEndpoint"
+ address="http://localhost:${CxfWsdlFirstProcessorTest.port2}/PersonService/"
serviceClass="org.apache.camel.wsdl_first.Person"
endpointName="person:soap"
wsdlURL="person.wsdl"
@@ -41,7 +43,7 @@
</cxf:cxfEndpoint>
<cxf:cxfEndpoint id="serviceEndpoint"
- address="http://localhost:9000/PersonService/"
+ address="http://localhost:${CxfWsdlFirstProcessorTest.port1}/PersonService/"
serviceClass="org.apache.camel.wsdl_first.Person"
endpointName="person:soap"
serviceName="person:PersonService"
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlOnlyBeans.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlOnlyBeans.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlOnlyBeans.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlOnlyBeans.xml Wed Jun 29 13:24:58 2011
@@ -25,8 +25,9 @@
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
- <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:8092/PersonService/"
+ <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:${CXFWsdlOnlyTest.port3}/PersonService/"
wsdlURL="person.wsdl"
endpointName="person:soap"
serviceName="person:PersonService"
@@ -34,14 +35,14 @@
</cxf:cxfEndpoint>
- <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:9000/PersonService/"
+ <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CXFWsdlOnlyTest.port1}/PersonService/"
wsdlURL="person.wsdl"
endpointName="person:soap"
serviceName="person:PersonService"
xmlns:person="http://camel.apache.org/wsdl-first">
</cxf:cxfEndpoint>
- <cxf:cxfEndpoint id="routerEndpoint2" address="http://localhost:8093/PersonService/"
+ <cxf:cxfEndpoint id="routerEndpoint2" address="http://localhost:${CXFWsdlOnlyTest.port4}/PersonService/"
wsdlURL="person.wsdl"
endpointName="person:soap"
serviceName="person:PersonService"
@@ -49,7 +50,7 @@
</cxf:cxfEndpoint>
- <cxf:cxfEndpoint id="serviceEndpoint2" address="http://localhost:9001/PersonService/"
+ <cxf:cxfEndpoint id="serviceEndpoint2" address="http://localhost:${CXFWsdlOnlyTest.port2}/PersonService/"
wsdlURL="person.wsdl"
endpointName="person:soap"
serviceName="person:PersonService"
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringProducer.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringProducer.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringProducer.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringProducer.xml Wed Jun 29 13:24:58 2011
@@ -25,9 +25,10 @@
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<jaxrs:server id="restService"
- address="http://localhost:9002"
+ address="http://localhost:${CxfRsProducerTest.port1}"
staticSubresourceResolution="true">
<jaxrs:serviceBeans>
<ref bean="customerService"/>
@@ -36,12 +37,13 @@
<bean id="customerService" class="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService" />
- <cxf:rsClient id="rsClientProxy" address="http://localhost:9002"
+ <cxf:rsClient id="rsClientProxy" address="http://localhost:${CxfRsProducerTest.port1}"
serviceClass="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService"/>
- <cxf:rsClient id="rsClientHttp" address="http://localhost:9002"/>
+ <cxf:rsClient id="rsClientHttp" address="http://localhost:${CxfRsProducerTest.port1}"/>
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+ <endpoint id="fromEndpoint" uri="jetty://http://localhost:${CxfRsProducerTest.port2}/testQuery"/>
<route>
<from uri="direct://proxy"/>
<to uri="cxfrs://bean://rsClientProxy"/>
@@ -51,7 +53,7 @@
<to uri="cxfrs://bean://rsClientHttp"/>
</route>
<route>
- <from uri="jetty://http://localhost:9003/testQuery"/>
+ <from ref="fromEndpoint"/>
<process ref="myProcessor" />
</route>
</camelContext>
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringProducerAddressOverride.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringProducerAddressOverride.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringProducerAddressOverride.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringProducerAddressOverride.xml Wed Jun 29 13:24:58 2011
@@ -20,14 +20,15 @@
xmlns:cxf="http://camel.apache.org/schema/cxf"
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<jaxrs:server id="restService"
- address="http://localhost:9002"
+ address="http://localhost:${CxfRsProducerAddressOverrideTest.port1}"
staticSubresourceResolution="true">
<jaxrs:serviceBeans>
<ref bean="customerService"/>
@@ -42,6 +43,7 @@
<cxf:rsClient id="rsClientHttp" address="http://badAddress"/>
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+ <endpoint id="fromEndpoint" uri="jetty://http://localhost:${CxfRsProducerAddressOverrideTest.port2}/testQuery"/>
<route>
<from uri="direct://proxy"/>
<to uri="cxfrs://bean://rsClientProxy"/>
@@ -51,7 +53,7 @@
<to uri="cxfrs://bean://rsClientHttp"/>
</route>
<route>
- <from uri="jetty://http://localhost:9003/testQuery"/>
+ <from ref="fromEndpoint"/>
<process ref="myProcessor" />
</route>
</camelContext>
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/nonWrapperProcessor.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/nonWrapperProcessor.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/nonWrapperProcessor.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/nonWrapperProcessor.xml Wed Jun 29 13:24:58 2011
@@ -24,8 +24,9 @@
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
- <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:8092/PersonService/"
+ <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:${CxfNonWrapperTest.port1}/PersonService/"
serviceClass="org.apache.camel.non_wrapper.Person"
endpointName="person:soap"
serviceName="person:PersonService"
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfEndpointBeans.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfEndpointBeans.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfEndpointBeans.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfEndpointBeans.xml Wed Jun 29 13:24:58 2011
@@ -26,7 +26,9 @@
<bean id="fromEndpointJaxwsHandler" class="org.apache.camel.wsdl_first.JaxwsTestHandler"/>
- <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:9000/router"
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+ <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:${CxfEndpointBeanTest.port1}/router"
serviceClass="org.apache.camel.component.cxf.HelloService">
<cxf:schemaLocations>
<cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
@@ -35,7 +37,7 @@
</cxf:cxfEndpoint>
- <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:9002/helloworld"
+ <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CxfEndpointBeanTest.port2}/helloworld"
serviceClass="org.apache.camel.component.cxf.HelloService"/>
</beans>
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/FileToCxfMessageDataFormatTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/FileToCxfMessageDataFormatTest.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/FileToCxfMessageDataFormatTest.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/FileToCxfMessageDataFormatTest.xml Wed Jun 29 13:24:58 2011
@@ -23,9 +23,10 @@
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<cxf:cxfEndpoint id="routerEndpoint"
- address="http://localhost:9001/router"
+ address="http://localhost:${FileToCxfMessageDataFormatTest.port1}/router"
serviceClass="org.apache.camel.component.cxf.HelloService">
<!-- use MESSAGE data format -->
<cxf:properties>
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsa/WSAddressingTest-context.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsa/WSAddressingTest-context.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsa/WSAddressingTest-context.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsa/WSAddressingTest-context.xml Wed Jun 29 13:24:58 2011
@@ -22,8 +22,11 @@
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
<cxf:cxfEndpoint id="routerEndpoint"
- address="http://localhost:9000/SoapContext/SoapPort" endpointName="tns:SoapPort"
+ address="http://localhost:${WSAddressingTest.port0}/SoapContext/SoapPort" endpointName="tns:SoapPort"
serviceName="tns:SOAPService" wsdlURL="/wsdl/hello_world.wsdl"
serviceClass="org.apache.hello_world_soap_http.Greeter"
xmlns:tns="http://apache.org/hello_world_soap_http">
@@ -38,7 +41,7 @@
</cxf:features>
</cxf:cxfEndpoint>
<cxf:cxfEndpoint id="serviceEndpoint"
- address="http://localhost:9001/SoapContext/SoapPort" endpointName="tns:SoapPort"
+ address="http://localhost:${WSAddressingTest.port1}/SoapContext/SoapPort" endpointName="tns:SoapPort"
serviceName="tns:SOAPService" wsdlURL="/wsdl/hello_world.wsdl"
serviceClass="org.apache.hello_world_soap_http.Greeter"
xmlns:tns="http://apache.org/hello_world_soap_http">
Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsa/client.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsa/client.xml?rev=1141094&r1=1141093&r2=1141094&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsa/client.xml (original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsa/client.xml Wed Jun 29 13:24:58 2011
@@ -26,9 +26,12 @@
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<http:conduit name="{http://apache.org/hello_world_soap_http}SoapPort.http-conduit">
- <http:client DecoupledEndpoint="http://localhost:9990/decoupled_endpoint"/>
+ <http:client DecoupledEndpoint="http://localhost:${WSAddressingTest.port2}/decoupled_endpoint"/>
</http:conduit>
<cxf:bus>