I am trying to create a SOAP client in ASP.NET, framework 3.5, using Basic Authentication and WS Security All of the examples I have seen use a WSDL endpoint - unfortunately the way that the Web service is designed, one invoked a web method directly - WSDL
is not available - so I cannot use 'add a service reference'
Endpoint is something like: https://webservice.com/GetFirstName I have a username and password.
USING SMARTBEAR SOAP UI client (great tool!), I got this to work by creating an XML request like:
<'element'> '<'UserID'>'frank1<''<'UserID'> <'element'>
Then I enter the Endpoint URL, credentials.
When I execute, I hit the endpoint with username/password, authenticates, and I get an XML response like:
<'data contentType="application/xml; charset=UTF-8" contentLength="515"> '' <'element'> <'FirstName'>Frank<'/FirstName> <'/element'>
So the above is working in SOAP UI Client.
So now how do I go about transitioning this to work in an ASP.NET application? I have some experience with WCF, but again most examples I have seen expect a WSDL which I don't have.
How can I create a SOAP object envelope, using Basic authentication, populate the SOAP header with credentials, populate the body with the example XMl above, and then target the URL endpoint to get this to work? (Hope I have worded this correctly)