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

Discussion in 'Java' started by nrm, Apr 7, 2006.

  1. nrm

    nrm Guest

    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.
     
    nrm, Apr 7, 2006
    #1
    1. Advertising

  2. nrm

    James McGill Guest

    Re: Why no existing Java type to existing XML schema bindingsupport?

    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.
     
    James McGill, Apr 7, 2006
    #2
    1. Advertising

  3. nrm

    Roedy Green Guest

    On Fri, 07 Apr 2006 15:37:31 -0700, James McGill
    <> 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.
     
    Roedy Green, Apr 8, 2006
    #3
  4. nrm

    nrm Guest

    > 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.
     
    nrm, Apr 10, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus
    Replies:
    1
    Views:
    1,663
    Markus
    Nov 23, 2005
  2. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,327
    Stanimir Stamenkov
    Apr 25, 2005
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,222
    Smokey Grindel
    Dec 2, 2006
  4. Replies:
    3
    Views:
    3,171
  5. Matt
    Replies:
    3
    Views:
    367
    Bob Barrows [MVP]
    Apr 23, 2004
Loading...

Share This Page