Public Class WebLink Public WebServiceLink As WebService.HTNGListenerSoap = New WebService.HTNGListenerSoap Function BuildCredentials(ByVal UserName As String, ByVal Password As String) Dim myCache As New CredentialCache myCache.Add(New Uri(WebServiceLink.Url), "basic", New NetworkCredential(UserName, Password)) WebServiceLink.Credentials = myCache.GetCredential(New Uri(WebServiceLink.Url), "basic") WebServiceLink.PreAuthenticate = True Return True End Function Function ReceiveMessageAsync(ByRef XmlString) Dim Result As String = "Success" Try WebServiceLink.ReceiveMessageAsync(XmlString) Catch loExc As Exception Me.exception = loExc Result = loExc.Message End Try Return Result End Function Function Connect(ByVal UserName As String, ByVal Password As String) Return Me.BuildCredentials(UserName, Password) End Function End ClassI call the Connect function and then the ReceiveMessageAsync, however, when I look at the soap message:
POST /interface/<HostASMX>HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.1433) Content-Type: text/xml; charset=utf-8 SOAPAction: "http://htng.org/1.1/Listener.Wsdl#ReceiveMessageAsync" Host: <HostName> Content-Length: 6887 Expect: 100-continue Connection: Keep-Alive <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><Request xmlns="http://htng.org/1.1/Listener.Wsdl"><?xml version="1.0" encoding="UTF-8"?There appears no header and no username or password?