On Tue August 25 2009 3:32:01 pm Helder Ribeiro wrote: > Dear all, > > At first I would like to tell Im new in Cxf. > > In my project I have one web service method where the result is a List of > one entity that I have implemented (One simple POJO). Ive called this > entity Resposta. > > Im trying to use Dynamic Client Factory, so the Cxf engine generates the > bean classes at runtime. As I could notice the generated bean class has the > same properties and methods as in my entity class. > What is the best way to instantiate my entity class in my client based on > the the objects returned by the invoke method if the Client Cxf class ? > Should I use reflection ?
Generally using reflection, yes. The DynamicClient is MOST useful when using one of the dynamic languages like Groovy or something that can just use the objects as is. If you have the schema, you can run xjc on it or something to pre-generate the types and I think the DynamicClient would just load them instead. Thus, you could just cast and use directly. Dan > Feel free to suggest a better approach. I would like my client as simple as > possible. > > Thanks in advance. -- Daniel Kulp [email protected] http://www.dankulp.com/blog
