Hi,

I had a question about this. I have ten namespaces declared below the
binding tag with default specified as none and the ns attribute
specified on structure tags and mapping tags. The tag is qualified
correctly. But all the prefixes which I have declared previously are
being put in the generated tag and child tags which are complex types.

Is there a way where only the needed namespace prefix will be declared
as opposed to all prefixes declared in the binding?
If the first option is not possible, is there a way to have the prefix
declarations generated at root level only?

Akhil Srinivasan

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dennis
Sosnoski
Sent: Friday, February 02, 2007 3:20 AM
To: JiBX users
Subject: Re: [jibx-users] problem with XML name space qualification

The <namespace ... default="elements"/> in your binding tells JiBX you 
want the namespace to be applied to all elements. In your case you just 
want the namespace to apply to the root PCHA_Dataset element of your 
document. Remove the default="elements" attribute from the <namespace/> 
element in your binding, and add 
ns="http://businessobjects.datalayer.fpa"; to the <mapping> element start

tag. This will apply the namespace only to the root element.

  - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Carmi wrote:
> I'm using jibx 1.1.3. and unmarshalling an XML.
> I have this binding file (simplified) 
> http://www.nabble.com/file/6134/samplebinding.xml samplebinding.xml 
> and this XML file  http://www.nabble.com/file/6135/sampleTest.XML
> sampleTest.XML 
> at runtime jibx complain about the name space. Basically it wants me
to
> qulify the elements . In the real world, this is a big XML, and I
don't see
> why jibx insists that I qualify the names. Don't want to qualify all
the
> elements.
> When I put this:  
>
<PCHA_to_FPA:PCHA_Software_Version>0102042</PCHA_to_FPA:PCHA_Software_Ve
rsion>
> Jibx is happy.
> Otherwise, it complains with:
> Failed Exception: Failed to parse file /tmp/sampleTest.xml, Expected
> "{http://businessobjects.datalayer.fpa}PCHA_Software_Version"; start
tag,
> found "PCHA_Software_Version" start tag (line 4, col 28)
>
> if in the xml I remove the namespace from this:
> xmlns:PCHA_to_FPA="http://businessobjects.datalayer.fpa"; and leave it
as 
> xmlns="http://businessobjects.datalayer.fpa"; jibx complains about
error in
> the file.
>
> Any pointers/help would be greatly appriciated.
> Thanks
>   

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



MASTEK 
"Making a valuable difference"
Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of 
Mastek Limited, unless specifically indicated to that effect. Mastek Limited 
does not accept any responsibility or liability for it. This e-mail and 
attachments (if any) transmitted with it are confidential and/or privileged and 
solely for the use of the intended person or entity to which it is addressed. 
Any review, re-transmission, dissemination or other use of or taking of any 
action in reliance upon this information by persons or entities other than the 
intended recipient is prohibited. This e-mail and its attachments have been 
scanned for the presence of computer viruses. It is the responsibility of the 
recipient to run the virus check on e-mails and attachments before opening 
them. If you have received this e-mail in error, kindly delete this e-mail from 
all computers.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Reply via email to