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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: Mapping: Schema - Java

[ Lists Home | Date Index | Thread Index ]
  • From: "Box, Don" <dbox@develop.com>
  • To: "'Oliver Becker'" <obecker@informatik.hu-berlin.de>, xml-dev@xml.org
  • Date: Wed, 8 Mar 2000 11:08:22 -0800

Title: RE: Mapping: Schema - Java

> -----Original Message-----
> From: Oliver Becker [mailto:obecker@informatik.hu-berlin.de]
> Sent: Wednesday, March 08, 2000 3:34 AM
> To: xml-dev@xml.org
> Subject: Mapping: Schema - Java
>
>
> Hi there,
>
> I wonder if somebody has defined (or even implemented) a mapping
> from XML Schema to Java, i.e. how does Java classes look like which
> can contain data represented in XML and constrained by a XML Schema.

The SOAP/1.0 protocol was designed with exactly this in mind. Check out Section 8 of the SOAP spec (http://search.ietf.org/internet-drafts/draft-box-http-soap-01.txt). There is a Java/SOAP serializer at http://www.develop.com/soap. Once I finish my book manuscript on Friday of next week (yippee), I plan on (a) fixing the pending bugs and (b) adding support for schema<->class compilation.

 I'm aware of DTD tools (Oracle, alphaWorks), but don't know
> the details.
> SOAP defines something the other way around: rules for expressing
> (Java) types in XML.

Right. The SOAP approach is similar in spirit to the SML approach - that is, if your goal is to use XML as a serialziation format for your application's types, Section 8 defines a uniform method for translating standard programming language constructs (e.g., struct, class, array) into XML and XML Schema. This method is largely a formalization of element-normal-form encoding (which is a/the core concept in SML).

That stated, we (the authors of the SOAP spec) left an escape hatch in the encoding style to allow arbitrary XML-based serialization styles to be used. Additionally, we (DevelopMentor - the company I work at) designed our [de]serialization engine to support pluggable translators based on alternative encoding styles.

There are a variety of Java-based "data-binding" proposals out there that you ought to look at as well. Koins and XMOP come to mind, but I am sure there are others.

DB
http://www.develop.com/dbox





 

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

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