Hi Dan, When I use my custom MessageInvoker and make my service call I get the following exception:
"org.apache.cxf.interceptor.Fault: object is not an instance of declaring class while invoking public java.lang.String com.tripolis.services.impl.PrototypeServiceImpl.rerouting(java.lang.Integer) with params [3]" The custom invoker has no specific implementation yet; just the call to super. So actually nothing custom really... If I take the jaxws:invoker out in the spring config, the call works fine. The service call is very simple - just an Integer input value and a String output value. Because I use Spring I had to add a default constructor in my custom MessageInvoker. Could that be the problem? That the wrong constructor is called on initialization? Or should I add constructor-arg in the spring config for my custom invoker? If so, which implementation of Factory should I then use? Ronald dkulp wrote: > > > Basically, you would subclass the JAXWSMethodInvoker and override the > invoke > method to catch the Faults and then have it return your normal response > object. In the spring config, the jaxws:endpoint element has a > jaxws:invoker child element that would be an instance of your invoker. > Something like: > > <jaxws:endpoint .....> > <jaxws:invoker><bean class="com.foo.MyInvoker"/></jaxws:invoker> > </jaxws:endpoint> > > > Dan > > > On Wednesday 02 June 2010 3:30:03 am Ronald Pieterse wrote: >> Hi, >> >> I would like to replace all Faults with my own response object to keep >> the >> Faults from my clients. So I mean not wrap them into another object but >> really replace the Fault object with my own Response. >> What would be the best way to do this? I read something about extending >> the >> JAXWSMethodInvoker but its not clear how that should work for me. >> Should I replace some interceptors on the outgoing chain? >> Can someone help me out here? >> >> Ronald > > -- > Daniel Kulp > [email protected] > http://dankulp.com/blog > > -- View this message in context: http://old.nabble.com/Replace-Fault-with-custom-response-tp28751052p28793396.html Sent from the cxf-user mailing list archive at Nabble.com.
