Thank you Ian for the response, That's what I did by starting from minimum code and figured it out.
Petr --- On Tue, 11/11/08, Ian Roberts <[EMAIL PROTECTED]> wrote: From: Ian Roberts <[EMAIL PROTECTED]> Subject: Re: New to CXF, Can't return simple DTO, hitting run time exception :-( To: [email protected] Date: Tuesday, November 11, 2008, 2:00 AM Petr V. wrote: > Hi All, > > This is my first exposure and hello world example with CXF. > > I can successfully call web service that is returning string but when I > try to return my simple DTO, I am getting following exception at run time. > ... > Caused by: java.lang.InstantiationException: > com.mycomp.cp.cxftest.dto.SampleDTO > at java.lang.Class.newInstance0(Class.java:340) > at java.lang.Class.newInstance(Class.java:308) > at > org.apache.cxf.jaxws.interceptors.WrapperHelper$ReflectWrapperHelper.createWrapperObject(WrapperHelper.java:276) > ... 19 more You need to add a no-argument constructor to your DTO class (which could be in addition to the two-arg one, it doesn't have to be either/or). Ian -- Ian Roberts | Department of Computer Science [EMAIL PROTECTED] | University of Sheffield, UK
