public static object Invoke(string url, string className, string methodName, object[] args, string protocolName, bool generateInMemory)
        {
            //设定编译参数
            CompilerParameters parameters = new CompilerParameters();

            parameters.GenerateExecutable = false;
            parameters.GenerateInMemory   = generateInMemory;

            parameters.ReferencedAssemblies.Add("System.dll");
            parameters.ReferencedAssemblies.Add("System.XML.dll");
            parameters.ReferencedAssemblies.Add("System.Web.Services.dll");
            parameters.ReferencedAssemblies.Add("System.Data.dll");

            return(WebServiceHelper.Invoke(url, className, methodName, args, null, parameters));
        }
 public static object Invoke(string url, string methodName, object[] args, bool generateInMemory)
 {
     return(WebServiceHelper.Invoke(url, null, methodName, args, null, generateInMemory));
 }
 /// <summary>调用服务方法</summary>
 /// <param name="url">WSDL服务地址</param>
 /// <param name="methodName">方法名</param>
 /// <param name="args">参数</param>
 /// <returns></returns>
 public static object Invoke(string url, string methodName, object[] args)
 {
     return(WebServiceHelper.Invoke(url, methodName, args, true));
 }