Hmm... can you package up a small test case.   Not sure what is going on.   
Could be a classloader issue, but I'm not sure.

For the constructor, I would pass the impl bean of your service.   That would 
be the "default" that the normal factory would end up doing.

Dan


On Sunday 06 June 2010 6:04:44 pm Ronald Pieterse wrote:
> 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

Reply via email to