我创建了一个简单的spring引导应用程序,它调用提供的soapweb服务。
http一切正常。如果使用https,spring会将其写入日志文件,然后停止执行任何操作:
18 November 09:50:11 SERVERNAME java [26150]: 2020-11-18 09:50:11.503 INFO 26150 --- [ main] o.a.c.w.s.f.ReflectionServiceFactoryBean : Create Service {http://xmlns.COMPANY.com/SOME/SERVICE/1.0}SERVICEWebServiceServiceServiceService from WSDL: https://mule.COMPANY.com/SERVICE-services?wsdl
我使用ApacheCxf版本3.1.5和spring boot版本1.5.18.release
当直接从服务器使用curl时,url返回与http和https相同的wsdl文件。
我创建bean如下:
@Bean(name = "SERVICEWebService")
public SERVICEWebService SERVICEWebService() {
JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean();
factoryBean.setServiceClass(SERVICEWebService.class);
factoryBean.setAddress(address);
factoryBean.setProperties(Collections.singletonMap("set-jaxb-validation-event-handler", Boolean.FALSE));
factoryBean.setWsdlURL(address + "?wsdl");
return (SERVICEWebService) factoryBean.create();
}
这是启用调试的日志文件:
2020-11-18 10:24:02.084 INFO 28879 --- [main] o.a.c.w.s.f.ReflectionServiceFactoryBean : Creating Service {http://xmlns.COMPANY.com/SOME/SERVICE/1.0}SERVICEWebServiceService from WSDL: https://mule-test.COMPANY.de/SOME-services?wsdl
2020-11-18 10:24:02.168 DEBUG 28879 --- [main] o.a.cxf.resource.DefaultResourceManager : resolving resource <org.apache.cxf.wsdl11.WSDLManagerImpl/bus> type <interface org.apache.cxf.Bus>
2020-11-18 10:24:02.168 DEBUG 28879 --- [main] o.a.cxf.resource.DefaultResourceManager : resolving resource <null> type <interface org.apache.cxf.Bus>
2020-11-18 10:24:02.366 DEBUG 28879 --- [main] o.apache.cxf.transport.http.HTTPConduit : Conduit '{http://cxf.apache.org}TransportURIResolver.http-conduit' has been (re)configured for plain http.
2020-11-18 10:24:02.367 DEBUG 28879 --- [main] o.apache.cxf.transport.http.HTTPConduit : No Trust Decider configured for Conduit '{http://cxf.apache.org}TransportURIResolver.http-conduit'
2020-11-18 10:24:02.367 DEBUG 28879 --- [main] o.apache.cxf.transport.http.HTTPConduit : No Auth Supplier configured for Conduit '{http://cxf.apache.org}TransportURIResolver.http-conduit'
2020-11-18 10:24:02.367 DEBUG 28879 --- [main] o.apache.cxf.transport.http.HTTPConduit : Conduit '{http://cxf.apache.org}TransportURIResolver.http-conduit' has been configured for plain http.
2020-11-18 10:24:02.368 DEBUG 28879 --- [main] o.apache.cxf.transport.http.HTTPConduit : registering incoming observer: org.apache.cxf.transport.TransportURIResolver$1@4983159f
2020-11-18 10:24:02.509 DEBUG 28879 --- [main] o.a.c.t.https.HttpsURLConnectionFactory : The location of the key store has not been set via a system parameter or through configuration so the default value of /home1/users/tomcat/.keystore will be used.
2020-11-18 10:24:02.511 DEBUG 28879 --- [main] o.a.c.t.https.HttpsURLConnectionFactory : The key store password has not been set via a system property or through configuration, reading data from the keystore will fail.
2020-11-18 10:24:02.511 DEBUG 28879 --- [main] o.a.c.t.https.HttpsURLConnectionFactory : The key password has not been set via a system property or through configuration, reading data from the keystore will fail.
2020-11-18 10:24:02.511 DEBUG 28879 --- [main] o.a.c.t.https.HttpsURLConnectionFactory : No default keystore /home1/users/tomcat/.keystore
2020-11-18 10:24:02.517 DEBUG 28879 --- [main] o.a.c.t.https.HttpsURLConnectionFactory : The cipher suites have been set to [Ljava.lang.String;@c35172e.
2020-11-18 10:24:02.590 DEBUG 28879 --- [main] org.apache.cxf.transport.http.Headers : Accept: */*
2020-11-18 10:24:02.590 DEBUG 28879 --- [main] o.apache.cxf.transport.http.HTTPConduit : No Trust Decider for Conduit '{http://cxf.apache.org}TransportURIResolver.http-conduit'. An afirmative Trust Decision is assumed.
2020-11-18 10:24:02.743 DEBUG 28879 --- [main] s.n.www.protocol.http.HttpURLConnection : sun.net.www.MessageHeader@a4ca3f68 pairs: {GET /SOME-services?wsdl HTTP/1.1: null}{Content-Type: text/xml}{Accept: */*}{User-Agent: Apache CXF 3.1.5}{Cache-Control: no-cache}{Pragma: no-cache}{Host: mule-test.COMPANY.de}{Connection: keep-alive}
2020-11-18 10:24:02.764 DEBUG 28879 --- [main] s.n.www.protocol.http.HttpURLConnection : sun.net.www.MessageHeader@72ea61938 pairs: {null: HTTP/1.1 200}{Date: Wed, 18 Nov 2020 09:24:02 GMT}{Server: Apache}{APPDYNAMICS_GUID: 46c19ad2-88a1-46f6-9b69-ba4e7ebda94e}{Content-Length: 32231}{Content-Type: text/xml}{Keep-Alive: timeout=15, max=100}{Connection: Keep-Alive}
2020-11-18 10:24:02.988 DEBUG 28879 --- [main] o.apache.cxf.transport.http.HTTPConduit : Conduit '{http://cxf.apache.org}TransportURIResolver.http-conduit' has been (re)configured for plain http.
2020-11-18 10:24:02.989 DEBUG 28879 --- [main] o.apache.cxf.transport.http.HTTPConduit : No Trust Decider configured for Conduit '{http://cxf.apache.org}TransportURIResolver.http-conduit'
2020-11-18 10:24:02.989 DEBUG 28879 --- [main] o.apache.cxf.transport.http.HTTPConduit : No Auth Supplier configured for Conduit '{http://cxf.apache.org}TransportURIResolver.http-conduit'
2020-11-18 10:24:02.989 DEBUG 28879 --- [main] o.apache.cxf.transport.http.HTTPConduit : Conduit '{http://cxf.apache.org}TransportURIResolver.http-conduit' has been configured for plain http.
2020-11-18 10:24:02.989 DEBUG 28879 --- [main] o.apache.cxf.transport.http.HTTPConduit : registering incoming observer: org.apache.cxf.transport.TransportURIResolver$1@4b629f13
2020-11-18 10:24:02.995 DEBUG 28879 --- [main] o.a.c.t.https.HttpsURLConnectionFactory : The cipher suites have been set to [Ljava.lang.String;@70925b45.
2020-11-18 10:24:02.995 DEBUG 28879 --- [main] org.apache.cxf.transport.http.Headers : Accept: */*
2020-11-18 10:24:02.996 DEBUG 28879 --- [main] o.apache.cxf.transport.http.HTTPConduit : No Trust Decider for Conduit '{http://cxf.apache.org}TransportURIResolver.http-conduit'. An afirmative Trust Decision is assumed.
2020-11-18 10:24:55.479 DEBUG 28879 --- [ContainerBackgroundProcessor[StandardEngine[Tomcat]]] org.apache.catalina.session.ManagerBase : Start expire sessions StandardManager at 1605691495478 sessioncount 0
2020-11-18 10:24:55.479 DEBUG 28879 --- [ContainerBackgroundProcessor[StandardEngine[Tomcat]]] org.apache.catalina.session.ManagerBase : End expire sessions StandardManager processingTime 1 expired sessions: 0
2020-11-18 10:25:03.033 DEBUG 28879 --- [main] o.a.cxf.resource.DefaultResourceManager : resolving resource <https://flb-test-par.COMPANY.de:38000/SOME-services?xsd=SERVICE.xsd> as stream
2020-11-18 10:25:55.481 DEBUG 28879 --- [ContainerBackgroundProcessor[StandardEngine[Tomcat]]] org.apache.catalina.session.ManagerBase : Start expire sessions StandardManager at 1605691555480 sessioncount 0
2020-11-18 10:25:55.481 DEBUG 28879 --- [ContainerBackgroundProcessor[StandardEngine[Tomcat]]] org.apache.catalina.session.ManagerBase : End expire sessions StandardManager processingTime 1 expired sessions: 0
暂无答案!
目前还没有任何答案,快来回答吧!