Login Registre-se
Cancelamento CTE  XML
Índice dos Fóruns » NF-e / NFS-e / CT-e / CF-e / Certificados Digitais
Autor Mensagem
elton.cunha

JavaC Membro

Membro desde: 31/08/2014 21:21:14
Mensagens: 4
Offline

Boa Noite Senhores !!!

Estou com dificuldades no cancelamento de CTe por evento, mesmo enviado o XML conforme o manual informa está me retornando erro 225 falha no schema XML, abaixo XML, não estou conseguindo ver o erro neste XML, se possível me ajudarem agradeço muito.

Boa Noite Senhores !!!
Estou enfrentando uma dificuldade em nosso sistema para homologar o cancelamento de CTe, junto ao sefaz RS, estou enviando o XML abaixo, que se validar junto ao manual estaria OK, porem está sempre me retornando um erro 225 erro no schema XML, duas dúvidas,
Qual é a URL correta para o cancelamento do CTE ?
E neste XML abaixo o qual passo pelo validador desta própria página confirma que está OK, possui erro ?

desde já muito obrigado pela atenção.

<?xml version="1.0" encoding="UTF-8"?><eventoCTe xmlns="http://www.portalfiscal.inf.br/cte" versao="2.00"><infEvento Id="ID1101114315071044100200017057001000003035106003035801"><cOrgao>43</cOrgao><tpAmb>1</tpAmb><CNPJ>10441002000170</CNPJ><chCTe>43150710441002000170570010000030351060030358</chCTe><dhEvento>2015-08-16T22:06:29</dhEvento><tpEvento>110111</tpEvento><nSeqEvento>01</nSeqEvento><detEvento versaoEvento="2.00"><evCancCTe><descEvento>Cancelamento</descEvento><nProt>143150031939803</nProt><xJust>CT-e emitido com valor incorreto</xJust></evCancCTe></detEvento></infEvento><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><Reference URI="#ID1101114315071044100200017057001000003035106003035801"><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmlds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GAQUFBwMEMIG9BgNVHREEgbUwgbKBGkVMVE9OLkNVTkhBQFNPTEFOTkEuQ09NLkJSoD4GBWBMAQMEoDUTMzAyMDkxOTgzODIwMTE1MjQwOTExMjY3MTk2NjcwMDAwMDAwMTA0MTg3ODIzMVNKUyBSU6AgBgVgTAEDAqAXExVFTFRPTiBQT0xPTkkgREEgQ1VOSEGgGQYFYEwBAwOgEBMOMTA0NDEwMDIwMDAxNzCgFwYFYEwBAwegDhMMMDAwMDAwMDAwMDAwMA0GCSqGSIb3DQEBCwUAA4ICAQAZstWbTSPm6YYG42p9ay3smv+DOtNRg0RmSPx4aI7gEybjfY/JsYR89dMOJwA1oPhNw+2B6QNmT6flyHPbo5SBkRWMVe2d6m6z7OIfDoy34ordIFiWG9XcEnlNTMvEOku4ZWt5SrmxOUDzto91RtZ7p4Am5Xe46T7U2ztFd3PZKEoIIyyQvbFNMFCH4MYbIezc/LO1LfdAap7GaeYrGtsmg4Vo+2J/pcKGe1ayF4iVH89ZWjbU5+SsAdbUk4qbwAsT7qT9PSrV4kauihrrXMfXsjrWagEnR7JzrfXKZB4faAvndAYVTl1o/INej2aSCtmsQJvPK+43pGAitvX0BngHOo4RHhfcs+YRxNxTRcqAYHomtZN7bZvx4HgWDVLdOQa5u6RrkXXg+ekaaXsD3ekhy1ZH8re0RGbKeK4rjwPGjeq4w+IjgJMZ1QFrY1lPSEkbCbC0F7RYBel4kblnKyOMrDYqXSSlnDpFKT1Zy746R+m5xfklTozfRZly8rWeOYuDo9BAd0X9SaF1Nacrzbp92uGF54A7XTayc2v8GEb+aA8bjqNg7/gKA0BD8eecZpns9cXbpPw6feEly/QC5SkU3cbz+tPk/fMVJyAQ2LTTGpaexjxs2COCCToVbISVcGtg+V/eOsf/9ItEj8lJR3QlKQ/c4ajo6lZCpV0EbcV1PA==</X509Certificate></X509Data></KeyInfo></Signature></eventoCTe>
rfumiot

JavaC Membro
[Avatar]

Membro desde: 23/06/2015 17:19:55
Mensagens: 215
Offline

bom dia elton.cunha


o erro 225 falha no schema XML - acontece quando encontrada algumas dessas situações no xml:
- Espaços entre as TAGs do XML;
- Quebras de Linhas;
- Caracteres especiais;
- Nome de TAGs errados;
- Versão do XML diferente do esperado pelo Web Service;

você verifica se o seu xml tem espaços ou caracteres especiais? aqui no fórum tem um método que faz isso...
elton.cunha

JavaC Membro

Membro desde: 31/08/2014 21:21:14
Mensagens: 4
Offline

já verifiquei o xml, e a principio não tem nada de anormal que eu esteja vendo, e no validador do sefaz passa sem problemas.

sobre este método de verificação saberia me dizer qual é, assim tento implementar para eliminar esse possível erro.

para cancelamento estou utilizando a versão 2.00,

obrigado pelo auxilio
rfumiot

JavaC Membro
[Avatar]

Membro desde: 23/06/2015 17:19:55
Mensagens: 215
Offline

o tópico referente ao método de remover acentos é este:

