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 ...

Get Real World XML Web Services: For VB and VB .NET Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.