Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Web services Java Glassfish-如何使用SSL web服务?_Web Services_Ssl_Glassfish - Fatal编程技术网

Web services Java Glassfish-如何使用SSL web服务?

Web services Java Glassfish-如何使用SSL web服务?,web-services,ssl,glassfish,Web Services,Ssl,Glassfish,我使用netbeans在Glassfish服务器上创建和部署SSL ejb hello world web服务,然后尝试(未成功)从java应用程序使用该服务 任何帮助都将不胜感激。下面是我所做的更多细节 我创建了一个HelloWorld(ejb)web服务 我将hello world web服务的安全服务选项设置为传输安全性(SSL) 我在glassfish 3.1上部署了web服务 我创建了一个java应用程序,添加了一个web服务客户端,该客户端使用wsdl使用hello world w

我使用netbeans在Glassfish服务器上创建和部署SSL ejb hello world web服务,然后尝试(未成功)从java应用程序使用该服务

任何帮助都将不胜感激。下面是我所做的更多细节


  • 我创建了一个HelloWorld(ejb)web服务
  • 我将hello world web服务的安全服务选项设置为传输安全性(SSL)
  • 我在glassfish 3.1上部署了web服务
  • 我创建了一个java应用程序,添加了一个web服务客户端,该客户端使用wsdl使用hello world web服务:https://localhost:8181/OanhWebService/OanhWebService?wsdl"
  • 当我尝试调用web服务时,出现以下错误: 线程“main”javax.xml.ws.soap.SOAPFaultException中出现异常:WSS1601:未满足安全要求-在策略中配置了传输绑定,但传入消息未启用SSL 当我尝试打开Web服务引用的“编辑Web服务属性”对话框时,在“服务质量”选项卡中只有一个选项“传输”,缺少选项“安全性”。 请帮忙!这是一项非常基本的任务,但出乎意料地花费了我很多时间。 非常感谢,, Tuc

  • 详情如下:

    -------------------工具版本---------------------------------

    Glassfish版本:3.1 Netbeans版本7.0 RC1(尝试了6.9.1和7 Beta版,7 Beta 2版,但遇到了相同的问题!) 地铁2.0

    ------------------已发布的WSDL---------------------------------------

    从web浏览器查看的WSDL:

    @命名空间html url(http://www.w3.org/1999/xhtml); :root{font:small-Verdana;font-weight:bold;padding:2em;padding-left:4em;}*{display:block;padding-left:2em;}html | style{display:none;}html | span,html | a{display:inline;padding:0;font-weight:normal;文本修饰:none;}html |显示:block;}*[html |隐藏],span.block[html |隐藏]{display:none;}展开{display:block;}。展开:在{content:'+'之前;颜色:红色;位置:绝对;左:-1em;}。折叠{display:block;}。折叠:在{content:'-'之前;颜色:红色;位置:绝对;左:-1em;} http://jax-ws.dev.java.net. RI的版本是Metro/2.1(Branchs/2.1-6728;2011-02-03T14:14:58+0000)JAXWS-RI/2.2.3 JAXWS/2.2。--> http://jax-ws.dev.java.net. RI的版本是Metro/2.1(Branchs/2.1-6728;2011-02-03T14:14:58+0000)JAXWS-RI/2.2.3 JAXWS/2.2。-->

    ----------------客户端站点的跟踪------------------------------------

    线程“main”javax.xml.ws.soap.SOAPFaultException中出现异常:WSS1601:未满足安全要求-在策略中配置了传输绑定,但传入消息未启用SSL 位于com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178) 位于com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:119) 位于com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108) 位于com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78) 位于com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107) $Proxy30.hello(未知来源) 在oanhejbwebserviceclient.oanhejbwebserviceclient.hello(oanhejbwebserviceclient.java:47) 位于oanhejbwebserviceclient.oanhejbwebserviceclient.main(oanhejbwebserviceclient.java:39) 原因:javax.xml.ws.soap.SOAPFaultException:WSS1601:未满足安全要求-策略中配置了传输绑定,但传入消息未启用SSL 位于com.sun.xml.ws.security.opt.impl.util.SOAPUtil.createSOAPFault(SOAPUtil.java:223) 在com.sun.xml.ws.security.opt.impl.util.SOAPUtil.getSOAPFaultException(SOAPUtil.java:215)上 位于com.sun.xml.wss.provider.wsit.WSITServerAuthContext.validateRequest(WSITServerAuthContext.java:379) 位于com.sun.xml.wss.provider.wsit.WSITServerAuthContext.validateRequest(WSITServerAuthContext.java:263) 位于com.sun.enterprise.security.webservices.commonServerSecurityType.processRequest(commonServerSecurityType.java:173) 位于com.sun.enterprise.security.webservices.commonServerSecurityType.process(commonServerSecurityType.java:144) 位于com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:119) 在com.sun.xml.ws.api.pipe.Fiber.\uu doRun(Fiber.java:641) 位于com.sun.xml.ws.api.pipe.Fiber.\u-doRun(Fiber.java:600) 位于com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585) 位于com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482) 位于com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:314) 位于com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:608) 位于com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:259) 位于com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:162) 位于org.glassfish.webservices.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:120) 位于org.glassfish.webservices.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:91) 位于org.glassfish.webservices.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:200) 位于org.glassfish.webservices.EjbWebServiceServlet.service(EjbWebServiceServlet.java:131) 位于javax.servlet.http.HttpServlet.service(HttpServlet.java:848) 位于com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.doFilter(ServletAdapter.java:1002) 位于com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.invokeFilterChain(ServletAdapter.java:942) 位于com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:404) 位于com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:354) 位于com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) 位于com.sun.enterprise.v3.server.HK2Dispatcher.dispatcher(HK2Dispatcher.java:117) 位于com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234) 位于com.sun.grizzly.http.ProcessorTask.InvokeApter(ProcessorTask.java:822) 在com.sun.grizzly