Using a Class Factory to Return a Web Service

J

johntallon

Hi People,

I have a question regarding Web Service and Class Factories.

I have a Collection of Web Services that do specific jobs. There are
about 15 in all. These services are in one VS.NET project.

I have created a Base Web Service Class, that implements Authenticate,
Exception Handling and a few other common functions.

My Other Web Service Classes inherit this Base web service, as well as
add there own specific functionality, such as Login, Updates, and some
other functionality.

What I would like to do is use a Factory to Create the Appropreate Web
Service by using a Parameter in the Factory.Create Class eg:

BaseService Factory.Create(string ServiceName)
{
if(ServiceName == "User")
return new UserService();

if(ServiceName == "Lists")
return new ListService();

if(ServiceName == "Payments")
return new PaymentsService();
}

Now I know that this code is not exactly right for WebServices, but I
want to use the same Pattern.

Is there a way I can call a factory to Create a Service which is
derived from the baseService Web Service?

Any Ideas would be great...

Thanks
 
V

Vishakha

Hi Johntallon!

I want a list of web services which do some specific job for creating some
forms in XSN.
I would b very grateful if u send me the list of web services in u'r
collection.

Thanks,
Vishu
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top