- 创建一个web项目
- 右键要发布的类,选择Web Services,create Web Service
- 一直下一步到结束
- 在WEN-INF/services/*/META-INF/services.xml添加
<parameter name="ServiceObjectSupplier"> org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier </parameter> <parameter name="SpringBeanName">userService</parameter>//服务端spring的Bean中id要一致
- 在生成的客户端中
UserServiceImplStub stub = new UserServiceImplStub(); UserServiceImplStub.Test test = new UserServiceImplStub.Test(); test.setName("123456"); System.out.println(stub.test(test).get_return());
时间: 2024-10-09 00:01:14