小编Sri*_*iks的帖子

如何在spring项目中读取属性文件?

在发布此问题之前,我谷歌从Spring项目获取属性(它不是基于Web的项目).我很困惑,因为每个人都在谈论application-context.xml并且配置类似

但是,我正在使用Spring正常的Java项目(没有Web应用程序和类似的东西).但我想从属性文件中获取一些常见属性,并且需要在JAVA文件中使用.如何通过使用Spring/Spring Annotations实现这一目标?

我应该在我的项目下配置myprops.properties文件以及如何通过spring调用?

我的理解是application-context.xml仅用于基于Web的项目.如果没有,我应该如何配置这个application-context.xml,因为我没有web.xml来定义application-context.xml

java spring properties spring-annotations

14
推荐指数
2
解决办法
8万
查看次数

PKIX路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到所请求目标的有效证书路径

我在Tomcat 7.x中通过TLS连接(https)进行Webservice调用

在调用WebService时,我得到了以下错误.会是什么问题?我尝试过创建证书和CA.

仅供参考 - https://sites.google.com/site/ddmwsst/create-your-own-certificate-and-ca

我导入了CA证书和其他证书,但我仍然遇到此问题.请指教.

Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'https://localhost:8443/myDomain/MyService?wsdl'.: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:262)
at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:205)
at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:92)
... 37 more
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1902)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:276)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:270)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1341)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:153)
    at …
Run Code Online (Sandbox Code Playgroud)

apache ssl tomcat

7
推荐指数
2
解决办法
3万
查看次数

如何为WebService创建Endpoint?

如何为Web服务创建端点?我是Web服务世界的初学者.

我有WSDL,我想基于该WSDL创建一个Web服务.我使用Apache CXF生成客户端存根.将其作为服务进行测试的后续步骤是什么?

我该如何创建EndPoints?

我如何在本地模仿WSDL soapbind地址并测试它?


让我澄清一下这个问题.看起来有混乱.谢谢@Buhake Sindi指出.

我已经获得了WSDL并通过在Eclipse中使用Apache CXF Framework生成了客户端存根.我需要测试WebService客户端代码是否有效.现在如何测试这种方法?我的WSDL URL目前无法正常工作.

如何测试我的客户端存根(来自生成的Impl类)?

我是否需要创建任何端点来模仿WSDL URL(现在没有运行)?

希望问题现在清楚......

java soap wsdl web-services cxf

5
推荐指数
1
解决办法
3604
查看次数

标签 统计

java ×2

apache ×1

cxf ×1

properties ×1

soap ×1

spring ×1

spring-annotations ×1

ssl ×1

tomcat ×1

web-services ×1

wsdl ×1