none
Quebra de Linha retorno WebService RRS feed

  • Pergunta

  • Bom dia,

    Criei um WebService, e o retorno não está vindo com a quebra de linha.

    String:

    "H091307046723520160923\r\nDPG046723500000708983600013692A000000000000000000000009000000000000000090000000000000000200000000140169300000000000\r\nDPG046723500010021056200013693A000000000000000000019742000000000000197420000000000000000000000000187089481000000000\r\nDPG046723500005170400800013694A000000000000000000001480000000000000014800000000000000000000000000187088000000000000\r\nDPG046723500005526035900013697A000000000000000000009087000000000000090870000000000000000000000000190271000000000000\r\nDPG046723500000771335100013698A000000000000000000000064000000000000000640000000000000000000000000173269090000000000\r\nDPG046723500004673764400013698A000000000000000000001446000000000000014460000000000000000000000000184818021000000000\r\n"

    Retorno WebService

    This XML file does not appear to have any style information associated with it. The document tree is shown below.
    <string xmlns="http://www.grupolider.com.br">
    H091307046723520160923 DPG046723500000708983600013692A000000000000000000000009000000000000000090000000000000000200000000140169300000000000 DPG046723500010021056200013693A000000000000000000019742000000000000197420000000000000000000000000187089481000000000 DPG046723500005170400800013694A000000000000000000001480000000000000014800000000000000000000000000187088000000000000 DPG046723500005526035900013697A000000000000000000009087000000000000090870000000000000000000000000190271000000000000 DPG046723500000771335100013698A000000000000000000000064000000000000000640000000000000000000000000173269090000000000 DPG046723500004673764400013698A000000000000000000001446000000000000014460000000000000000000000000184818021000000000
    </string>

    Como deveria ser o Retorno WebService:

    <string xmlns="">
    H091307046723520160923
    DPG046723500000708983600013692A000000000000000000000009000000000000000090000000000000000200000000140169300000000000
    DPG046723500010021056200013693A000000000000000000019742000000000000197420000000000000000000000000187089481000000000
    DPG046723500005170400800013694A000000000000000000001480000000000000014800000000000000000000000000187088000000000000
    DPG046723500005526035900013697A000000000000000000009087000000000000090870000000000000000000000000190271000000000000
    DPG046723500000771335100013698A000000000000000000000064000000000000000640000000000000000000000000173269090000000000
    DPG046723500004673764400013698A000000000000000000001446000000000000014460000000000000000000000000184818021000000000
    </string>


    Já troquei o \r\n por Environment.NewLine e mesmo assim não funcionou.

    quarta-feira, 5 de outubro de 2016 12:47

Respostas

  • Mas as quebras de linha estao la, veja:

    1000000000 DPG04672

    Note o espaço entre o 00 e o DP. Ali esta sua quebra de linha. O que ocorre é que seu visualizador nao consegue motra-lo como uma quebra de linha.

    att


    William John Adam Trindade
    Analyste-programmeur
    ----------------------------------------------------------

    • Marcado como Resposta Yannick Freitas quarta-feira, 5 de outubro de 2016 16:15
    quarta-feira, 5 de outubro de 2016 14:57
    Moderador

Todas as Respostas

  • Mas as quebras de linha estao la, veja:

    1000000000 DPG04672

    Note o espaço entre o 00 e o DP. Ali esta sua quebra de linha. O que ocorre é que seu visualizador nao consegue motra-lo como uma quebra de linha.

    att


    William John Adam Trindade
    Analyste-programmeur
    ----------------------------------------------------------

    • Marcado como Resposta Yannick Freitas quarta-feira, 5 de outubro de 2016 16:15
    quarta-feira, 5 de outubro de 2016 14:57
    Moderador
  • Obrigado,

    Não imaginava que o visualizador poderia interferir.

    quarta-feira, 5 de outubro de 2016 16:15