cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Exception Beans and @WebFault
Date Wed, 04 Feb 2009 21:25:05 GMT

I believe this is a symptom of:
https://issues.apache.org/jira/browse/CXF-973

Patches to fix this would be great.   Basically, around line 152 of 
ClientFaultConverter, if the constructor is null (update it to not throw the 
exception or similar), use reflection to copy all the fields from the bean to 
the exception.   

Dan


On Wed February 4 2009 2:46:14 pm Will Gomes wrote:
> I have a set of exceptions in package org.foo.exceptions which I'm using in
> a Service residing in package org.foo.bar.Service.
>
> I generated exception beans and placed them in package
> org.foo.exceptions.jaxws. When I use the @WebFaultAnnotation to point to
> these fault beans, cxf throws the following error:
>
> org.apache.cxf.interceptor.ClientFaultConverter  - Exception occurred while
> creating exception:
> org.foo.exceptions.DoesNotExistException.<init>(java.lang.String,
> org.foo..exceptions.jaxws.DoesNotExistExceptionBean)
> java.lang.NoSuchMethodException:
> org.foo.exceptions.DoesNotExistException.<init>(java.lang.String,
> org.foo.exceptions.jaxws.DoesNotExistExceptionBean)
>
> I don't understand why this constructor is necessary in the exception
> class?
>
> Using @WebFault with jaxws metro implementation did not require this
> constructor.  If I get rid of the @WebFault, CXF is happy. Metro, however,
> dynamically generates org.foo.bar.jaxws.DoesNotExistExceptionBean rather
> than using org.foo.exceptions.jaxws.DoesNotExistExceptionBean. I could not
> determine if CXF was also dynamically generating an exception bean in this
> scenario.

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Mime
View raw message