Westhveg
2009-11-05 10:31:04 UTC
Hello,
I'm using castor 1.3. I have a problem with marshalling, let me explain with
some code:
This is my class configuration in mapping.xml file:
<class name="com.mypackage.MyClass">
<map-to xml="myXmlElementA" ns-uri="http://mynamespaceuri/" ns-prefix="tns"
/>
<field name="value" type="java.lang.String" required="true">
<bind-xml name="myXmlElementB" node="element" />
</field>
</class>
And this is the resulting XML when it sends the request:
<tns:myXmlElementA xmlns:tns="http://mynamespaceuri/">
<tns:myXmlElementB>Input Value</tns:myXmlElementB>
</tns:myXmlElementA>
But I need this:
<tns:myXmlElementA xmlns:tns="http://mynamespaceuri/">
<myXmlElementB>Input Value</myXmlElementB>
</tns:myXmlElementA>
How can I remove the 'tns' prefix from 'myXmlElementB'?
Thanks in advance,
Westhveg
I'm using castor 1.3. I have a problem with marshalling, let me explain with
some code:
This is my class configuration in mapping.xml file:
<class name="com.mypackage.MyClass">
<map-to xml="myXmlElementA" ns-uri="http://mynamespaceuri/" ns-prefix="tns"
/>
<field name="value" type="java.lang.String" required="true">
<bind-xml name="myXmlElementB" node="element" />
</field>
</class>
And this is the resulting XML when it sends the request:
<tns:myXmlElementA xmlns:tns="http://mynamespaceuri/">
<tns:myXmlElementB>Input Value</tns:myXmlElementB>
</tns:myXmlElementA>
But I need this:
<tns:myXmlElementA xmlns:tns="http://mynamespaceuri/">
<myXmlElementB>Input Value</myXmlElementB>
</tns:myXmlElementA>
How can I remove the 'tns' prefix from 'myXmlElementB'?
Thanks in advance,
Westhveg
--
View this message in context: http://old.nabble.com/Problem-in-marshalling-elements-%28sending-request%29-tp26209995p26209995.html
Sent from the Castor - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
View this message in context: http://old.nabble.com/Problem-in-marshalling-elements-%28sending-request%29-tp26209995p26209995.html
Sent from the Castor - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email