Hi Rikard

Are you using Castor XML directly on the EJB or on the ValueObject/View that
the EJB generates?

I am using Xdoclet with CMP2.0 which generates the Views/ValueObjects. Now,
I would now like to add XML input and output capabilities. eg:
Input - Single
==============
- receive order.xml
- marshal(orderValueObject, new FileWriter("order.xml"));
- call Order.addOrder (orderValueObject);

Input - Collection
==============
- receive orders.xml
- call Order.addOrders ("orders.xml");

Output - Single
===============
- call Order.getOrder ();
- unMarshal(orderValueObject, new FileReader("order.xml"));
- send order.xml

Output - Collection (don't know how to get this)
===================
- call Order.getOrders ("orders.xml");
- send orders.xml

Can you point me to the right direction?

Keith

> -----Original Message-----
> From: Rickard [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, 12 January 2002 4:00 a.m.
> To: [EMAIL PROTECTED]
> Subject: [castor-dev] Castor XML with EJB and references
>
>
> Hi!
>
> I'm using Castor XML with EJB's. My EJB's reference other EJB's, both as
> direct references and as collections.
>
> I would prefer if these references and collections were handled by
> allowing me to dereference them using custom code. E.g. use IDREF's
> which would allow me to look up the EJB's when loading an EJB that
> references others. I can't find any docs, examples, or mailing list
> archive posts that hint how this could be done, but from the API's it
> seems kind of possible.
>
> How would I go about doing this? If the answer is "it's tough but do
> something like this.." that's fine, I just NEED this to work :-)
>
> I tried setting <bind-xml name="reference"> but that didn't help. What
> are the rules for when an IDResolver is used anyway?
>
> I did try implementing CDR's, but can't quite understand how they're
> supposed to work. To be exact, how do I get my own object resolution
> code in there? (i.e. what do I code to say "let this code handle object
> resolution of this field")
>
> Any clues on this would be most helpful.
>
> /Rickard
>
> --
> Rickard �berg
> Author of "Mastering RMI"
> Chief Architect, TheServerSide.com
>    The Middleware Company - We Build Experts!
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev
>
>

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to