问题描述
我正在使用Glassfish 4.0中的NetBeans 7.4开发Web服务客户端;主机服务器运行https(受保护).我可以成功访问NetBeans中的WSDL并生成所需的类.问题是我得到一个错误:
I am developing a web service client with NetBeans 7.4 in Glassfish 4.0; The host server runs https (secured). I could access the WSDL in NetBeans successfully and generated the required classes. The problem is that I get a error:
com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code 403: Forbidden
当我将应用程序部署到Glassfish 4.0中时.有趣的是,当我部署到Tomcat中或以Java桌面应用程序开发,构建和运行时,不会发生此问题.
when I deploy my application into Glassfish 4.0. Interestingly, this problem does not occur when I deploy into Tomcat or when I develop, build and run as a Java Desktop application.
我需要在Glassfish上进行一些设置吗?我注意到我要访问的主机服务器使用了Verisign证书.任何帮助将不胜感激!
Is there some setup I need to do on Glassfish? I noticed the host server I am accessing uses a Verisign Certificate.Any help will be very much appreciated!
推荐答案
好吧,到处搜索解决方案之后;我从得到提示,我在Glassfish 3.1上的应用程序将赢得通过从默认glassfish域的jvm选项中删除-Dcom.sun.enterprise.security.httpsOutboundKeyAlias = s1来执行客户端身份验证
Well, after searching everywhere for a solution; I got the hint from My application on Glassfish 3.1 won't perform client authentication by removing -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as from the default glassfish domain's jvm option
谢谢!
这篇关于从Glassfish 4调用https Web服务返回HTTPS 403错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!