用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>

来自:http://sunpfsj.blog.163.com/blog/static/1770500972013424113314769/

Spring注解+Axis2开发WebService的更多相关文章

  1. Spring集成XFire开发WebService

    Spring是眼下最流行的JavaEE Framework,可是使用Spring的Spring-WS开发WebService却十分繁琐.XFire是一个简化WebService开发的开源项目.通过Sp ...

  2. Axis2开发WebService客户端 的3种方式

    Axis2开发WebService客户端 的3种方式 在dos命令下   wsdl2java        -uri    wsdl的地址(网络上或者本地)   -p  com.whir.ezoffi ...

  3. 1、课程简介-Spring 注解驱动开发

    1.课程简介-Spring 注解驱动开发

  4. 0、Spring 注解驱动开发

    0.Spring注解驱动开发 0.1 简介 <Spring注解驱动开发>是一套帮助我们深入了解Spring原理机制的教程: 现今SpringBoot.SpringCloud技术非常火热,作 ...

  5. 【Spring注解驱动开发】聊聊Spring注解驱动开发那些事儿!

    写在前面 今天,面了一个工作5年的小伙伴,面试结果不理想啊!也不是我说,工作5年了,问多线程的知识:就只知道继承Thread类和实现Runnable接口!问Java集合,竟然说HashMap是线程安全 ...

  6. 【Spring注解驱动开发】组件注册-@ComponentScan-自动扫描组件&指定扫描规则

    写在前面 在实际项目中,我们更多的是使用Spring的包扫描功能对项目中的包进行扫描,凡是在指定的包或子包中的类上标注了@Repository.@Service.@Controller.@Compon ...

  7. 【Spring注解驱动开发】自定义TypeFilter指定@ComponentScan注解的过滤规则

    写在前面 Spring的强大之处不仅仅是提供了IOC容器,能够通过过滤规则指定排除和只包含哪些组件,它还能够通过自定义TypeFilter来指定过滤规则.如果Spring内置的过滤规则不能够满足我们的 ...

  8. 【Spring注解驱动开发】使用@Scope注解设置组件的作用域

    写在前面 Spring容器中的组件默认是单例的,在Spring启动时就会实例化并初始化这些对象,将其放到Spring容器中,之后,每次获取对象时,直接从Spring容器中获取,而不再创建对象.如果每次 ...

  9. 【Spring注解驱动开发】使用@Lazy注解实现懒加载

    写在前面 Spring在启动时,默认会将单实例bean进行实例化,并加载到Spring容器中.也就是说,单实例bean默认在Spring容器启动的时候创建对象,并将对象加载到Spring容器中.如果我 ...

随机推荐

  1. oracle导入expdp、导出impdp数据库用户

    仅限oracle服务器上执行:把172.16.251.136:1521/orcl的AMI4_2用户导入到192.168.2.30:1521/orclss中的AMI1用户:  关于导入导出更详细的见文章 ...

  2. centos7.0 安装日志--图文具体解释-python开发环境配置

    centos7.0公布之后,就下载了everthing的DVD镜像.今天有时间,所以决定在vbox底下体验一番--- 上图: watermark/2/text/aHR0cDovL2Jsb2cuY3Nk ...

  3. audio_coding模块分析和audio_conference_mixer模块分析

    audio_coding 1. 主要接口      AudioCodingModuleImpl::RegisterReceiveCodec 初始化Codec      AudioCodingModul ...

  4. 【1】按照Django官网,编写一个web app 创建project/配置数据库

    1. Creating a project From the command line, cd into a directory where you'd like to store your code ...

  5. UVA 11426 - GCD - Extreme (II) 欧拉函数-数学

    Given the value of N, you will have to find the value of G. The definition of G is given below:G =i< ...

  6. CountDownTimer,0,0

    @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); s ...

  7. redis windows安装与使用

    是什么 Redis(Remote Dictionary Server)远程字典服务器 开源免费 C语言编写的 key/value分布式内存数据库,基于内存运行 Redis支持数据的持久化,可以将内存中 ...

  8. poj--3159--Candies(简单差分约束)

    Candies Time Limit: 1500MS   Memory Limit: 131072K Total Submissions: 26888   Accepted: 7398 Descrip ...

  9. Ztree自动触发第一个节点的点击事件

    1.代码 $(function () { var setting = { //check属性放在data属性之后,复选框不起作用 //check: { // enable: true //}, dat ...

  10. Cookie是存储在客户端上的一小段数据

    背景 在HTTP协议的定义中,采用了一种机制来记录客户端和服务器端交互的信息,这种机制被称为cookie,cookie规范定义了服务器和客户端交互信息的格式.生存期.使用范围.安全性. 在JavaSc ...