要了解如何为camel
绑定配置cxf-jms
路由我正在this cxf-soap example中测试各种方法,但尚未成功:(
我希望从客户端收到的soap请求存储在activemq队列(请求队列)中,然后被分派到服务器。然后,服务器的响应应该首先存储在另一个队列(响应队列)中,然后按如下方式传递给客户端:
(client) soap request <-> activeMQ queue <-> soap responses (server)
我想知道如何在以下spring配置文件中添加camel context
,routes
,endpoints
等,以便让我为我工作,如上所述。
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<context:component-scan base-package="com.briansjavablog.accounts" />
<jaxws:server id="accountService"
address="http://localhost:8080/apache-cxf-demo/services/accounts">
<jaxws:serviceBean>
<bean class="com.briansjavablog.accounts.service.AccountServiceEndpoint" />
</jaxws:serviceBean>
<jaxws:inInterceptors>
<ref bean="loggingInInterceptor" />
</jaxws:inInterceptors>
<jaxws:outInterceptors>
<ref bean="loggingOutInterceptor" />
</jaxws:outInterceptors>
</jaxws:server>
<jaxws:client id="testAccountServiceClient"
address="http://localhost:8080/apache-cxf-demo/services/accounts"
serviceClass="com.briansjavablog.accounts.Accounts">
<jaxws:inInterceptors>
<ref bean="loggingInInterceptor" />
</jaxws:inInterceptors>
<jaxws:outInterceptors>
<ref bean="loggingOutInterceptor" />
</jaxws:outInterceptors>
</jaxws:client>
<bean id="abstractLoggingInterceptor" abstract="true">
<property name="prettyLogging" value="true" />
</bean>
<bean id="loggingInInterceptor" class="org.apache.cxf.interceptor.LoggingInInterceptor" parent="abstractLoggingInterceptor" />
<bean id="loggingOutInterceptor" class="org.apache.cxf.interceptor.LoggingOutInterceptor" parent="abstractLoggingInterceptor" />
</beans>
我已经看过一些例子,阅读了一些教程,尝试了很多,但无法解决问题:(
非常感谢任何帮助。