If your response contains Person objects then you could cast to Person. This of 
course would mean that your app is not so dynamic anymore.

Is there any reason why you do not simply use code generation or java first 
with the static Person class?

Christian


-----Ursprüngliche Nachricht-----
Von: srinivas thallapalli [mailto:[email protected]] 
Gesendet: Mittwoch, 25. Mai 2011 14:34
An: [email protected]
Betreff: Re: Need help on CXF client

For example I have pasted code snipet
So in response array contains person object (Person class with lname and fname 
attrs) we can get the values of person attrs as follows using reflection 
(demo.person.Person class need not in classpath)

JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
Client client =
dcf.createClient("http://localhost:8080/Personservice?wsdl";);
Object[] response = client.invoke("getPerson", id); Object person= 
Thread.currentThread().getContextClassLoader().loadClass("demo.person.Person").newInstance();
Method m1 = order.getClass().getMethod("getLname");
Method m2 = order.getClass().getMethod("getFname")

Stirng fanme = m1.invoke(person);

Now I want get the lname and fname values without using reflection as above.

Any way to do that?


Thanks



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Need-help-on-CXF-client-tp4424942p4425119.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to