O'Reilly logo

Real World XML Web Services: For VB and VB .NET Developers by Yasser Shohoud

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

10.5. An Example Client

To show you how a client would interact with a Web service that uses the security and accounting extensions, I wrote a very simple client shown in Listing 10.9.

Listing 10.9. A simple client calling the Web service (VBWSClientCode\Chapter10\SecurityTestClient\Form1.vb)
 Private Sub btnCall_Click( _ ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnCall.Click Dim ws As New vbwsserver.CustomerOrders() Dim sessionId As String 'call LogOn sessionId = ws.LogOn(txtUid.Text, txtpwd.Text) 'create a new sessionHeader ws.SessionHeaderValue = New vbwsserver.SessionHeader() 'set the SessionId member of the session header ws.SessionHeaderValue.SessionId = sessionId 'now call the Web service Dim ds As DataSet ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required