xfire 调用ASP。NET的webservers例子

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();
}

}
}

你可能感兴趣的:(.net,asp.net,asp)