Hi Spiros,
What happens if you change the <map-to> element to
<map-to xml="Address" ns-uri="gttp://castor.org/test" ns-prefix="urn" />
Specifying just a namespace prefix does not make any sense at all
without actually specifying the namespace for which the prefix shoul dbe
used.
Let me know whether this helps ....
Werner
[EMAIL PROTECTED] wrote:
Hi,
I am using Castor for the first time and although i have managed to see it
working properly in my case when Marshalling to XML, i get some
small inconsistencies in my output file which i cannot yet see how to
configure.
Consider the following example mapping for a class Address:
<!-- mapping for class Address -->
<class name="data.Address">
<map-to xml="Address" ns-prefix="urn" />
<field name="lAddressT" type="java.lang.String">
<bind-xml name="lAddressT" node="attribute"/>
</field>
<field name="countryCode" type="java.lang.String">
<bind-xml name="CountryCode" node="element" />
</field>
<field name="addressF" type="java.lang.String">
<bind-xml name="AddressF" node="element"/>
</field>
<field name="addressS" collection="arraylist"
get-method="getAddressS" set-method="setAddressS">
<bind-xml name="AddressS" node="element" />
</field>
</class>
here is the output:
<urn:Address>
<CountryCode>GR</CountryCode>
<AddressF>Name</AddressF>
</urn:Address>
I would like the CountryCode and all subelements for all my class mappings,
which actually do
not have a class mapping them selves in the mapping file, to also have the
ns-prefix "urn".
How do i achieve this?
Thanks in advance
Spiros Papadopoulos
************************************************************
HSBC Bank plc
Registered Office: 8 Canada Square, London E14 5HQ
Registered in England - Number 14259
Authorised and regulated by the Financial Services Authority
************************************************************
<HTML><BODY><P><hr size=1></P>
<P><STRONG>
SAVE PAPER - THINK BEFORE YOU PRINT!
This E-mail is confidential.
It may also be legally privileged. If you are not the addressee you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return E-mail.
Internet communications cannot be guaranteed to be timely secure, error or virus-free. The sender does not accept liability for any errors or omissions.
</STRONG></P></BODY></HTML>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email