java - Property is already defined error in wsdl2java -
i trying generate proxy classes wsdl2java using cxf, whenever try keep on getting below error:
wsdltojava error: http://webservices.sabre.com/wsdl/sabrexml1.0.00/shopping/grou peditineraryresponse_v1-0-2.xsd [0,0]: property "validatingcarrier" d efined. use <jaxb:property> resolve conflict. http://webservices.sabre.com/wsdl/sabrexml1.0.00/shopping/groupeditineraryrespon se_v1-0-2.xsd [0,0]: following location relevant above error
i tried add binding file wsdl2java.bat got info 1 of url this:
<jaxws:bindings wsdllocation="http://webservices.sabre.com/wsdl/sabrexml1.0.00/shopping/bargainfindermaxrq_v1-8-2.wsdl" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:extensionbindingprefixes="xjc" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"> <jaxws:bindings node="wsdl:definitions/wsdl:types/xsd:schema"> <jaxb:globalbindings jaxb:version="2.0"> <xjc:simple /> </jaxb:globalbindings> </jaxws:bindings>
i using third party wsdl url, don't have control change on server side, need make changes on command successfuly generate proxy classes. can kindly me in issue?
the problem faretype
has both child element named validatingcarrier
, attribute same name.
to work around should add field binding suggested error message. example binding:
<jaxb:bindings xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" xsi:schemalocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd" jaxb:version="2.1" schemalocation="http://webservices.sabre.com/wsdl/sabrexml1.0.00/shopping/groupeditineraryresponse_v1-0-2.xsd"> <jaxb:bindings node="//xs:complextype[@name='faretype']/xs:sequence/xs:element[@name='validatingcarrier']"> <jaxb:property name="validatingcarrierinfo"></jaxb:property> </jaxb:bindings> </jaxb:bindings>
with binding renamed validatingcarrier
validatingcarrierinfo
.
Comments
Post a Comment