users@jaxb.java.net

XML Namespace -> Updated

From: <HeruMartinus.Salim_at_infineon.com>
Date: Wed, 11 Oct 2006 12:41:30 +0200

Hallo,

Sorry about the double posting. I have made a mistake by my older Post.

I have a problem with the Namespace of the XML file, which is created by
the marshaller.

Here is the Element Creator of the ObjectFactoryt
@XmlElementDecl(namespace = "essence", name = "IPComponent")
 public JAXBElement<IPComponent> createIPComponentRoot(IPComponent
value) {
        return new JAXBElement<IPComponent>(_IPComponentRoot_QNAME,
IPComponent.class, null, value);
 }

Here is my XML Schema header
<xsd:schema xmlns:essence="essence"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="essence">

I'm expecting with such Element Creator to get an XML file which looked
like this:
<essence:IPComponentRoot xmlns:essence="essence" >

But instead, I got it like this:
<ns2:IPComponentRoot xmlns:ns2="essence">

What can I do to change this namespace symbol "essence" instead of
"ns2"?
Can I get the XML file which is expected?
Is there any place in the Code I should change?

As Information, I made a subclass of the IPComponent class, but using
the original (superclass) to create the JAXBElement.

Thanks in advance for the help.
Best regards,
Heru