OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] W3C Schema: Resistance is Futile, says Don Box

[ Lists Home | Date Index | Thread Index ]


> Finally the fact that .Net users use it all the time; does this apply to
> Schemas that they generate for instance documents - forgive me here I
> seem to remember seeing a schema generator for VS.Net sometime, as I
> just use the Framework I'm unfamiliar with the functionalities of VS.Net
> - does it apply to Schemas that others have written, or does it apply to
> Schemas that they themselves author? I submit that if it applies to the
> second then the "accounting" for development time could be screwed up
> without accurate measurement of time taken to write the schema, which I
> bet could have been more quickly written in another language.

Here's how it works in .NET, including .NET Studio.  The xml schema is
basically invisible to the programmer.  Say you want to provide a "Web
Service".  You start a new Web Services form in .NET Studio and define the
classes that will respond the the service requests.  Being .Net, you can use
C++, C#, VB, ...  When you compile everything, .NET creates a WSDL service
description, which includes an xml schema that describes the data types for
the input and output.  This happens behind the scenes; the user does not
write the schema nor select the translation to xsd data types.

To access to service, you create, in .NET Studio, a form which is more or
less a web page with Microsoft extensions for server-side processing (which
are added by the .NET machinery, not by the programmer).  You tell it to use
your web service.  When you compile, behind the scenes .NET refers to the
wsdl file, reads the embedded schema in that file, and creates corresponding
classes to turn a request instance into parameters of the corresponding data
types and pass them to the code that does the service.  IIRC, it also
generates code that checks the received parameters to see that they are the
right type.

You can also start with a wsdl file that you create outside of .NET.  That
sometimes does not work - for example, if you use a urn: scheme instead of
an http: scheme for the target namespace, it gets rejected by the machinery
(I can't imagine why), but I think that normally it does work.

So  you can see that .NET provides roundtripping translation of normal
programming data types, and uses schemas, while the user does not see or
touch schemas, wsdl, or even xml.

If you do want to do part of this by hand, for example to connect to a
service that was not created  by .NET, it may work but if it doesn't fit the
scenarios that MS has provided for, it may not.


Tom P


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS