beginner: add webreference at runtime

J

JK

Hi all,

I want to build some functionality in my ASP.NET app and do not know where
to start, so just asking for some basic advice...

Here is what I want to do:

1. Store webreferences and methods as strings in my sql server database
2. Retrieve such a string from the database
3. From my ASP.NET app set a reference to the corresponding webservice
3. Run a specified method (also stored in the database as string) optionally
with some parameters
4. Get the result and do something with it (like displaying xml data on a
datagrid)

I am having trouble with 3 and 4...

Can anyone give me some hints or even better: give me some examples?

Thanks a lot in advance!

Regards,

Joost
 
J

Jan Tielens

Do you only want to change the location of the webservice at runtime (url),
so the interface (wsdl) remains the same? Or do you want to be able any kind
of webservices on any location?

The first one is pretty simple: you can change the URL property. The second
one is a little more complex, but there is a nice library created by
Christian Weyer:
http://weblogs.asp.net/cweyer/posts/9769.aspx
Did you ever think about invoking your XML Web Services dynamically without
having to generate a client side proxy class at design/compile time with
wsdl.exe or Visual Studio .NET? - No need to know the exact Web Service
description and endpoint at compile/design time. Just get your WSDL from
UDDI (or from wherever you want, e.g. XMethods), specify the type to
instantiate and the methods to call ... voila! Can be used from any .NET
application or even an unmanaged resource.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top