示例#1
0
        private void button2_Click(object sender, EventArgs e)
        {
            SimpleService s = new SimpleService();
            NFU_Service.MySoapObject2[] ms = new NFU_Service.MySoapObject2[2];
            for (int i = 0; i < ms.Length; i++)
            {
                ms[i] = new NFU_Service.MySoapObject2();
                ms[i].Author2 = "中文";
                ms[i].Description2 = "The One that should be returned";
                ms[i].Name2 = i.ToString();
                ms[i].Text2 = "something something something " + i.ToString();
                ms[i].VoteCount2 = i * 2;
                ms[i].VoteTotal2 = (int)Math.Pow(ms[i].VoteCount2, 2);
            }

            NFU_Service.MySoapObject retn = s.ProcessMySoapObject(ms);
            // if output ArrayOfString
            // string[] retn2 = s.ProcessMySoapObject(ms);
            string output = "";
            output += retn.Author + "\t\t\r\n";
            output += retn.Description + "\t\t\r\n";
            output += retn.Name + "\t\t\r\n";
            output += retn.Text + "\t\t\r\n";
            output += retn.VoteCount.ToString() + "\t\t\r\n";
            output += retn.VoteTotal.ToString() + "\t\t\r\n";
            MessageBox.Show(output);
        }
示例#2
0
        private void button2_Click(object sender, EventArgs e)
        {
            SimpleService s = new SimpleService();

            NFU_Service.MySoapObject2[] ms = new NFU_Service.MySoapObject2[2];
            for (int i = 0; i < ms.Length; i++)
            {
                ms[i]              = new NFU_Service.MySoapObject2();
                ms[i].Author2      = "中文";
                ms[i].Description2 = "The One that should be returned";
                ms[i].Name2        = i.ToString();
                ms[i].Text2        = "something something something " + i.ToString();
                ms[i].VoteCount2   = i * 2;
                ms[i].VoteTotal2   = (int)Math.Pow(ms[i].VoteCount2, 2);
            }

            NFU_Service.MySoapObject retn = s.ProcessMySoapObject(ms);
            // if output ArrayOfString
            // string[] retn2 = s.ProcessMySoapObject(ms);
            string output = "";

            output += retn.Author + "\t\t\r\n";
            output += retn.Description + "\t\t\r\n";
            output += retn.Name + "\t\t\r\n";
            output += retn.Text + "\t\t\r\n";
            output += retn.VoteCount.ToString() + "\t\t\r\n";
            output += retn.VoteTotal.ToString() + "\t\t\r\n";
            MessageBox.Show(output);
        }
 /// <remarks/>
 public void ProcessMySoapObjectAsync(MySoapObject2[] soapObjects) {
     this.ProcessMySoapObjectAsync(soapObjects, null);
 }
 /// <remarks/>
 public void ProcessMySoapObjectAsync(MySoapObject2[] soapObjects, object userState) {
     if ((this.ProcessMySoapObjectOperationCompleted == null)) {
         this.ProcessMySoapObjectOperationCompleted = new System.Threading.SendOrPostCallback(this.OnProcessMySoapObjectOperationCompleted);
     }
     this.InvokeAsync("ProcessMySoapObject", new object[] {
                 soapObjects}, this.ProcessMySoapObjectOperationCompleted, userState);
 }
 public MySoapObject ProcessMySoapObject(MySoapObject2[] soapObjects) {
     object[] results = this.Invoke("ProcessMySoapObject", new object[] {
                 soapObjects});
     return ((MySoapObject)(results[0]));
 }