|
|
Rank: Newbie Coder Groups: Member
Joined: 6/29/2012 Posts: 4 Points: 12 Location: turkey
|
Hi ;
I have been using your technology for 1 month. Everything went well. I'm able to publish my wcf services from iis with net-tcp and get these services from my flex client and everything works great and so fast.But after one case i realized that weborb cannot obey the wcf rules. I m defining some properties with data member.Like
[DataContract] public class Class A
[DataMember] public string Name { get { return mAdi; } set { mAdi = value; } }
public string Surname { get { return mAdi; } set { mAdi = value; } }
When I publish this class i need to get only "Name" property. I'm not defining data member signutare but I also get surname property. Is there any way to restrict these properties with some rules from webConfig or something else.Its an urgent information for me. Thanks...
|
|
 Rank: Administration Groups: Administration
Joined: 8/21/2006 Posts: 1,607 Points: 4,082 Location: Frisco, TX
|
Hi, You can exclude properties using the PropertyExclusion attribute. See the documentation for details: http://www.themidnightcoders.com/fileadmin/docs/dotnet/v5/property_exclusion.htmRegards, Mark
Mark Piller Midnight Coders, Inc. twitter: midnightcoderblog: blog.themidnightcoders.comwebsite: www.themidnightcoders.com
|
|
Rank: Newbie Coder Groups: Member
Joined: 6/29/2012 Posts: 4 Points: 12 Location: turkey
|
What if we have already written entire framework just obeying the rules of wcf and using it nature signatures. Do we really have to refactor all of our codes and add your signature and also add your dll into our core framework. If we dont want to add any external dll to our core framework is it impossible to use your product?? By the way , if you support wcf,why do you ignore the native signature of wcf and push your consumer to use different signature? Thanks
Onur
|
|
 Rank: Administration Groups: Administration
Joined: 8/21/2006 Posts: 1,607 Points: 4,082 Location: Frisco, TX
|
Onur, You do not need to rewrite your signatures, all you need to do is to add an attribute. WebORB exposes your class not only as a WCF service, but also as a plain .NET class. Our attribute takes care of property exclusion in both cases. Also, if you do not define the "Surname" property on the client, it will never show up even you do not exclude it explicitly. Mark
Mark Piller Midnight Coders, Inc. twitter: midnightcoderblog: blog.themidnightcoders.comwebsite: www.themidnightcoders.com
|
|
Rank: Newbie Coder Groups: Member
Joined: 6/29/2012 Posts: 4 Points: 12 Location: turkey
|
Hi Mark,
Thanks for your reply but could you please explain this sentence more specific .
Also, if you do not define the "Surname" property on the client, it will never show up even you do not exclude it explicitly. ?
|
|
 Rank: Administration Groups: Administration
Joined: 8/21/2006 Posts: 1,607 Points: 4,082 Location: Frisco, TX
|
Your class A has two representations, it is defined on the server-side as a .NET "Class A", it also has a representation in flex as an ActionScript class (which I assume has the same name). The structure of the class (the fields and properties) they define should be the same, however, the ActionScript side does not need to have a field or property ("public function set XXX") for all the corresponding server-side properties. That means if your AS class does not define the "Surname" property, it will never be initialized with a value when WebORB returns an instance of A to the client. Hope it makes it clearer. Regards, Mark
Mark Piller Midnight Coders, Inc. twitter: midnightcoderblog: blog.themidnightcoders.comwebsite: www.themidnightcoders.com
|
|
Rank: Newbie Coder Groups: Member
Joined: 6/29/2012 Posts: 4 Points: 12 Location: turkey
|
Thanks Mark
I'm gonna try your explanation hopefully it would help us.I'll let you know...
Onur
|
|
|
Guest |