Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

Why no existing Java type to existing XML schema binding support?

Thread view: 
nrm - 07 Apr 2006 23:26 GMT
For implementing a resource-oriented Web service, it has been quite
difficult for me to bridge the gap between XML schemas defining the Web
service interface (providing resources) and a Java implementation.

The main reason for my complaint is that my three options (all
involving Java) are to:

1. design a schema and generate Java types from it - this generates
different classes for different representations of a resource
2. design Java types and generate schema from it - require different
classes for supporting different representations of a resource, or
alternatively produces a single representation of a resource
3. design Java types and design schema - require manual XML processing
and a ton of challenges deploying the service and obtaining a WSDL
describing the service

As example, imagine I had to generate two representations of an order
which looked like the following XML:
<order-summary>
 <number>...</number>
 <placed>...</placed>
 <status>...</status>
 <total currency="...">...</total>
</order-summary>

<order-detail>
  <number>...</number>
  <placed>...</placed>
  <status>...</status>
  <items>
      <item>
          <name>...</name>
          <sku>...</sku>
          <count>...</count>
          <price>...</price>
      </item>
      ...
  </items>
  <total currency="...">...</total>
</order-detail>

I don't know of a standardized technology or a customization technique
for a standardized technology that I can use to work with a single
Order Java type that can be (un)marshalled from/to an XML stream of
either of the two representations.

I don't think either JAX-RPC or JAXWS provides any standardized support
for taking over the XML processing. Am I missing something? Do I need
to perform more research? Or is there a fundamental reason why this is
a bad idea?

I hope this topic merits a reasonable discussion.

Nikunj.
James McGill - 07 Apr 2006 23:37 GMT
> I hope this topic merits a reasonable discussion.

I just use Castor.  It's not perfect, but it certainly takes me to a
place where I don't have the kind of complaints you raise in your
message.
Roedy Green - 08 Apr 2006 00:41 GMT
On Fri, 07 Apr 2006 15:37:31 -0700, James McGill
<jmcgill@cs.arizona.edu> wrote, quoted or indirectly quoted someone
who said :

>I just use Castor.  It's not perfect, but it certainly takes me to a
>place where I don't have the kind of complaints you raise in your
>message.

tell us about why you like it and what it does.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

nrm - 10 Apr 2006 17:52 GMT
> I just use Castor.  It's not perfect, but it certainly takes me to a
> place where I don't have the kind of complaints you raise in your
> message.

Thanks for the tip. I am also considering Castor, but that still
supports the conclusion that existing standards do not provide for
custom serialization.

Another possibility is the use of Toplink O-X mapping.
http://www.oracle.com/technology/tech/java/newsletter/articles/toplink/toplinkox.html

Nikunj.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.