4

问题的背景:

我使用了一个矿外机构公开的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 目录树中,并在物理上位于(在我的 PC 中)的“类”文件夹中复制其他 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

如果您能给我一些想法,我将不胜感激问题的根源或解决问题的任何方法

4

1 回答 1

4

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

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

使用第三方 JAX-WS Web 服务引擎

于 2012-01-24T20:47:20.773 回答