public class WSETest: System.Web.Services.WebService
When I do that, the next exception is as follows:
Microsoft.Web.Services2.Addressing.AddressingFault: Destination Unreachable ---> System.Exception: WSE817: The <To> header must match the Actor attribute on this receiver. The <To> header contained "http://yaddayadda.imaginets.com/testing/WSEtest/test.asmx" whereas the Actor attribute was "soap://imaginets.com/WSETest".
Here is the question:
What is the easiest way to change the SOAPheader <To> to use the Actor attribute above, by configuring the client proxy?
The WSE documentation says that you can create a different proxy class using the WseWsdl2.exe tool.
C:\Program Files\Microsoft WSE\v2.0\Tools\Wsdl>wsewsdl2 http://localhost/wsetest/test.asmx?wsdl -name "soap://imaginets.com/WSETest" WSeTestsoap.cs
There are some problems with the resulting proxy class (WSeTestsoap.cs):
1. You have to also add a reference to System.Web (minor)
2. The proxy class is much different than the auto-generated classes when you add a web reference via the VS.IDE. Very much unlike the proxy classes created in the IDE, where there is a WSETest proxy and a WSETestWse proxy that are very similar in nature.
3. The URL for the endpoint is set in the constructor, so I suspect it will be difficult to change after.
I would prefer to use the proxy class generated by the VS.IDE and not the wsewsdl2.exe tool. Is it possible?
I think the answer lies in the WSETestWse.RequestSoapContext class and its sub-classes, but I'm unsure of how to do that.
(Aside: the root of this problem is that the SoapActor attribute is not described anywhere in the WSDL, so the wsdl proxy generators, neither the VS.IDE nor the WseWsdl2.exe, cannot determine that the proxy classes must set the appropriate Actor. They have added a command line switch for it to WseWsdl2.exe, but the resulting proxy classes are not similar enough to the IDE's proxies to be immediately useful.)
Anyone got any suggestions for me?