2 shihai1991 shihai1991 于 2014.07.21 15:25 提问

基于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
不知道大家做项目分离时,有没有遇到过此类问题,以及解决方法,希望大家能指教一二。

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!