Unmarshalling child elements

Hi everyone,

I have defined a couple of complex types on two XML Schema files: one complex type element (RequestList, defined on request_list.xsd) that contains a sequence of the other complex type Request (defined on request.xsd).

What I want to accomplish with this is to create a couple of OTD's (one for RequestList and one for Request) that can be (un)marshalled, so that when I receive an XML file similar to this:

<request_list>

<request id="1">...</request>

<request id="2">...</request>

</request_list>

I can loop through the RequestList, grab each Request and unmarshall it to String so that it can be sent as a String to a JMS queue and later (on some other JCD) directly to the soap:body of a SOAP message.

No matter how I define the XSD's there is just no way for the Request class to have the necessary marshall/unmarshall methods and using Request.toString doesn't produce the wanted results (makes sense).

Is there a way to accomplish this? I have very little experience with JCAPS so if you'd do it some other way I would really appreciate to hear about it.

Cheers,

Celso

[1201 byte] By [Cliffb53] at [2007-11-26 10:56:01]
# 1
There is a way based on the use of XML Schema concepts.Please let me have your email address to michael . czapski AT sun . com and I will email you a document that discusses this kindof thing. I canot attach documents to posts here.
mczapski at 2007-7-7 3:09:14 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 2
Thanks a lot!Cheers,Celso
Cliffb53 at 2007-7-7 3:09:14 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...