I have a web service that I am calling and their published WSDL doesn’t actually define much of the service, 3/4 of it you have to manually build afterwards.
The problem I have is that they need a SoapHeader with some specific information in it, but I don’t have any way of doing it. The only real things I have for the service is a proxy method that was created (MyMethod) that I can pass my message to. How can I set/send a soap header with it as well?
All of the services I’ve had, I have been able to use the automatically bound items from Visual Studio.
I was able to get this done by modifying the auto-generated proxy code manually and simply injecting a class that inherited ‘SoapHeader’ and added the attribute to the method!
I cannot re-generate or re-fresh the proxy, but it got the job done, and only took 15 minutes.