Caros colegas,
Estou fazendo a consulta de um lote da NFE :
NfeRetRecepcao2Stub.NfeCabecMsg cabec = new NfeRetRecepcao2Stub.NfeCabecMsg();
cabec.setCUF("15");
cabec.setVersaoDados("2.00");
NfeRetRecepcao2Stub.NfeCabecMsgE nfeCabecMsg = new NfeRetRecepcao2Stub.NfeCabecMsgE();
nfeCabecMsg.setNfeCabecMsg(cabec);
NfeRetRecepcao2Stub.NfeDadosMsg nfeDadosMsg = new NfeRetRecepcao2Stub.NfeDadosMsg();
//estou usando aki String p/ teste
String str = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><consReciNFe versao=\"2.00\" xmlns=\"http://www.portalfiscal.inf.br/nfe\"><tpAmb>2</tpAmb><nRec>154000004532880</nRec></consReciNFe>";
System.out.println( str );
//imprime <?xml version="1.0" encoding="UTF-8"?><consReciNFe versao="2.00" xmlns="http://www.portalfiscal.inf.br/nfe"><tpAmb>2</tpAmb><nRec>154000004532880</nRec></consReciNFe>
nfeDadosMsg.setExtraElement( AXIOMUtil.stringToOM( str ) );
NfeRetRecepcao2Stub.NfeRetRecepcao2Result nfeRetResult = new NfeRetRecepcao2Stub().nfeRetRecepcao2(nfeDadosMsg, nfeCabecMsg);
System.out.println( nfeRetResult.getExtraElement() );
e como resultado:
<retConsReciNFe xmlns="http://www.portalfiscal.inf.br/nfe" versao="2.00"><tpAmb>2</tpAmb><verAplic>SVAN_4.01</verAplic><nRec>154000004532880</nRec><cStat>999</cStat><xMotivo>2254 - Falha no carregamento dos esquemas XSD</xMotivo><cUF>15</cUF></retConsReciNFe>
Já verifiquei caracteres inválidos,espaços duplos e outras coisas e não achei nada.
Não consigo saber qual é o erro desse xml.
Se alguém tiver algum exemplo que funcione ou puder testar este código eu agradeço.