【问题标题】:Axis2 webservice client weblogic webservice client jar confilctAxis2 webservice 客户端 weblogic webservice 客户端 jar 冲突
【发布时间】:2011-05-12 23:19:48
【问题描述】:

我的应用程序是部署在 weblogic 10 中的战争。在我的一个班级中,我需要进行 2 个 web 服务调用 A 和 W。A 基于 AXIS2,使用 wstx-asl-3.2.4.jar,W 基于在 weblogic 中使用 jars 的 weblogic webservice。我猜由于 wstx-asl 和 weblogic stax 实现之间的冲突,它们不能同时制作。 这是问题的详细信息: 1. 如果我从 web-inf/lib 文件夹中删除 wstx-asl-3.2.4.jar, B 可以,但 A 由于异常而失败:ClassCastException:weblogic.xml.stax.XMLStreamInputFactory 2. 如果我将 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 ......................... 请告知如何使他们一起成功。谢谢。

【问题讨论】:

    标签: web-services axis2 webservice-client weblogic-10.x


    【解决方案1】:

    在您的部署 weblogic.xml 文件中,使用 <prefer-web-inf-classes> 标记并将其设置为 true 以进行 axis2 调用。并为 weblogic web 服务设置为 false。

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-10-16
      • 2011-05-23
      • 1970-01-01
      • 2012-04-27
      • 2011-04-04
      • 2013-08-19
      • 1970-01-01
      相关资源
      最近更新 更多