Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Service.

Similar presentations


Presentation on theme: "Web Service."— Presentation transcript:

1 Web Service

2 建立Web Service網站

3 .vb檔案 Web Service區塊

4 .asmx檔案 以 ASP.NET 指示詞 WebService 為開頭

5 建立Web Service <WebMethod()> _
Public Function area(ByVal length As String, ByVal width As String) As Integer Dim x, y As Integer x = Convert.ToInt32(length) y = Convert.ToInt32(width) Return x * y End Function 計算方形面積

6 建置Web Service

7 執行Web Service

8 測試Web Service

9 傳回XML結果

10 呼叫使用 Web Service ASP.NET

11 呼叫使用Web Service 建立callWS網站

12 加入Web 參考(1)

13 加入Web參考(2)

14 呼叫使用Web Service

15 呼叫使用Web Service Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim myService As myws.Service = New myws.Service Dim z As Integer z = myService.area(TextBox1.Text, TextBox2.Text) TextBox3.Text = z.ToString() End Sub

16 呼叫使用 Web Service Windows Form

17 呼叫使用Web Service 建立callWS專案

18 加入Web 參考(1)

19 加入Web參考(2)

20 呼叫使用Web Service Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim myService As myws.Service = New myws.Service Dim z As Integer z = myService.area(TextBox1.Text, TextBox2.Text) TextBox3.Text = z.ToString() End Sub


Download ppt "Web Service."

Similar presentations


Ads by Google