[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AW: XML parse failed



   Hallo Fritz,

   Um �upt etwas zu einem gegebenen Problem sagen zu k�n, ben�e
   ich auf in fast jedem Fall zuerst das Debug Log. So auch in deinem
   Fall, da ich wissen muss, wie die Antwortnachricht des Web Services
   aussieht.

   Bitte schicke mir das Debug Log, aber achte darauf, dass es bei der
   �ertragung von der IBM i auf den PC nicht zu einer
   Zeichensatzkonvertierung kommt. FTP im BINARY Modus geht auf jeden
   Fall.

   Benutzerkennungen und Passw�r sollten nat� entfernt sein.

   Viele Gr�   Thomas.

     "Logic IT: Karl Fritz" <k.fritz@xxxxxxxx> hat am 26. Oktober 2016 um
     10:45 geschrieben:
     Hallo Thomas
     Beiliegend schicke ich Dir den Source-Code von dem kleinen
     Web-Service der
     die EORI-Nummern checken soll. Einen �lichen hab ich f�
     VAT-Nummern,
     welcher tadellos funktioniert.
     Ich hab beide Versionen (UTF-8 und ISO-8859-1) versucht, ohne
     Erfolg.
     Scott empfiehlt mir Unicode, allerdings hab ich Zweifel ob das
     wirklich
     n� ist.
     Vielen Dank f� Hilfe.
     Beste Gr�us der regnerischen Schweiz.
     Karl
     -----Urspr�he Nachricht-----
     Von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
     [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Im Auftrag von Thomas
     Raddatz
     Gesendet: Mittwoch, 26. Oktober 2016 07:42
     An: HTTPAPI and FTPAPI Projects
     Betreff: AW: XML parse failed
     Fritz,
     What does the xml prolog header look like? Usually it should look
     like this,
     specifying utf-8 for the xml data stream:
     <?xml version="1.0" encoding="UTF-8"?>
     Also check the hex value of the German "�f "R�en". For utf-8
     it should
     be x'c396'. If it actually is x'F6', then the actual encoding could
     be for
     example ISO-8859-1. If the parser expects utf-8, it throws an error,
     when it
     reads x'F6'.
     The parser looks at the prolog header to select the proper encoding.
     If
     there is no prolog header, I strongly assume that it defaults to
     utf-8. So,
     if there is no xml prolog, look at the "Content-Type" header of the
     response
     message in your debug log, to figure out the encoding of the
     response
     message:
     Here are some examples:
     a) Encoding is ISO-8859-1.
     Content-Type: text/xml;charset=ISO-8859-1
     b) Encoding is utf-8.
     Content-Type: text/xml;charset=utf-8
     I am not sure about the deafult charset value of the content type
     header.
     But I assume, that it is us ascii.
     But I strongly assume, that your parser expects utf-8, but gets
     another
     encoding such as ISO-8859-1.
     Last but not least, here is where you should find the content type
     header:
     recvresp(): entered
     HTTP/1.1 200 OK
     Date: Mon, 25 Jul 2016 16:23:16 GMT
     Content-Type: text/xml;charset=ISO-8859-1
     Content-Length: 2877
     Connection: close
     Thomas.
     -----Urspr�he Nachricht-----
     Von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
     [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Im Auftrag von Logic
     IT: Karl
     Fritz
     Gesendet: Dienstag, 25. Oktober 2016 16:25
     An: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
     Betreff: XML parse failed
     Hi Scott,
     Using your HTTPAPI, i got this error:
     XML parse failed at line 1, col 311: not well-formed (invalid token)
     I think the reason for that is this XML expression:
     <street>R�en Str.</street>
     I compiled the HTTPAPI with CCSID 500 (Switzerland) but as it seems,
     it
     don't like characters like "�     If I run my app without special characters, I've no probs.
     How can I solve it?
     Thanks,
     Karl
     --
     IMPORTANT NOTICE:
     This email is confidential, may be legally privileged, and is for
     the
     intended recipient only. Access, disclosure, copying, distribution,
     or
     reliance on any of it by anyone else is prohibited and may be a
     criminal
     offence. Please delete if obtained in error and email confirmation
     to the
     sender.
     --------------------------------------------------------------------
     ---
     This is the FTPAPI mailing list. To unsubscribe, please go to:
     http://www.scottklement.com/mailman/listinfo/ftpapi
     --------------------------------------------------------------------
     ---
     --------------------------------------------------------------------
     ---
     This is the FTPAPI mailing list. To unsubscribe, please go to:
     http://www.scottklement.com/mailman/listinfo/ftpapi
     --------------------------------------------------------------------
     ---
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------