Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / September 2006

Tip: Looking for answers? Try searching our database.

Custom types across WS

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Max André Bündchen - 05 Sep 2006 13:22 GMT
When a web method return a custom class, like a Employee definition, the
proxy definition in the client recriate the definition of Employee using the
public fields/properties of the original class.
In this process all custom methods of the Employee definition was lost in
the client.

My question is: if server and client are developed in .Net 2.0 there's a way
to create a Employee object in one side and take the full object in the other
side of the web method, using the same Employee assembly in both sides?

Take off the option of instanciating a Employee object and hardcode the
migrations of the fields from proxy class to biz class.
John Saunders - 06 Sep 2006 17:58 GMT
> When a web method return a custom class, like a Employee definition, the
> proxy definition in the client recriate the definition of Employee using
[quoted text clipped - 11 lines]
> Take off the option of instanciating a Employee object and hardcode the
> migrations of the fields from proxy class to biz class.

Web services do not pass objects around. They pass XML, which is
deserialized into an object of a different class than the one which was
serialzed into the XML that was passed.

If you want to pass objects, and not XML, then you should look into .NET
Remoting.

Consider: if you returned your Employee object as the return from a Web
Service, then how would a scripting language like Perl or JavaScript call
the methods of that object? How would a non object-oriented langage even
know what the methods were?

This is all a part of the platform-independance that makes Web Services so
powerful.

And, if you really need the full semantics of .NET objects, then you need
.NET remoting, which also supports SOAP over HTTP.

John

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.