473,396 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Abstract Class Acting as Web Service -- Can it ??

Hey Guys
Just go easy on me .
I have an abstract class which is pure is a kind of asmx.

I know the answer that I am asking but still need somebody's advice.

Since it's an abstract class, the user of this web service would not be
able to make use of it since one cannot instantiate the abstract class.
the reason I am doing this as my implementation would be carried out to
another class and the developers can work independantly on other
classes full filling the objective of the work to be done.

So I have a class A which is pure virtual class(Abstract) which has
some methods of Type WebMethods and a class B derived from that , which
would do the deed.

So i obviously know that this would not work as the abstract class
cannot be instantiated.
So how do i go with the design??

I do want o follow the above design , If there is a war around could
any one of you guide me.

Thanks

Nov 16 '06 #1
2 2456
Abstract classes for a web service aren't uncommon, and in some respects are
a recommended approach. To expose the web service though, just make a class
that inherits the abstract class.

In ASP.NET Web service projects, just add the abstract class or assembly to
the project, add a new Web service class and have it inherit the abstract
class.

Ron

"Rahul" <ra*******@gmail.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
Hey Guys
Just go easy on me .
I have an abstract class which is pure is a kind of asmx.

I know the answer that I am asking but still need somebody's advice.

Since it's an abstract class, the user of this web service would not be
able to make use of it since one cannot instantiate the abstract class.
the reason I am doing this as my implementation would be carried out to
another class and the developers can work independantly on other
classes full filling the objective of the work to be done.

So I have a class A which is pure virtual class(Abstract) which has
some methods of Type WebMethods and a class B derived from that , which
would do the deed.

So i obviously know that this would not work as the abstract class
cannot be instantiated.
So how do i go with the design??

I do want o follow the above design , If there is a war around could
any one of you guide me.

Thanks

Nov 16 '06 #2
Thanks..

RYoung wrote:
Abstract classes for a web service aren't uncommon, and in some respects are
a recommended approach. To expose the web service though, just make a class
that inherits the abstract class.

In ASP.NET Web service projects, just add the abstract class or assembly to
the project, add a new Web service class and have it inherit the abstract
class.

Ron

"Rahul" <ra*******@gmail.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
Hey Guys
Just go easy on me .
I have an abstract class which is pure is a kind of asmx.

I know the answer that I am asking but still need somebody's advice.

Since it's an abstract class, the user of this web service would not be
able to make use of it since one cannot instantiate the abstract class.
the reason I am doing this as my implementation would be carried out to
another class and the developers can work independantly on other
classes full filling the objective of the work to be done.

So I have a class A which is pure virtual class(Abstract) which has
some methods of Type WebMethods and a class B derived from that , which
would do the deed.

So i obviously know that this would not work as the abstract class
cannot be instantiated.
So how do i go with the design??

I do want o follow the above design , If there is a war around could
any one of you guide me.

Thanks
Nov 16 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Michael G | last post by:
I am not sure why, in the RefinedAbstraction class, that the abstract baseclass' constructor can be called. I have always thought that abstract classes cannot be instantiated. It is a little...
2
by: Sebastien Degardin | last post by:
Hello, I need to use a Factory pattern to create services class. i have an interface --> MyService i can have an abstract class --> MyAbstractService i have several concrete class for this...
17
by: Medi Montaseri | last post by:
Hi, Given a collection of similar but not exact entities (or products) Toyota, Ford, Buick, etc; I am contemplating using the Abstraction pattern to provide a common interface to these products....
15
by: Tee | last post by:
Hi, I have a base usercontrol with a method (blank method, no code), I have another few usercontrols that will inherit this base usercontrol, but I want to force all the usercontrol that...
9
by: Anon Email | last post by:
Hi people, I'm learning about header files in C++. The following is code from Bartosz Milewski: // Code const int maxStack = 16; class IStack
33
by: Chris Capel | last post by:
What is the rationale behind the decision not to allow abstract static class members? It doesn't seem like it's a logically contradictory concept, or that the implementation would be difficult or...
4
by: drb | last post by:
Hi, I'm hoping this is a stupid question, so I apologize in advance. After creating WSDL files from scratch for a new web service, I used the WSDL.exe tool to generate C# stubs for both the...
1
by: D Witherspoon | last post by:
Coming up with a scenario here. For example there is the standard .NET MailMessage class. I am creating a project (let's call it CommonBase) that has the following 2 classes ...
0
by: Rahul | last post by:
I go tmy answre to the previos questions thanks to poster. I am a little confused, I have a class A that's a abstract class and Class B (non Abstract) is derived from it , Class A and B is...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.