web services - Axis2 webservice client weblogic webservice c



我的应用程序是部署在weblogic 10中的战争。在我的一个班级中,我需要进行 2 次 Web 服务调用 A 和 W。A 基于 AXIS2 使用 wstx-asl-3.2.4.jar,W 基于 weblogic webservice 在 weblogic 中使用 jar。我想由于 wstx-asl 和 weblogic stax 实现之间的冲突,它们不能同时进行。以下是问题的详细信息:1. 如果我从 web-inf/lib 文件夹中删除 wstx-asl-3.2.4.jar,B 正常,但 A 由于异常而失败:ClassCastException:weblogic.xml.stax.XMLStreamInputFactory2. 如果我将 wstx-asl-3.2.4.jar 保存在 web-inf/lib 文件夹中,A 正常,但 B 由于异常而失败: [java.lang.ExceptionInInitializerError at com.bea.staxb.runtime.internal.BindingContextImpl.createMarshaller(BindingContextImpl.java:65) at weblogic.wsee.bind.runtime.internal.LiteralSerializerContext.(LiteralSerializerContext.java:54) at weblogic.wsee.bind.runtime.internal.RuntimeBindingsImpl.createSerializerContext(RuntimeBindingsImpl.java:152) at weblogic.wsee.bind.runtime.internal.RuntimeBindingsImpl.createSerializerContext(RuntimeBindingsImpl.java:168) at weblogic.wsee.codec.soap11.SerializationContextUtil.createSerializerContext(SerializationContextUtil.java:26) at weblogic.wsee.codec.soap11.SoapEncoder.encodeParts(SoapEncoder.java:179) at weblogic.wsee.codec.soap11.SoapEncoder.encode(SoapEncoder.java:119) at weblogic.wsee.codec.soap11.SoapCodec.encode(SoapCodec.java:128) at weblogic.wsee.ws.dispatch.client.CodecHandler.encode(CodecHandler.java:52) at weblogic.wsee.ws.dispatch.client.CodecHandler.handleRequest(CodecHandler.java:41) at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:123) at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:99) at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:101) at weblogic.wsee.ws.WsStub.invoke(WsStub.java:89) at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:331) at ......................... 请告知如何使他们一起成功。谢谢。

在部署 weblogic.xml 文件中,使用 <prefer-web-inf-classes> 标记并将其设置为 Axis2 调用的 true。并将其设置为 false 对于 weblogic Web 服务。

http://download.oracle.com/docs/cd/E13222_01/wls/docs90/programming/classloading.html#1082452

最新更新