hayes_shi 2014-07-21 07:25 采纳率: 0%
浏览 1981

基于cxf-webservice的项目业务分离,cxf客户端jar包冲突

现在项目做业务的分离,webservice接口是基于apache cxf实现的,以及生成客户端。因为项目彼此间有不同业务的调用,所以打的客户端jar包有很多class类会冲突
冲突提示如下:
Caused by: org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:338)
at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:490)
。。。。。。。
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 19 counts of IllegalAnnotationExceptions
。。。。。。
Two classes have the same XML type name "{http://inner.cxf.com/}wsPolicyData". Use @XmlType.name and @XmlType.namespace to assign different names to them.
this problem is related to the following location:
at com.cxf.client.outserver.WsPolicyData
at protected com.cxf.client.outserver.WsPolicyData com.cxf.client.outserver.WsSeatWithPriceAndComisionItem.policyData
at com.cxf.client.outserver.WsSeatWithPriceAndComisionItem
at protected java.util.List com.cxf.client.outserver.WsFlightWithPriceAndCommision.seatItems
at com.cxf.client.outserver.WsFlightWithPriceAndCommision
at protected java.util.List com.cxf.client.outserver.WsFlightWithPriceAndCommisionItem.flights
at com.cxf.client.outserver.WsFlightWithPriceAndCommisionItem
at protected java.util.List com.cxf.client.outserver.AvailableFlightWithPriceAndCommisionReply.flightItems
at com.cxf.client.outserver.AvailableFlightWithPriceAndCommisionReply
at @javax.xml.bind.annotation.XmlSeeAlso(value=[class com.yl.domain.PublicOfTicketMsg, class com.yl.domain.PublicOfStore, class com.yl.cxf.domain.PublicOfWebTicket, class com.yl.domain.PublicOfPagination, class com.yl.domain.PublicOfTicket, class com.yl.domain.PublicOfMessageDomain, class com.yl.cxf.domain.PublicOfWebMerchant, class com.cxf.client.outserver.AvailableFlightWithPriceAndCommisionReply, class com.cxf.order.PyAccount, class com.cxf.client.outserver.TcGetSceneryTrafficInfoResponse, class com.cxf.client.outserver.TcGetSceneryResponse, class com.cxf.client.outserver.ArrayOfTcSimpleScenery, class com.cxf.client.outserver.ArrayOfTcTheme, class com.cxf.client.outserver.ArrayOfTcImpression, class com.cxf.client.outserver.ArrayOfTcSuitherd, class com.cxf.client.outserver.TcSimpleScenery, class com.yl.cxf.domain.PublicOfWebMerchant, class java.util.ArrayList, class com.cxf.client.outserver.AvailableFlightWithPriceAndCommisionReply, class com.cxf.order.PyAccount, class com.cxf.client.outserver.TcGetSceneryTrafficInfoResponse, class com.yl.domain.UnionPayOrder, class com.yl.core.page.PublicOfPager])
at private com.yl.cxf.domain.PublicOutDomain com.yl.cxf.publicservice.jaxws_asm.DoAccquireRefundResponse._return
at com.yl.cxf.publicservice.jaxws_asm.DoAccquireRefundResponse
this problem is related to the following location:
at com.cxf.order.WsPolicyData
at protected com.cxf.order.WsPolicyData com.cxf.order.WsSeatWithPriceAndComisionItem.policyData
at com.cxf.order.WsSeatWithPriceAndComisionItem
at protected java.util.List com.cxf.order.WsFlightWithPriceAndCommision.seatItems
at com.cxf.order.WsFlightWithPriceAndCommision
at protected java.util.List com.cxf.order.WsFlightWithPriceAndCommisionItem.flights
at com.cxf.order.WsFlightWithPriceAndCommisionItem
at protected java.util.List com.cxf.order.AvailableFlightWithPriceAndCommisionReply.flightItems
at com.cxf.order.AvailableFlightWithPriceAndCommisionReply
at protected com.cxf.order.AvailableFlightWithPriceAndCommisionReply com.cxf.order.GetAvailableFlightResponse._return
at com.cxf.order.GetAvailableFlightResponse
at public com.cxf.order.GetAvailableFlightResponse com.cxf.order.ObjectFactory.createGetAvailableFlightResponse()
at com.cxf.order.ObjectFactory
不知道大家做项目分离时,有没有遇到过此类问题,以及解决方法,希望大家能指教一二。

  • 写回答

1条回答

  • CSDN-Ada助手 CSDN-AI 官方账号 2022-09-21 01:54
    关注
    不知道你这个问题是否已经解决, 如果还没有解决的话:

    如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^
    评论

报告相同问题?

悬赏问题

  • ¥15 使用C#,asp.net读取Excel文件并保存到Oracle数据库
  • ¥15 C# datagridview 单元格显示进度及值
  • ¥15 thinkphp6配合social login单点登录问题
  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 虚心请教几个问题,小生先有礼了
  • ¥30 截图中的mathematics程序转换成matlab