Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Why no existing Java type to existing XML schema binding support?

Reply
Thread Tools

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

 
 
nrm
Guest
Posts: n/a
 
      04-07-2006
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.

 
Reply With Quote
 
 
 
 
James McGill
Guest
Posts: n/a
 
      04-07-2006
On Fri, 2006-04-07 at 15:26 -0700, nrm wrote:
>
> 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.

 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      04-07-2006
On Fri, 07 Apr 2006 15:37:31 -0700, James McGill
<(E-Mail Removed)> 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.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
Reply With Quote
 
nrm
Guest
Posts: n/a
 
      04-10-2006
> 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/tec...toplinkox.html

Nikunj.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
web.xml / XML schema issue, why do some XML schema attributes disappear asciz@starmail.com Java 3 02-20-2007 09:56 AM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
XML Schema to XML Schema Conversion Hari Om XML 1 03-02-2004 09:04 PM
XML schema regular expressions question and recommended XML Schema book Fred Smith XML 1 02-05-2004 11:12 AM



Advertisments