473,403 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class?

Hi!

I have developed both a Web Service and a client application, and they work
fine.

All classes used in the Web Service interface are declared in an assembly
named Entities, that is referenced both in the Web Service and the client
application.

The problem is that the automatically-generated Web Service proxy class
creates new classes instead of referencing the original classes.

This way, if I add a method to any of the classes in the Entities assembly,
that functionality isn't available in the client application, because the
proxy-generated classes are static snapshots of the server objects, with all
functionality lost.

There must be a way to do this, because that's what DataSets do. If you
create a Web Service that returns a DataSet, and you reference that web
service from a .NET application that knows about System.Data namespace, the
DataSet gets deserialized as a DataSet.

I suppose it must have something to do with Xml attributes or interfaces,
but I can't find which.

Any help is appreciated. Thanks in advance,

Francisco Garcia
Apr 12 '06 #1
3 1477
Hi Francisco,

actually the type System.Data.DataSet is *not* serialized at all... You see,
you already have kind of a snapshot copy both in the references of your
client project and your WebService project. These definitions don't change,
and if they would one would also need to update the corresponding DLLs
accordingly.

Same for WebServices. .NET creates an object of a type by using an Assembly.
The name of the type is given in the SOAP message. Just the name, nothing
more. If you want a Serializable type to be available at "the other end",
you must create a local Assembly defining that type. Otherwise it can't be
constructed on the other machine.

HTH,
Axel
------------------
"Francisco Garcia" <fr*********@no.spam> wrote in message
news:Os**************@TK2MSFTNGP04.phx.gbl...
Hi!

I have developed both a Web Service and a client application, and they work fine.

All classes used in the Web Service interface are declared in an assembly
named Entities, that is referenced both in the Web Service and the client
application.

The problem is that the automatically-generated Web Service proxy class
creates new classes instead of referencing the original classes.

This way, if I add a method to any of the classes in the Entities assembly, that functionality isn't available in the client application, because the
proxy-generated classes are static snapshots of the server objects, with all functionality lost.

There must be a way to do this, because that's what DataSets do. If you
create a Web Service that returns a DataSet, and you reference that web
service from a .NET application that knows about System.Data namespace, the DataSet gets deserialized as a DataSet.

I suppose it must have something to do with Xml attributes or interfaces,
but I can't find which.

Any help is appreciated. Thanks in advance,

Francisco Garcia

Apr 26 '06 #2
Axel,

I found this in-depth series of articles on returning custom classes from a
web service at
http://www.dalepreston.com/Blog/2005...-from-web.html

Dale Preston answered to a repost of this same question in other newsgroup,
and I copy the answer here so it can help other people.

Thanks

"Axel Dahmen" <Ke********@newsgroups.nospam> escribió en el mensaje
news:eN**************@TK2MSFTNGP04.phx.gbl...
Hi Francisco,

actually the type System.Data.DataSet is *not* serialized at all... You
see,
you already have kind of a snapshot copy both in the references of your
client project and your WebService project. These definitions don't
change,
and if they would one would also need to update the corresponding DLLs
accordingly.

Same for WebServices. .NET creates an object of a type by using an
Assembly.
The name of the type is given in the SOAP message. Just the name, nothing
more. If you want a Serializable type to be available at "the other end",
you must create a local Assembly defining that type. Otherwise it can't be
constructed on the other machine.

HTH,
Axel
------------------
"Francisco Garcia" <fr*********@no.spam> wrote in message
news:Os**************@TK2MSFTNGP04.phx.gbl...
Hi!

I have developed both a Web Service and a client application, and they

work
fine.

All classes used in the Web Service interface are declared in an assembly
named Entities, that is referenced both in the Web Service and the client
application.

The problem is that the automatically-generated Web Service proxy class
creates new classes instead of referencing the original classes.

This way, if I add a method to any of the classes in the Entities

assembly,
that functionality isn't available in the client application, because the
proxy-generated classes are static snapshots of the server objects, with

all
functionality lost.

There must be a way to do this, because that's what DataSets do. If you
create a Web Service that returns a DataSet, and you reference that web
service from a .NET application that knows about System.Data namespace,

the
DataSet gets deserialized as a DataSet.

I suppose it must have something to do with Xml attributes or interfaces,
but I can't find which.

Any help is appreciated. Thanks in advance,

Francisco Garcia


Apr 29 '06 #3
.......

"Francisco Garcia" <fr*********@no.spam> wrote in message
news:Os**************@TK2MSFTNGP04.phx.gbl...
Hi!

I have developed both a Web Service and a client application, and they work fine.

All classes used in the Web Service interface are declared in an assembly
named Entities, that is referenced both in the Web Service and the client
application.

The problem is that the automatically-generated Web Service proxy class
creates new classes instead of referencing the original classes.

This way, if I add a method to any of the classes in the Entities assembly, that functionality isn't available in the client application, because the
proxy-generated classes are static snapshots of the server objects, with all functionality lost.

There must be a way to do this, because that's what DataSets do. If you
create a Web Service that returns a DataSet, and you reference that web
service from a .NET application that knows about System.Data namespace, the DataSet gets deserialized as a DataSet.

I suppose it must have something to do with Xml attributes or interfaces,
but I can't find which.

Any help is appreciated. Thanks in advance,

Francisco Garcia

Jun 8 '06 #4

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

Similar topics

7
by: Mark | last post by:
I built the example application outlined in this artical: http://msdn.microsoft.com/library/default.asp? url=/library/en-us/dnservice/html/service02112003.asp There were a number of questions...
6
by: trexim | last post by:
Hi, I am trying to create a Web Reference for CSTA using the URL http://www.ecma-international.org/standards/ecma-348/csta-wsdl/csta-wsdl-all-operations.wsdl Visual .Net complains that: "...
1
by: Carsten Posingies | last post by:
Hi NG, I've got this annoying problem: On the server's side there's an Apache w/ PHP running. I wrote a kind of "bare bones" SOAP implementation, though meeting the SOAP specs. Afaics this...
0
by: Stefan Lischke | last post by:
Hi, I'm really desperate using code generation(wsdl.exe) from wsdl files for latest WS-Eventing(including WS-Addressing) Specs. I'm writing my diploma about "publish subscribe systems based on...
1
by: drb | last post by:
Hi, Newbie question #2 - hope that's OK! I'm trying to create a WSDL file using one or more XSD schema files. While WSDL.exe doesn't seem to support the XSD "import" function, if I include a...
0
by: AndyO | last post by:
Following what is found out at http://www.gotdotnet.com/team/xml_wsspecs/dime/WSDL-Extension-for-DIME.htm for composing my WSDL, when using the wsdl.exe, I can't seem to get around the error...
0
by: Andreas | last post by:
Hi, Im trying to consume a webservice described by the WSDL below, however When i try to add the WSDL it does not work, tried to run it through WSDL.EXE It validates in XMLSpy, but WSDL.exe...
9
by: Nick Locke | last post by:
I have a fairly simple structure: - Simple Types in an XSD - Complex Types (one file) in another XSD, importing the Simple Types - More Complex Types (second file) in another XSD, again...
2
by: BillB | last post by:
Hi, I've been given a WSDL file and need to convert it to C# so that I can use the procedures it creates, can anyone tell me how to do this? I'm looking at doing it using Visual Studio 2005...
0
by: Eternal Snow | last post by:
Hi all. I have some trouble by using WCF while creating WSDL. Please follow that: 1 Create a WCF service in EXE mode (not tried in IIS), add a basicHTTPBinding and a mexHttpBinding. 2 Run it,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.