1 year ago
#288161
shatk
Spring WS Camel | overriding default http connection properties
We are working on performance tuning of camel spring-ws API to support high TPS. we are trying to override default connection properties of HttpComponentsMessageSender with custom spring-webservice template based on below spring-ws doc , but with no luck.
https://camel.apache.org/components/3.15.x/spring-ws-component.html
camel.version -3.0.1 spring-boot-version - 2.6.3
Camel Route
.doTry()
.to(dStreamPath)
Spring WS YAML Config
dStreamPath: spring-ws:http://URL/getOffers?webServiceTemplate=#customSpringWSTemplate&soapAction=http://www.url.org
Bean Config
@Bean(name = "customSpringWSTemplate")
public WebServiceTemplate webServiceTemplate() throws Exception {
final MessageFactory msgFactory = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
final SaajSoapMessageFactory saajSoapMessageFactory = new SaajSoapMessageFactory(msgFactory);
final WebServiceTemplate customSpringWSTemplate = new WebServiceTemplate(saajSoapMessageFactory);
HttpComponentsMessageSender httpMessageSender = new HttpComponentsMessageSender();
httpMessageSender.setMaxConnectionsPerHost(new HashMap<String, String>() {
{ put("http://URL/getOffers", "20");}
});
httpMessageSender.setMaxTotalConnections(100);
customSpringWSTemplate.setMessageSender(httpMessageSender);
return customSpringWSTemplate;
}
Error :
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint:
spring-ws://URL due to:
There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{amp;soapAction=http://URL}]
at org.apache.camel.support.DefaultComponent.validateParameters(DefaultComponent.java:199)
at org.apache.camel.support.DefaultComponent.createEndpoint(DefaultComponent.java:135)
java
spring-boot
apache-camel
spring-ws
0 Answers
Your Answer