jaxrpchelloworld.java
来自「java webservice axis的一个简单实现」· Java 代码 · 共 27 行
JAVA
27 行
package com.test.webservice;
import javax.xml.rpc.ServiceException;
import org.springframework.remoting.jaxrpc.ServletEndpointSupport;
import com.test.IHelloWorld;
public class JaxRpcHelloWorld extends ServletEndpointSupport implements IHelloWorld
{
private IHelloWorld helloWorld;
protected void onInit() throws ServiceException {
//在Spring容器中获取Bean的实例
helloWorld = (IHelloWorld) getApplicationContext().getBean(
"helloWorld");
}
public String getMessage(String name) {
//执行Bean中的相同的方法
return helloWorld.getMessage(name);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?