gpt4 book ai didi

java - WAS 7.0 中带有 JAX WS-SUN 库的 Web 服务

转载 作者:搜寻专家 更新时间:2023-11-01 02:52:18 25 4
gpt4 key购买 nike

问题的背景:

我使用了一个矿外机构暴露的Web服务方法,该Web服务是由JAX WS-SUN生成的。为我的机构实现其他用于国内消费的 web 服务,它封装了外包商公开的方法,使用 JAX WS-SUN(不是 IBM),最初在识别某些 jar 时遇到了一些问题。尝试在服务器上设置共享库以将 jar 与类加载器 PARENT_LAST 一起使用,但没有用。使用 JAX WS-IBM 库尝试 reliza 但没有成功,因此使用 JAX WS-SUN(外部服务提供商使用的库)然后我找到了一个解决方案,使用 WAS 7.0 中包含的 sdk 目录树中的“endorsed”文件夹(该文件夹已经存在但为空),并复制“classes”文件夹中的其他 jar,这些文件夹位于(在我的电脑):

endorsed: E: \ IBM \ SDP \ jdk \ jre \ lib \ Endorsed
jar copied:
- saaj-api.jar
- Saaj-impl.jar
- Serializer-2.7.1.jar
- Stax-1.2.0.jar
- Stax-ex.jar
- Streambuffer.jar
- Xalan-2.7.1.jar
- XercesImpl-2.9.0.jar
- Xml-apis-1.3.04.jar

classes: E: \ IBM \ SDP \ runtimes \ base_v7 \ profiles \ AppSrv01 \ classes
jar copied:
- jaxb-api.jar
- Jaxb-impl.jar
- Jaxb-xjc.jar
- Jaxp-ri-1.4.2.jar
- Jaxws-api.jar
- Jaxws-rt.jar
- Jaxws-tools.jar
- Webservices-api.jar
- Webservices-rt.jar

使用安装在 Windows Server 2003 EE - 32 位上的 RSA 7.5 (Rational Software Architect) 中包含的 WAS 7.0 部署应用程序。到目前为止一切顺利,我的测试查询公开了方法并获得了预期的响应

问题:

当我将 EAR 部署到安装在 linux (RedHat) 内核 2.6.18 - 64 位上的 WAS 7.0 时出现问题。

在这种情况下,我不得不创建一个文件夹,它不是认可的目录,并将 jar 放在上面列出的每个目录中,这些目录实际位于:

Endorsed: / opt / IBM / WebSphere / AppServer / java / jre / lib / endorsed
classes: / opt/IBM/WebSphere/AppServer/profiles/AppSrv01/classes

然后我进行测试并跟踪给出了以下错误:

