使用CXF前端以编程方式为restful Web服务配置SSL?
我有一个关于使用javax.xml.ws.Provider为CXF前端编程配置SSL的问题 基本上,我实现了一个简单的Restful Web服务,如使用CXF前端以编程方式为restful Web服务配置SSL?,ssl,cxf,configure,Ssl,Cxf,Configure,我有一个关于使用javax.xml.ws.Provider为CXF前端编程配置SSL的问题 基本上,我实现了一个简单的Restful Web服务,如 @WebServiceProvider() @ServiceMode(value = Service.Mode.PAYLOAD) public class RestWebServiceProvider implements Provider<DOMSource> { ... } 与CXF下载的示例文件夹中的restful_di
@WebServiceProvider()
@ServiceMode(value = Service.Mode.PAYLOAD)
public class RestWebServiceProvider implements Provider<DOMSource> {
...
}
与CXF下载的示例文件夹中的restful_dispatch示例项目完全相同
现在我试图实现的是以编程方式配置SSL,而不是使用XML
为什么??因此,可以在运行时从浏览器配置SSL,而无需重新启动web应用程序
我做了一些家庭作业,看到示例项目/jax\u rs/basic\u https正在这样做
static {
// set the configuration file
SpringBusFactory factory = new SpringBusFactory();
Bus bus = factory.createBus("ServerConfig.xml");
BusFactory.setDefaultBus(bus);
}
在ServerConfig.xml定义实际SSL配置的服务器类中。但这对于我的用例来说不够灵活
我已经在stackoverflow上做了一些挖掘,我发现的最好的链接似乎来自
我自己还没有尝试过这种方法,但我一直在想,这是不是你们专家所做的,或者是否有更好的方法
以前有没有人做过类似的事情,愿意分享一些建议
谢谢
萨姆
static {
// set the configuration file
SpringBusFactory factory = new SpringBusFactory();
Bus bus = factory.createBus("ServerConfig.xml");
BusFactory.setDefaultBus(bus);
}