You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Ian Williamson (JIRA)" <ji...@apache.org> on 2010/12/23 00:54:01 UTC

[jira] Updated: (DOSGI-87) Declarative Services not registering ExceptionMapper provider

     [ https://issues.apache.org/jira/browse/DOSGI-87?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ian Williamson updated DOSGI-87:
--------------------------------

    Attachment: DS_Provider.zip

> Declarative Services not registering ExceptionMapper provider
> -------------------------------------------------------------
>
>                 Key: DOSGI-87
>                 URL: https://issues.apache.org/jira/browse/DOSGI-87
>             Project: CXF Distributed OSGi
>          Issue Type: Bug
>          Components: DSW
>    Affects Versions: 1.1
>         Environment: D-OSGi 1.1, Equinox 3.5, Windows XP
>            Reporter: Ian Williamson
>         Attachments: DS_Provider.zip
>
>
> Greetings, 
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.