Olá pessoal,
Estou gerando o XML através do Marshaller e
depois preciso preparar a XML para enviar o Lote; estou usando a seguinte rotina:
[code]JAXBContext context = JAXBContext.newInstance(“br.inf.portalfiscal.nfe”);
Unmarshaller unmarshaller = context.createUnmarshaller();
Marshaller marshaller = context.createMarshaller();
notaFile = new File(“C://empresas//ricjava20//XMLS//nfebabb.xml”);
TNFe nfe = unmarshaller.unmarshal(new StreamSource(notaFile), TNFe.class).getValue();
…
TEnviNFe enviNFe = new TEnviNFe();
enviNFe.setVersao(“2.00”);
enviNFe.setIdLote(“1”);
// adiciona nfebobb em nfbobbLote
enviNFe.getNFe().add(nfe);[/code]
Ele está gerando a tag “tEnviNFe” e precisa ser “enviNFe”;
também está deixando vazia, ou seja, sem "xmlns=“http://www.portalfiscal.inf.br/nfe”
<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
<tEnviNFe xmlns="http://www.portalfiscal.inf.br/nfe" versao="2.00">
<idLote>1</idLote>
<NFe>
<infNFe Id="NFe41110305372142000101550010000004461410542621" versao="2.00">
...
agradeço por alguma ajuda;