我使用keytool命令生成了自签名证书。并在jboss保险丝级别成功配置https,分配给它的端口为8443. https://localhost:8443/hawtio/login
完全正常。在apache cxf我面临问题。以下配置在blueprint xml文件中完成。
<cxf:rsServer address="http://0.0.0.0:9192/"
id="serviceOrderEndpoint" serviceClass="pk.com.telenor.so.controller.ServiceOrder"/>
<cxfcore:bus/>
<httpj:engine-factory bus="cxf">
<httpj:engine port="8443">
<httpj:tlsServerParameters secureSocketProtocol="TLSv1">
<sec:keyManagers keyPassword="password">
<sec:keyStore resource="certs/jbossfuse-dev.jks" password="password" type="JKS"/>
</sec:keyManagers>
<sec:trustManagers>
<sec:keyStore resource="certs/jbossfuse-dev.jks" password="password" type="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="false"/>
</httpj:tlsServerParameters>
</httpj:engine>
</httpj:engine-factory>
我想在https://localhost:9192/上运行它 在pom.xml文件中,我放置了以下依赖项:
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>9.3.0.M0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.cxf/cxf-rt-frontend-jaxws -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>2.5.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.cxf/cxf-rt-transports-http -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>2.2.3</version>
</dependency>
这是我面临的问题
Caused by: java.lang.ClassNotFoundException: org.apache.cxf.jaxb.JAXBDataBinding not found by org.apache.cxf.cxf-rt-wsdl
答案 0 :(得分:0)
当你说“在jboss保险丝级别配置https”时,我相信你的意思是你在$ JBOSS_FUSE / etc / org.ops4j.pax.web.cfg中配置。
然后,当您的cxf rs端点部署到JBoss FUSE容器中时,最佳做法是此端点使用由此容器管理的servlet传输(由OPS4J PAXWEB和jetty实现的HTTP OSGi服务),因此您的配置地址为cxf:rsServer应该是address =“/ myendpoint”之类的相对地址,然后你可以从中访问它
https://localhost:8443/cxf/myendpoint。
此外,由于https已在JBoss FUSE级别配置,因此您不需要
<httpj:engine-factory bus="cxf">
...
</httpj:engine-factory>
东西。
弗里曼