Hi Ian -

Can you please try to create a sample bundle and attach it to the JIRA ?
Is it Equinox that you use for deploying the Declarative Service ( according
to the Declarative Services OSGI spec ?)
What DOSGi version do you use ?

thanks, Sergey

On Wed, Dec 22, 2010 at 1:30 AM, Sisyphus <[email protected]> wrote:

>
> Greetings,
>
> (Reposting this to the correct forum with ammendments.)
>
> I am attempting to setup a custom exception handler through CXF-DOSGi using
> Declarative Services to register my provider.
>
> My endpoints registration file (for REST) declares the following:
>
>  <property name="org.apache.cxf.rs.provider"
> value="com.MyExceptionClassPath.TestExceptionMapper" />
>
> (Sergey suggested the following format - it does not solve my issue:
>   <property name="org.apache.cxf.rs.provider">
>      com.MyExceptionClassPath.TestExceptionMapper
>   </property>
> )
>
> The class TestExceptionMapper is defined with the following signature and
> default method:
>
>  package com.MyExceptionClassPath;
>  public class TestExceptionMapper implements
> ExceptionMapper<MyCustomException> {
>     public Response toResponse(MyCustomException arg0) {
>        return Response.status(Response.Status.FORBIDDEN).build();
>     }
>  }
>
> I am using SoapUI to call into my web service and I am trying a test of the
> custom exception provider by simply calling:
>
>  throw new MyCustomException();
>
> I have a breakpoint set at TestExceptionMapper.toResponse(), but it is
> never
> hit.  Instead, the execution stack just falls through MyCustomException.
>
> Tracing to ServiceComponent.createInstance(), I see that during a
> subsequent
> call to ServiceComponentProp.build(), an element of instance
> ComponentInstanceImpl has a ServiceComponentProp.properties hashtable entry
> for provider TestMapperException.  Not sure where to go from here.
>
>
> I must add a common caveat.  This is all extremely new to me, so any
> responsdor needs to understand that I do not have a deep background
> (working
> on it) in this technological field.
>
> Thanks for any forthcoming assistance.
>
> Cheers, Ian
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Help-with-Declarative-Services-and-ExceptionMapper-tp3314384p3314384.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

Reply via email to