camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sriram C <>
Subject Re: Camel type converter question
Date Wed, 04 Mar 2009 17:51:42 GMT

Hi Willem,
Thanks for your reply. The issue in Kohsuke's blog is not the cause of my
problem. Let me explain my wsdl in a little more detail. My top level
element is defined as following:

<element name="notifications">
                    	<element name="OrganizationId" type="ent:ID"/>
                    	<element name="ActionId" type="ent:ID"/>
                    	<element name="SessionId" type="xsd:string"
                    	<element name="EnterpriseUrl" type="xsd:string"/>
                    	<element name="PartnerUrl" type="xsd:string"/>
                        <element name="Notification" maxOccurs="100"

jaxb using the simple binding generates the correct bean object
(Notifications) with the @XmlRootElement for the top level element. However
since the contained element is defined as of type Notification defined

<complexType name="Notification">
                    <element name="Id" type="ent:ID"/>
                    <element name="sObject" type="ens:sObject"/>

The bean for the above complexType (Notification) is generated without the
@XmlRootElement. I wish to persist the Notification objects to the disk
using the FileEndPoint generated using the following routing snippet:

However since the Notification bean is missing the @XmlRootElement, the
FallbackTypeConverter is failing to marshall this to XML. This is the
problem I am trying to solve. JAXB has the notion of DataTypeAdapters which
can be used to specify marshalling rules for jaxb elements and types.  I
wonder if anybody on this forum has tried using these Adapters in
conjunction with the FallbackTypeConverter.


willem.jiang wrote:
> Hi Sriram,
> I just used google to do a quick search, the error may relate to the
> anonymous complexTypes in your wsdl.
> Here is the link[1] which talks about it.
> [1]
> Willem
> Sriram C wrote:
>> I have defined a CXF jaxws endpoint. The incoming message to this end
>> point has an element which is defined as a ComplexType in the wsdl.  The
>> CXF wsdl2java utility generates this complextype with an @XmlType
>> annotation. Since it is missing the @XmlRootElement annotation, the
>> FallbackTypeConverter is unable to marshall this object. What is a good
>> solution for resolving this issue?
>> Thanks in advance,
>> Sriram

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message