[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] XML Schema: "Best used with the ______ tool"
- From: Dennis Sosnoski <dms@sosnoski.com>
- To: xml-dev@lists.xml.org
- Date: Fri, 28 Nov 2008 23:29:08 +1300
Michael Kay wrote:
>> ...
>> Are we in a similar situation today with XML Schema tools?
>> When you create an XML Schema will you inform your clients:
>>
>>
>
> As far as schema tools used to perform validation are concerned, I think the
> level of interoperability is quite high. There are a few edge cases where
> you find variations, but they don't cause that many problems in practice.
> What I think you are seeing is problems with data binding tools. These are
> performing a mapping from constructs in XML Schema to constructs in some
> other type system. These mappings are far less governed by standards, and
> it's generally not surprising if there are some constructs in XML Schema
> that don't cleanly map to some other chosen type system, and that therefore
> can't be used with the tool in question.
>
> The best answer is to do everything using XML-based processing languages
> (XSLT and XQuery) rather than spending 75% of your programming effort
> converting your data between one type system and another.
>
Wonderful answer for those who don't have any performance concerns and
are more comfortable working in XML than in data structures. The web
services world, however, is generally quite concerned about both
performance and ease of use for programmers, and because of these issues
data binding is used for the vast majority of web services.
Unfortunately there is a real disconnect between XML schema and
programming language data structures, and most of the people in the SOA
community who are pushing schema for web services don't seem to
understand that. I personally think it's better to start from code and
use data binding tools that allow clean schema generation, since the
schema generated by one data binding tool will generally be usable with
other tools of the same type. But too many people have been sold on
"schema first" approaches, and when they actually start using their
schema in real applications they're shocked to discover that, e.g.,
pretty much all of their lovingly-crafted simpleType restrictions are
ignored in the programming API and the base datatype is just used instead.
That doesn't make schemas useless with web services, of course, even if
they have more detail than is represented in the data binding
representation. You can still use schema validation during testing, for
instance. But if your focus is on web services you should design your
schemas with data binding in mind.
- Dennis
Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]