I marshal like this:


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

viktoR

Keith Visco wrote:

How are you calling the Marshaller ? Make sure you are not using one of the static marshal methods.

--Keith


g r i t s e n k o wrote:

Brief error description:



Castor ignores ‘map-to xml=’resume’ in mapping for Resume class, which
at run time is materialized by proxy class – Apache OJB does it  for
lazy loading purposes – so called dynamic proxy.



Castor attempts to marshal Resume and comes up with xml tag name for
Resume, which is in fact name of the proxy class, run-time-provided by
Apache OJB.



It happens that proxy class name starts with a dollar sign - $.



MS Explorer does not like tag names starting with $ signs and
complains – incorrect character.



The truth is that in Castor xml mapping – see fragment below- I do
declare xml tag name I want for Resume – it is ‘resume’ lower case.



Yet Castor ignores this request and takes the name from OJB-run-time
provided proxy class name.



(?) Please suggest how to make Castor to take xml tag name I ask for.
(?)





Detailed error scenario:



Resume.class which implements InterfaceResume interface.



Interface is used for reason of leveraging lazy loading, provided by
Apache OJB object-relational bridge framework.



Castor is used for XML marshalling/unmarshalling.



I am marshalling Resume as a root element(tag) of the xml document –
there is nothing above Resume.



Castor XML mapping fragment:



<<

<class name="com.semanticestate.gold.valueobject.Resume"

auto-complete="false" >

<map-to xml="resume"/>

<field name="id" type="integer">

<bind-xml node="element"/>

</field>

<field name="availDay" type="string">

<bind-xml node="element"/>

</field>

<field name="availMonth" type="string">

<bind-xml node="element"/>

</field>

<field name="availYear" type="string">

<bind-xml node="element"/>

</field>

<field name="isNotAvailable" type="string">

<bind-xml node="element" />

</field>

<field name="file" type="string">

<bind-xml node="element"/>

</field>

<field name="language" type="string">

<bind-xml node="element"/>

</field>

<field name="name" type="string">

<bind-xml node="element"/>

</field>

<field name="address" type="string">

<bind-xml node="element"/>

</field>

<field name="profile" type="string">

<bind-xml node="element"/>

</field>

<field name="profileA" type="string">

<bind-xml node="element"/>

</field>

<field name="profileB" type="string">

<bind-xml node="element"/>

</field>

<field name="profileC" type="string">

<bind-xml node="element"/>

</field>

<field name="security" type="string">

<bind-xml node="element"/>

</field>

<field name="telephone" type="string">

<bind-xml node="element"/>

</field>

       <field name="project" get-method="getProjectList"
type="com.semanticestate.gold.valueobject.Project"

collection="collection" >



</field>

        <field name="education" get-method="getEducationList"
type="com.semanticestate.gold.valueobject.Education"

collection="collection" >

<bind-xml node="element"/>

</field>

       <field name="certification" get-method="getCertificationList"
type="com.semanticestate.gold.valueobject.Certification"

collection="collection" >

<bind-xml node="element"/>

</field>

       <field name="training" get-method="getTrainingList"
type="com.semanticestate.gold.valueobject.Training"

collection="collection" >

<bind-xml node="element"/>

</field>

       <field name="presentation" get-method="getPresentationList"
type="com.semanticestate.gold.valueobject.Presentation"

collection="collection" >

<bind-xml node="element"/>

</field>

       <field name="conference" get-method="getConferenceList"
type="com.semanticestate.gold.valueobject.Conference"

collection="collection" >

<bind-xml node="element"/>

</field>

       <field name="publication" get-method="getPublicationList"
type="com.semanticestate.gold.valueobject.Publication"

collection="collection" >

<bind-xml node="element"/>

</field>

       <field name="proAssociation"
get-method="getProAssociationList"
type="com.semanticestate.gold.valueobject.ProAssociation"

collection="collection" >

<bind-xml node="element"/>

</field>

       <field name="techItem" get-method="getTechItemList"
type="com.semanticestate.gold.valueobject.TechItem"

collection="collection" >

<bind-xml node="element"/>

</field>

</class>

<class name="com.semanticestate.gold.valueobject.Project"

auto-complete="true" >

       <field name="repherence" get-method="getRepherenceList"
type="com.semanticestate.gold.valueobject.Repherence"

collection="collection" >

<bind-xml node="element"/>

</field>

</class>

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




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




Reply via email to