如何实现与 cxf 端点的 Spring 集成



我们有现有的端点(cxf:cxfEndpoint(,现在我们必须从这个现有的端点调用spring集成应用程序,我找到了一些使用jaxws端点的例子,但无法使用cxfendpoint找到。你能通过提供一些参考或示例代码来帮助我吗?

我不

熟悉 CXF(我们有 Spring WS(,但我相信这个概念就像将一些 POJO 方法调用包装到该端点。

Spring 集成提供了一个@MessagingGateway抽象,其中包含一个标有一些注释的接口,以便在调用此接口上的方法时将消息发送到通道。

因此,一方面您为 Spring 集成配置这样的网关,另一方面使用此接口的实例(bean(包装到 CXF 端点中。

我在这样的春季项目中将骆驼与 cxf 一起使用。 也许它很有用。

<?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:jaxws="http://cxf.apache.org/jaxws" 
   xmlns:wsa="http://cxf.apache.org/ws/addressing"
   xmlns:cxf="http://camel.apache.org/schema/cxf"
   xmlns:soap="http://cxf.apache.org/bindings/soap"
   xmlns:camel="http://camel.apache.org/schema/spring"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
                        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/ws/addressing http://cxf.apache.org/schemas/ws/addressing.xsd http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.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">

<cxf:cxfEndpoint id="CXFTest" address="/javainuse/learn"
                 endpointName="a:SOATestEndpoint" serviceName="a:SOATestEndpointService"
                 serviceClass="com.javainuse.SOATestEndpoint"
                 xmlns:a ="http://javainuse.com">
    <cxf:binding>
        <soap:soapBinding mtomEnabled="false" version="1.2" />
    </cxf:binding>
    <cxf:features>
        <wsa:addressing  xmlns:wsa="http://cxf.apache.org/ws/addressing"/>
    </cxf:features>
</cxf:cxfEndpoint>

最新更新