论坛首页 Java企业应用论坛

xfire 调用ASP。NET的webservers例子

浏览 3111 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2011-02-22   最后修改:2011-02-22
SOA
import java.net.URL;
import org.codehaus.xfire.client.Client;

public class Test {
public static void main(String[] args) {
try {
//xfire  调用ASP。NET的webservers
String serivceURL = "http://www.51bsp.com:8012/OrderService.asmx?wsdl";
Client client = new Client(new URL(serivceURL));
Object[] params = {"张三",13};//如果有参数就按顺序写    没参数就   params = {};

Object[] res = {};
res = client.invoke("HelloWorld", params);

for (Object object : res) {
System.out.println(object);
}
} catch (Exception e) {
e.printStackTrace();
}

}
}
   发表时间:2011-09-21  
这个代码测试过吗
0 请登录后投票
   发表时间:2011-12-02  
如果参数是一个JAVABEAN怎样写?
  • lib.rar (720.9 KB)
  • 下载次数: 26
0 请登录后投票
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics