axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ho-yeon. Lee (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AXIS2-5486) JAX-WS and Spring Integration
Date Sun, 03 Mar 2013 03:07:13 GMT

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

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

    Description: 
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 3 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 object is wrapped with aop advices by Spring, the class of the 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 different each other. 
(At runtime, an error occured like this
"object is not an instance of declaring class")
I changed JavaDispatcher class and it is tested very well. 
And finally jax-ws of axis2 can integrate with Spring well.

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

  was:
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 3 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 is tested very well. 
And finally axis2 can integrate with Spring well.

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

    
> 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
>              Labels: jaxws, spring
>         Attachments: axis2.xml, JavaBeanDispatcher.java, JaxWsSpringServletContextObjectSupplier.java
>
>
> 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 3 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 object is wrapped with aop advices by Spring, the class of the 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 different each other. 
> (At runtime, an error occured like this
> "object is not an instance of declaring class")
> I changed JavaDispatcher class and it is tested very well. 
> And finally jax-ws of axis2 can integrate with Spring well.
> Check it out whether it's applicable 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


Mime
View raw message