To cast is a bright idea - I will try it and report on progress!


Bruce Snyder wrote:

This one time, at band camp, Stein M. Hugubakken said:

SMH>g r i t s e n k o wrote:
SMH>>
SMH>> I marshal like this:
SMH>>
SMH>> marshaller = new Marshaller(res.getWriter());
SMH>>                     marshaller.setMapping(_xml_mapping);
SMH>>                     marshaller.marshal(aResume);
SMH>>
SMH>
SMH>When you call marshaller.marshal(aResume) you are not actually
SMH>marshalling a com.semanticestate.gold.valueobject.Resume, but rather
SMH>some proxy-class and this class is not defined in the mapping-file.
SMH>
SMH>What if create a definition for the proxy in the mapping file?

Actually, I think Stein is correct. Castor is not imposing anything
on you by using the $Proxy0 name. This is actually the type of the
object when Castor receives it. What behavior do you see if you
cast the aResume object to a Resume? Below is an example:

    marshaller = new Marshaller(res.getWriter());
    marshaller.setMapping(_xml_mapping);
    marshaller.marshal( (Resume)aResume );

Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

The Castor Project
http://www.castor.org/

Apache Geronimo
http://incubator.apache.org/projects/geronimo.html

----------------------------------------------------------- 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