///
/// remarks> /// /// Object obj = invokeebservice ("http://localhost/gsp_workflowwebservice/common.asmx", "menersoft.platform.service.workflow" , "Common", "GetToolType", new object [] {"1"}); /// code> /// /// code> /// example> Private Object InvokeWebService (String Url, String @Namespace, String Classname, String MethodName , object [] args) {try {system.net.WebClient wc = new system.net.WebClient (); system.io.stream stream = wc.Openread (URL "? WSDL"); System.Web.Services.Description .ServiceDescription sd = System.Web.Services.Description.ServiceDescription.Read (stream); System.Web.Services.Description.ServiceDescriptionImporter sdi = new System.Web.Services.Description.ServiceDescriptionImporter (); sdi.AddServiceDescription (sd, " "," "); System.CodeDom.CodeNamespace cn = new System.CodeDom.CodeNamespace (@namespace); System.CodeDom.CodeCompileUnit ccu = new System.CodeDom.CodeCompileUnit (); ccu.Namespaces.Add (cn); sdi .Import (CN, CCU); MI Crosoft.csharp.csharpcodeProvider CSC = New Microsoft.csharp.csharpcodeProvider (); system.codedom.compiler.icodeCompiler ICC = csc.createcompiler ();
System.CodeDom.Compiler.CompilerParameters cplist = new System.CodeDom.Compiler.CompilerParameters (); cplist.GenerateExecutable = false; cplist.GenerateInMemory = true; cplist.ReferencedAssemblies.Add ( "System.dll"); cplist.ReferencedAssemblies.Add ("System.xml.dll"); cplist.referencedassemblies.add ("system.web.services.dll"); cplist.referencedassemblies.add ("system.data.dll");