Hi Dave,
I'm not sure about your question ,  but Spring user guide [1] shows  how you
can access beans defined in  the Spring application context. you don't need
to modify you Spring application context file , but need to define
"ServiceObjectSupplier" parameter in the service.xml file.

When you come to Spring AOP proxy beans you need one more extra step to
define "ServiceClass" parameter in the service.xml file . Recently i have
done a  such example ,please refer following blog entry [2] for more details
.


[1] - http://ws.apache.org/axis2/1_4/spring.html
[2] - http://ssagara.blogspot.com/2008/08/axis2-with-spring-aop.html

Hope this will help you ,

Regards ,

Sagara Gunathunga

Blog - ssagara.blogspot.com
Web - http://sagaras.awardspace.com/

On Fri, Aug 1, 2008 at 10:26 PM, David Land <[EMAIL PROTECTED]> wrote:

>  I have a question about integrating Axis 1.3 with Spring. I want to
> implement an AOP logging solution for a set of Axis web services. Basically,
> I want to be able to do some logging and the beginning and end of each web
> service method. My question is regarding how to get Axis to use an instance
> of the Spring AOP proxy class.
>
>
>
> The only solution I could find for doing it was to create a dummy web
> service class that inherits from
> org.springframework.remoting.jaxrpc.ServletEndpointSupport and then to
> override the onInit() method to set a class variable to the AOP object
> returned from the Spring application context. Then in each of the dummy web
> service's methods, call the corresponding method on the AOP object. Here is
> a typical example:
>
> -----------------------------------------------------------------------
> public class DummyService extends ServletEndpointSupport implements
> IRealWebService {
>    private IRealWebService real;
>
>    protected void onInit() {
>       this. real =
> (IRealWebService)getWebApplicationContext().getBean("wsBean");
>    }
>
>    public String sayHello(String message) {
>       return real.sayHello(message);
>    }
>
>
>
>    public String doSomethingElse (String message) {
>       return real. doSomethingElse (message);
>    }
> }
> -----------------------------------------------------------------------
>
> I'm not a huge fan of this solution because it requires you to keep around
> this dummy class that doesn't do anything but create and call the Spring
> generated proxy. Then every time you want add a new method to the web
> service you would have to go back and update the dummy class as well. Isn't
> there a way to get Axis to instantiate and use the AOP proxy object from the
> Spring application context? Maybe some lower level handler in Axis can be
> overridden so you can inject the Spring object?
>
>
>
> It's my understanding that Axis2 has better support for Spring, but using
> Axis2 is not an option at this point.
>
>
>
> Thanks,
>
> Dave
>



--

Reply via email to