File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes namespaces in child tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "namespaces in child tags" Watch "namespaces in child tags" New topic

namespaces in child tags

Emily Sit

Joined: Mar 17, 2005
Posts: 8

I am using WebLogic workshop xmlbeans in my application. The XMLs I am creating contain namespaces and it seems that namespaces are being declared multiple times within child tags.

<ord rderRetrievalResponse xmlns rd="ca/bell/oms/orderretrieval">
<oms:receivedDateTime xmlns ms="ca/bell/oms/autotype/omscommonresponse">2007-03-22T10:34:07.218-04:00</oms:receivedDateTime>
<oms:transactionIdentifier xmlns ms="ca/bell/oms/autotype/omscommonresponse">testOr</oms:transactionIdentifier>
<oms rocessedDateTime xmlns ms="ca/bell/oms/autotype/omscommonresponse">2007-03-22T10:34:07.218-04:00</oms rocessedDateTime>
<oms:responseSystem xmlns ms="ca/bell/oms/autotype/omscommonresponse">OmfOrderRetrieve</oms:responseSystem>
<oms:successIndicator xmlns ms="ca/bell/oms/autotype/omscommonresponse">Success</oms:successIndicator>

The namespace xmlns ms="ca/bell/oms/autotype/omscommonresponse" is defined within each tag. Is there a way to clean this up so that the namespace is declared once at the root?
I agree. Here's the link:
subject: namespaces in child tags
It's not a secret anymore!