1

CXF フレームワークは初めてです。最近、CXF と Spring Endpoint を使用して Web サービスの作成に成功しました。私はWSDLの最初のアプローチを使用しています。Web サービスで SSL(https) を使用する方法を教えてください。私はトラストストアとキーストアについて考えています。Apache Tomcat サーバーを使用しています。以下は私のApplicationContext.xmlです->

<?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:cxf="http://cxf.apache.org/core"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
    http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
    http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"
default-autowire="byName">

 <!-- Service endpoint -->
<jaxws:endpoint id="CalculatorWebService"
        implementorClass="com.web.calculator.service.CalculatorContractImpl"
        implementor="#CalculatorImpl"
        address="/CalculatorWS">
</jaxws:endpoint>

<bean id="CalculatorImpl" class="com.web.calculator.service.CalculatorContractImpl"/>

ここでトラストストアの構成エントリをいくつか作成し、同様にいくつかのxmlでクライアント側のキーストアの構成を作成する必要があると思います。また、キーストアを使用するには Passwordcallback クラスが必要だと思います。

SSL を有効にするために必要な設定について教えてください。

あなたの助けは本当に感謝しています...

ありがとう...

4

1 に答える 1

0

これは、CXF で SSL を使用して必要なものをすべてセットアップする方法に関する優れたチュートリアルです。セクションを参照してくださいConfiguring SSL SupporthttpsTomcat で有効にすることを忘れないでください。完全な「これを行う方法」は、こちらで提供されています。まだ何も試していないと思います。すべてが非常に明確に説明されているため、これらの手順に従うだけで済みます。

于 2012-08-24T16:25:01.880 に答える