无法使用 apache CXF 建立安全的 SOAP 服务器时加载类 org.eclipse.jetty.server.



我正在尝试将安全的 SOAP 服务器发布为 JBoss Fuse 骆驼路由的消费端点。我的蓝图配置中有以下端点和码头安全描述:

...
<cxf:cxfEndpoint
        xmlns:crm="http://www.bank.com/CRM"
        id="crmOutboundService"
        address="https://localhost:9001/cxf/CRMOutbound"
        serviceName="crm:CRMOutboundRq"
        endpointName="crm:ASBOCRMOutPort"
        wsdlURL="model/ASBOCRMOut/CRMOutboundRq.wsdl"
        serviceClass="com.bank.SAXSourceService">
    <cxf:properties>
        <entry key="dataFormat" value="PAYLOAD"/>
    </cxf:properties>
</cxf:cxfEndpoint>
<httpj:engine-factory bus="cxf">
    <httpj:engine port="9001">
        <httpj:tlsServerParameters secureSocketProtocol="TLSv1">
            <sec:keyManagers keyPassword="password">
                <sec:keyStore type="JKS" password="password"
                file="/opt/esb/security/keystore.jks"/>
            </sec:keyManagers>
            <sec:trustManagers>
                <sec:keyStore type="JKS" password="password"
                              file="/opt/esb/security/truststore.jks"/>
            </sec:trustManagers>
            <sec:cipherSuitesFilter>
                <sec:include>.*_WITH_3DES_.*</sec:include>
                <sec:include>.*_WITH_DES_.*</sec:include>
                <sec:exclude>.*_WITH_NULL_.*</sec:exclude>
                <sec:exclude>.*_DH_anon_.*</sec:exclude>
            </sec:cipherSuitesFilter>
            <sec:clientAuthentication want="true" required="true"/>
        </httpj:tlsServerParameters>
    </httpj:engine>
</httpj:engine-factory>
...

手册中的所有内容都从这里开始:https://access.redhat.com/documentation/en-us/red_hat_jboss_fuse/6.2/pdf/apache_cxf_security_guide/Red_Hat_JBoss_Fuse-6.2-Apache_CXF_Security_Guide-en-US.pdf

我在pom.xml中有以下依赖项:

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-blueprint</artifactId>
</dependency>
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-cxf</artifactId>
</dependency>
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-transports-http-jetty</artifactId>
</dependency>    

当应用程序捆绑包部署到 JBoss Fuse 中时,会出现以下异常:

org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to load class org.eclipse.jetty.server.Connector from recipe MapRecipe[name='#recipe-11850']"

问题是:为什么会发生这样的错误,在 JBoss Fuse 中建立安全 SOAP 服务器的正确方法是什么?

我们最终将以下指令添加到蓝图描述符中:

<bean id="server" class="org.eclipse.jetty.server.Server"/>

错误已经消失,应用程序工作正常,但我们实际上并不明白为什么,因为没有任何对新 bean 的引用。我们试图弄清楚,如果这个指令启动了Jetty服务器的新实例。

最新更新