Hi Willem: Thank you for your kind help. I will try out the way that using wsdl2java. I'm very interested the POJO way ,It would be help me greatly if you could please give me more information or some example.:) thanks again!
a new camel rider. Chen Jie. From: Willem jiang Date: 2013-07-01 21:55 To: users; cdj0579 Subject: Re: how to create the "custom bean" for unmarshalling the webservice request If you are using wsdl2java to generate the artifacts from the wsdl, you should be able to get the Request class which has the jaxb annotation as you want. JAXB dataformat fallback type will be used to do the unmarshal work for you. If you sql component can not take the request object, you need to write a custom converter to converter the request object for you. BTW, you can use the POJO data format this time, you should be able to get the request object directly, then you don't need to care much about JAXB data format stuff any more. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Monday, July 1, 2013 at 8:40 PM, cdj0579 wrote: > Hi~ > > This is how my camel route looks like: > <camelContext id="test_context" xmlns="http://camel.apache.org/schema/spring"> > <route> > <from uri="cxf:bean:wsConsumer?dataFormat=MESSAGE" /> > <convertBodyTo type="com.mycompany.bean.TestBean" /> > <to uri="sql:select * from projects where license = # order by > id?dataSource=#myDS"/> > <to uri="log:output" /> > </route> > </camelContext> > > Below is what my camel route want to do, I found it's difficult to achieve > step 2: > 1.setup a cxf endpoint to consume the requst, > 2.convert the request into one custom bean(List type) > 3.using SqlComponent to access database(MySQL),do a query action. > 4.logout the query result. > > the step 1,3,4 is easy to achieve ,step 2 is difficult for me. > I known we can using JAXB to unmarshal the input webservice request into a > "custom bean". > but how the "custom bean" create from? I'm so confued. I just have a wsdl > file,and the service related classes. > Can anyone please tell me in how to create this "custom bean" ? > > Thanks in advance for any help! > > > > > a new camel rider > chen jie.
