Lets consume this service from a client on Hogwarts
Now I am attaching VB code, which will consume the web service on the previous page. Kindly refer to details in the zip files on the previous page, which shows how to consume a web service. The purpose of attaching this piece of code is only to show what has to be done inorder to get your application working on a mobile phone. IMPORTANT: THIS CLIENT ON HOGWARTS HAS TO BE CREATED USING ASP.NET MOBILE and not just ASP.NET, ELSE IT WON'T WORK.
Public Class MobileWebForm1
Inherits System.Web.UI.MobileControls.MobilePage
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim a, b As String
a = Request.QueryString("user") ' will accept input from the php/wml file which resides on people.clemson.edu
b = Request.QueryString("pass") ' will accept input from the php/wml file, which resides on peopel.clemson.edu
Dim name1 As String
If ((a = "") Or (b = "")) Then
name1 = "Incomplete Form"
Else
Dim getobj As mobile.Service1 = New mobile.Service1 ' consume the web service
name1 = getobj.getName(a, b)
End If
Dim url, name2 As String
name2 = name1.Replace(" ", "%20")
url = "http://people.clemson.edu/~kchopra/project2/output.php?hello=" & name2
Response.Write(url) ' extremely important statement. Please put this in your code
End Sub
End Class
In the above code, name1 and name2 have the required data that has been obtained from the database. Kindly take note of the file OUTPUT.PHP in the above url.
Click here for code that has to written on PEOPLE.CLEMSON.EDU