473,659 Members | 2,582 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Custom types across WS

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.
Sep 5 '06 #1
1 902
"Max André Bündchen" <Ma************ @discussions.mi crosoft.comwrot e in
message news:77******** *************** ***********@mic rosoft.com...
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.
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
Sep 6 '06 #2

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

Similar topics

12
1702
by: Franz | last post by:
Greetings, I have created the following types: typedef struct _tbl_certificate{ int cert_id; char *cert_name; }tbl_certificate; typedef struct _cameraObj{ tbl_camera camera;
5
6743
by: p988 | last post by:
Could someone show me how to derive and use custom exception types separately from:System.Exception, System.Object and System.ApplicationException in C#? When people say:"Use Visual Studio .NET to create a component..." What does it mean by "component" here in C#?
2
2327
by: Mark Gibson | last post by:
Hello, I've been experimenting with dblink recently, and have encountered some limitations I'd like to discuss. I've been trying to create views of remote tables, like so: CREATE VIEW stuff AS SELECT * FROM dblink(' ... remote connection info ... ', 'SELECT id, title, title_idx FROM stuff')
12
5323
by: Noel | last post by:
Hello, I'm currently developing a web service that retrieves data from an employee table. I would like to send and retrieve a custom employee class to/from the webservice. I have currently coded the custom employee class and have built it as a separate library (employee.dll). This employee.dll is being referenced by both the web service and the windows application. I face the following problem when I send this class to the webservice.
9
3133
by: wardy1975 | last post by:
Hi All, Looking for a little expert advice on a few web standards issues. I am currently trying to understand the impact of web standards for a web application I work with. I have been doing a lot of research in the areas of XHTML and WAI compliance, and am attempting to come up with a recommendation for our product in terms of standards level compliance. Ideally, I would like to be at XHTML 1.0 Strict. However, in my reading I have...
8
1820
by: Techno_Dex | last post by:
Has anyone come up with a slick way to make Custom Serializable Objects to behave like DataSets when using WebServices? What I'm looking for is some way to force the WSDL generated code to create a reference to my custom object's namespace instead of creating it's own copy of the object in it's own WS namespace. Either that, or some easy way to move all of the properties from the Custom Serializable Object into the WSDL generated object...
3
4738
by: Greg Collins [Microsoft MVP] | last post by:
I have done a bit of research of Url Rewriting, but as yet have been unsuccessful at getting it to work well, and there are issues around what file types are supported and how much code you want to write. While working on a similar, though partially unrelated, issue, I came across a possible alternate method. Before I pursue this method in full, I wanted to get opinions of others as to any unforseen issues I might encounter. The method is...
2
4271
by: =?Utf-8?B?Y3Nz?= | last post by:
I am new to ASP.net webservice and have a quesiton. Is is possible to pass custom object to a web service (using VB 2005)? My custom object will look like this Public Class Myclass Public Property1 As String Public Property2 As Integer Public Property myCollection1 As Arraylist (Actually, it will be a strongly
2
19457
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's words, or maybe, my own words as how I understand them, hoping, you will understand it the same way that...
0
2897
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's words, or maybe, my own words as how I understand them, hoping, you will understand it the same way that...
0
8341
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8751
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7360
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4176
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2759
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1982
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.