You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Ho-yeon. Lee (JIRA)" <ji...@apache.org> on 2013/02/07 09:29:12 UTC

[jira] [Created] (AXIS2-5486) JAX-WS and Spring Integration

Ho-yeon. Lee created AXIS2-5486:
-----------------------------------

             Summary: JAX-WS and Spring Integration
                 Key: AXIS2-5486
                 URL: https://issues.apache.org/jira/browse/AXIS2-5486
             Project: Axis2
          Issue Type: Improvement
          Components: jaxws
    Affects Versions: 1.6.2
            Reporter: Ho-yeon. Lee


It seems like integrating with Spring is just available in using JAX-RPC.
There is no bridge between Spring and JAX-WS Annotations until now.
So I created some code - JaxWsSpringServletContextObjectSupplier.java
It finds an suitable object in the Spring's web application context by bean name.
You can find a bean name from endpoint class's annotation such as '@Service', '@Component'. If the endpoint class doesn't have any Spring's annotation, its default bean name would be uncapitalized string of class's simple name.
I attached 2 files (axis2.xml, java file) to this issue.

And I have one opinion about JavaDispatcher class.
It has an constructor with two arguments(class, object).
But I think service class argument doesn't necessary, because the service class can be returned by a service object argument.
It is very important especially when you integrate with Spring and JAX-WS in axis2.
If endpoint class is wrapped with aop advices by Spring, the class of the service object would be a 'Proxy' class.
It means that the method of endpoint object can't be invoked because endpoint class and proxy class are differ each other. (At runtime, an error occured like this
"object is not an instance of declaring class")
I changed JavaDispatcher class and it tested very well. 
And finally axis2 can integrate with spring well.

Check it out whether it's applicable to apply to you.
Thank you for reading. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org