ssl - 如何在 WSDL First CXF Framework Web 服务中配置 SSL?

标签 ssl wsdl cxf top-down

我是 CXF 框架的新手。最近使用 CXF 和 Spring Endpoint 成功创建了 web 服务。我正在使用 WSDL 优先方法。您能否建议如何将 SSL(https) 用于 Web 服务。我对信任库和 keystore 有想法。我正在使用 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 中为 keystore 做一些类似的配置。另外我认为我需要一些 Passwordcallback 类来使用 keystore 。

能否请您帮助我进行启用 SSL 必须进行的配置。

非常感谢您的帮助...

谢谢...

最佳答案

Here is great tutorial how to set up everything you need with SSL in your CXF .请参阅部分配置 SSL 支持。 并且不要忘记在您的 tomcat 中启用 https。提供了完整的“如何执行此操作”here .我假设你还没有尝试任何东西。您需要做的就是按照这些步骤操作,因为所有内容都解释得很清楚。

关于ssl - 如何在 WSDL First CXF Framework Web 服务中配置 SSL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12027623/

相关文章:

c# - 使单个 WCF 服务同时支持 SOAP、REST 和 WSDL

java - Cxf Web服务设计问题

java - cxf:cxf-codegen-plugin:2.1.2:wsdl2java 失败:索引 2 处不透明部分中的非法字符

iphone - iPhone 上的 SSL 问题

ssl - 我的网站有 SSL 证书,但浏览器仍然显示连接不安全

Windup 工具中的 Java 到 Wsdl 映射

java - 在 JAX-WS 客户端 .jar 中嵌入 Web 服务的 WSDL

python - GEvent PyWSGI SSL 非常慢

SSL dns区别

web-services - 使用 WebServiceContext 测试 @Webservice EJB(使用 OpenEJB?)