用Spring注解方式:
配置扫描指定包下的类
<context:component-scan base-package="包名" />
标识类为spring管理的bean
@Component("注入名称")
@Scope("注入方式")
public class LoginService
Axis2的services.xml文件配置:
<service name="loginService">
<description>WeatherService:Spring POJO Axis2 Service Sample</description>
<parameter name="ServiceObjectSupplier">
org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier
</parameter>
<parameter name="SpringBeanName">loginService</parameter>
<operation name="login" mep="http://www.w3.org/2004/08/wsdl/in-out">
<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
</operation>
</service>