camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pietroforte <pietrofo...@gmail.com>
Subject Re: Does Jaxb With Spring Remoting (proxy) work ?
Date Mon, 17 Aug 2009 18:05:01 GMT

Hi.

I don't know exactly why, but when i use camel producer template with jaxb,
i don't have to serialize the classes and i can marshal and unmarshal with
jaxb dataformat normaly.

But, when i introduce de proxy and remove the producer template, start the
serialization problem and marshal and unmarshal do not work.

Did you do something like this?

Tks!

akuhtz wrote:
> 
> Hi,
> 
> If I get you right the problem is that the classes generated by jaxb do
> not implement Serializable?! This can be changed by adding custom binding
> for jaxb. I haven't tried out how to use this with Camel but I guess this
> should be a starting point. You can also google for jaxb java class
> serializable.<br>
> 
> Should be something like this:<br>
> <pre>
> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
> &lt;jxb:bindings version="2.0" 
>               xmlns:jxb="http://java.sun.com/xml/ns/jaxb" 
>               xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; 
>   &lt;jxb:bindings &gt; 
>     &lt;jxb:globalBindings&gt; 
>        &lt;jxb:serializable uid="1" /&gt;
>     &lt;/jxb:globalBindings&gt; 
>   &lt;/jxb:bindings&gt; 
> &lt;/jxb:bindings&gt;
> </pre>
> 
> Save the snippet above e.g. as my_binding.xjb in the resource directory
> where the xsd schema files are located (*.xjb is the default extension
> that is picked up by the maven-jaxb2-plugin, see
> https://maven-jaxb2-plugin.dev.java.net/docs/guide.html for more
> information).
> Hope this helps.
> 

-- 
View this message in context: http://www.nabble.com/Does-Jaxb-With-Spring-Remoting-%28proxy%29-work---tp24956379p25011472.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.


Mime
View raw message