Send a SOAP request, where to start?
.net, c#, soap
Solution
You can do this by adding a service reference to the endpoint URL you've provided in the question. Then you can call the web method as you would call a normal method, just off the client object. Step-by-step below:
- Right-click references, select add service reference
- Enter URL to add service reference
- In code instantiate new client and use as below:
ServiceReference1.NotificationPortTypeClient client = new ServiceReference1.NotificationPortTypeClient();
client.sendNotification(...);
Edit
Looking at the web service in more detail, it looks as though the SOAP request you have included in the question is the response that would be sent back by the url when you had invoked the method - not the request you would send to the web service to invoke the method.
Problem
I need to send a SOAP request to a URL. But i find this harder then i thought it would be. The request that i have to send is: ``` string bla = "" + "<?xml version='\"1.0\" encoding=\"UTF-8\"?>" + "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + "<soap:Body>" + "<ns1:sendNotificationResponse" + "xmlns=\"http://notification.services.adyen.com\"" + "xmlns:ns2=\"http://common.services.adyen.com\">" + "<notificationResponse>[accepted]</notificationResponse>" + "</sendNotificationResponse>" + "</soap:Body>" + "</soap:Envelope>"; ``` I've been given an URL: https://ca-test.adyen.com/ca/services/Notification?wsdl The problem is, is that I'm not sure how to go on from here. Can i simply just send a request to that URL? Or do I have to import the WSDL somehow first? I've found a lot of examples on the net, but I couldn't really make sense out of most of them. Some were even out dated, because they were still using: Microsoft.Web.Services3 So in short, I'm kinda clueless on what I exactly have to do here and how. I simply want to send that 'SOAP' message...