我正在使用 JBoss 5.1 GA 服务器并在 server.xml 中配置 SSL,如下所示。从 jsp 调用我的 CXF 客户端得到以下错误:
org.apache.cxf.service.factory.ServiceConstructionException
请帮我解决这个错误。另一件事是,同样的战争在 tomcat 7 服务器中成功运行。
server.xml 中的 SSL 配置:
<Connector protocol="HTTP/1.1" SSLEnabled="true"
port="8443" address="${jboss.bind.address}"
scheme="https" secure="true" clientAuth="false"
keystoreFile="${jboss.server.home.dir}/conf/mykeystore.jks"
keystorePass="q1234" sslProtocol = "TLSv1" />
我的客户代码:
System.setProperty("javax.net.ssl.keyStore",JksfilePath);
System.setProperty("javax.net.ssl.keyStorePassword",password);
System.setProperty("javax.net.ssl.trustStore",JksfilePath);
System.setProperty("javax.net.ssl.trustStorePassword",password);
RequestTransmitterService ss = new RequestTransmitterService(wsdlURL, SERVICE_NAME);
RequestTransmitterPortType port = ss.getRequestTransmitterPort(new AddressingFeature(false));
BindingProvider provider = (BindingProvider)port;
((BindingProvider) port).getRequestContext().put(
"set-jaxb-validation-event-handler",
"false");
provider.getRequestContext().put(
BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"https://test.state.us/dev/TransService");
port.RequestTransmitter(RequestTransmitter,
l_HeaderRequestType,
l_objTrnsmtReqDtlType);
我的战争库:
activemq-broker-5.9.1.jar
activemq-client-5.9.1.jar
activemq-openwire-legacy-5.9.1.jar
antlr-2.7.7.jar
aopalliance-1.0.jar
asm-3.3.1.jar
commons-codec-1.10.jar
commons-collections-3.2.1.jar
commons-lang-2.6.jar
cxf-core-3.0.4.jar
cxf-manifest.jar
cxf-rt-bindings-coloc-3.0.4.jar
cxf-rt-bindings-corba-3.0.4.jar
cxf-rt-bindings-object-3.0.4.jar
cxf-rt-bindings-soap-3.0.4.jar
cxf-rt-bindings-xml-3.0.4.jar
cxf-rt-databinding-aegis-3.0.4.jar
cxf-rt-databinding-jaxb-3.0.4.jar
cxf-rt-databinding-jibx-3.0.4.jar
cxf-rt-databinding-sdo-3.0.4.jar
cxf-rt-databinding-xmlbeans-3.0.4.jar
cxf-rt-features-clustering-3.0.4.jar
cxf-rt-frontend-jaxrs-3.0.4.jar
cxf-rt-frontend-jaxws-3.0.4.jar
cxf-rt-frontend-js-3.0.4.jar
cxf-rt-frontend-simple-3.0.4.jar
cxf-rt-javascript-3.0.4.jar
cxf-rt-management-3.0.4.jar
cxf-rt-rs-client-3.0.4.jar
cxf-rt-rs-extension-providers-3.0.4.jar
cxf-rt-rs-extension-search-3.0.4.jar
cxf-rt-rs-security-cors-3.0.4.jar
cxf-rt-rs-security-jose-3.0.4.jar
cxf-rt-rs-security-oauth-3.0.4.jar
cxf-rt-rs-security-oauth2-3.0.4.jar
cxf-rt-rs-security-sso-saml-3.0.4.jar
cxf-rt-rs-security-xml-3.0.4.jar
cxf-rt-rs-service-description-3.0.4.jar
cxf-rt-security-3.0.4.jar
cxf-rt-transports-http-3.0.4.jar
cxf-rt-transports-http-hc-3.0.4.jar
cxf-rt-transports-http-jetty-3.0.4.jar
cxf-rt-transports-http-netty-client-3.0
cxf-rt-transports-http-netty-server-3.0
cxf-rt-transports-jms-3.0.4.jar
cxf-rt-transports-local-3.0.4.jar
cxf-rt-transports-udp-3.0.4.jar
cxf-rt-ws-addr-3.0.4.jar
cxf-rt-ws-mex-3.0.4.jar
cxf-rt-ws-policy-3.0.4.jar
cxf-rt-ws-rm-3.0.4.jar
cxf-rt-ws-security-3.0.4.jar
cxf-rt-wsdl-3.0.4.jar
cxf-services-sts-core-3.0.4.jar
cxf-services-ws-discovery-api-3.0.4.jar
cxf-services-ws-discovery-service-3.0.4
cxf-services-wsn-api-3.0.4.jar
cxf-services-wsn-core-3.0.4.jar
cxf-tools-common-3.0.4.jar
cxf-tools-corba-3.0.4.jar
cxf-tools-java2ws-3.0.4.jar
cxf-tools-misctools-3.0.4.jar
cxf-tools-validator-3.0.4.jar
cxf-tools-wadlto-jaxrs-3.0.4.jar
cxf-tools-wsdlto-core-3.0.4.jar
cxf-tools-wsdlto-databinding-jaxb-3.0.4
cxf-tools-wsdlto-frontend-javascript-3.
cxf-tools-wsdlto-frontend-jaxws-3.0.4.j
cxf-xjc-boolean-3.0.2.jar
cxf-xjc-bug671-3.0.2.jar
cxf-xjc-dv-3.0.2.jar
cxf-xjc-javadoc-3.0.2.jar
cxf-xjc-runtime-3.0.2.jar
cxf-xjc-ts-3.0.2.jar
ehcache-2.8.5.jar
endorsed
FastInfoset-1.2.13.jar
geronimo-j2ee-management_1.1_spec-1.0.1
geronimo-javamail_1.4_spec-1.7.1.jar
geronimo-jaxws_2.2_spec-1.2.jar
geronimo-jta_1.1_spec-1.1.1.jar
hawtbuf-1.9.jar
httpasyncclient-4.0.2.jar
httpclient-4.3.5.jar
httpcore-4.3.3.jar
httpcore-nio-4.3.3.jar
integration
jasypt-1.9.2.jar
java-json.jar
javax.annotation-api-1.2.jar
javax.ws.rs-api-2.0.1.jar
jaxb-api-2.2.11.jar
jaxb-core-2.2.11.jar
jaxb-impl-2.2.11.jar
jaxb-xjc-2.2.11.jar
jcl-over-slf4j-1.7.9.jar
jettison-1.3.7.jar
jetty-continuation-8.1.15.v20140411.jar
jetty-http-8.1.15.v20140411.jar
jetty-io-8.1.15.v20140411.jar
jetty-security-8.1.15.v20140411.jar
jetty-server-8.1.15.v20140411.jar
jetty-util-8.1.15.v20140411.jar
joda-time-2.2.jar
js-1.7R2.jar
mina-core-2.0.9.jar
neethi-3.0.3.jar
oauth-20100527.jar
oauth-provider-20100527.jar
opensaml-2.6.1.jar
openws-1.5.1.jar
org.apache.commons.httpclient.jar
slf4j-api-1.7.9.jar
slf4j-jdk14-1.7.9.jar
spring-aop-3.2.3.RELEASE.jar
spring-beans-3.2.3.RELEASE.jar
spring-context-3.2.3.RELEASE.jar
spring-core-3.2.3.RELEASE.jar
spring-expression-3.2.3.RELEASE.jar
spring-jms-3.2.3.RELEASE.jar
spring-tx-3.2.3.RELEASE.jar
spring-web-3.2.3.RELEASE.jar
stax2-api-3.1.4.jar
velocity-1.7.jar
WHICH_JARS
woodstox-core-asl-4.4.1.jar
wsdl4j-1.6.3.jar
wss4j-bindings-2.0.3.jar
wss4j-policy-2.0.3.jar
wss4j-ws-security-common-2.0.3.jar
wss4j-ws-security-dom-2.0.3.jar
wss4j-ws-security-policy-stax-2.0.3.jar
wss4j-ws-security-stax-2.0.3.jar
xml-resolver-1.2.jar
xmlbeans-2.6.0.jar
xmlschema-core-2.2.1.jar
xmlsec-2.0.3.jar
xmltooling-1.4.1.jar
我的 web.xml-> 因为我是直接从 jsp 调用的,所以我将 web.xml 设置为空,如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
</web-app>