Hi Chetan, See the full description for the <namespace> element: http://jibx.sourceforge.net/details/namespace-element.html If you set default="none", the namespace will only be used when you specify.
- Dennis Dennis M. Sosnoski SOA, Web Services, and XML Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-296-6194 - Wellington, NZ +64-4-298-6117 [EMAIL PROTECTED] wrote: > > 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 > [email protected] > https://lists.sourceforge.net/lists/listinfo/jibx-users > Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ jibx-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jibx-users
