deploying and using web services at runtime (Again)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would be also interested in knowing if there a way to make a proxy for a
web service at runtime - the web service not existant when execution starts
-. Let me explain.

My executable starts running and while processing it does something that in
turn deploys a web service on a server running on the machine. At that
point, in the middle of execution - can I create a proxy for the newly
created web service and invoke it. Is there an easy way to do this ?
 
Faraz,

You could use the SoapHttpClientProtocol class and make the calls
dynamically. You can't create a strongly typed proxy and then access it.

However, if the web service that is created and deployed always has the
same set of signatures, then there is no reason you can not create a proxy
that is included in your app, and then set the Uri to the endpoint and make
the appropriate call when done.

Hope this helps.
 
what an odd thing to do!

The problem is that visual studio writes a good bit of code for you when you
make a web reference.

If the web service being deployed is the same on all systems, then this
isn't such a problem, because you can make the web reference in your dev
environment (and get the code) and then not call it on the target machine
until the web service exists.

If the web service is different in different situations, then this won't
work. You should take a look at the hidden code that VS makes for you when
you make a web reference. I haven't tried to write this code myself, but it
should be quite possible to do.

--- Nick
 
Back
Top