[01/20/2012 9:11:54] ERROR [class: pe.gob.pj.WsBiometriaImpl] error
javax.xml.ws.WebServiceException: java.lang.NoSuchMethodError: com / sun / xml / stream / buffer / Stax / StreamWriterBufferCreator.setCheckAttributeValue (Z) V
at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processRequest (SecurityClientTube.java: 170)
at com.sun.xml.ws.api.pipe.Fiber.__doRun (Fiber.java: 598)
at com.sun.xml.ws.api.pipe.Fiber._doRun (Fiber.java: 557)
at com.sun.xml.ws.api.pipe.Fiber.doRun (Fiber.java: 542)
at com.sun.xml.ws.api.pipe.Fiber.runSync (Fiber.java: 439)
at com.sun.xml.ws.client.Stub.process (Stub.java: 222)
at com.sun.xml.ws.client.sei.SEIStub.doProcess (SEIStub.java: 135)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke (SyncMethodHandler.java: 109)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke (SyncMethodHandler.java: 89)
at com.sun.xml.ws.client.sei.SEIStub.invoke (SEIStub.java: 118)
at $ Proxy158.login (Unknown Source)
at reniec.ws.AccessWS.loginWSBIO (AccessWS.java: 36)
at pe.gob.pj.WsBiometriaImpl.loginWSBIO (WsBiometriaImpl.java: 74)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java: 45)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java: 37)
at java.lang.reflect.Method.invoke (Method.java: 599)
com.sun.xml.ws.api.server.InstanceResolver at $ 1.invoke (InstanceResolver.java: 246)
com.sun.xml.ws.server.InvokerTube at $ 2.invoke (InvokerTube.java: 146)
at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke (EndpointMethodHandler.java: 257)
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest (SEIInvokerTube.java: 93)
at com.sun.xml.ws.api.pipe.Fiber.__doRun (Fiber.java: 598)
at com.sun.xml.ws.api.pipe.Fiber._doRun (Fiber.java: 557)
at com.sun.xml.ws.api.pipe.Fiber.doRun (Fiber.java: 542)
at com.sun.xml.ws.api.pipe.Fiber.runSync (Fiber.java: 439)
com.sun.xml.ws.server.WSEndpointImpl at $ 2.process (WSEndpointImpl.java: 243)
com.sun.xml.ws.transport.http.HttpAdapter at $ HttpToolkit.handle (HttpAdapter.java: 444)
at com.sun.xml.ws.transport.http.HttpAdapter.handle (HttpAdapter.java: 244)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle (ServletAdapter.java: 135)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet (WSServletDelegate.java: 129)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost (WSServletDelegate.java: 160)
at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost (WSServlet.java: 75)
at javax.servlet.http.HttpServlet.service (HttpServlet.java: 738)
at javax.servlet.http.HttpServlet.service (HttpServlet.java: 831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service (ServletWrapper.java: 1657)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest (ServletWrapper.java: 939)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest (ServletWrapper.java: 502)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest (ServletWrapperImpl.java: 179)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest (CacheServletWrapper.java: 91)
at com.ibm.ws.webcontainer.WebContainer.handleRequest (WebContainer.java: 864)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest (WSWebContainer.java: 1583)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready (WCChannelLink.java: 186)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination (HttpInboundLink.java: 445)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest (HttpInboundLink.java: 504)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest (HttpInboundLink.java: 301)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete (HttpICLReadCallback.java: 83)
at
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)
com.ibm.io.async.ResultHandler at $ 2.run (ResultHandler.java: 905)
at com.ibm.ws.util.ThreadPool $ Worker.run (ThreadPool.java: 1604)
Caused by: java.lang.NoSuchMethodError: com / sun / xml / stream / buffer / Stax / StreamWriterBufferCreator.setCheckAttributeValue (Z) V
at com.sun.xml.ws.security.opt.impl.message.SOAPBody.cachePayLoad (SOAPBody.java: 204)
at com.sun.xml.ws.security.opt.impl.dsig.SignedMessagePart.writeTo (SignedMessagePart.java: 147)
at com.sun.xml.ws.security.opt.impl.crypto.JAXBDataImpl.writeTo (JAXBDataImpl.java: 117)
at com.sun.xml.ws.security.opt.crypto.dsig.Exc14nCanonicalizer.transform (Exc14nCanonicalizer.java: 181)
at com.sun.xml.ws.security.opt.crypto.dsig.Transform.transform (Transform.java: 178)
at com.sun.xml.ws.security.opt.crypto.dsig.Reference.transform (Reference.java: 183)
at com.sun.xml.ws.security.opt.crypto.dsig.Reference.digest (Reference.java: 124)
at com.sun.xml.ws.security.opt.crypto.dsig.Signature.sign (Signature.java: 214)
at com.sun.xml.ws.security.opt.impl.dsig.SignatureProcessor.sign (SignatureProcessor.java: 122)
at com.sun.xml.wss.impl.filter.SignatureFilter.sign (SignatureFilter.java: 544)
at com.sun.xml.wss.impl.filter.SignatureFilter.process (SignatureFilter.java: 506)
at com.sun.xml.wss.impl.HarnessUtil.processWSSPolicy (HarnessUtil.java: 93)
at com.sun.xml.wss.impl.HarnessUtil.processDeep (HarnessUtil.java: 268)
at com.sun.xml.wss.impl.SecurityAnnotator.processMessagePolicy (SecurityAnnotator.java: 186)
at com.sun.xml.wss.impl.SecurityAnnotator.secureMessage (SecurityAnnotator.java: 147)
at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.secureOutboundMessage (SecurityTubeBase.java: 390)
at
at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processRequest (SecurityClientTube.java: 167)
... 53 more

如果您能告诉我问题的根源或任何解决方法,我将不胜感激

最佳答案

听起来您创建的认可目录可能未被识别。

IBM 在其 WAS 7.0 文档中推荐了一种不同的方法。

Using a third-party JAX-WS Web services engine

关于java - WAS 7.0 中带有 JAX WS-SUN 库的 Web 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8992880/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com