当前位置: 首页 > 面试题库 >

从Websphere 8.5.5.2访问ssl Web服务

沈单弓
2023-03-14
问题内容

我们有一个Java Web应用程序,我们需要访问一个Web服务,它是一个https Web服务。所以我将ssl证书添加到Websphere;

SSL证书和密钥管理>密钥库和证书> NodeDefaultKeyStore>签署者证书

SSL证书和密钥管理>密钥库和证书> NodeDefaultTrustStore>签署者证书

当应用程序尝试访问Web服务时,将引发如下异常:

tr.biznet.msign.service.signature.SignatureException: Mobil signature certificate query is failed. Unknown error.
    at tr.biznet.msign.service.signature.SignatureService.queryMobileSignCertificateRef(SignatureService.java:440)
    at tr.biznet.msign.controller.signature.BsspController.queryMobileSignCertificateRef(BsspController.java:227)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:434)
    at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:372)
    at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
    at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:806)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:736)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:360)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97)
    at tr.biznet.msign.controller.NoCacheFilter.doFilter(NoCacheFilter.java:68)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:960)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1064)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3837)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:981)
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1864)
  Caused by: javax.xml.ws.WebServiceException: The following WSDL exception occurred: WSDLException: faultCode=WSDL4JWrapper : : javax.wsdl.WSDLException: WSDLException: faultCode=WSDL4JWrapper : : java.io.IOException: Server returned HTTP response code: 500 for URL: WEBSERVICELINK
    at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:173)
    at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70)
    at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.setupWsdlDefinition(ServiceDescriptionImpl.java:1202)
    at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.(ServiceDescriptionImpl.java:249)
    at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.(ServiceDescriptionImpl.java:172)
    at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:143)
    at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:79)
    at org.apache.axis2.jaxws.description.DescriptionFactory.createServiceDescription(DescriptionFactory.java:78)
    at org.apache.axis2.jaxws.spi.ServiceDelegate.(ServiceDelegate.java:218)
    at org.apache.axis2.jaxws.spi.Provider.createServiceDelegate(Provider.java:83)
    at org.apache.axis2.jaxws.spi.Provider.createServiceDelegate(Provider.java:79)
    at javax.xml.ws.Service.(Service.java:57)
    at com.turkcelltech.mobilesignature.validation.soap.MSSProfileQueryService.(MSSProfileQueryService.java:50)
    at tr.biznet.msign.service.signature.SignatureService.queryMobileSignCertificateRef(SignatureService.java:411)
    ... 50 more
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=WSDL4JWrapper : : javax.wsdl.WSDLException: WSDLException: faultCode=WSDL4JWrapper : : java.io.IOException: Server returned HTTP response code: 500 for URL: WEBSERVICELINK
    at org.apache.axis2.jaxws.util.WSDL4JWrapper.commonPartsURLConstructor(WSDL4JWrapper.java:234)
    at org.apache.axis2.jaxws.util.WSDL4JWrapper.(WSDL4JWrapper.java:156)
    at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.setupWsdlDefinition(ServiceDescriptionImpl.java:1182)
    ... 61 more
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=WSDL4JWrapper : : java.io.IOException: Server returned HTTP response code: 500 for URL: WEBSERVICELINK
    at org.apache.axis2.jaxws.util.WSDL4JWrapper.commonPartsURLConstructor(WSDL4JWrapper.java:203)
    ... 63 more
Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: WEBSERVICELINK
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1479)
    at com.ibm.net.ssl.www2.protocol.https.b.getInputStream(b.java:63)
    at org.apache.axis2.jaxws.util.WSDL4JWrapper$14.run(WSDL4JWrapper.java:974)
    at org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:132)
    at org.apache.axis2.jaxws.util.WSDL4JWrapper.getInputStream(WSDL4JWrapper.java:971)
    at org.apache.axis2.jaxws.util.WSDL4JWrapper.commonPartsURLConstructor(WSDL4JWrapper.java:189)
    ... 63 more

我屏蔽了专用Web服务地址(WEBSERVICELINK),另一方面,我使用weblogic和tomcat测试了该应用程序。我可以访问安全的Web服务。

所以我需要有关Websphere的帮助。有什么配置吗?


问题答案:

问题

IBM将自己的Axis框架用于Web服务客户端。问题是,当您将第三方库用于Web服务客户端时,(Axis2,jax-
ws)客户端代码由第三方库生成。生成的代码和was库之间可能会有差异。

首先为您的应用程序使用本地类加载器。(WAS管理控制台)

企业应用程序>“ your_app”>管理模块>“ module_name”>定制属性

添加:com.ibm.websphere.webservices.DisableIBMJAXWSEngine = true

企业应用程序>“ your_app”>管理模块>“ module_name”

选择:“本地类加载器优先(父最后一个)”

企业应用程序>“ your_app”>类加载器

滴答:覆盖Web和EJB模块的类重载设置滴答:首先用本地类装载器(父最后一个)装载的类滴答:应用程序中每个WAR文件的类装载器



 类似资料:
  • 我已经构建了一些自定义封送器,我正在尝试访问消息服务。我有以下代码。 Resources.groovy 我得到以下异常 无法对空对象调用方法getMessage()。Stacktrace如下:java.lang.nullpointerException:无法在org.hri.leaverequest.marshaller.errorsmarshaller$_register_closure1_cl

  • 问题内容: 我正在制作一个打算在PC上本地运行的html页面,最好不要在本地服务器上运行(file://)。我还使用jQuery使操作/ AJAX更加容易。 我正在尝试从twitter API加载2个结果,但出现错误。代码如下: 我也尝试了以下代码,但没有改变结果。 我在chrome中(在本地服务器上)收到以下错误: 或(带有file://链接) 有谁知道我该如何解决? 问题答案: 您遇到了同源策

  • 问题内容: 我需要在本地使用数据库。我已经使用Visual Studio 2012在(LocalDB)\ v11.0 Server中创建了数据库。从例如控制台应用程序进行连接时,一切正常。但是我的应用程序是Windows Service。尝试通过以下方式连接到我的数据库输出: 有什么解决办法吗?也许我应该考虑为此设置其他数据库服务器?如果是,如何设置它使其仅在本地可见? 问题答案: 所以我自己找到

  • 问题内容: 我正在尝试从jQuery客户端访问wcf服务 具体来说,此示例 http://www.codeproject.com/KB/aspnet/WCF_JQUERY_ASMX.aspx#4 当客户端网页与服务位于同一域时,所有方法都可以正常工作 一旦我将客户端网页移到另一个域,它就会中断。无法到达服务,请求失败 所有示例(ASMX,REST和WCF)都会发生这种情况 任何想法如何使这个跨岛工

  • 我无法从外部访问我的服务。首先,这里是我的conf yaml文件: nginx-pod.yaml nginx-service.yaml metallb-config.yaml 然后我创建了集群。命令 打印: 一切正常,而且< code > ku bectl describe service/nginx-service 打印: curl命令在主服务器打印。接下来我试图从另一个网络打开,它不起作用,但

  • 我已经为windows server设置了Service bus 1.1,并尝试使用以下代码访问它。 如果我从控制台应用程序运行代码,这很好,但是如果我将其放在windows服务中,并在本地服务或本地系统下运行,则代码会在尝试检查队列是否存在于下一行namespaceManager中时引发以下异常。QueueExists(queuename)。 有人能帮我理解我做错了什么吗?