日期:2014-05-18 浏览次数:20737 次
import java.util.Map;
import java.util.Vector;
import java.util.Iterator;
import java.util.Arrays;
import org.apache.axis.wsdl.symbolTable.*;
public class wsCaller {
/**
* @param args
*/
public static void main(String[] args) {
String wsdlLocation =
"http://192.168.1.113/ReadOffice/ReadWord.asmx?wsdl";
String serviceName = "ReadWord";
String operationName = "read";
String strFirstParam = "c:\\nlb.log";
String strSecondParam = "0";
String strThirdParam = "200";
String portName = "ReadWordSoap";
/*
* 添加web service方法的输入参数到Vector
*/
Vector parameterValues = new Vector();
parameterValues.addElement(strFirstParam);
parameterValues.addElement(strSecondParam);
parameterValues.addElement(strThirdParam);
try
{
DynamicInvoker invoker = new DynamicInvoker(wsdlLocation);
/*
* 遍历web service每一个方法,获取serverName、参数列表以及类型的过程
*/
Vector vServices = invoker.enumServiceNames();
Object[] Services = vServices.toArray();
&nb