PLP SIGEP Streamreader Error

Asked

Viewed 391 times

0

I’m integrating into my system the Webservice SIGEP, with closure of PLP.

I am having a problem posting the XML closing PLP. I get the error:

STREAMREADER ERROR

All other functions work properly. I’ve tried everything and the XML is ok, according to the Post Office manual.

Someone, who has, or has already developed this integration, could post a PLP closure XML as an example? Serves the Tags XML, and/or the Posting XML on webservice.

At the close of the PLP, we have the insertion of an XML inside another XML.

Following example:

<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">
    <soapenv:Header/>
    <soapenv:Body>
        <cli:fechaPlpVariosServicos>
            <xml>
                <?xml version="1.0" encoding="ISO-8859-1"?>
                <correioslog>
                    <tipo_arquivo>Postagem</tipo_arquivo>
                    <versao_arquivo>2.3</versao_arquivo>
                    <plp>
                        <id_plp />
                        <valor_global></valor_global>
                        <mcu_unidade_postagem></mcu_unidade_postagem>
                        <nome_unidade_postagem></nome_unidade_postagem>
                        <cartao_postagem>********</cartao_postagem>
                    </plp>
                    <remetente>
                        <numero_contrato>**********</numero_contrato>
                        <numero_diretoria>72</numero_diretoria>
                        <codigo_administrativo>********</codigo_administrativo>
                        <nome_remetente>******** *********</nome_remetente>
                        <logradouro_remetente>AVENIDA *******</logradouro_remetente>
                        <numero_remetente>****</numero_remetente>
                        <complemento_remetente></complemento_remetente>
                        <bairro_remetente>********** *****</bairro_remetente>
                        <cep_remetente>********</cep_remetente>
                        <cidade_remetente>RIBEIRAO PRETO</cidade_remetente>
                        <uf_remetente>SP</uf_remetente>
                        <telefone_remetente>16********</telefone_remetente>
                        <fax_remetente></fax_remetente>
                        <email_remetente></email_remetente>
                    </remetente>
                    <forma_pagamento />
                    <objeto_postal>
                        <numero_etiqueta>DU*********BR</numero_etiqueta>
                        <codigo_objeto_cliente />
                        <codigo_servico_postagem>81019</codigo_servico_postagem>
                        <data_captacao/>
                        <cubagem>0</cubagem>
                        <peso>2000</peso>
                        <rt1 />
                        <rt2 />
                        <destinatario>
                            <nome_destinatario>****** ****** ** *****</nome_destinatario>
                            <telefone_destinatario></telefone_destinatario>
                            <celular_destinatario></celular_destinatario>
                            <email_destinatario></email_destinatario>
                            <logradouro_destinatario>*** ******** ***** ** ********* ******</logradouro_destinatario>
                            <complemento_destinatario>14 ANDAR</complemento_destinatario>
                            <numero_end_destinatario>***</numero_end_destinatario>
                        </destinatario>
                        <nacional>
                            <bairro_destinatario>ITAIM BIBI</bairro_destinatario>
                            <cidade_destinatario>SAO PAULO</cidade_destinatario>
                            <uf_destinatario>SP</uf_destinatario>
                            <cep_destinatario>********</cep_destinatario>
                            <codigo_usuario_postal />
                            <centro_custo_cliente />
                            <numero_nota_fiscal>64377</numero_nota_fiscal>
                            <serie_nota_fiscal />
                            <valor_nota_fiscal />
                            <natureza_nota_fiscal />
                            <descricao_objeto></descricao_objeto>
                            <valor_a_cobrar></valor_a_cobrar>
                        </nacional>
                        <servico_adicional>
                            <codigo_servico_adicional>25</codigo_servico_adicional>
                            <codigo_servico_adicional>19</codigo_servico_adicional>
                            <data_agendamento/>
                            <valor_declarado>205,36</valor_declarado>
                        </servico_adicional>
                        <dimensao_objeto>
                            <tipo_objeto>002</tipo_objeto>
                            <dimensao_altura>20,0</dimensao_altura>
                            <dimensao_largura>20,0</dimensao_largura>
                            <dimensao_comprimento>20,0</dimensao_comprimento>
                            <dimensao_diametro></dimensao_diametro>
                        </dimensao_objeto>
                    </objeto_postal>
                </correioslog>
            </xml>
            <idPlpCliente>123</idPlpCliente>
            <cartaoPostagem>**********</cartaoPostagem>
            <listaEtiquetas>DU********BR</listaEtiquetas>
            <usuario>**************</usuario>
            <senha>******</senha>
        </cli:fechaPlpVariosServicos>
    </soapenv:Body>
</soapenv:Envelope>
  • I am voting to close this question as out of scope because this is not a question.

  • First of all, a read on the [Tour] is good. You are not on the Emerson website (whoever this is), and here is not a site for personal contact exchanges (if you want to leave your email, register your profile). If you have any programming questions that have not been answered yet on the site, and are on Scope of the site, is welcome to [Edit] the post to tailor your question. Here are some tips: [Ask] and [Help].

  • 1

    Good Afternoon. Sorry, as I had found a relevant question of a user named Emerson and was in his profile, I understood that the question would be sent to him. As for the email I realized that I would be tied to my registration after the conclusion of the question, because my registration was done after the conclusion of the question. I’ll rephrase the question and excuse the inconvenience.

  • @Matheusleone formatted your post, but I don’t know if it represents the original intent of your question. If you are not satisfied, feel free to [Dit] or reverse my amendment by edition history.

  • @Bacco Thanks for your help. It’s great.

  • 1

    seems to be a UTF-8 vs ANSI encoding error, try to make a conversion of the strings to UTF-8, almost all internal Post Office systems use UTF-8. See a similar answer [here](http://stackoverflow.com/questions/40284807/curious-issue-in-delphi-using-stream-reader "Curious Issue in Delphi using Stream Reader")!

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.