all groups > dotnet web services > june 2004 >
You're in the

dotnet web services

group:

Dynamic WSDL?


Dynamic WSDL? Wayne
6/24/2004 1:57:13 PM
dotnet web services: I have a way for doing plugin's in my gui app. These plugins have to talk to
a webservice to do database calls. I've done the DB access as a web service
so it can be shared with the rest of the company, if not for the want of
reuse the gui app would have just simply accessed the DB Directly and each
plugin in would have been fully self contained. Each time I create a new gui
plugin I find myself modifying the web service to add new support for the
new gui plugin. This forces our QA staff to have to re-test the entire app,
as well as I have to, which the plugins are suppose to prevent. However I've
not come up with a good way to increase the functionality of the webservice
as I need to. From what I know the WSDL of the webservice is static, unless
it is rebuilt.

I know I could use a generic Method in the webservice, and based on what is
passed determine what to do, but that would defeat the purpose of a self
describing webservice.

I would like to have the new functionality exposed each time something is
added, and more importantly have it removed once the new functionality goes
away.

Anyone have any suggestions of a way to have a plugin based webservice?
something that may allow the change of the WSDL at run time?

Thanks
Wayne

Re: Dynamic WSDL? Wayne
6/29/2004 8:32:25 AM
Anyone?


[quoted text, click to view]

Re: Dynamic WSDL? Dino Chiesa [Microsoft]
6/30/2004 1:17:25 AM
You don't want to allow changing of WSDL, by definition. If you change the
WSDL then you need to recompile, and you just told us you don't want that.
So, no changing the WSDL.

Instead what you seem to want is a WSDL that is extensible. The same WSDL
can carry requests and responses of different types. This is a different
thing.

This is possible to do, using xsd:any (wildcard) types in the message
schema.

But can you give us all a more concrete example of how you want to extend
the webservice? What is the nature of the changes the webservice needs to
support?

(you can leave out the details of the DB Access, and the GUI app, and
anything else that is orthogonal to the WSDL and webservice design)

Or Maybe just check this out:
http://msdn.microsoft.com/library/en-us/dnservice/html/service04162003.asp
....which talks about a generic webservice that can dynamically validate
incoming requests. Serialization and de-serialization of requests and
responses is a bit more manual, but it may give you the flexibility you
desire.

-D



[quoted text, click to view]

Re: Dynamic WSDL? Wayne
6/30/2004 9:33:24 AM
I will take a look at the link you provided. I hope the following may be a
bit more descritpive to what I want.

Today I have a web service with the following methods

GetUserList
GetInspectionList
GetUser
GetInspection

Some new requirement comes up and now I need to get a Document from the
database, so I would like to have a web service with the following

GetUserList
GetInspectionList
GetUser
GetInspection
GetDocument

But what I don't want to do is have to recompile the web service to add the
GetDocument, I would like the ability to add the GetDocument method simply
by dropping a new ClassAssembly in the directory where the main ASPX and DLL
exists.

Hope this makes more sense. I don't want to do it genericly in the resepct
that the web service has an ExecuteMethod that accepts one param and from
that param figures out it has to run GetUserList or run GetInspectionList. I
want the new methods to just show up as part of the available methods once I
drop in a new Class Lib.

Thanks
Wayne


[quoted text, click to view]

Re: Dynamic WSDL? Dino Chiesa [Microsoft]
7/2/2004 8:47:59 AM
yes it makes sense.

I don't know of an architecture that allows this.

You can do it at a different level, of course.
"Dropping in" a single ASMX with a single method, you will get this dynamic
behavior.
No recompiling, at least not explicitly.
But the new ASMX will have its own WSDL .

I can imagine setting up a separate FileSystemWatcher app, and when it sees
a new DLL in a specific directory, it starts up, examines each DLL in the
plugin directory, and generates a webmethod for the "method" exposed in
that DLL. Then the agent app generates a new ASMX and drops it into a web
directory. Basically, just-in-time generation of ASMX based on the list
of DLLs you drop in.

So maybe there are ways to get what you want but probably not automatically
..
-D

[quoted text, click to view]

Re: Dynamic WSDL? Wayne
7/2/2004 8:55:50 AM
Actually the auto generation of the asmx may be a way I could go, I'll let
you know if I am able too. Not sure how it would fly with the QA structure
we have here as the ASMX is being modified, comes down to do we still need
to test it.

Thanks
Wayne


[quoted text, click to view]

AddThis Social Bookmark Button