Author: bvahdat
Date: Fri Feb 10 04:20:19 2012
New Revision: 1242665
URL: http://svn.apache.org/viewvc?rev=1242665&view=rev
Log:
CAMEL-4998: Provide the timeout option for the SpringWebserviceProducer.
Added:
camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ProducerRemoteRouteTimeOutTest.java
(with props)
camel/trunk/components/camel-spring-ws/src/test/resources/org/apache/camel/component/spring/ws/ProducerRemoteRouteTimeOutTest-context.xml
(with props)
Modified:
camel/trunk/components/camel-spring-ws/pom.xml
camel/trunk/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceConfiguration.java
camel/trunk/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceProducer.java
camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ProducerLocalRouteTest.java
Modified: camel/trunk/components/camel-spring-ws/pom.xml
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-ws/pom.xml?rev=1242665&r1=1242664&r2=1242665&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-ws/pom.xml (original)
+++ camel/trunk/components/camel-spring-ws/pom.xml Fri Feb 10 04:20:19 2012
@@ -95,6 +95,11 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
Modified:
camel/trunk/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceConfiguration.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceConfiguration.java?rev=1242665&r1=1242664&r2=1242665&view=diff
==============================================================================
---
camel/trunk/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceConfiguration.java
(original)
+++
camel/trunk/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceConfiguration.java
Fri Feb 10 04:20:19 2012
@@ -31,6 +31,7 @@ public class SpringWebserviceConfigurati
private WebServiceTemplate webServiceTemplate;
private String soapAction;
private URI wsAddressingAction;
+ private int timeout = -1;
/* Consumer configuration */
private CamelEndpointMapping endpointMapping;
@@ -74,7 +75,15 @@ public class SpringWebserviceConfigurati
}
public void setWsAddressingAction(String wsAddressingAction) throws
URISyntaxException {
- this.wsAddressingAction = new URI(wsAddressingAction);
+ setWsAddressingAction(new URI(wsAddressingAction));
+ }
+
+ public int getTimeout() {
+ return timeout;
+ }
+
+ public void setTimeout(int timeout) {
+ this.timeout = timeout;
}
public CamelEndpointMapping getEndpointMapping() {
Modified:
camel/trunk/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceProducer.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceProducer.java?rev=1242665&r1=1242664&r2=1242665&view=diff
==============================================================================
---
camel/trunk/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceProducer.java
(original)
+++
camel/trunk/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceProducer.java
Fri Feb 10 04:20:19 2012
@@ -17,7 +17,12 @@
package org.apache.camel.component.spring.ws;
import java.io.IOException;
+import java.net.HttpURLConnection;
import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
import javax.xml.transform.Source;
import javax.xml.transform.TransformerException;
@@ -26,20 +31,33 @@ import org.apache.camel.Exchange;
import org.apache.camel.TypeConverter;
import org.apache.camel.impl.DefaultProducer;
import org.apache.camel.util.ExchangeHelper;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import org.springframework.ws.WebServiceMessage;
import org.springframework.ws.client.core.SourceExtractor;
import org.springframework.ws.client.core.WebServiceMessageCallback;
+import org.springframework.ws.client.core.WebServiceTemplate;
import org.springframework.ws.soap.addressing.client.ActionCallback;
import org.springframework.ws.soap.client.core.SoapActionCallback;
+import org.springframework.ws.transport.WebServiceMessageSender;
+import org.springframework.ws.transport.http.CommonsHttpMessageSender;
+import org.springframework.ws.transport.http.HttpUrlConnectionMessageSender;
+import org.springframework.ws.transport.http.HttpsUrlConnectionMessageSender;
public class SpringWebserviceProducer extends DefaultProducer {
+ private static final Logger LOG =
LoggerFactory.getLogger(SpringWebserviceProducer.class);
private static final SourceExtractor<Object> SOURCE_EXTRACTOR = new
NoopSourceExtractor();
- private SpringWebserviceEndpoint endpoint;
public SpringWebserviceProducer(Endpoint endpoint) {
super(endpoint);
- this.endpoint = (SpringWebserviceEndpoint) endpoint;
+ }
+
+ @Override
+ public SpringWebserviceEndpoint getEndpoint() {
+ return (SpringWebserviceEndpoint) super.getEndpoint();
}
public void process(Exchange exchange) throws Exception {
@@ -51,12 +69,15 @@ public class SpringWebserviceProducer ex
String soapAction =
exchange.getIn().getHeader(SpringWebserviceConstants.SPRING_WS_SOAP_ACTION,
String.class);
URI wsAddressingAction =
exchange.getIn().getHeader(SpringWebserviceConstants.SPRING_WS_ADDRESSING_ACTION,
URI.class);
- WebServiceMessageCallback callback = new
DefaultWebserviceMessageCallback(soapAction, wsAddressingAction);
+ // Populate the given (read) timeout if any
+ populateTimeout(getEndpoint().getConfiguration());
+
+ WebServiceMessageCallback callback = new
DefaultWebserviceMessageCallback(soapAction, wsAddressingAction,
getEndpoint().getConfiguration());
Object body = null;
if (endpointUri != null) {
- body =
endpoint.getConfiguration().getWebServiceTemplate().sendSourceAndReceive(endpointUri,
sourcePayload, callback, SOURCE_EXTRACTOR);
+ body =
getEndpoint().getConfiguration().getWebServiceTemplate().sendSourceAndReceive(endpointUri,
sourcePayload, callback, SOURCE_EXTRACTOR);
} else {
- body =
endpoint.getConfiguration().getWebServiceTemplate().sendSourceAndReceive(sourcePayload,
callback, SOURCE_EXTRACTOR);
+ body =
getEndpoint().getConfiguration().getWebServiceTemplate().sendSourceAndReceive(sourcePayload,
callback, SOURCE_EXTRACTOR);
}
if (ExchangeHelper.isOutCapable(exchange)) {
exchange.getOut().copyFrom(exchange.getIn());
@@ -64,26 +85,108 @@ public class SpringWebserviceProducer ex
}
}
- protected class DefaultWebserviceMessageCallback implements
WebServiceMessageCallback {
- private String soapActionHeader;
- private URI wsAddressingActionHeader;
+ private static void populateTimeout(SpringWebserviceConfiguration
configuration) {
+ WebServiceTemplate webServiceTemplate =
configuration.getWebServiceTemplate();
+ List<WebServiceMessageSender> webServiceMessageSenders = new
ArrayList<WebServiceMessageSender>(webServiceTemplate.getMessageSenders().length);
+ Collections.addAll(webServiceMessageSenders,
webServiceTemplate.getMessageSenders());
+ for (WebServiceMessageSender webServiceMessageSender :
webServiceMessageSenders) {
+ if (webServiceMessageSender instanceof CommonsHttpMessageSender) {
+ CommonsHttpMessageSender commonsHttpMessageSender =
(CommonsHttpMessageSender) webServiceMessageSender;
+ setTimeOut(commonsHttpMessageSender, configuration);
+ } else if (webServiceMessageSender instanceof
HttpsUrlConnectionMessageSender) {
+ // Should check HttpsUrlConnectionMessageSender first as it
extends HttpUrlConnectionMessageSender
+ if (shouldConsiderTimeoutConfiguration(configuration)) {
+ webServiceMessageSenders.remove(webServiceMessageSender);
+ webServiceMessageSenders.add(new
CamelHttpsUrlConnectionMessageSender(configuration));
+ }
+ } else if (webServiceMessageSender instanceof
HttpUrlConnectionMessageSender) {
+ if (shouldConsiderTimeoutConfiguration(configuration)) {
+ webServiceMessageSenders.remove(webServiceMessageSender);
+ webServiceMessageSenders.add(new
CamelHttpUrlConnectionMessageSender(configuration));
+ }
+ } else {
+ // Warn only if the timeout option has been explicitly
specified
+ if (shouldConsiderTimeoutConfiguration(configuration)) {
+ LOG.warn("Ignoring the timeout option for {} as there's no
provided API available to populate it!", webServiceMessageSender);
+ }
+ }
+ }
+
+
webServiceTemplate.setMessageSenders(webServiceMessageSenders.toArray(new
WebServiceMessageSender[webServiceMessageSenders.size()]));
+ }
+
+ private static boolean
shouldConsiderTimeoutConfiguration(SpringWebserviceConfiguration configuration)
{
+ return configuration.getTimeout() > -1;
+ }
+
+ private static void setTimeOut(HttpURLConnection connection,
SpringWebserviceConfiguration configuration) {
+ if (configuration.getTimeout() > -1) {
+ connection.setReadTimeout(configuration.getTimeout());
+ }
+ }
+
+ private static void setTimeOut(CommonsHttpMessageSender
commonsHttpMessageSender, SpringWebserviceConfiguration configuration) {
+ if (configuration.getTimeout() > -1) {
+
commonsHttpMessageSender.setReadTimeout(configuration.getTimeout());
+ }
+ }
+
+ private static class CamelHttpUrlConnectionMessageSender extends
HttpUrlConnectionMessageSender {
+
+ private final SpringWebserviceConfiguration configuration;
+
+ CamelHttpUrlConnectionMessageSender(SpringWebserviceConfiguration
configuration) {
+ this.configuration = configuration;
+ }
+
+ @Override
+ protected void prepareConnection(HttpURLConnection connection) throws
IOException {
+ super.prepareConnection(connection);
+
+ setTimeOut(connection, configuration);
+ }
+
+ }
+
+ private static class CamelHttpsUrlConnectionMessageSender extends
HttpsUrlConnectionMessageSender {
+
+ private final SpringWebserviceConfiguration configuration;
+
+ CamelHttpsUrlConnectionMessageSender(SpringWebserviceConfiguration
configuration) {
+ this.configuration = configuration;
+ }
+
+ @Override
+ protected void prepareConnection(HttpURLConnection connection) throws
IOException {
+ super.prepareConnection(connection);
+
+ setTimeOut(connection, configuration);
+ }
+
+ }
+
+ private static class DefaultWebserviceMessageCallback implements
WebServiceMessageCallback {
+ private final String soapActionHeader;
+ private final URI wsAddressingActionHeader;
+ private final SpringWebserviceConfiguration configuration;
- public DefaultWebserviceMessageCallback(String soapAction, URI
wsAddressingAction) {
+ public DefaultWebserviceMessageCallback(String soapAction, URI
wsAddressingAction, SpringWebserviceConfiguration configuration) {
this.soapActionHeader = soapAction;
this.wsAddressingActionHeader = wsAddressingAction;
+ this.configuration = configuration;
}
public void doWithMessage(WebServiceMessage message) throws
IOException, TransformerException {
// Add SoapAction to webservice request. Note that exchange header
// takes precedence over endpoint option
- String soapAction = soapActionHeader != null ? soapActionHeader :
endpoint.getConfiguration().getSoapAction();
+ String soapAction = soapActionHeader != null ? soapActionHeader :
configuration.getSoapAction();
if (soapAction != null) {
new SoapActionCallback(soapAction).doWithMessage(message);
}
// Add WS-Addressing Action to webservice request (the
WS-Addressing
// 'to' header will default to the URL of the connection).
// Note that exchange header takes precedence over endpoint option
- URI wsAddressingAction = wsAddressingActionHeader != null ?
wsAddressingActionHeader : endpoint.getConfiguration().getWsAddressingAction();
+ URI wsAddressingAction = wsAddressingActionHeader != null ?
wsAddressingActionHeader : configuration.getWsAddressingAction();
if (wsAddressingAction != null) {
new ActionCallback(wsAddressingAction).doWithMessage(message);
}
Modified:
camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ProducerLocalRouteTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ProducerLocalRouteTest.java?rev=1242665&r1=1242664&r2=1242665&view=diff
==============================================================================
---
camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ProducerLocalRouteTest.java
(original)
+++
camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ProducerLocalRouteTest.java
Fri Feb 10 04:20:19 2012
@@ -41,7 +41,7 @@ public class ProducerLocalRouteTest exte
@EndpointInject(uri = "mock:result")
private MockEndpoint resultEndpoint;
- @Test()
+ @Test
public void consumeStockQuoteWebserviceWithDefaultTemplate() throws
Exception {
Object result =
template.requestBody("direct:stockQuoteWebserviceWithDefaultTemplate",
xmlRequestForGoogleStockQuote);
@@ -49,7 +49,7 @@ public class ProducerLocalRouteTest exte
assertTrue(result instanceof Source);
}
- @Test()
+ @Test
public void consumeStockQuoteWebserviceAndPreserveHeaders() throws
Exception {
resultEndpoint.expectedHeaderReceived("helloHeader", "hello world!");
@@ -59,7 +59,7 @@ public class ProducerLocalRouteTest exte
resultEndpoint.assertIsSatisfied();
}
- @Test()
+ @Test
public void consumeStockQuoteWebservice() throws Exception {
Object result = template.requestBody("direct:stockQuoteWebservice",
xmlRequestForGoogleStockQuote);
@@ -67,7 +67,7 @@ public class ProducerLocalRouteTest exte
assertTrue(result instanceof Source);
}
- @Test()
+ @Test
public void consumeStockQuoteWebserviceWithCamelStringSourceInput() throws
Exception {
Object result = template.requestBody("direct:stockQuoteWebservice",
new StringSource(xmlRequestForGoogleStockQuote));
@@ -75,7 +75,7 @@ public class ProducerLocalRouteTest exte
assertTrue(result instanceof Source);
}
- @Test()
+ @Test
public void consumeStockQuoteWebserviceWithNonDefaultMessageFactory()
throws Exception {
Object result =
template.requestBody("direct:stockQuoteWebserviceWithNonDefaultMessageFactory",
xmlRequestForGoogleStockQuote);
@@ -83,7 +83,7 @@ public class ProducerLocalRouteTest exte
assertTrue(result instanceof Source);
}
- @Test()
+ @Test
public void consumeStockQuoteWebserviceAndConvertResult() throws Exception
{
Object result =
template.requestBody("direct:stockQuoteWebserviceAsString",
xmlRequestForGoogleStockQuote);
@@ -93,7 +93,7 @@ public class ProducerLocalRouteTest exte
assertTrue(resultMessage.contains("Google Inc."));
}
- @Test()
+ @Test
public void consumeStockQuoteWebserviceAndProvideEndpointUriByHeader()
throws Exception {
Object result =
template.requestBodyAndHeader("direct:stockQuoteWebserviceWithoutDefaultUri",
xmlRequestForGoogleStockQuote,
SpringWebserviceConstants.SPRING_WS_ENDPOINT_URI,
stockQuoteWebserviceUri);
Added:
camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ProducerRemoteRouteTimeOutTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ProducerRemoteRouteTimeOutTest.java?rev=1242665&view=auto
==============================================================================
---
camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ProducerRemoteRouteTimeOutTest.java
(added)
+++
camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ProducerRemoteRouteTimeOutTest.java
Fri Feb 10 04:20:19 2012
@@ -0,0 +1,86 @@
+/**
+ * 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.camel.component.spring.ws;
+
+import java.net.SocketTimeoutException;
+
+import org.apache.camel.CamelExecutionException;
+import org.apache.camel.Produce;
+import org.apache.camel.ProducerTemplate;
+
+import org.junit.Ignore;
+import org.junit.Test;
+
+import org.springframework.test.context.ContextConfiguration;
+import
org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+@ContextConfiguration
+public class ProducerRemoteRouteTimeOutTest extends
AbstractJUnit4SpringContextTests {
+
+ private final String xmlRequestForGoogleStockQuote = "<GetQuote
xmlns=\"http://www.webserviceX.NET/\"><symbol>GOOG</symbol></GetQuote>";
+
+ @Produce
+ private ProducerTemplate template;
+
+ @Ignore("Run manually, makes connection to external webservice")
+ @Test
+ public void callStockQuoteWebserviceCommonsHttpWith3MillSecondsTimeout()
throws Exception {
+ try {
+
template.requestBody("direct:stockQuoteWebserviceCommonsHttpWith3MillSecondsTimeout",
xmlRequestForGoogleStockQuote);
+ fail("Miss the expected exception in chain");
+ } catch (CamelExecutionException cee) {
+ assertTrue(hasThrowableInChain(cee, SocketTimeoutException.class));
+ }
+ }
+
+ @Ignore("Run manually, makes connection to external webservice")
+ @Test
+ public void
callStockQuoteWebserviceCommonsHttpWith5000MillSecondsTimeout() throws
Exception {
+
template.requestBody("direct:stockQuoteWebserviceCommonsHttpWith5000MillSecondsTimeout",
xmlRequestForGoogleStockQuote);
+ }
+
+ @Ignore("Run manually, makes connection to external webservice")
+ @Test
+ public void callStockQuoteWebserviceJDKWith3MillSecondsTimeout() throws
Exception {
+ try {
+
template.requestBody("direct:stockQuoteWebserviceJDKWith3MillSecondsTimeout",
xmlRequestForGoogleStockQuote);
+ fail("Miss the expected exception in chain");
+ } catch (CamelExecutionException cee) {
+ assertTrue(hasThrowableInChain(cee, SocketTimeoutException.class));
+ }
+ }
+
+ @Ignore("Run manually, makes connection to external webservice")
+ @Test
+ public void callStockQuoteWebserviceJDKWith5000MillSecondsTimeout() throws
Exception {
+
template.requestBody("direct:stockQuoteWebserviceJDKWith5000MillSecondsTimeout",
xmlRequestForGoogleStockQuote);
+ }
+
+ private static boolean hasThrowableInChain(Throwable throwable, Class<?
extends Throwable> clazz) {
+ if (throwable == null) {
+ return false;
+ } else if (clazz.isAssignableFrom(throwable.getClass())) {
+ return true;
+ }
+
+ return hasThrowableInChain(throwable.getCause(), clazz);
+ }
+
+}
Propchange:
camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ProducerRemoteRouteTimeOutTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
camel/trunk/components/camel-spring-ws/src/test/resources/org/apache/camel/component/spring/ws/ProducerRemoteRouteTimeOutTest-context.xml
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-ws/src/test/resources/org/apache/camel/component/spring/ws/ProducerRemoteRouteTimeOutTest-context.xml?rev=1242665&view=auto
==============================================================================
---
camel/trunk/components/camel-spring-ws/src/test/resources/org/apache/camel/component/spring/ws/ProducerRemoteRouteTimeOutTest-context.xml
(added)
+++
camel/trunk/components/camel-spring-ws/src/test/resources/org/apache/camel/component/spring/ws/ProducerRemoteRouteTimeOutTest-context.xml
Fri Feb 10 04:20:19 2012
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ 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/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">
+
+ <bean id="messageFactory"
class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory" />
+
+ <bean id="commonsHttpWebServiceTemplate"
class="org.springframework.ws.client.core.WebServiceTemplate">
+ <constructor-arg ref="messageFactory" />
+ <property name="messageSender">
+ <bean
+
class="org.springframework.ws.transport.http.CommonsHttpMessageSender" />
+ </property>
+ </bean>
+
+ <bean id="jdkHttpWebServiceTemplate"
class="org.springframework.ws.client.core.WebServiceTemplate">
+ <constructor-arg ref="messageFactory" />
+ </bean>
+
+ <camelContext xmlns="http://camel.apache.org/schema/spring">
+ <route>
+ <from
uri="direct:stockQuoteWebserviceCommonsHttpWith3MillSecondsTimeout" />
+ <to
uri="spring-ws:http://www.webservicex.net/stockquote.asmx?timeout=3&webServiceTemplate=#commonsHttpWebServiceTemplate&soapAction=http://www.webserviceX.NET/GetQuote"
/>
+ </route>
+
+ <route>
+ <from
uri="direct:stockQuoteWebserviceCommonsHttpWith5000MillSecondsTimeout" />
+ <to
uri="spring-ws:http://www.webservicex.net/stockquote.asmx?timeout=5000&webServiceTemplate=#commonsHttpWebServiceTemplate&soapAction=http://www.webserviceX.NET/GetQuote"
/>
+ </route>
+
+ <route>
+ <from
uri="direct:stockQuoteWebserviceJDKWith3MillSecondsTimeout" />
+ <to
uri="spring-ws:http://www.webservicex.net/stockquote.asmx?timeout=3&webServiceTemplate=#jdkHttpWebServiceTemplate&soapAction=http://www.webserviceX.NET/GetQuote"
/>
+ </route>
+
+ <route>
+ <from
uri="direct:stockQuoteWebserviceJDKWith5000MillSecondsTimeout" />
+ <to
uri="spring-ws:http://www.webservicex.net/stockquote.asmx?timeout=5000&webServiceTemplate=#jdkHttpWebServiceTemplate&soapAction=http://www.webserviceX.NET/GetQuote"
/>
+ </route>
+ </camelContext>
+
+</beans>
Propchange:
camel/trunk/components/camel-spring-ws/src/test/resources/org/apache/camel/component/spring/ws/ProducerRemoteRouteTimeOutTest-context.xml
------------------------------------------------------------------------------
svn:eol-style = native