简体   繁体   English

从服务器调用Web服务时出现SSL异常

[英]SSL exception when calling web service from server

I'm consuming a web service in a java class standalone and it works fine. 我在独立的Java类中使用了Web服务,并且工作正常。 I deployed that class as a part of a web-app in tomcat apache and it works fine. 我将该类部署为tomcat apache中的Web应用程序的一部分,并且运行良好。

Then, I deployed it in a glassfish server and I get this error: 然后,我将其部署在glassfish服务器中,并出现以下错误:

    WSS1601: Transport binding configured in policy but incoming message was not SSL enabled

I have several weeks stuck here. 我在这里呆了几个星期。 Seems like some glassfish setting doesn't accepts that my web-app uses a web service that works through HTTP (this is, and has to be the case). 似乎某些glassfish设置不接受我的Web应用程序使用通过HTTP工作的Web服务(确实如此,确实如此)。

The webservice client was made with the web service client wizard tool of netbeans (it uses wsimport-JAX-WS). Web服务客户端是使用netbeans的Web服务客户端向导工具制作的(它使用wsimport-JAX-WS)。 More details on the error trace from the server: 有关来自服务器的错误跟踪的更多详细信息:

    com.sun.xml.wss.impl.XWSSecurityRuntimeException: WSS1601: Transport binding configured in policy but incoming message was not SSL enabled
    at com.sun.xml.wss.impl.policy.verifier.MessagePolicyVerifier.verifyPolicy(MessagePolicyVerifier.java:125)

Has anybody else faced this issue? 还有其他人面对这个问题吗? Any help or ideas appreciated. 任何帮助或想法表示赞赏。


EDIT: I tried generating the stubs using the axis2 tool and it works great, so i'm sensing some kind of error in jax-ws when used in glassfish. 编辑:我尝试使用axis2工具生成存根,并且效果很好,所以在玻璃鱼中使用jax-ws时,我感觉到某种错误。

I guess you are trying to access the service enables with SSL. 我想您正在尝试通过SSL访问启用的服务。 Try invoking the service with https also you have to install the valid SSL certificate in the client JDK. 尝试使用https调用服务,否则您必须在客户端JDK中安装有效的SSL证书。 The following link explain how to obtain and install a signed certificate : https://docs.oracle.com/cd/E19798-01/821-1794/aeogl/index.html 以下链接说明了如何获取和安装签名证书: https : //docs.oracle.com/cd/E19798-01/821-1794/aeogl/index.html

Good luck :) 祝好运 :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM