Webservice Authentication Made Simple

< system.web.services.webservice(description:="authentication
Name:=”AD”, _
Namespace:=http://Tempuri.org/AD/AD) > _
Public Class VPO
Inherits System.Web.Services.WebService

#Region ” Web Services Designer Generated Code “

‘Implimentation of the Header Class
Public Authentication As AuthHeader

‘The soapheader attribute tells the interface what to do.
< system.web.services.webservice(description:="authentication
CacheDuration:=0, _
Description:=”Test Interface with Return”, _
EnableSession:=False, _
MessageName:=”TestReturn”), _
SoapHeader(“Authentication”) > _
Public Function HelloWorld() As String
Return “Hello World: ” & Authentication.VerndorID.ToString
End Function
End Class

‘This is the class that defines what is being passed in the authentication
Public Class AuthHeader
Inherits SoapHeader
Public VerndorID As Guid
End Class

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.