I'm attempting to consume a SOAP service that requires HTTP Basic Authentication (over HTTPS).
I'm using WSE 3.0 on Visual Studio 2008.
Here's the basics...
And from Main
Public Sub New(ByVal destination As EndpointReference)
Public Function RequestResponseMethod(ByVal envelope As SoapEnvelope) As SoapEnvelope
Return MyBase.SendRequestResponse("getRecords", envelope)
None of these objects contains anything that looks like 'Credentials' or 'HTTPHeaders'...
Dim sncuri As Uri = New Uri("https://site.com/path.do?SOAP")
Dim destination As EndpointReference = New EndpointReference(sncuri)
Dim client As SNCClient = New SNCClient(destination)
Dim result As SoapEnvelope = client.RequestResponseMethod(message)
Catch ex As AsynchronousOperationException
I've tried doing https://email@example.com/path.do?SOAP in my URI, without effect.
I've also tried going the more direct route, creating a SoapEnvelope and SoapSender separately, but they didn't have any credential related properties in their object either.
Finally, I tried consuming the WSDL directly through the "Add Service Reference". This consumed the service definition, but the object still doesn't contain anything related to credentials. All the online examples show
But that method isn't available to my object.
I read that "to be able to use the WSS methods to access the security headers, the proxy class has to inherit Microsoft.Web.Services.WebServicesClientProtocol", but it didn't bother telling me how to do that.
I'm very frustrated with VB, right now... I'm pretty sure I could have implemented SOAP from basic HTTP and XML classes in less time than I've spent searching for this solution, and that's what I'll do tomorrow if this cry for help goes unanswered.