camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sanjay.gautam" <sanjay.gau...@gmail.com>
Subject Exchange has SOAPMessage want to Send to JMS Topic
Date Fri, 15 Jan 2016 03:02:14 GMT
I am new to the Camel world and what I am trying to do is as follows. 

1. There is a route which is Servlet Component  which is called by external
System. 
2. MyServlet CamelComponent Reads the incoming exchange and creates the
SOAPMessage.
3. In Next Step I want to send the SOAP message to JMS Topic. 

 <bean id="jmsConnectionFactory" 
   class="org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory">
   		<constructor-arg  name="url" value="tcp://localhost:9161" />
      	<constructor-arg  name="user" value="admin" />
        <constructor-arg  name="password" value="password" />
  </bean>

 <bean id="jmsConfig" 
   class="org.apache.camel.component.jms.JmsConfiguration">
   <property name="connectionFactory" ref="jmsConnectionFactory"/>
   <property name="concurrentConsumers" value="1"/>
</bean>

<bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
   <property name="configuration" ref="jmsConfig"/>
</bean>

JMS ROUTE 
At this point I Have a Exchange with SOAPMessage into it and as per the SOAP
documentation I should be able to send SOAP message via JMS , but as per
document  JMS can take only few types ?
I was expecting that CAMEL might have some internal Converter like  
MessageTransformer.SOAPMessageIntoJMSMessage(soapMessage, session);
which help in converting the message . I tried Spring Converter but it
doesnt not convert actually. 

<route id="jmsroute">
        
        <from   uri="direct:jmsDirect"/>
        <log message=" jmsDirect  .... "/>
        <to
uri="activemq:topic:exampleTopic?messageConverter=#jmsMsgConverter"  
pattern="InOnly" />
        
        <transform>
                <constant>OK</constant>
        </transform>
        <log message=" Processing Done Going to Marshal The Object  .... "/>
          
         
        <onException>
            <exception>java.lang.Exception</exception>
            <log message="Exception occured ${exception.message}"/>
            <to uri="bean:exceptionHandler"/>
        </onException>
        <log message="Route staxBroadcastRequestProcessRoute COMPLETED. ....
" loggingLevel="DEBUG"/>
    </route>

Please suggest me any option , I can surely unmarshel and get the details
form the SOAP message but i dont want to do that as that is not our
requirement. we dont need to looking into the message 

thanks
Sanjay G 






--
View this message in context: http://camel.465427.n5.nabble.com/Exchange-has-SOAPMessage-want-to-Send-to-JMS-Topic-tp5776268.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message