Dave Orchard on profiling XSD

Dave Orchard posted this piece in response to my posts on profiling XSD. He thinks I'm missng the point that this is an issue for users because they can't get interoperability across their implementation of schema. I disagree. What users can't get is interoperability across their implemenetations of OO serializers whose behavior is defined (typically) at dev time by consuming a schema. This is not the same thing. There are no ambiguities that need to be resolved in XSD, as there were in SOAP and WSDL. Having WS-I define a subset of schema that amounts to a lowest-common denominator for what object serializers must do and then developing to that is a sure fire way to turn Web services into an (O)RPC mechanism, and nothing more. As I've said before, if that's all we're doing, then what's the point?

In response to my statement about changing tools if the one you are using doesn't do what you need, Dave says:

So this means that if .Net doesn't support something then all of .Net should be thrown out? We all know that a company is *not* going to throw out all of .Net Web services because of some "technical" schema problems.

No, of course not. You could step away from the object <=> XML marshaling plumbing and consume a message directly as XML if desired. You can do this in ASP.NET Web Services (ASMX) and in WSE, and you'll be able to do it Indigo too. But even that's not required. XmlSerializer, the object <=> XML marshaler in .NET today can be used independent of XSD. You can write your own class that uses XmlSerializer to map your data to objects. So the only thing you're walking away from is the wizard/command-line tool that takes your XSD and does that for you.

It's those tools that we're really talking about. Should the interoperable standard for message description be based on *today's* tools? What would be the criteria? If an XSD feature made a tool crash, it makes sense to throw it out, right? But what if other tools can process it? Is one tool choking enough to drop a piece of XSD on the floor? What if none of the tools crash, but one ignores the feature and exposes only a subset of a message as a result, is that okay? What if a tool maps something from XSD into an object model, but doesn't capture all the semantics? For instance, what if a tool maps an integer restricted to the range 0 to 100 to an integer with any value. Is that okay, or should restriction of simple types be disallowed, even though the next version of the tool might add this enhancement? And what happens when we go beyond .NET and Java and think about SQL Server support for Web services, or PERL Web service toolkits, or Kafka, which is written in XSLT? Do the things those less mainstream tools can and can't do matter, or do we only care about ASMX and JAX-RPC programmers?

Beyond tools, what about the schemas that already exist. Dave suggests that XHTML 1.1, which uses xs:redefine, xs:group, and a host of other XSD-isms, isn't interesting to WS-I. But I work on applications for MSDN, a business that publishes information online, and all of the content in our new online system is represented using XHTML. We're working on internal Web services for publishing and external Web services for delivery of that content. I want my services to be interoperable too, but subsetting XSD isn't going to do it because I'm using an existing schema. Is my problem domain just not important? How about XBRL for financial records and HL7 for health care information? A big part of the value of Web services will only be realized when we have standard schema for describing information. Don't we care about those vertical standards too?

I'm not a big fan of XSD, as anyone who reads my blog can attest. But I accept that we're using it because there's industry concensus on it. Tools do not require concensus. I don't want to live in a world where we tie our hands based on a how today's tools work. More importantly, I don't want to standardize any aspect of Web services that frames the technology as nothing more than an (O)RPC mechanism and hiding every aspect of XML from the user is more important than leveraging the power XML offers. As I seem to be saying a lot lately, if that's all we end up doing, we're really missing the point.


Posted Sep 02 2004, 07:25 PM by tim-ewald

Comments

Mark Nottingham wrote re: Dave Orchard on profiling XSD
on 09-02-2004 8:12 PM
Hi Tim,

"Having WS-I define a subset of schema that amounts to a lowest-common denominator for what object serializers must do and then developing to that is a sure fire way to turn Web services into an (O)RPC mechanism, and nothing more."

That doesn't follow. Just because we're limited to a subset of Schema doesn't mean that it magically becomes RPC; it's possible to have document-oriented messages without using the Infoset and Schema; that was precisely the point of my original entry.

Regarding XHTML, you say, "Is my problem domain just not important?"

I think the relevant question is whether it's necessary to model/constrain that part of the content in Schema. HTML is a presentation language, and while it's nice to know that it's syntactically valid, there isn't too much in the way of semantics captured in it, usually. Even when there is, validation only goes so deep; this conundrum faces every schema language, of course.

Just because something is valid XHTML doesn't mean that it's appropriate for *your* Web service (imagine posting a car review to MSDN, for example), so validation of the XHTML only adds a bit of value here (that's easy to replicate elsewhere, BTW).

Finally, you state that you "accept that we're using it because there's industry concensus on it."

You say industry concensus, I say vendor consensus. Has it taken hold with rank-and-file developers yet? Will they be able to get their heads around it?
Dave Orchard's Blog wrote Schema interop: Users care!
on 09-02-2004 10:17 PM
Tim posted his response to my response to his... on the pros and cons of WS-I profiling Schema....
Steve Loughran wrote lets just abandon O/X mapping altogether
on 09-02-2004 11:26 PM
I concur. Cutting down XSD because some tools cant handle the edges is like restricting RDBMS systems to what O/R mappings like EJB can handle.

I also think that the generic problem of object-XML mapping, O/X mapping, is very much a descendant of the O/R mapping problem, and equally hard. We have to stop trying to hide the XML inside compile-time-generated classes.
Paul Downey wrote re: Dave Orchard on profiling XSD
on 09-03-2004 6:27 AM
Just because people want to use toolkits, that doesn't imply RPC message exchanges or even encode objects directly in messages.

Whilst I'm personally happy to working at an XML document level, i'm liberal enough not to want to do anything to preclude the large developer base that wants to use tools that abstract messages into their programming model.

Web services offers the possibility to bridge the document and programming model universes except that it's very difficult to write an autonomous processor to generate and parse messages described using the full gamut of W3C schema. Schema does have problems beyond poor and partial implementations, not least with versioning and the ability to describe structures that aren't deterministic.

The 'ditch' 1 vendor's tools because they don't work just isn't practicable - it could work in-house inside a small company with good governance, but it's the 'best viewed in internet explorer' approach. Publishing a public Web service that only works in say .NET means your somewhat restricting your customer base over whom you have no control. I moved one of my bank accounts because they didn't support Firefox.

So our reason for wanting a 'profile' is, as DaveO says, it's the only sharp instrument the WS-I offers to us. I would add that the intent of a profile here is as a stepping stone - a floor rather than a ceiling - a subset known to interoperate. it's not as if there isn't already a lot of precedence in this approach with other standards SVG tiny, OWL-Lite, etc.
Gia wrote I wonder
on 09-03-2004 7:54 AM
"You could step away from the object <=> XML marshaling plumbing and consume a message directly as XML if desired" <- current version of J2EE specs for web services (JAX-RPC and JSR 109) do not have this flexibility. If you want to write vendor-neutral web service or client you HAVE to use object mapping which only covers small part of schema. Could this be one of the driving forces?
The XML Files wrote What does the XSD profiling mean?
on 09-03-2004 8:42 AM

Add a Comment

(required)  
(optional)
(required)  
Remember Me?