views:

11

answers:

0

I've spent a while looking at this but am struggling to get any useful answers.

Basically I have a SoapHttpClientProtocol that I've compiled from a WSDL previously. I then get the MethodInfo for my particular method from the clientProtocol and Invoke it using the standard Invoke method.

What you get back is just the response from the web service cast as an object. What I want to do is get the actual SOAP response that is passed back so I can get into the actual XML. I have seen a non-thread safe way of doing this but that is no help in this case. Does anyone know a way of doing this. Maybe some form of proxy?

Would be extremely grateful if anyone could help.

Assembly assembly = GetLoadedAssembly(@"C:\Assembly.dll");
SoapHttpClientProtocol instanceType = (SoapHttpClientProtocol)assembly.CreateInstance("MyMethod");

MethodInfo method = instanceType.GetType().GetMethod(methodName);
object[] objParameters = {"a parameter"};
object response = method.Invoke(instanceType, objParameters);