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

Discussion in 'ASP .Net Web Services' started by Francisco Garcia, Apr 12, 2006.

  1. 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, Apr 12, 2006
    #1
    1. Advertising

  2. Francisco Garcia

    Dale Guest

    RE: How do Datasets manage to get deserialized as DataSets instead of

    I have an in-depth series of articles on returning custom classes from a web
    service at
    http://www.dalepreston.com/Blog/2005/02/returning-custom-classes-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
    >
    >
    >
    >
    >
     
    Dale, Apr 13, 2006
    #2
    1. Advertising

  3. Francisco Garcia

    Fran Garcia Guest

    Re: How do Datasets manage to get deserialized as DataSets instead of

    Thanks a lot, Dale.

    That solved my problem!

    "Dale" <> escribió en el mensaje
    news:...
    >I have an in-depth series of articles on returning custom classes from a
    >web
    > service at
    > http://www.dalepreston.com/Blog/2005/02/returning-custom-classes-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
    >>
    >>
    >>
    >>
    >>
     
    Fran Garcia, Apr 13, 2006
    #3
  4. Francisco Garcia

    vincent Guest

    RE: How do Datasets manage to get deserialized as DataSets instead of

    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/02/returning-custom-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
    >>
     
    vincent, Apr 13, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. news.microsoft.com
    Replies:
    0
    Views:
    454
    news.microsoft.com
    Apr 12, 2006
  2. Francisco Garcia
    Replies:
    2
    Views:
    490
    Fran Garcia
    Apr 13, 2006
  3. Mike Dinnis

    WSDL.exe doesn't seem to create the proxy class

    Mike Dinnis, Oct 28, 2003, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    242
    Mike Dinnis
    Nov 3, 2003
  4. RH
    Replies:
    1
    Views:
    281
    Dino Chiesa [Microsoft]
    May 27, 2004
  5. news.microsoft.com
    Replies:
    0
    Views:
    200
    news.microsoft.com
    Apr 12, 2006
Loading...

Share This Page