On 21/01/2008, sub3 <[EMAIL PROTECTED]> wrote:
>
> Yes, I know I didn't use camel-cxf component.  But that is only when I want
> to hit a web service right?

Or process SOAP encoding of messages


> So I have a wsdl for my order system. The message is
> OrderSystemRequestMessage.  Inside that is OrderRequest, inside that is a
> list of Order.
>
> Right now, I want to pass around the Order class. Eventually, it will make
> it to the web service; but I am not at that point yet.  (It need to verify
> the Order, Check Inventory, Assign item, etc).
>
> When I try to pass just the Order class around (using the previous example),
> it becomes null.  Like the cxf objects & camel aren't serializing them at
> all.  If I create my own Order class (simple class w/a few fields), it works
> fine.
>
> Is there something I need to do with cxf generated classes so it will work
> in camel.

AFAIK the only special thing with CXF generated classes is they use by
default JAXB for marshalling themselves to and from XML.

Could you describe how and when the payload turns to null? e.g. any
chance you could create a little Camel route example of how to take
one of your CXF-generated beans and making it go wrong? In your
previous mail you used this code...

     context.addRoutes(new RouteBuilder() {
                   public void configure() {
                       // set up a listener on the file component
                       from("test-jms:queue:PA").process(new Processor() {

                               public void process(Exchange e) {
                                   Object obj = e.getIn().getBody();
                                   System.out.println("OBJ IS: "+obj);
                               }
                           });
                   }
               });

I'm just wondering, do the messages on the queue definitely contain a
valid body, and if so what format is it? Or to say that another way,
what code sends the messages?

Am wondering if its JAXB2 related. e.g. does adding the
@XmlRootElement to your hand crafted Order class, does that cause your
code to break too?

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Reply via email to