Hi,

I have pasted two XML messages.One the actual message that I used as a basis for getting my binding files in place.
the one below is the output after I ran the binding compiler and then marshalled the contents of my java objects ino an xml.

The actual message has the namespace preifx(ibml:) only at the top level, where as,the output obtained has the prefix in the parent as well as child elements.
--------------------------------------------------------------------------------------------
                        Actual Message
--------------------------------------------------------------------------------------------
                        <ibml:unitPrice>
                                <currency>USD</currency>
                                <amount>78.20</amount>
                        </ibml:unitPrice>

--------------------------------------------------------------------------------------------
                                Output message
--------------------------------------------------------------------------------------------
                  <ibml:unitPrice xmlns:ibml="http:chetan.org">
                        <ibml:currency>Rs</ibml:currency>
                        <ibml:amount>100</ibml:amount>
                  </ibml:unitPrice>

My question -- how to enable the namespace prefix as and when one wants it.
From the jibx tutorials all that i could gather was i can use the elements/attributes/all as options
in the namespace element
somehting like
<namespace uri="http:chetan.org" prefix="ibml" default="elements"/>      (other options being all/attributes for default)


the binding that I am using for this is

---------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<binding>
        <mapping name="unitPrice" class="UnitPrice">
                <namespace uri="http:chetan.org" prefix="ibml" default="elements"/>
                <value name="currency" field="currency"/>
                <value name="amount" field="amount"/>                
        </mapping>
</binding>
---------------------------------------------------------------------------------------------------------------------------------

Pls let me know if any other information is required.Request you to kindly help me with this matter.

Regards,
Chetan
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to