|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
Does Jaxb With Spring Remoting (proxy) work ?1) When i configure client to use the producer template with jaxb, it works fine.
2) When i change to proxy configuration, it doesn't work.
The (un)marshal, in the camel-server.xml, works with Template, but doesn't work with Proxy.
...
|
|
|
Re: Does Jaxb With Spring Remoting (proxy) work ?Hi
I think you need to provide a bit more details such as - Version of Camel, OS, JDK, JAXB etc. - What goes wrong, stacktrace / error etc. - Configuration of working vs. non working On Thu, Aug 13, 2009 at 8:28 PM, Pietroforte<pietroforte@...> wrote: > > 1) When i configure client to use the producer template with jaxb, it works > fine. > > 2) When i change to proxy configuration, it doesn't work. > > The (un)marshal, in the camel-server.xml, works with Template, but doesn't > work with Proxy. > ... > > > > > > > > If i want my Proxy working, i have to remove the (un)marshal of the route > and utilize a method in my inteface that receives a common type, such a > integer or a string, but not a type generated by jaxb. > > Some clues? > > > -- > View this message in context: http://www.nabble.com/Does-Jaxb-With-Spring-Remoting-%28proxy%29-work---tp24956379p24956379.html > Sent from the Camel - Users (activemq) mailing list archive at Nabble.com. > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus |
|
|
Re: Does Jaxb With Spring Remoting (proxy) work ?Hi
And it may also be a pure spring related issue how to work with JAXB over it using its proxy features. Although you can use Camel as well to expose such a proxy. On Fri, Aug 14, 2009 at 8:42 AM, Claus Ibsen<claus.ibsen@...> wrote: > Hi > > I think you need to provide a bit more details such as > > - Version of Camel, OS, JDK, JAXB etc. > - What goes wrong, stacktrace / error etc. > - Configuration of working vs. non working > > > On Thu, Aug 13, 2009 at 8:28 PM, Pietroforte<pietroforte@...> wrote: >> >> 1) When i configure client to use the producer template with jaxb, it works >> fine. >> >> 2) When i change to proxy configuration, it doesn't work. >> >> The (un)marshal, in the camel-server.xml, works with Template, but doesn't >> work with Proxy. >> ... >> >> >> >> >> >> >> >> If i want my Proxy working, i have to remove the (un)marshal of the route >> and utilize a method in my inteface that receives a common type, such a >> integer or a string, but not a type generated by jaxb. >> >> Some clues? >> >> >> -- >> View this message in context: http://www.nabble.com/Does-Jaxb-With-Spring-Remoting-%28proxy%29-work---tp24956379p24956379.html >> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com. >> > > > > -- > Claus Ibsen > Apache Camel Committer > > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus |
|
|
Re: Does Jaxb With Spring Remoting (proxy) work ?Hi Claus,
I made my tests based on the tutorial on spring remoting with JMS by Martin Gilday. Version of Camel: apache-camel-1.6.1 OS: windows xp JDK: 1.5 JAXB: message broker: apache-activemq-5.2.0 (i've tryied with mqseries but had the same behavior The problem happens when, after i start the server (camel-server.xml) and the client( camel-client-remoting.xml), i try to comunicate with an interface of the server that receives an object generated by jaxb. The comunication in the side of client stops here, with a message in console: [DEBUG] joining on thread Thread[Thread: 1 org.apache.camel.component.jms.JmsComponent@ac0b08,5, and, in the side of server, with the apache camel already started, nothing happens. I think that the route subtags (un)marshall are causing this non expected behavior. To the transport of the object works fine, i have to remove the (un)marshal and manually serialize the classes generated by jaxb, so i don't tranport xml but objects serialized. Working this way, i have a limited use of jaxb. my dependencies are basically: com.ibm.mqjms 5.3.13 com.ibm.mq 5.3.13 org.apache.camel camel-core 1.6.1 camel-jms 1.6.1 camel-jaxb 1.6.1 camel-spring 1.6.1 org.apache.activemq activemq-core 5.2.0 org.apache.xbean xbean-spring 3.5 cglib cglib-nodep 2.1_3 org.springframework spring-core 2.5.6 org.spring-orm 2.5.6 javax.xml.bind jaxb-api 2.0 com.sun.xml.bind jaxb-impl 2.0.3 com.sun.jdmk jmxtools1.2.1 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin 0.7.1 camel-client-remoting.xmlcamel-server.xmlcamel-server.xml |
|
|
Re: Does Jaxb With Spring Remoting (proxy) work ?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.
Should be something like this:
<?xml version="1.0" encoding="UTF-8"?>
<jxb:bindings version="2.0"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<jxb:bindings >
<jxb:globalBindings>
<jxb:serializable uid="1" />
</jxb:globalBindings>
</jxb:bindings>
</jxb:bindings>
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. |
|
|
Re: Does Jaxb With Spring Remoting (proxy) work ?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!
|
|
|
Re: Does Jaxb With Spring Remoting (proxy) work ?Hi,
Can you show us how your create the producer template and your routing rule ? Willem Pietroforte wrote: > 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> >> <?xml version="1.0" encoding="UTF-8"?> >> <jxb:bindings version="2.0" >> xmlns:jxb="http://java.sun.com/xml/ns/jaxb" >> xmlns:xs="http://www.w3.org/2001/XMLSchema"> >> <jxb:bindings > >> <jxb:globalBindings> >> <jxb:serializable uid="1" /> >> </jxb:globalBindings> >> </jxb:bindings> >> </jxb:bindings> >> </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. >> > |
| Free embeddable forum powered by Nabble | Forum Help |