473,404 Members | 2,137 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,404 software developers and data experts.

Interfaces and web services in .Net.

Can I specify a custom Interface as the return type for a web service in
..Net?

I can see that you can't define ICollection as the return type but you can
defined IList as the return type?

Why is this?

Cheers

Jim

Nov 15 '05 #1
1 1041
I don't think it is reasonable, even if technically possible. Providing an
interface as a return value assumes that the client should have an ability
to invoke the methods of the interface and, therefore, have means to perform
calls over the network. So, the actual object instance will have to be
hosted on the server. This is possible with Remoting, but the nature of Web
Services is just not tailored for such purposes, I think.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Ollie" <ol**********@hotmail.com> wrote in message
news:eA**************@TK2MSFTNGP11.phx.gbl...
Can I specify a custom Interface as the return type for a web service in
.Net?

I can see that you can't define ICollection as the return type but you can
defined IList as the return type?

Why is this?

Cheers

Jim


Nov 15 '05 #2

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

Similar topics

1
by: baylor | last post by:
In C#, an interface cannot mark any method as static. i'm told the ILASM supports it but i've never tested that Two questions. First, why? OK, i've heard the reason about interfaces being...
8
by: Phil D | last post by:
Hi, I am new to c# and oop and have a question about interfaces which I hope someone can help me with. The book I am using (C# Step by Step) explains how to create and implement interfaces...
0
by: New Devil | last post by:
shud we have to implement the interfaces in C# or is there any other way for it e.g. TAPI3Lib.TapiConstants call=new TAPI3Lib.TapiConstants(); TAPI3Lib.ITDigitDetectionEvent...
0
by: Matt Sipes via DotNetMonster.com | last post by:
my C# code interface: namespace IShared; { public interface IChannelEntity { void SendMsg(string p_msg); void Exit(); } public interface IChannelEntityCallBack
7
by: tshad | last post by:
I am trying to figure out when it is best to use Interfaces and when to use classes. The only reason I can figure out to use interface is if you need to implement multiple interfaces. The...
1
by: John Cortright | last post by:
Hello! I've got an application that uses web services to traverse between various tiers, and we're passing complex data types back and forth as both parameters and return types. Originally, I...
24
by: Rob R. Ainscough | last post by:
VS 2005 I have: ClickOnce deployment User's that hate and or don't want to use an IE Client (don't blame them) I don't see how ASPX web pages are going to survive? With .NET 2.0 and clickonce...
18
by: _dee | last post by:
Question about best use of interfaces: Say there's a 'Master' class that needs to implement a few interfaces: class Master : I1, I2, I3 { } The actual code already exists in smaller...
22
by: RSH | last post by:
Hi, I have been reading on interfaces working on samples I've run across on the web. For the life of me I cannot seem to grasp them. It appears to me that interfaces are simply blueprints to...
0
by: Smokey Grindel | last post by:
I am writing an application on a 64bit workstation (XP Pro x64) and I am using reporting services which is installed as a 64bit sql server instance, but my project needs to reference the .NET...
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...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.