Hi,

>
> You might want to check the methods like getNamespaceContext() (probably
> return an empty implementation), getPrefix(), getDefaultNamespace

Finally, it has been enough to implement a dummy NamespaceContext like this:

class EmptyNamespaceContext implements NamespaceContext {

        public String getNamespaceURI(String prefix) {
            return "";
        }

        public String getPrefix(String namespaceURI) {
            return "";
        }

        public Iterator getPrefixes(String namespaceURI) {
            return null;
        }

    }

and overwrite the getNamespaceContext method to retrieve a new
instance of EmptyNamespaceContext:

       @Override
        public NamespaceContext getNamespaceContext() {
            return new EmptyNamespaceContext();
        }

>
> By the way, it could be simpler if your writer just extends
>
> http://svn.apache.org/repos/asf/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/DelegatingXMLStreamWriter.java

With this my code stays cleaner.

Sergey, thank you again for your support and keep up the good work!.

Regards,

Juanjo.

Reply via email to