Yes--as you said, the export is there in my custom bundle, but the cxf
bundle has no way to import it to create the interceptor instance.

Are you saying there is currently a way to do this, or that DOSGi will need
to be modified to allow custom interceptors? I think you are saying it is
not available currently, but that it would probably need to be a property
on the osgi service export configuration.

Thanks,
Jeff

On Mon, Jan 16, 2012 at 8:37 AM, Sergey Beryozkin-5 [via CXF] <
ml-node+s547215n5148873...@n5.nabble.com> wrote:

> Ignore that please, keeping forgetting the cxf bundle does not import
> custom classes/
>
> I think in DOSGi case, a new property would have to be introduced in
> time for custom CXF interceptors be picked up
>
> Cheers, Sergey
>
> On 16/01/12 12:25, Sergey Beryozkin wrote:
>
> > Does the custom bundle export "com.uhg.upm.webservice.interceptor" ?
> >
> > Sergey
> >
> > On 13/01/12 22:36, gaygeek wrote:
> >> I am trying to configure a custom interceptor for a web service I'm
> >> exposing
> >> with DOSGi. However, it seems that the interceptor cannot be
> >> initialized via
> >> annotation, as the org.apache.cxf.bundle-minimal does not have access
> >> to my
> >> custom interceptor class from its bundle classloader. I get the
> following
> >> error when starting my bundle with the service in it (which DOES have
> >> access
> >> to the package that my SoapFaultInterceptor is in). It seems like the
> >> only
> >> way to make it work would be to hack the MANIFEST.MF for the
> >> org.apache.cxf.bundle-minimal to import my bundle with the custom
> >> interceptor.
> >>
> >> Is there a different way to configure custom interceptors with DOSGi?
> >> Or am
> >> I missing something in order to allow the annotations to work?
> >>
> >> Annotations for the WebService interface:
> >> @WebService(name = "HelloService", targetNamespace =
> >> "http://upm.uhc.com/example/hello";)
> >> @OutFaultInterceptors(interceptors =
> >> {"com.uhg.upm.webservice.interceptor.SoapFaultInterceptor"})
> >> public interface HelloService
> >>
> >> Exception when starting my bundle with the HelloService in it:
> >> Exception in thread "pool-1-thread-4" org.apache.cxf.interceptor.Fault:
> >> Could not create annotation object:
> >> com.uhg.upm.webservice.interceptor.SoapFaultInterceptor
> >> at
> >>
> org.apache.cxf.interceptor.AnnotationInterceptors.initializeAnnotationObjects(AnnotationInterceptors.java:79)
>
> >>
> >> at
> >>
> org.apache.cxf.interceptor.AnnotationInterceptors.getAnnotationObject(AnnotationInterceptors.java:48)
>
> >>
> >> at
> >>
> org.apache.cxf.interceptor.AnnotationInterceptors.getAnnotationInterceptorList(AnnotationInterceptors.java:102)
>
> >>
> >> at
> >>
> org.apache.cxf.interceptor.AnnotationInterceptors.getOutFaultInterceptors(AnnotationInterceptors.java:122)
>
> >>
> >> ...
> >> Caused by: java.lang.ClassNotFoundException:
> >> com.uhg.upm.webservice.interceptor.SoapFaultInterceptor not found by
> >> org.apache.cxf.bundle-minimal [57]
> >> at
> >>
> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:812)
>
> >>
> >> at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:72)
> >>
> >> Thank you for any insight into this issue.
> >>
> >> -Jeff
> >>
> >> --
> >> View this message in context:
> >>
> http://cxf.547215.n5.nabble.com/Custom-interceptors-with-DOSGi-tp5143924p5143924.html
> >>
> >> Sent from the cxf-user mailing list archive at Nabble.com.
> >
> >
>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>
> Blog: http://sberyozkin.blogspot.com
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://cxf.547215.n5.nabble.com/Custom-interceptors-with-DOSGi-tp5143924p5148873.html
>  To unsubscribe from Custom interceptors with DOSGi, click 
> here<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5143924&code=am1lbGJ5QGdtYWlsLmNvbXw1MTQzOTI0fC02NTQzMjczNTA=>
> .
> NAML<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


--
View this message in context: 
http://cxf.547215.n5.nabble.com/Custom-interceptors-with-DOSGi-tp5143924p5149014.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to