users@jaxb.java.net

how to setup jaxb marshaller to generate the namespaces at the root node.

From: Srinivasan Chikkala <srinivasan.chikkala_at_Sun.COM>
Date: Tue, 07 Jun 2005 12:30:39 -0700

When I marshall the jaxb model that contains the elements with
attributes of type javax.xml.namespaces.QName, the namespace prefix and
the namespace uri is generated locally in the parent element. Is there a
way to tell the marshaller to generate all the namespaces in the root
element of the xml document?

I am getting the marshalled xml like

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<services-info version="1.0" xmlns="http://java.sun.com/xml/ns/ns1">
    <services component="true">
        <provide endpoint-name="MyServiceEndpoint"
interface-name="ns2:MyInterface" service-name="ns2:MyService"
xmlns:ns2="http://www.example.org/myservice.wsdl"/>
    </services>
</services-info>

I want to get the xml like this

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<services-info version="1.0"
    xmlns="http://java.sun.com/xml/ns/my/ns1"
    xmlns:ns2="http://www.example.org/myservice.wsdl >
    <services component="true">
        <provide endpoint-name="MyServiceEndpoint"
interface-name="ns2:MyInterface" service-name="ns2:MyService" />
    </services>
</services-info>


I am using jwsdp 1.5


thanks,
-chikkala