Consult section 6 of
http://www.w3.org/TR/REC-xml-names. I'd say that
the SW responsible for creating the DOM tree from XML in that Web
Service is buggy. There shouldn't be a problem of repeating the
default (or any other) namespace inside the scope of a namespace.
What happens if you use a prefix?
-W
On 28/02/2012, Fernando Cesar da Silva <fsilva_at_synchro.com.br> wrote:
> Hi JAXB Community,
>
>
>
> First of all, I know that apparently the e-mail subject makes no sense at
> all, and I know that JAXB automatically avoid declaring redundant namespace
> URIs when you are marshalling to DOMResult.
>
>
>
> I need to unmarshall a XML like the following to a POJO generated using XJC,
> I will set this POJO as a Web Service content. As you can see the XML has a
> namespace redundancy.
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <enviNFe versao="2.00" xmlns="http://www.portalfiscal.inf.br/nfe">
>
> <idLote>000000000000002</idLote>
>
> <NFe xmlns="http://www.portalfiscal.inf.br/nfe">
>
> <infNFe Id="NFe35120254625819002893551420000300001392548901"
> versao="2.00">
>
> <ide>
>
> <cUF>35</cUF>
>
> <cNF>39254890</cNF>
>
> ...
>
> ...
>
>
>
> When I do the unmarshall, set the POJO as the Web Service content and invoke
> the WS, the Service return a message complaining about the missing namespace
> in the tag <NFe>.
>
>
>
> What should I do to the unmarshalling process maintain the redundancy?
>
>
>
> Thanks.
>
>
>
> <mailto:fsilva_at_synchro.com.br> Fernando Cesar da Silva | JEE Architect |
> Phone: +55 19 3794 1608 x 1828
> <http://www.synchro.com.br/> Synchro Solução Fiscal – 20 anos | SPED | NFe
> | CTe | Classificação Fiscal
>
>
>
>
>
>