Open SwpuEsine opened 7 years ago
Hi SwpuEsine,
I believe the issue here is you are using CXF, which does not support MaxOccurs more than 5000. We have some MaxOccurs valus as 9999 in wsdl which is causing the issue with ServiceConstruction. Could you please try with apache axis2 instead of CXF. Please let us know how it goes. Thanks.
hi vivekjyotipramanik, thanks for your help,you are right, i did use CXF, But I have several interfaces that already use CXF,And I've never used axis2,could you give me some demo to study,thanks
when i create a AirReservatReq, it occurs: 十月 09, 2017 5:20:38 下午 org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL 信息: Creating Service {http://www.travelport.com/service/universal_v42_0}AirService from WSDL: file:/C:/Users/jiww/Desktop/20170927/travelport-uapi-tutorial-master/wsdl/universal_v42_0/UniversalRecord.wsdl
java.lang.RuntimeException: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException
Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:360) at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:349) at javax.xml.ws.Service.getPort(Service.java:119) at com.travelport.service.universal_v42_0.AirService.getAirCreateReservationPort(AirService.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.travelport.tutorial.support.PortWrapper.init(PortWrapper.java:185) ... 25 more Caused by: org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:329) at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86) at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:426) at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:528) at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:263) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:199) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:103) at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:91) at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:159) at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:142) at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:492) at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:358) ... 33 more Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions javax.xml.bind.JAXBElement没有无参数默认构造器。 this problem is related to the following location: at javax.xml.bind.JAXBElement at public javax.xml.bind.JAXBElement com.travelport.schema.hotel_v42_0.ObjectFactory.createHotelSearchAvailabilityRsp(com.travelport.schema.hotel_v42_0.BaseHotelSearchRsp) at com.travelport.schema.hotel_v42_0.ObjectFactory
i wonder know what should i do