Re: Type fidelity - reusing mechanism used by framework to serialize Datasets ??
From: Dan Rogers (danro_at_microsoft.com)
Date: 11/29/04
- Next message: Dan Rogers: "Re: Avoiding De-Serialization"
- Previous message: Dan Rogers: "Re: how to return xml document from a web service"
- In reply to: Matt: "Re: Type fidelity - reusing mechanism used by framework to serialize Datasets ??"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 29 Nov 2004 20:12:15 GMT
Hi Matt,
The specifics of marshalling dataset are covered by patent and trade
secret. As you can see if you look on the wire, it is a pretty complicated
set of data, and the special logic that it takes to understand that
specific type requires .NET on both sides. For web services that are
intended to be used in this environment - .NET on both sides - exposing
data sets directly is a net positive and lets you take full advantage of an
investment in a .NET.
As for cross platform, however, exposing a dataset instead of a schema
defined complex type consisting of well known cross-platform types (as
mentioned previously) will be problematic. The best practices that I've
been seeing has companies exposing service methods both ways - that is,
pure .NET using data sets, and also with strongly typed, cross platform
friendly interfaces. The added investment is minimal - one can facade the
code of the other, so logic doesn't need to be repeated. The benefits of
the added cross-tool, cross language, or cross platform (e.g.
windows<->mainframe, etc) of this approach is well worth the minor
technical investment.
I hope this helps
Dan Rogers
Microsoft Corporation
--------------------
>From: matt_randle@yahoo.com (Matt)
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
>Subject: Re: Type fidelity - reusing mechanism used by framework to
serialize Datasets ??
>Date: 25 Nov 2004 08:07:46 -0800
>Organization: http://groups.google.com
>Lines: 52
>Message-ID: <ccb5c73c.0411250807.19636188@posting.google.com>
>References: <ccb5c73c.0411240420.109f5333@posting.google.com>
<F01qWzk0EHA.3436@cpmsftngxa10.phx.gbl>
>NNTP-Posting-Host: 80.176.97.106
>Content-Type: text/plain; charset=ISO-8859-1
>Content-Transfer-Encoding: 8bit
>X-Trace: posting.google.com 1101398866 23433 127.0.0.1 (25 Nov 2004
16:07:46 GMT)
>X-Complaints-To: groups-abuse@google.com
>NNTP-Posting-Date: Thu, 25 Nov 2004 16:07:46 +0000 (UTC)
>Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwi
x.com!newsfeed.cwix.com!tdsnet-transit!newspeer.tds.net!news.glorb.com!postn
ews.google.com!not-for-mail
>Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:26814
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
>
>Dan,
>
>Thanks for your reply.
>
>As you suggest, I would not use Datasets for any outward facing web
>services due to the obvious interoparibility problems.
>
>I am still curious as to how the Dataset marshalling is implemented in
>the framework and if that functionality is exposed so it can be used
>in other classes. ie. can you stop WSDL.EXE generating a proxy by
>marking up the class to be marshalled in some way and hence
>automatically gaurantee type fidelity ??
>
>>From further investigations, I have come to the conclusion that it
>must be hacked into the proxy generator. Maybe you (microsoft)
>decided the dataset marshalling was a 'special' type as it is used so
>frequently when you have .net on both ends of the wire ??
>
>I am suprised this approach was taken as the design of the web
>services framwork (and the whole of .net for that matter) is so
>'clean' that this seems to be an anomalous case.
>
>Thanks,
>
>Matt.
>
>
>danro@microsoft.com (Dan Rogers) wrote in message
news:<F01qWzk0EHA.3436@cpmsftngxa10.phx.gbl>...
>> Hi Matt,
>>
>> The best advice I can offer here is to use datasets inside of your own
>> applicaiton domains, but not across your web service boundaries. This
is
>> advice centered in maximizing cross-platform, cross tool-version interop
>> based on well defined data contracts.
>>
>> As for specific questions about how to decode a dataset, my advice is to
>> use a dataset to decode a dataset. The WSDL for a contract that
involves a
>> dataset describes an "any" (e.g. an untyped object) - making this a
loosely
>> coupled interface that is not suitable for tool-supported cross platform
>> interop.
>>
>> You may wish to consider the WS-I.org basic profile 1.0 guidelines,
which
>> steer you away from using framework specific "smart types" such as the
NET
>> dataSet, the java Hash table, etc. These require specific
implementations
>> to work with, and thus impede the goals that one would use a web service
>> interface to solve.
>>
>> I hope this helps
>>
>> Dan Rogers
>> Microsoft Corporation
>> --------------------
>
- Next message: Dan Rogers: "Re: Avoiding De-Serialization"
- Previous message: Dan Rogers: "Re: how to return xml document from a web service"
- In reply to: Matt: "Re: Type fidelity - reusing mechanism used by framework to serialize Datasets ??"
- Messages sorted by: [ date ] [ thread ]