cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward Ost (JIRA)" <>
Subject [jira] [Commented] (CXF-3492) Spring OSGI Service Reference as JAXWS:endpoint implementor
Date Thu, 05 May 2011 21:03:03 GMT


Edward Ost commented on CXF-3492:

Sorry to be going on a goose chase here, but I wasn't able to reproduce that successful test
 (I'm pretty certain it was actually running a previous build). 

I've set up and attached a fresh project to demonstrate the issue in isolation (and run against
a clean TESB4 container and MVN repository).  This was tested on talend-esb-4.0-prerelease-kit-2
against the CXF bundle 2.4.0-SNAPSHOT (included) and also against an upgraded CXF 2.4.0 bundle.

I couldn't find a Maven source dependencies for 2.4.0-SNAPSHOT to debug against, so I've used
2.4.0 to determine the following:

When using a spring OSGI reference as the JAXWS implementor, e.g.

<jaxws:endpoint id="testEndpoint"

It's dying in JaxWsServerFactoryBean(org.apache.cxf.frontend.ServerFactoryBean).create() line:

            if (serviceBean != null) {
            } else if (getServiceClass() != null) {
                initializeAnnotationInterceptors(server.getEndpoint(), getServiceClass());

The code here ignores the "implementorClass" on the JAXWS tag (which populates ServerFactoryBean.getServiceClass())
and tries to determine the underlying class via "ClassHelper.getRealClass".  (which fails
because ClassHelper throws a ClassCastException internally because it tries to cast an opaque
proxy (spring OSGI proxy) to org.springframework.aop.framework.Advised).

I'm guessing the above if/else block may be incorrect, and possibly should be:

            if (getServiceClass() != null) {
                initializeAnnotationInterceptors(server.getEndpoint(), getServiceClass());
            } else if (serviceBean != null) {

Would you mind passing this on for investigation?

The attached tar ball should just build with "mvn install", then "install",
except that it's built against CXF 2.4.0.

If running against talend-esb-4.0-prerelease-kit-2.tar.gz, can either
(a) change in pom.xml to <cxf.version>2.4.0-SNAPSHOT</cxf.version> , or 
(b) uninstall default CXF bundle and use "features:addurl mvn:org.apache.cxf.karaf/apache-cxf/2.4.0/xml/features",
"features:install cxf-bundle/2.4.0"

> Spring OSGI Service Reference as JAXWS:endpoint implementor
> -----------------------------------------------------------
>                 Key: CXF-3492
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: OSGi
>    Affects Versions: 2.4
>            Reporter: Edward Ost
> Problem pointing <jaxws:endpoint> to an implementor that's provided by <osgi:reference>

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message