Click here to Skip to main content
15,907,497 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi to all
The below function return type IFeatureReader is a interface..
In interface webservices not accept..how can i achive this in webservice..
public IFeatureReader GetSite (IConnection connection,
long site_id)
I referrd google and many links,i didnt get clear idea on this.
Posted
Comments
Rajesh Anuhya 3-Dec-10 2:07am    
where is the below function.., can you provide the code./
thatraja 3-Dec-10 4:28am    
Complete your question by adding things which you have missed here.

1 solution

What I read from your question is, that you want to use interfaces as parameters or return types in a webmethod of a webservice.

If that is right, then you are out of luck. You can only use serializable types as parameters in a webmethod. When calling a webmethod, all parameters are serialized, transmitted and then deserialized at the receiving end. Deserializing means creating a new instance and filling it with the transmitted values. Now, of what exactly shall an instance be created in case of an interface type?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900