I use the following code to invoke a webservice from wsdl
dynamically, which is working perfectly:(see docs)
Now I want to have the raw data from the response. I found the following: (Docs)
But to use that example I need a place to add the method attribute of the extension. Because I invoke the webservice
method through reflection, I don't have the method definition in my code.
On the previous webpage
they are talking about creating a soapextension
to capture the raw messages.
But where do I need to apply the extension in the first code, to have a dynamic webservice invoker with the possibility to request the raw data?
I had to convert my code to use WCF instead of the legacy webservice support in C#. It's also possible to create a class with methods defined in the WSDL file. This allows me to invoke the webservice dynamically like I already did. On the following site I found some example code: http://blogs.msdn.com/b/vipulmodi/archive/2006/11/16/dynamic-programming-with-wcf.aspx
To get the raw data the only thing I needed to do was adding a behaviour to the endpoint of the service. I learned how to do that on the following page: http://mbsguru.blogspot.be/2012/11/capturing-and-using-raw-soap-messages.html