Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class?

Reply
Thread Tools

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

 
 
Francisco Garcia
Guest
Posts: n/a
 
      04-12-2006
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




 
Reply With Quote
 
 
 
 
Dale
Guest
Posts: n/a
 
      04-13-2006
I have an in-depth series of articles on returning custom classes from a web
service at
http://www.dalepreston.com/Blog/2005...-from-web.html.

HTH
--
Dale Preston
MCAD C#
MCSE, MCDBA


"Francisco Garcia" wrote:

> 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
>
>
>
>
>

 
Reply With Quote
 
 
 
 
Fran Garcia
Guest
Posts: n/a
 
      04-13-2006
Thanks a lot, Dale.

That solved my problem!

"Dale" <(E-Mail Removed)> escribió en el mensaje
news:(E-Mail Removed)...
>I have an in-depth series of articles on returning custom classes from a
>web
> service at
> http://www.dalepreston.com/Blog/2005...-from-web.html.
>
> HTH
> --
> Dale Preston
> MCAD C#
> MCSE, MCDBA
>
>
> "Francisco Garcia" wrote:
>
>> 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
>>
>>
>>
>>
>>



 
Reply With Quote
 
vincent
Guest
Posts: n/a
 
      04-13-2006
Hello Dale,

i've posted a comment on your last article dealing with SchemaImporterExtension...

i don't know how to use them in a class library...

i've tried declaring it in app.config, but it's ignored.

Vincent.

> I have an in-depth series of articles on returning custom classes from
> a web service at
> http://www.dalepreston.com/Blog/2005...-classes-from-
> web.html.
>
> HTH
>
> "Francisco Garcia" wrote:
>
>> 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
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class? Francisco Garcia ASP .Net 2 04-13-2006 10:41 AM
How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class? news.microsoft.com ASP .Net Web Services 0 04-12-2006 09:07 AM
How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class? news.microsoft.com ASP .Net 0 04-12-2006 09:07 AM
Binding to deserialized objects in an arraylist !? Alex Nitulescu ASP .Net 5 02-21-2005 12:21 AM



Advertisments