Hi,

To generate @XmlRootElement annotations apparently you need to use anonymous 
inner types (unrelated example):
    <xs:element name="AcknowledgeOrders">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="OrderLine" type="OrderResult" minOccurs="1" 
maxOccurs="unbounded" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>

And not:
    <xs:element name="AcknowledgeOrders" type="OrderResults" />
    
    <xs:complexType name="OrderResults">
        <xs:sequence>
            <xs:element name="OrderLine" type="OrderResult" minOccurs="1" 
maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>

Other option would be to wrap it in a JAXBElement<?> yourself and then marshal 
it:

FACTORY.createAcknowledgeOrders((OrderResults) object);


-----Oorspronkelijk bericht-----
Van: jainmcs03 [mailto:tojayendran.in...@gmail.com] 
Verzonden: Monday 11 May 2015 13:31
Aan: users@camel.apache.org
Onderwerp: Re: NoTypeConversionAvailableException

Hi Claus,

Yes, @XmlRootElement() missing. No class with root element annotation in my 
code generated by cxf-codegen-plugin.

Actually my payload should be like this,

<InquiryRequest xmlns="http://services.equifax.com/eport/ws/schemas/1.0";>
    <RequestHeader>
        <CustomerId></CustomerId>

Part of XSD is below,

   <xsd:element name="InquiryRequest" type="ns:InquiryRequestType">
      <xsd:annotation>
         <xsd:documentation>
            The WS Inquiry service request message root element declaration
         </xsd:documentation>
      </xsd:annotation>
   </xsd:element>

Couldnt find my mistake.

Regards
Jayendran



--
View this message in context: 
http://camel.465427.n5.nabble.com/NoTypeConversionAvailableException-tp5766952p5766976.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to