<camel:errorHandler id="myErrorHandler" type="LoggingErrorHandler" level="ERROR" logName="myLoggingErrorHandler"/>
<camel:camelContext errorHandlerRef="myErrorHandler" trace="true">
<camel:route> <!-- errorHandlerRef="myErrorHandler" -->
<camel:from uri="file://src/resources?fileName=bookstore.xml" />
<camel:split>
<camel:xpath>//book/[#category='WEB']/author/text()</camel:xpath>
<camel:log message="Main route: '${body}'" />
</camel:split>
<!-- <camel:to uri="stream:out"/> -->
</camel:route>
</camel:camelContext>
Errors are getting logged but not with the name myLoggingErrorHandler as should be. That is how they were without using errorHandler. Please guide.
Related
H I have doubts with the implementation of Detached XML Signatures, I have mostly followed the example that appears here. My doubt is related to the validation that is done with the schema "test.xsd", I have not managed to generate it according to my needs.
I have to sign the body, Timestamp and BinarySecurityToken of the request, which is encrypted (for the encryption I am using the implementation that appears in http://camel.apache.org/xmlsecurity-dataformat.html)
My route camel is:
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:camel="http://camel.apache.org/schema/blueprint"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf"
xmlns:http="http://cxf.apache.org/transports/http/configuration"
xmlns:sec="http://cxf.apache.org/configuration/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<camel:keyStoreParameters id="injks" password="desarrollo" resource="C:/Users/Usuario/Desktop/nuevo/test.jks"/>
<bean class="org.apache.camel.util.jsse.KeyStoreParameters" id="keyStore2">
<property name="resource" value="C:/Users/Usuario/Desktop/nuevo/test.jks"/>
<property name="password" value="development"/>
</bean>
<bean
class="org.apache.camel.component.xmlsecurity.api.DefaultKeyAccessor" id="keyAccessorOne">
<property name="alias" value="test"/>
<property name="password" value="development"/>
<property name="keyStoreParameters" ref="keyStore2"/>
</bean>
<!-- Parts -->
<bean class="java.util.ArrayList" id="xpathParts">
<argument>
<list>
<bean
class="org.apache.camel.component.xmlsecurity.api.XmlSignatureHelper" factory-method="getXpathFilter">
<argument type="java.lang.String" value="//*:Body"/>
</bean>
<bean
class="org.apache.camel.component.xmlsecurity.api.XmlSignatureHelper" factory-method="getXpathFilter">
<argument type="java.lang.String" value="//*:Timestamp"/>
</bean>
<bean
class="org.apache.camel.component.xmlsecurity.api.XmlSignatureHelper" factory-method="getXpathFilter">
<argument type="java.lang.String" value="//*:BinarySecurityToken"/>
</bean>
</list>
</argument>
</bean>
<camelContext id="context-redbanc" xmlns="http://camel.apache.org/schema/blueprint">
<route id="_route1">
<from id="_from1" uri="timer:foo?period=20000"/>
<setBody id="_setBody1">
<simple>resource:classpath:etc/wsdl/schema.xml</simple>
</setBody>
<marshal id="_marshal2">
<jaxb contextPath="cl.coopeuch.integracion.wsredbanc.wsdl.test"/>
</marshal>
<marshal id="_marshal1">
<secureXML id="inEncryption"
keyCipherAlgorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
keyOrTrustStoreParametersId="injks"
recipientKeyAlias="des-wls02.rbc.cl"
secureTag="//*:Body" secureTagContents="true" xmlCipherAlgorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
</marshal>
<setHeader headerName="CamelXmlSignatureContentReferenceUri" id="_setHeader1">
<constant>#Body</constant>
</setHeader>
<to id="_to2" uri="xmlsecurity:sign://oneSign?keyAccessor=#keyAccessorOne&digestAlgorithm=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23sha1&xpathsToIdAttributes=#xpathParts&schemaResourceUri=etc/wsdl/schema.xsd"/>
<to id="_to3" uri="file://C:/Users/Usuario/Desktop/salida?fileName=outbound_body.xml"/>
<to id="_to4" uri="mock:result"/>
</route>
</camelContext>
The elements to sign are:
<bean class="java.util.ArrayList" id="xpathParts">
<argument>
<list>
<bean
class="org.apache.camel.component.xmlsecurity.api.XmlSignatureHelper" factory-method="getXpathFilter">
<argument type="java.lang.String" value="//*:Body"/>
</bean>
<bean
class="org.apache.camel.component.xmlsecurity.api.XmlSignatureHelper" factory-method="getXpathFilter">
<argument type="java.lang.String" value="//*:Timestamp"/>
</bean>
<bean
class="org.apache.camel.component.xmlsecurity.api.XmlSignatureHelper" factory-method="getXpathFilter">
<argument type="java.lang.String" value="//*:BinarySecurityToken"/>
</bean>
</list>
</argument>
</bean>
and the uri used to sign is:
<to id="_to2" uri="xmlsecurity:sign://oneSign?keyAccessor=#keyAccessorOne&digestAlgorithm=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23sha1&xpathsToIdAttributes=#xpathParts&schemaResourceUri=etc/wsdl/schema.xsd"/>
The test.xsd in my implementation is schema.xsd, which is: (I have not known how to indicate the other two parties to sign)
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<import namespace="http://www.w3.org/2000/09/xmldsig#"
schemaLocation="xmldsig-core-schema.xsd" />
<element name="Envelope">
<complexType>
<sequence>
<element name="Header"/>
<element name="Body">
<complexType>
<sequence>
<element ref="ds:Signature" minOccurs="0" />
</sequence>
<attribute name="Body" type="ID" use="required" />
<attribute name="stringBody" type="string" />
</complexType>
</element>
</sequence>
</complexType>
</element>
Any ideas or other examples that I can follow?
..Is solved! The ws-policy framework was used with the following policies:
<?xml version="1.0" encoding="UTF-8"?>
<wsp:Policy
wsu:Id="SecureConversation_MutualCertificate10SignEncrypt_IPingService_policy"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsp:ExactlyOne xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
<wsp1_2:All xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy">
<sp:AsymmetricBinding xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsaws="http://www.w3.org/2005/08/addressing" xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy"
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
<wsp1_2:Policy>
<sp:InitiatorToken>
<wsp:Policy>
<sp:X509Token
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<sp:WssX509V3Token10 />
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:InitiatorToken>
<sp:RecipientToken>
<wsp:Policy>
<sp:X509Token
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
<wsp1_2:Policy>
<sp:WssX509V3Token10 />
<sp:RequireIssuerSerialReference />
</wsp1_2:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:RecipientToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:TripleDesRsa15 />
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:IncludeTimestamp />
<sp:ProtectTokens />
</wsp1_2:Policy>
</sp:AsymmetricBinding>
<sp:SignedParts
xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
xmlns:wss="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<sp:Body />
</sp:SignedParts>
<sp:EncryptedParts
xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
<sp:Body />
</sp:EncryptedParts>
</wsp1_2:All>
</wsp:ExactlyOne>
</wsp:Policy>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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.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"/>
<!-- Defined the real JAXRS back end service -->
<jaxrs:server id="restService"
address="http://localhost:${CXFTestSupport.port2}/CxfRsRouterTest/rest"
staticSubresourceResolution="true">
<jaxrs:serviceBeans>
<ref bean="customerService"/>
</jaxrs:serviceBeans>
</jaxrs:server>
<bean id="jsonProvider" class="org.apache.cxf.jaxrs.provider.json.JSONProvider"/>
<bean id="customerService" class="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService" />
<!-- Defined the server endpoint to create the cxf-rs consumer -->
<cxf:rsServer id="rsServer" address="http://localhost:${CXFTestSupport.port1}/CxfRsRouterTest/route"
serviceClass="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService"
loggingFeatureEnabled="true" loggingSizeLimit="20" skipFaultLogging="true">
<cxf:providers>
<ref bean="jsonProvider"/>
</cxf:providers>
</cxf:rsServer>
<!-- Defined the client endpoint to create the cxf-rs consumer -->
<cxf:rsClient id="rsClient" address="http://localhost:${CXFTestSupport.port2}/CxfRsRouterTest/rest"
serviceClass="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService"
loggingFeatureEnabled="true" skipFaultLogging="true">
<cxf:providers>
<ref bean="jsonProvider"/>
</cxf:providers>
</cxf:rsClient>
<!-- The camel route context -->
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<route>
<!-- Just need to ignoreDeleteMethodMessageBody -->
<from uri="cxfrs://bean://rsServer"/>
<to uri="log:body?level=INFO"/>
<to uri="cxfrs://bean://rsClient?ignoreDeleteMethodMessageBody=true"/>
</route>
</camelContext>
</beans>
In the Camel Docs they say that cxf:rsServer is a REST Consumer where as cxf:rsClient is a REST producer but the code seems to do vice-versa.
Also i want to understand the difference between Jaxrs tag and cxf:rsserver and cxf:rsclient tags.
jaxrs:server : create a basic endpoint service.
cxf:rsServer : Is a camel component to create REST endpoint. It will turn a request into a normal Java object.
cxf:rsClient : Do the opposite of rsServer, it turn a java object to a REST request.
<camelContext>
<route>
<from uri="cxfrs://bean://rsServer" />
<to uri="log:body?level=INFO" />
<to uri="cxfrs://bean://..=true" />
</route>
</camelContext>
If we take a look to the code example, we see that this is a proxy. We received a REST request, we log it and then forward it.
<cxf:rsServer id="rsServer" address="http://localhost:${CXFTestSupport.port1}/CxfRsRouterTest/route"
serviceClass="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService"
loggingFeatureEnabled="true" loggingSizeLimit="20" skipFaultLogging="true">
<cxf:providers>
<ref bean="jsonProvider"/>
</cxf:providers>
</cxf:rsServer>
<cxf:rsClient id="rsClient" address="http://localhost:${CXFTestSupport.port2}/CxfRsRouterTest/rest"
serviceClass="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService"
loggingFeatureEnabled="true" skipFaultLogging="true">
<cxf:providers>
<ref bean="jsonProvider"/>
</cxf:providers>
</cxf:rsClient>
Theses tags is for configure your cxf component outside from the camel-route.
Hope this help.
how to solve this problem.i am beginner " jboss middleware"
http://i.stack.imgur.com/d4STG.png
Parameter dataFormatType is a mandatory field and cannot be empty. Please check the properties view for more details
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:camel="http://camel.apache.org/schema/blueprint"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<!-- this is the JDBC data source Config for postgresql database -->
<bean class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close" id="dataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://localhost:3306/demo"/>
<property name="username" value="root"/>
<property name="password" value="root"/>
</bean>
<!-- configure the Camel SQL component to use the JDBC data source -->
<bean class="org.apache.camel.component.sql.SqlComponent" id="sql">
<property name="dataSource" ref="dataSource"/>
</bean>
<camelContext id="CustInfoContext" trace="false" xmlns="http://camel.apache.org/schema/blueprint">
<propertyPlaceholder id="properties" location="classpath:sql.properties"/>
<route customId="true" id="custinfoRoute">
<from id="_from1" uri="activemq:queue:customer"/>
<unmarshal id="_unmarshal1">
<jaxb contextPath="org.blogdemo.homeloan.model"
partClass="org.blogdemo.homeloan.model.CustInfo" prettyPrint="true"/>
</unmarshal>
<setHeader headerName="custNationalID" id="_setHeader1">
<simple>${body.nationalID}</simple>
</setHeader>
<setHeader headerName="firstName" id="_setHeader2">
<simple>${body.firstName}</simple>
</setHeader>
<setHeader headerName="lastName" id="_setHeader3">
<simple>${body.lastName}</simple>
</setHeader>
<setHeader headerName="age" id="_setHeader4">
<simple>${body.age}</simple>
</setHeader>
<setHeader headerName="occupation" id="_setHeader5">
<simple>${body.occupation}</simple>
</setHeader>
<to id="_to1" uri="sql:{{sql.insertCustInfo}}"/>
</route>
</camelContext>
So it seems that is a problem in the Beta1 version of the tooling. In the latest sources I can't reproduce this issue. See attached screenshots. I'd suggest to upgrade to the latest version as soon as it is released.
I am using the Camel AHC component in a route where there is choice condition in the route. Depending up the value of a header the decision is taken. The route works fine during normal testing. But when used under load the Exchange headers starts mixing from when choise-when to another choise-when(happens for 1/8 number of calls). Following is my route:
camel:camelContext id="ZEMPSRV" streamCache="true">
<camel:properties>
<camel:property key="CamelCachedOutputStreamCipherTransformation" value="RC4"/>
</camel:properties>
<camel:route>
<camel:from id="_MessageFlow_20_1422954968407" uri="xyz:abc/ZEMPSRV:Employees"/>
<camel:choice id="_ExclusiveGateway_8_1422954968423">
<camel:when>
<camel:simple>${header.Method} == 'GET_ENTRY'</camel:simple>
<camel:setHeader headerName="RelativeUri" id="GET_ENTRY_Header_1">
<camel:simple>abc/zemp_srv/Employees('{Empid}')</camel:simple>
</camel:setHeader>
<camel:bean id="_CallActivity_69_1422954968443" method="process" ref="abcprocessor"/>
<camel:setHeader headerName="scriptFile" id="GET_ENTRY_Header_2">
<camel:simple resultType="java.lang.String">Employees_REST_Read.groovy</camel:simple>
</camel:setHeader>
<camel:setHeader headerName="functionName" id="GET_ENTRY_Header_3">
<camel:simple resultType="java.lang.String">processRequestData</camel:simple>
</camel:setHeader>
<camel:setHeader headerName="scriptFileType" id="GET_ENTRY_Header_4">
<camel:simple resultType="java.lang.String">groovy</camel:simple>
</camel:setHeader>
<camel:bean method="process" ref="scriptprocessor" id="GET_ENTRY_scriptprocessor_pre"/>
<camel:bean id="_ServiceTask_14_1422954968508" method="process" ref="abcProcessor"/>
<camel:to uri="ahc:http://host:port/abc/zemp_srv/Employees('000000000001')"/>
<camel:setHeader headerName="RestContentType" id="GET_ENTRY_Header_5">
<camel:simple resultType="java.lang.String"/>
</camel:setHeader>
<camel:setBody id="_CallActivity_71_1422954968510">
<camel:simple>${bodyAs(String)}</camel:simple>
</camel:setBody>
<camel:setHeader headerName="scriptFile" id="GET_ENTRY_Header_6">
<camel:simple resultType="java.lang.String">Employees_REST_Read.groovy</camel:simple>
</camel:setHeader>
<camel:setHeader headerName="functionName" id="GET_ENTRY_Header_7">
<camel:simple resultType="java.lang.String">processResponseData</camel:simple>
</camel:setHeader>
<camel:setHeader headerName="scriptFileType" id="GET_ENTRY_Header_8">
<camel:simple resultType="java.lang.String">groovy</camel:simple>
</camel:setHeader>
<camel:bean method="process" ref="scriptprocessor" id="GET_ENTRY_scriptprocessor_post"/>
<camel:bean id="_CallActivity_73_1422954968577" method="process" ref="cdeProcessor"/>
</camel:when>
<camel:when>
<camel:simple>${header.Method} == 'GET_FEED'</camel:simple>
<camel:setHeader headerName="RelativeUri" id="GET_FEED_Header_1">
<camel:simple>/abc/zemp_srv/Employees</camel:simple>
</camel:setHeader>
<camel:setHeader headerName="scriptFile" id="GET_FEED_Header_2">
<camel:simple resultType="java.lang.String">Employees_REST_Query.groovy</camel:simple>
</camel:setHeader>
<camel:setHeader headerName="functionName" id="GET_FEED_Header_3">
<camel:simple resultType="java.lang.String">processRequestData</camel:simple>
</camel:setHeader>
<camel:setHeader headerName="scriptFileType" id="GET_FEED_Header_4">
<camel:simple resultType="java.lang.String">groovy</camel:simple>
</camel:setHeader>
<camel:bean method="process" ref="scriptprocessor" id="GET_FEED_scriptprocessor_pre"/>
<camel:bean id="_ServiceTask_15_1422954968675" method="process" ref="abcDestinationProcessor"/>
<camel:to uri="ahc:http://host:port/abc/zemp_srv/Employees?$filter=Empid%20le%20%27000000000050%27"/>
<camel:setHeader headerName="RestContentType" id="GET_FEED_Header_5">
<camel:simple resultType="java.lang.String"/>
</camel:setHeader>
<camel:setHeader headerName="Dilip" id="GET_ENTRY_Header_111">
<camel:simple resultType="java.lang.String">Patidar</camel:simple>
</camel:setHeader>
<camel:setBody id="_CallActivity_76_1422954968677">
<camel:simple>${bodyAs(String)}</camel:simple>
</camel:setBody>
<camel:setHeader headerName="scriptFile" id="GET_FEED_Header_6">
<camel:simple resultType="java.lang.String">Employees_REST_Query.groovy</camel:simple>
</camel:setHeader>
<camel:setHeader headerName="functionName" id="GET_FEED_Header_7">
<camel:simple resultType="java.lang.String">processResponseData</camel:simple>
</camel:setHeader>
<camel:setHeader headerName="scriptFileType" id="GET_FEED_Header_8">
<camel:simple resultType="java.lang.String">groovy</camel:simple>
</camel:setHeader>
<camel:bean method="process" ref="scriptprocessor" id="GET_FEED_scriptprocessor_post"/>
<camel:bean id="_CallActivity_78_1422954968744" method="process" ref="cdeProcessor"/>
</camel:when>
<camel:otherwise/>
</camel:choice>
</camel:route>
The switch happen after the ahc component call and by the time I come to scriptprocessor or adeprocessor the value of header.Method is switch from GET_ENTRY to GET_FEED and vise versa. Strange issue. Only happens under load testing and that too only for 1/8 of calls.
Is this related with general issue with camel header handling?
Is this related with header handling in Camel AHC component?
Regards,
Dilip
I have a web application providing rest full service and another standalone (jar) application doing soap request response (using camel)
Can someone give me pointers to me for how to integrate the two applications
Specifically around how to kick camel routes when war file is deployed in tomcat, and how to re-run the routes when a specific HTTP request arrives.
I am using camel DSL (xml) and spring.
UPDATE 1:
I have followed this
Checked that web.xml has following lines:
<context-param>
<param-name>contextClass</param-name>
<param-value>org.springframework.web.context.support.AnnotationConfigWebApplicationContext</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>com.mycompany.server.Binder</param-value>
</context-param>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/classes/log4j.properties</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
Created a /WEB-INF/applicationContext.xml file and put all my routes and beans in it (btw I have beans.xml file as well in src/main/resources which is getting read by spring).
<?xml version="1.0" encoding="UTF-8"?>
<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"
xmlns="http://www.springframework.org/schema/beans"
xsi:schemaLocation="
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.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
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
">
<!-- Camel applicationContext -->
<!-- this import needed to bring in CXF classes -->
<import resource="classpath:META-INF/cxf/cxf.xml" />
<bean id="properties" class="org.apache.camel.component.properties.PropertiesComponent">
<property name="location" value="classpath:${env}/my.properties" />
</bean>
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:${env}/my.properties</value>
</list>
</property>
</bean>
<camel:camelContext id="camelContext">
<camel:contextScan/>
<camel:template id="serviceConsumerTemplate" defaultEndpoint="direct:start" />
<camel:threadPoolProfile defaultProfile="true" id="defaultThreadPool" poolSize="10" maxPoolSize="15" />
<camel:route id="serviceGetAccount">
<camel:from uri="timer://kickoff?repeatCount=1"/>
<camel:to uri="bean:serviceGetAccountProcessor" />
<camel:to uri="bean:serviceRequestHeaderCreator" />
<camel:to uri="cxf:bean:serviceGetAccountEndpoint?dataFormat=POJO" />
<camel:to uri="bean:serviceGetAccountResponseProcessor" />
</camel:route>
</camel:camelContext>
<bean id="serviceRequestHeaderCreator" class="com.mycompany.service.soap.SOARequestHeaderCreator">
<property name="serviceName" value="service" />
<property name="spnValue" value="${nj.spn}" />
<property name="securityTokenEnabled" value="true" />
<property name="sendingApplication" value="NJ SERVICE" />
<property name="serviceVersion" value="3.0.2" />
<property name="sendingHost" ref="localHostName"/>
</bean>
<cxf:cxfEndpoint id="serviceGetAccountEndpoint"
address="${request.endpoint}/serviceAccountRequestResponsePT"
endpointName="s:serviceAccountRequestResponsePort"
serviceName="s:serviceAccountRequestResponseHTTP"
xmlns:s="http://soa.mycompany.com/services/service/wsdl/v3"
serviceClass="com.mycompany.services.service.wsdl.v3.serviceAccountRequestResponsePT"
loggingFeatureEnabled="true">
</cxf:cxfEndpoint>
<bean id="serviceGetAccountProcessor" class="com.mycompany.service.serviceGetAccountProcessor"/>
<bean id="serviceGetAccountResponseProcessor" class="com.mycompany.service.serviceGetAccountResponseProcessor"/>
</beans>
Up the logging level of log4j.logger.org.apache.camel=DEBUG
However do not see any camel log lines of routes starting.
Update 2:
I was not doing mvn clean generate-sources.
Once I started doing mvn clean and rebuilding the war file, camel kicked in.
Seems your spring context does not really fire. Make sure it is!
There should be some Spring info log events telling you about this.
Try adding this:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>