Hello:
I've been looking around for a way to create an IHttpHandler for
webmethods...something that doesn't need a physical *.asmx page to be
installed.
So far I've found no quick and dirty way other than starting again with
IHttpHandler, getting the incoming stream converted to and XmlDocument, and
parsing the xml nodes for the various indicators of what method to call
(SoapAction, etc.).
This seems just about within my reach...except for the part on how to
deserialize the XML to arguments of the right type for an invokation.
For example, if an incoming arg is:
<PointA>
<x>100</x>
<y>100</y>
</PointA>
how do I get it to be converted to a Point object for the call:
bool MyFunction(Point qA){...}
Is it that I am thinking about it backwards? Should I instead:
Start out from the SoapAction to get MethodInfo for the function I am going
to invoke,
get its Arguments[] somehow,
loop through these,
instantiate a tmp for each one based on the values given? This looks trivial
for simple types -- not so trivial for complex types (Some complex types
might have constructors that accept no args, other type contructors that do,
but have no set -- just get properties, etc...)
Anyway -- any feedback to all this spagetti is greatly appreciated --
especially a message saying "Sky, you ninny -- you don't have to reinvent
the wheel! The way to invoke WebMethods without a physical page is:....."
=:-)
Thanks very much in advance,
Sky