📄 test.java
字号:
package test.com.test;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.List;
import org.codehaus.xfire.XFireFactory;
import org.codehaus.xfire.client.XFireProxyFactory;
import org.codehaus.xfire.service.Service;
import org.codehaus.xfire.service.binding.ObjectServiceFactory;
import com.test.services.IHelloService;
public class Test {
public static void main(String args[]) {
Service srvcModel = new ObjectServiceFactory()
.create(IHelloService.class);
XFireProxyFactory factory = new XFireProxyFactory(XFireFactory
.newInstance().getXFire());
String helloWorldURL = "http://localhost:9090/xfire3/services/Hello";
try {
IHelloService srvc = (IHelloService) factory.create(
srvcModel, helloWorldURL);
System.out.print(srvc.getName("朱闰"));
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -