Jon,
No, you can't use Reflection, because you don't have a type to reflect
off of. That's what WSDL is for, it is the equivalent of a Type (more or
less) in web-services parlance. All that generated code is doing the work
of generating .NET type equivalents for the WSDL definition of the methods
exposed.
Now, if you look at the generated code, you'll notice that the class
derives from the SoapHttpClientProtocol class. There is nothing stopping
you from creating an instance of this class and setting the URL of the
service, then calling the Invoke method, passing the parameters you want to
the service, and getting the results. This is exactly what the typed
methods on the proxy do.
If you need to get further down to the metal, and want to process the
XML message that is returned to you, then you might want to use WCF, as it
will give you direct access to the message sent over the wire, and you can
work with it from there.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Jon Harrop" <jo*@ffconsultancy.comwrote in message
news:46**********************@ptn-nntp-reader02.plus.net...
>
So I'm just having a play with RPCs from C# using WSDL to generate lots of
C# code, compile it, load it in as a DLL and then call the functions. It
occurs to me that .NET should facilitate the run-time code generation that
makes these things so easy in languages like Python but Microsoft chose
the
code-generation and compilation route. Why? Can you not use reflection to
build an API on-the-fly?
--
Dr Jon D Harrop, Flying Frog Consultancy
The OCaml Journal
http://www.ffconsultancy.com/product...ournal/?usenet