java - How to use Annox to Add @XmlRootElement When Generating JAXB Model from WSDL? -


i have following wsdl

<?xml version='1.0' encoding='utf-8'?> <wsdl:definitions xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.m2m.no/resourcemanager" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns2="http://schemas.xmlsoap.org/soap/http" xmlns:ns1="http://www.m2m.no/resourcemanager/2013/03" name="resourcecontrollerimplservice" targetnamespace="http://www.m2m.no/resourcemanager"> <wsdl:types> <xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns:tns="http://www.m2m.no/resourcemanager/2013/03" targetnamespace="http://www.m2m.no/resourcemanager/2013/03" version="1.0"> <xs:element name="resourcefault">     <xs:complextype>       <xs:complexcontent>         <xs:extension base="tns:root">           <xs:sequence>             <xs:element name="errrorcode" type="xs:string"/>             <xs:element name="errrordescription" type="xs:string"/>           </xs:sequence>         </xs:extension>       </xs:complexcontent>     </xs:complextype>   </xs:element> <xs:element name="getsimdetails">     <xs:complextype>       <xs:complexcontent>         <xs:extension base="tns:root">           <xs:sequence>             <xs:element name="icc" type="xs:long"/>           </xs:sequence>         </xs:extension>       </xs:complexcontent>     </xs:complextype>   </xs:element> <xs:element name="getsimdetailsresponse">     <xs:complextype>       <xs:complexcontent>         <xs:extension base="tns:root">           <xs:sequence>             <xs:element name="resource" type="tns:resource"/>           </xs:sequence>         </xs:extension>       </xs:complexcontent>     </xs:complextype>   </xs:element> <xs:complextype name="root">     <xs:sequence>       <xs:element name="uuid" type="xs:string"/>     </xs:sequence>   </xs:complextype> <xs:complextype name="resource">     <xs:sequence>       <xs:element name="icc" type="xs:long"/>       <xs:element name="imsi" type="xs:long"/>       <xs:element name="name" type="xs:string"/>     </xs:sequence>   </xs:complextype> </xs:schema> <xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns:tns="http://www.m2m.no/resourcemanager" xmlns:ns1="http://www.m2m.no/resourcemanager/2013/03" elementformdefault="unqualified" targetnamespace="http://www.m2m.no/resourcemanager" version="1.0"> <xs:import namespace="http://www.m2m.no/resourcemanager/2013/03"/> <xs:element name="getsimdetails" type="tns:getsimdetails"/> <xs:element name="getsimdetailsresponse" type="tns:getsimdetailsresponse"/> <xs:complextype name="getsimdetails">     <xs:sequence>       <xs:element minoccurs="0" ref="ns1:getsimdetails"/>     </xs:sequence>   </xs:complextype> <xs:complextype name="getsimdetailsresponse">     <xs:sequence>       <xs:element minoccurs="0" ref="ns1:getsimdetailsresponse"/>     </xs:sequence>   </xs:complextype> </xs:schema>   </wsdl:types>   <wsdl:message name="resourcefault">     <wsdl:part element="ns1:resourcefault" name="resourcefault">     </wsdl:part>   </wsdl:message>   <wsdl:message name="getsimdetailsresponse">     <wsdl:part element="tns:getsimdetailsresponse" name="parameters">     </wsdl:part>   </wsdl:message>   <wsdl:message name="getsimdetails">     <wsdl:part element="tns:getsimdetails" name="parameters">     </wsdl:part>   </wsdl:message>   <wsdl:porttype name="resourcecontroller">     <wsdl:operation name="getsimdetails">       <wsdl:input message="tns:getsimdetails" name="getsimdetails">     </wsdl:input>       <wsdl:output message="tns:getsimdetailsresponse" name="getsimdetailsresponse">     </wsdl:output>       <wsdl:fault message="tns:resourcefault" name="resourcefault">     </wsdl:fault>     </wsdl:operation>   </wsdl:porttype>   <wsdl:binding name="resourcecontrollerimplservicesoapbinding" type="tns:resourcecontroller">     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>     <wsdl:operation name="getsimdetails">       <soap:operation soapaction="getsimdetails" style="document"/>       <wsdl:input name="getsimdetails">         <soap:body use="literal"/>       </wsdl:input>       <wsdl:output name="getsimdetailsresponse">         <soap:body use="literal"/>       </wsdl:output>       <wsdl:fault name="resourcefault">         <soap:fault name="resourcefault" use="literal"/>       </wsdl:fault>     </wsdl:operation>   </wsdl:binding>   <wsdl:service name="resourcecontrollerimplservice">     <wsdl:port binding="tns:resourcecontrollerimplservicesoapbinding" name="resourcecontrollerimplport">       <soap:address location="http://localhost:8080/resourcemanager-component/resourceservice"/>     </wsdl:port>   </wsdl:service> </wsdl:definitions> 

and jaxb binding

    <?xml version="1.0" encoding="utf-8"?> <jaxws:bindings wsdllocation="resourceservice1.wsdl"     xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"     xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"     xmlns:annox="http://annox.dev.java.net" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">     <jaxws:enablewrapperstyle>false</jaxws:enablewrapperstyle>     <jaxws:bindings         node="wsdl:definitions/wsdl:types/xs:schema[@targetnamespace='http://www.m2m.no/resourcemanager']">         <jaxb:bindings node="xs:complextype[@name='getsimdetails']">             <annox:annotate>                 <annox:annotate annox:class="javax.xml.bind.annotation.xmlrootelement"                     name="getsimdetails" namespace="http://www.m2m.no/resourcemanager" />             </annox:annotate>         </jaxb:bindings>     </jaxws:bindings> </jaxws:bindings> 

iam using cxf codegen plugin generate client out of wsdl , use jaxb binding include @xmlrootelement annotation in 1 of classes. seems fine annotation not getting included in wsdl. me figure out ?

regards kiran


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -