Hi Harald Nice blog btw on the JMS.
I remember adding support for serialized objects over HTTP recently. Basically you need to set the content-type to indicate that. Let me find an unit test. https://svn.apache.org/repos/asf/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/javabody/HttpJavaBodyTest.java This is the content-type application/x-java-serialized-object And you need Camel 2.6 Btw a bit related if your proxy is simple then you can send the data as plain text and still have a proxy: https://svn.apache.org/repos/asf/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/proxy/ On Sun, Mar 13, 2011 at 5:11 PM, Harald Wellmann <[email protected]> wrote: > I'm trying to set up a simple example with Spring remoting via HTTP, and I'm > not sure if my configuration or my assumptions are wrong, or if there's a > problem in the Camel HTTP component. > > Essentially, my setup is similar to the camel-example-spring-jms with > CamelClientRemoting, only I'm using HTTP instead of JMS as transport. > > On the client side, I'm creating a proxy for a HelloService service > interface using a CamelProxyFactoryBean, using the remote HTTP endpoint as > serviceUrl, e.g. http://localhost:9999/hello. > > Now when starting the Camel context, I'm getting the following exception: > > Caused by: org.apache.camel.NoTypeConversionAvailableException: No type > converter available to convert from type: > org.apache.camel.component.bean.BeanInvocation to the required type: > java.io.InputStream with value BeanInvocation public abstract void > com.blogspot.hwellmann.camel.greeter.api.HelloService.sayGoodbye(com.blogspot.hwellmann.camel.greeter.api.Person) > with [com.blogspot.hwellmann.camel.greeter.api.Person@1badd463]] > at > org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:143) > ~[camel-core-2.6.0.jar:2.6.0] > at > org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:100) > ~[camel-core-2.6.0.jar:2.6.0] > ... 31 common frames omitted > > > It seems the HTTP component is unable to convert the BeanInvocation object > to anything that can be written to the HTTP Request. > > As a workaround, I'm now connecting my proxy to a direct endpoint with an > intermediate XStream marshaller like this: > > from("direct:start") > .marshal().xstream() > .to("http://localhost:9999/hello"); > > and on the server side: > > from("jetty:http://0.0.0.0:9999/hello"). > unmarshal().xstream(). > to("helloService"); > > Is there a way to avoid the marshaller and simply use serialized objects? > > Best regards, > Harald > -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
