Jboss Fuse CXF请求/响应
我试图在JBoss Fuse for CXF-WS中创建一个非常简单的服务,但是我对响应消息有问题。请求被正确调用,spring camel路由工作正常,但响应始终包含一个空白的“SOAP Body”标记。以下是我对这项服务所做的: 使用wsdl2java.ext创建java对象模型 使用camel公开了一个CXF-WS 调用骆驼路由中的处理器组件以创建响应消息。的消息类型与我仅使用生成的对象工厂创建的接口所期望的一样。 以下是我创建的骆驼路线:Jboss Fuse CXF请求/响应,jboss,apache-camel,jbossfuse,Jboss,Apache Camel,Jbossfuse,我试图在JBoss Fuse for CXF-WS中创建一个非常简单的服务,但是我对响应消息有问题。请求被正确调用,spring camel路由工作正常,但响应始终包含一个空白的“SOAP Body”标记。以下是我对这项服务所做的: 使用wsdl2java.ext创建java对象模型 使用camel公开了一个CXF-WS 调用骆驼路由中的处理器组件以创建响应消息。的消息类型与我仅使用生成的对象工厂创建的接口所期望的一样。 以下是我创建的骆驼路线: <camelContext xmlns="
<camelContext xmlns="http://camel.apache.org/schema/spring" >
<!-- Define the CXF End-point -->
<endpoint id="bookMartEndpoint" uri="cxf:http://localhost:8200/OnlineBookMart">
<property key="serviceClass" value="org.jbossfusesamples.bookmart.BookMart" />
</endpoint>
<!-- Define the entity for bookmart set Query -->
<endpoint uri="sql:select * from bookmart" id="getBookQuery" >
<property key="dataSource" value="datasourceBean"/>
</endpoint>
<!-- Define the camel route -->
<route id="WSGateway" >
<from ref="bookMartEndpoint" />
<recipientList>
<simple>direct:${header.operationName}</simple>
</recipientList>
</route>
<!-- Implement the getBook operation -->
<route id="getBookRoute" >
<from uri="direct:getBook"/>
<log message="Route : direct -> getBook" />
<process ref="getBookProcessor" />
<log message="${body}" />
</route>
</camelContext>
如果我在这里遗漏了什么,请告诉我。最后这个问题得到了解决,不幸的是,“cxf rt transports http jetty”的版本与我的camel cxf版本不兼容。一旦我更新了它,它就开始工作了。这是我的工作配置
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cxf</artifactId>
<version>2.15.1.redhat-620133</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http-jetty</artifactId>
<version> 3.0.6</version>
</dependency>
最后,这个问题得到了解决,不幸的是,“cxf rt transports http jetty”的版本与我的camel cxf版本不兼容。一旦我更新了它,它就开始工作了。这是我的工作配置
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cxf</artifactId>
<version>2.15.1.redhat-620133</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http-jetty</artifactId>
<version> 3.0.6</version>
</dependency>