In order to embody XMLWebService, the heterogeneous platform is unrelated to the system-independent of the system-independent characteristics. To the students to demonstrate an example of using a Windows program to consume the service: the code is simple, just add the following line: Private void button1_click (Object sender, system.eventargs e) {get.service1 aa = new WS03.Get .Service1 (); string score = aa.getscore (ComboBox1.SelectedItem.toString (), ComboBox2.SelectedItem.toString ()). Tostring (); label3.text = "Student" ComboBoX1.SelectedItem.toString () " " ComboBox2.SelectedItem.tostring () " score is: " score;}
private void button2_Click (object sender, System.EventArgs e) {Get.Service1 AA = new WS03.Get.Service1 ();. string average = AA.GetAverage (comboBox1.SelectedItem.ToString ()) ToString (); label4.Text = "Students" ComboBox1.selectedItem.Tostring () "The average score is:" average;}
private void button3_Click (object sender, System.EventArgs e) {Get.Service1 AA = new WS03.Get.Service1 ();. string order = AA.GetOrder (comboBox1.SelectedItem.ToString ()) ToString (); label5.Text = "Students" ComboBox1.selectedItem.toTString () "is:" ORDER "Name";} and then write an ASP.NET program with VB.NET to call this service: The code is also very simple: Private Sub Button1_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim AA As New [Get] .Service1 Label1.Text = AA.GetScore (DropDownList1.SelectedItem.Text, DropDownList2.SelectedItem.Text ) End Sub
Private Sub Button2_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim AA As New [Get] .Service1 Label2.Text = AA.GetAverage (DropDownList1.SelectedItem.Text) End Sub