hai
now i'm also working in wcf. i'm new to wcf.please reffer to me any website to return as object
Mr. Arnold wrote:
You cannot return 'Object' as it is not serializable with WCF.
17-Oct-09
You cannot return 'Object' as it is not serializable with WCF. If objects ar
going to be retuned, then they must be custom serialized objects that ar
decorated with the [Serializable] attribute
Of course BrokenRule is another class/object that is decorated with th
[Serializable] attribute returned within the already serialize
class/object. Shippers in the example
[Serializable
[DataContractAttribute(IsReference=true)
public class Shipper
private List<BrokenRule> _brokenrules = new List<BrokenRule>()
[DataMemberAttribute
public List<BrokenRule> BrokenRule
get { return _brokenrules;
set { _brokenrules = value;
[DataMemberAttribute
public Int32 ShipperID {get; set;
[DataMemberAttribute
public string CompanyName {get; set;
[DataMemberAttribute
public string Phone {get; set;
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4518 (20091017) _________
The message was checked by ESET NOD32 Antivirus
http://www.eset.com
Previous Posts In This Thread:
returning object from wcf service
wcf web service returns List<PickListEntity> where PickListEntity i
defined as
[DataContract
public sealed class PickListEntit
[DataMember
public string DisplayMember { get; set;
[DataMember
public object ValueMember { get; set;
ValueMember can be string, int or decimal depending on passed parameter
Calling this returns strange error about cannot deserializ
MultiCastDeletage when result is retrieved
Calling same method of ASMX web service works OK
How to return List<PickListEntity> from WCF web servie
Andrus.
You cannot return 'Object' as it is not serializable with WCF.
You cannot return 'Object' as it is not serializable with WCF. If objects ar
going to be retuned, then they must be custom serialized objects that ar
decorated with the [Serializable] attribute
Of course BrokenRule is another class/object that is decorated with th
[Serializable] attribute returned within the already serialize
class/object. Shippers in the example
[Serializable
[DataContractAttribute(IsReference=true)
public class Shipper
private List<BrokenRule> _brokenrules = new List<BrokenRule>()
[DataMemberAttribute
public List<BrokenRule> BrokenRule
get { return _brokenrules;
set { _brokenrules = value;
[DataMemberAttribute
public Int32 ShipperID {get; set;
[DataMemberAttribute
public string CompanyName {get; set;
[DataMemberAttribute
public string Phone {get; set;
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4518 (20091017) _________
The message was checked by ESET NOD32 Antivirus
http://www.eset.com
Using ASMX web service we can define object as return type and assingstring,
Using ASMX web service we can define object as return type and assin
string, int or decimalt to it in service
On client side string,int or decimal object is automatically deserialized
How to obtain same functionality in WCF
Andrus.
An ASP.NET legacy Web service is not an ASP.
An ASP.NET legacy Web service is not an ASP.NET WCF Web service, which ar
playing with two different set of rules
You cannot pass an object that WCF cannot serialize. it is a simple as that
(Object) cannot be serialized due to the way you are using it
Now, you can set Object to a serialized object and pass it as Objec
because Object is pointing to a class/object that can be serialized
http://www.danrigsby.com/blog/index...s-datacontractserializer-serialization-in-wcf
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4520 (20091018) _________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
And the way the class is decoreted without the [Seralizable] attribute,you are
And the way the class is decoreted without the [Seralizable] attribute,
you are not going to be able to return it, not in an ASP.NET WCF Web
service.
[DataContract]
public sealed class PickListEntity
{
[DataMember]
public string DisplayMember { get; set; }
[DataMember]
public object ValueMember { get; set; }
}
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4520 (20091018) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
Submitted via EggHeadCafe - Software Developer Portal of Choice
Server Side Processing in ADO.NET/WCF Data Services
http://www.eggheadcafe.com/tutorial...f-4f6f92a76585/server-side-processing-in.aspx