The client, which I assume is SoapUI, expects an XML response (SOAP) but instead received an HTML response. Commonly, the HTML response it is an error message from the server. Open the HTML in a browser and/or read the contents of the message.
Authorization - WSDL File, Proxy class in C#
Hello,
I have received a WSDL file from a customer. With this I have created a proxy class via WSDL. --> IO
The server must be connected via Authorization.
I don't see anything there. How can I make the connection via Authorization?
The proxy class is quite complex. I need only 2 requests.
Is there any way I can best create the request. There is no support from the customer.
The alternative would be to create it myself via XDocument, which I am not in favor of.
private void btnOrderData_Click(object sender, EventArgs e)
{
using (PDXCSMEService danS = new PDXCSMEService())
{
//danS .Url = "";
// danS.Auto....???
Windows development | Internet Information Services
Windows for business | Windows Server | User experience | Other
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
Developer technologies | ASP.NET Core | Other
A set of technologies in .NET for building web applications and web services. Miscellaneous topics that do not fit into specific categories.
6 answers
Sort by: Most helpful
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
1 deleted comment
Comments have been turned off. Learn more
-
AgaveJoe 31,706 Reputation points2022-01-18T18:27:06.35+00:00 You still have not told us how the security works! If the service uses basic authentication and you have credentials then the pattern below will work.
static void Main(string[] args) { RemoteService.WebService client = new RemoteService.WebService() { Credentials = new NetworkCredential("username", "password"), PreAuthenticate = true, Url = "http://localhost/WebService/WebService.asmx" }; string resposne = client.HelloWorld(); Console.WriteLine(resposne); } -
AgaveJoe 31,706 Reputation points2022-01-17T13:11:04.377+00:00 There are several ways to secure a SOAP service. The members of this forum have no idea how the SOAP security works. You have no choice but to contact the service owners for support.
-
Ken Tucker 5,866 Reputation points2022-01-17T10:17:58.99+00:00 If you use wsdl.exe to generate the proxy class the class has a credentials property you can set to a network credentials