http://www.javac.com.br/jc/posts/list/75-remover-acentos-string.page
elton.cunha

JavaC Membro

Membro desde: 31/08/2014 21:21:14
Mensagens: 4
Offline

boa noite !!!

já tenho implementado essa rotina para eliminar caracteres indesejáveis mas mesmo assim estou enfrentando este problema que não estou conseguindo identificar o problema .

-----------------------------------------------------------------------------------------
XML de Envio de Evento de Cancelamento por evento

<?xml version="1.0" encoding="UTF-8"?>
<eventoCTe xmlns="http://www.portalfiscal.inf.br/cte" versao="2.00">
<infEvento Id="ID1101114315091044100200017057001000003373106003373401">
<cOrgao>43</cOrgao>
<tpAmb>1</tpAmb>
<CNPJ>10441002000170</CNPJ>
<chCTe>43150910441002000170570010000033731060033734</chCTe>
<dhEvento>2015-09-22T01:37:49</dhEvento>
<tpEvento>110111</tpEvento>
<nSeqEvento>01</nSeqEvento>
<detEvento versaoEvento="2.00">
<evCancCTe>
<descEvento>Cancelamento</descEvento>
<nProt>143150044219090</nProt>
<xJust>CT-e emitido com valor incorreto</xJust>
</evCancCTe>
</detEvento>
</infEvento>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><Reference URI="#ID1101114315091044100200017057001000003373106003373401"><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>dWSHEGy25GlToo9iwQSZJc4APH4=</DigestValue></Reference></SignedInfo><SignatureValue>b4EdSyXwun/wpsQfIlII8L5pSKQpVbCnLbhtpNrIBFDeQce5EY6AyAP5sF0Vk/N2fljhicsPlBzJvxq3MvroMi1ta5IjdYjF4tZmuFlE6TTOiM9pjCYV7tmmEyzjnI5QQgo3ukwiyW3yyk61ak7SmSGIZ7RqgFHkbhMsz4XRkQeRU8/d6mQxFKUpdAtmAt+0op716QrdFM0q+e9c1wSm0j+9jWrxU7vnsIahB4V4iqW/Zr1gzQiXYwqA6ypClUtRHDgGfcr6nv4uzpnuz2kqIez7dGiwWOaYNtiz/Uu5qLyWiqoOofnp0J59XAEa8NkvdhqHQlPOMVXW0Ie/fG+FLg==</SignatureValue><KeyInfo><X509Data><X509Certificate>MIIHyDCCBbCgAwIBAgIIKAdHPgLGQ8EwDQYJKoZIhvcNAQELBQAwTDELMAkGA1UEBhMCQlIxEzARBgNVBAoTCklDUC1CcmFzaWwxKDAmBgNVBAMTH1NFUkFTQSBDZXJ0aWZpY2Fkb3JhIERpZ2l0YWwgdjIwHhcNMTUwMTA5MTYwMjAwWhcNMTYwMTA5MTYwMjAwWjCB4zELMAkGA1UEBhMCQlIxEzARBgNVBAoTCklDUC1CcmFzaWwxFDASBgNVBAsTCyhFTSBCUkFOQ08pMRgwFgYDVQQLEw8wMDAwMDEwMDU3OTgyMzcxFDASBgNVBAsTCyhFTSBCUkFOQ08pMRQwEgYDVQQLEwsoRU0gQlJBTkNPKTEUMBIGA1UECxMLKEVNIEJSQU5DTykxFDASBgNVBAsTCyh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D8eecZpns9cXbpPw6feEly/QC5SkU3cbz+tPk/fMVJyAQ2LTTGpaexjxs2COCCToVbISVcGtg+V/eOsf/9ItEj8lJR3QlKQ/c4ajo6lZCpV0EbcV1PA==</X509Certificate></X509Data></KeyInfo></Signature>
</eventoCTe>
-------------------------------------------------------------------------------------------------
Retorno do Envio de Cancelamento :
<retEnviCte xmlns="http://www.portalfiscal.inf.br/cte" versao="2.00">
<tpAmb>1</tpAmb>
<cUF>43</cUF>
<verAplic>RS20140703103347</verAplic>
<cStat>103</cStat>
<xMotivo>Lote recebido com sucesso</xMotivo>
<infRec>
<nRec>431000258273754</nRec>
<dhRecbto>2015-09-22T01:37:46</dhRecbto>
<tMed>1</tMed>
</infRec>
</retEnviCte>
-------------------------------------------------------------------------------------------------
Consulta do Cancelamento :
<?xml version="1.0" encoding="utf-8"?>
<consReciCTe versao="2.00" xmlns="http://www.portalfiscal.inf.br/cte">
<tpAmb>1</tpAmb>
<nRec>431000258273754</nRec>
</consReciCTe>
-------------------------------------------------------------------------------------------------
Retorno da Consulta :
<retConsReciCTe xmlns="http://www.portalfiscal.inf.br/cte" versao="2.00">
<tpAmb>1</tpAmb>
<verAplic>RS20150831164450</verAplic>
<nRec>431000258273754</nRec>
<cStat>225</cStat>
<xMotivo>Rejeicao: Falha no Schema XML do CT-e</xMotivo>
<cUF>43</cUF>
</retConsReciCTe>
-------------------------------------------------------------------------------------------------

Não estou conseguindo identificar a falha do Schema XML se conseguirem olhar e me dar uma luz fico muito agradecido .

Muito Obrigado.
 
Índice dos Fóruns » NF-e / NFS-e / CT-e / CF-e / Certificados Digitais
Ir para:   
Powered by JForum 2.1.9 © JForum Team