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 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
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
.......
"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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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:
"...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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,...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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,...
|
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...
|
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...
| |