<WebService(Namespace:="http://www.wrox.com/helloworld")> _
<WebServiceBinding(ConformanceClaims:=WsiClaims.BasicProfile1_1, _
EmitConformanceClaims:=True)> _
Public Class HelloSoapHeader
Inherits System.Web.Services.WebService
Public myHeader As HelloHeader
<WebMethod(), SoapHeader("myHeader")> _
Public Function HelloWorld() As String
If (myHeader Is Nothing) Then
Return "Hello World"
Else
Return "Hello " & myHeader.Username & ". " & _
"<br>Your password is: " & myHeader.Password
End If
End Function
End Class
|