Hi,
     I am using XMLBeans in my route for marshalling an object into XML.  I
get the following error.
SEVERE: Caused by: [org.apache.camel.NoTypeConversionAvailableException - No
type converter available to convert from type: java.util.HashMap to the
required type: org.apache.xmlbeans.XmlObject 

 In the DTO there is HashMap field, which requires a type converter. 


@XmlRootElement(name = "ShippingConditions")
@XmlAccessorType(XmlAccessType.PROPERTY)
public class ShippingConditionMapDTO {

    Map<String,List<ShippingCondition>> shippingConditionMap = new
HashMap<String, List<ShippingCondition>>();

  
    public Map<String, List<ShippingCondition>> getShippingConditionMap() {
        return shippingConditionMap;
    }

    public void setShippingConditionMap(Map<String, List<ShippingCondition>>
shippingConditionMap) {
        this.shippingConditionMap = shippingConditionMap;
    }
}

 The route is as follows.  The Processor returns an instance of the DTO
mentioned above.

 <route>
           <from uri="{{CSVFileFolder}}"/>
            <convertBodyTo type="java.lang.String"/>
            <process ref="shippingConditionProcessor"/>
            <marshal><xmlBeans/></marshal>
            <convertBodyTo type="java.lang.String"/>
            <setHeader headerName="CamelHttpMethod">
                <constant>POST</constant>
            </setHeader>
            <setHeader headerName="Content-Type">
                <constant>application/xml</constant>
            </setHeader>
          <to uri="http://testserver/shippingCondition"/>   
         </route>

How can I specify typeconverter for this ? 

-- 
View this message in context: 
http://camel.465427.n5.nabble.com/org-apache-camel-NoTypeConversionAvailableException-No-type-converter-available-to-convert-from-typet-tp1223953p1223953.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to