You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2007/08/28 22:33:30 UTC

[jira] Updated: (CXF-874) Problems with service beans that use AOP

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

Daniel Kulp updated CXF-874:
----------------------------

          Component/s:     (was: Service Model)
                       JAX-WS Runtime
                       Core
                       Configuration
                       Bus
    Affects Version/s:     (was: 2.1)
                       2.0
                       2.0.1
        Fix Version/s: 2.0.2
             Assignee: Daniel Kulp


This really isn't something completely "fixable".   In the AOP cases, what is being assigned as a service is a java.lang.reflect.Proxy object.   That object does not have any of the annotations on it that the real service would have.   With Spring config, you can get around it by specifying the implementorClass/serviceClass attributes on the jaxws:endpoint/jaxws:server elements.   In that case, we'll ignore the obj.getClass() call and use the Class you specifically specify for finding the annotations and such.

That said, I'm doing a few things:
1)  I'm changing the default namespace for the case when getPackage() returns null to "http://unknown.namespace/".   Thus, the ?wsdl call will actually generate a wsdl instead of barf.   It's not a very usable wsdl though (service names like #Proxy8Service and such)

2) In the factory, if a service is created from a Proxy object, I'm going to log a WARNING level message that explains the issue and suggests setting the class explicitly.





> Problems with service beans that use AOP
> ----------------------------------------
>
>                 Key: CXF-874
>                 URL: https://issues.apache.org/jira/browse/CXF-874
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, Configuration, Core, JAX-WS Runtime
>    Affects Versions: 2.0, 2.0.1
>         Environment: Platform Independent
>            Reporter: Zarar Siddiqi
>            Assignee: Daniel Kulp
>             Fix For: 2.0.2
>
>
> There are a couple threads on the mailing list that talk about some problems users are having when using AOP with CXF.  Most notably there seem to be issues when service implementations are either proxied using AOP and/or are transactional in nature.  Here is an example of this:
> http://www.nabble.com/Dependency-Injection-in-JAXWS-endpoint-tf4154573.html#a11884767
> As Brad pointed out, the dev team is looking into this. However, I couldn't find a JIRA for this issue.  There's also this thread which is similar in nature.
> http://www.nabble.com/webservice-proxied-with-trasaction-interceptor-throwing-errors-on-WSDL-generation-tf4161303.html#a11842296
> In my last comment for CXF-803 (https://issues.apache.org/jira/browse/CXF-803#action_12516555) I point to a case where interceptors configured using annotations fail to get added to the interceptor chain when an AOP auto proxy creator is used (org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator).  If BeanNameAutoProxyCreator is defined as a Spring bean the annotations are not read, but if I comment out the BeanNameAutoProxyCreator, all is well.

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