JAXB: how to turn off namespaces?

I want to get rid of these silly little namespaces that JAXB is adding for the attributes in my XML output. Here is an example of what I am talking about:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<invocation xmlns="http://appriss.com/xsd/invocation.xsd" hashCode="1658591237">

<method>

<signature>publicvoid com.appriss.core.hibernate.StoredProcedurePersister.insert(java.io.Serializable,java.lang.Object[],java.lang.Object,org.hibernate.engine.SessionImplementor)throws org.hibernate.HibernateException</signature>

<args>

<arg xmlns:ns1="http://appriss.com/xsd/invocation.xsd" ns1:type="com.appriss.demo.CompositePK">com.appriss.demo.CompositePK@a71d9209</arg>

<arg xmlns:ns2="http://appriss.com/xsd/invocation.xsd" ns2:type="[Ljava.lang.Object;">[Ljava.lang.Object;@17d41d12</arg>

<arg xmlns:ns3="http://appriss.com/xsd/invocation.xsd" ns3:type="com.appriss.demo.TestCompositePKEntity">com.appriss.demo.TestCompositePKEntity@897d5ad</arg>

<arg xmlns:ns4="http://appriss.com/xsd/invocation.xsd" ns4:type="org.hibernate.impl.SessionImpl">SessionImpl(PersistenceContext[entityKeys=[EntityKey[com.appriss.demo.TestCompositePKEntity#component[key1,key2]{key1=1, key2=ninety-nine}]],collectionKeys=[]];ActionQueue[insertions=[EntityInsertAction[com.appriss.demo.TestCompositePKEntity#com.appriss.demo.CompositePK@a71d9209]] updates=[] deletions=[] collectionCreations=[] collectionRemovals=[] collectionUpdates=[]])</arg>

</args>

</method>

</invocation>

This xmlns:ns1, ns2, ns3, ns4 garbage has got to go. How can I do this? Is there something in my XSD that may be causing this? If that is possible, I will post my XSD as well, but I'm hoping there is simply a way to turn this off at the JAXBContext or Marshaller level.

[2402 byte] By [cpmcda01a] at [2007-10-3 3:35:13]
# 1
> I want to get rid of these silly little namespaces> that JAXB is adding for the attributes in my XML> output. Why?
DrClapa at 2007-7-14 21:29:52 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
> > I want to get rid of these silly little namespaces> > that JAXB is adding for the attributes in my XML> > output. > > Why?It's annoying, and I don't need it.
cpmcda01a at 2007-7-14 21:29:52 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
> It's annoying, and I don't need it.You are the luckiest programmer in the world. The rest of us have problems that actually need solving.
DrClapa at 2007-7-14 21:29:52 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
jaxb\samples\namespace-prefix\src, hope it helps...
WuWeia at 2007-7-14 21:29:52 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 5
This is a start, but it still produces prefixes for attributes, eventhough the namespace URI is the same one that is declared on the root element.
cpmcda01a at 2007-7-14 21:29:52 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 6

> > It's annoying, and I don't need it.

>

> You are the luckiest programmer in the world. The

> rest of us have problems that actually need solving.

Since you are desperately longing for some deeper meaning, I will give it. These XML messages will likely be parsed visually by a human, not a computer program. I am trying to reduce the line noise to make it more readable. Obviously I could pass it through a filter or an XSL transform, but I was hoping for a simpler solution within JAXB.+

I see you have made upwards of 26k posts here. Are they all as useless and pretentious as this one?

cpmcda01a at 2007-7-14 21:29:52 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 7

> Since you are desperately longing for some deeper

> meaning, I will give it.

Good. Posting the real question is always better than posting a meaningless question.

> These XML messages will

> likely be parsed visually by a human, not a computer

> program. I am trying to reduce the line noise to make

> it more readable. Obviously I could pass it through a

> filter or an XSL transform, but I was hoping for a

> simpler solution within JAXB.+

Making people read XML documents is extremely user-unfriendly in my opinion. I would agree with your idea of an XSL transform, especially if it produced text instead of XML. Just removing the namespace prefixes isn't going to make much difference.

> I see you have made upwards of 26k posts here. Are

> they all as useless and pretentious as this one?

It made you admit your real question, didn't it? Your original few posts were useless (but not pretentious).

DrClapa at 2007-7-14 21:29:52 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...