Schema XML Nota Fiscal Eletronica - Resposta WebService

pessoal, nao sei que está por dentro do projeto NF-e(Nota fiscal Eletronica) mas ao consumir o web service ele esta dando um erro de rejeição do cabeçalho.

meu xml gerado apartir de do XSD, é esse:


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nfes="http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico">
   <soapenv:Header/>
   <soapenv:Body>
      <nfes:nfeStatusServicoNF>

         <nfes:nfeCabecMsg> <![CDATA[  <?xml version="1.0" encoding="UTF-8"?>
<cabecMsg xmlns="http://www.portalfiscal.inf.br/nfe" versao="1.02">
<versaoDados>1.10</versaoDados>
</cabecMsg>   ]]>   </nfes:nfeCabecMsg> 

         <nfes:nfeDadosMsg> <![CDATA[  <?xml version="1.0" encoding="UTF-8"?>
<consStatServ xmlns="http://www.portalfiscal.inf.br/nfe" versao="1.07">
<tpAmb>2</tpAmb>
<cUF>35</cUF>
<xServ>STATUS</xServ>
</consStatServ>   ]]>  </nfes:nfeDadosMsg>
      </nfes:nfeStatusServicoNF>
   </soapenv:Body>
</soapenv:Envelope>

o ws me retorna o seguinte xml de erro:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <nfeStatusServicoNFResponse xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico">
         <nfeStatusServicoNFResult><![CDATA[<?xml version="1.0" encoding="UTF-8"?><retConsStatServ xmlns="http://www.portalfiscal.inf.br/nfe" versao="1.07"><tpAmb>1</tpAmb><verAplic>SP_NFE_PL_005a_R01</verAplic><cStat>242</cStat><xMotivo>Rejeição: Cabeçalho - Falha no Schema XML</xMotivo><cUF>35</cUF><dhRecbto>2008-06-19T09:26:29</dhRecbto><tMed>0</tMed></retConsStatServ>]]></nfeStatusServicoNFResult>
      </nfeStatusServicoNFResponse>
   </soap:Body>
</soap:Envelope>

desde já agradeço a todos que poderem me ajudar.

Cara…

hoje de manhã eu estava com esse erro…

Resolvi deixando o XML dessa maneira:

<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope">
    <S:Header>
        <nfeCabecMsg xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2">
            <cUF>43</cUF>
            <versaoDados>2.00</versaoDados>
        </nfeCabecMsg>
    </S:Header>
    <S:Body>
        <nfeDadosMsg xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2">
            <consStatServ xmlns="http://www.portalfiscal.inf.br/nfe" versao="2.00">
                <tpAmb>2</tpAmb>
                <cUF>43</cUF>
                <xServ>STATUS</xServ>
            </consStatServ>
        </nfeDadosMsg>
    </S:Body>
</S:Envelope>

Cara… como você faz a montagem do XML??

xD~~

altitdb, como você montou o xml?

Eu na verdade peguei este aqui no forum mesmo http://www.guj.com.br/java/206765-webservices-soap-12-headerresolvido, porém não consigo ver a estrutura do meu xml, não sei onde ele está errado.

NfeStatusServico2Soap12 consulta = new NfeStatusServico2().getNfeStatusServico2Soap12();
        NfeDadosMsg nfeDadosMsg = createNfeDadosMsg();
        Holder<NfeCabecMsg> nfeCabecMsg = new Holder<NfeCabecMsg>(createNfeCabecMsg());
        nfeConsultaNF2 = consulta.nfeStatusServicoNF2(nfeDadosMsg, nfeCabecMsg);

Se puder me ajudar, agradeço.

Edifran,

montei com o XStream.

Achei mais facil e atendeu minhas necessidades aqui.

xD~~

Site: http://xstream.codehaus.org/