users@jaxb.java.net

Re: default namespace inconsistency?

From: MrKimi <roger_at_senanque.co.nz>
Date: Thu, 8 May 2008 19:54:53 -0700 (PDT)

Jason Harrop wrote:
>
> Try adding attributeFormDefault="qualified" elementFormDefault="qualified"
> ?
>
> This should end up being reflected in package-info.java
>
>

package-info now looks like this:

@javax.xml.bind.annotation.XmlSchema(namespace =
"http://www.telecom.co.nz/EAI/UMTS_SOM", elementFormDefault =
javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package nz.co.telecom.dsm.umts_som;


and the resulting marshalled XML looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<createProductOrder xmlns="http://www.telecom.co.nz/EAI/UMTS_SOM">
    <productOrder>
....

So that has solved it thanks. We now have a default namespace specified in
the way I expected. I experimented with the NamespacePrefixMapper and it
puts the prefix on each tag if I return that preference, or creates a
default namespace as shown above.

Problem solved. Thanks for your help.

-- 
View this message in context: http://www.nabble.com/default-namespace-inconsistency--tp17138133p17140555.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.