"nullify" namespace

18 views
Skip to first unread message

Paulo "JCranky" Siqueira

unread,
Apr 23, 2012, 10:33:45 AM4/23/12
to sca...@googlegroups.com
Hi,

One of the web services I'm consuming required an internal element to have its namespace nullified. Something like this:

<PedidoEnvioLoteRPS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.prefeitura.sp.gov.br/nfe">
    <Cabecalho Versao="1" xmlns="">
    </Cabecalho>
</PedidoEnvioLoteRPS>

Is there any easy way to achieve the xmlns="" part with scalaxb? I'm already using scalaxb generated beans and except for th namespaces, everything else seems fine.

By the way, this xml is defined in a separated xsd file, which is independent (loosely-coupled as we talked some time ago I think) from the wsdl file for the W.S.

thanks!

[]s,

--
Paulo "JCranky" Siqueira
Visit my blog: http://www.jcranky.com/

eugene yokota

unread,
Apr 23, 2012, 10:39:26 AM4/23/12
to sca...@googlegroups.com
Hi,

If the schema's elementFormDefault is unqualified, the generated code should automatically handle that.
Otherwise it's a bug that needs to be fixed.

Could you open an issue with repro data?

-eugene

Paulo "JCranky" Siqueira

unread,
Apr 23, 2012, 10:51:27 AM4/23/12
to sca...@googlegroups.com
I'm not sure elementFormDefault is marked as unqualified. Actually, looking at the xsd, it doesn't seem to be set at all. Is the xml default behaviour expected to the unqualified, or perhaps this is just how this W.S. is handling things?

[]s,

2012/4/23 eugene yokota <eed3...@gmail.com>

eugene yokota

unread,
Apr 23, 2012, 10:56:57 AM4/23/12
to sca...@googlegroups.com
The default is unqualified.

elementFormDefault = (qualified | unqualified) : unqualified

-eugene

Paulo "JCranky" Siqueira

unread,
Apr 23, 2012, 11:38:41 AM4/23/12
to sca...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages