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

UTF-8 problem?



   Hi,



   We get an error when we are sending soap xml files to a web service.

   The error says that we are not sending proper UTF-8 and it appears
   only when we are using the scandinavian chars ���øå.

   Does httpapi support UTF-8 with scandinavian chars?

   Here is the parser error on the web server:

   :1: parser error : Input is not proper UTF-8, indicate encoding
   !\nBytes: 0xD8 0x52 0x4E
   0x41\nksref><foedselsnr>19097299999</foedselsnr><etternavn>FLON</etter
   navn><fornavn>BJ\n ^\n at /opt/ergotm/lib/TM/Server.pm line 112\n





   Here is the rpg code:



   SOAP =
    '<?xml version="1.0" encoding="UTF-8"?>'
   +'<soap:Envelope xmlns:soap='
   +'"[1]http://schemas.xmlsoap.org/soap/envelope/";'
   +'xmlns:brukersesjon='
   +'"[2]http://ws-test.infotorg.no/xml/Admin/Brukersesjon/2006-07-'
   +'07/Brukersesjon.xsd" xmlns:transaksjon="[3]http://ws-'
   +'test.infotorg.no/xml/Admin/Transaksjon/2006-07-07'
   +'/Transaksjon.xsd"'
   +'xmlns:dsf="[4]http://ws-test.infotorg.no'
   +'/xml/EDB/Folkeregisteret/2006-10-07/Folkeregisteret.xsd">'
   +'<soap:Header>'
   +'<brukersesjon:Brukersesjon>'
   +'<sesjonsid>' + %trimr(sesjonid) + '</sesjonsid>'
   +'</brukersesjon:Brukersesjon>'
   +'</soap:Header>'
   +'<soap:Body>'

   +'<dsf:hentDetaljer>'
   +'<saksref>' + brukerid + '</saksref>'
   +'<foedselsnr>' + %trimr(xforgnr) + '</foedselsnr>'
   +'<etternavn>' + %trimr(xetternavn) + '</etternavn>'
   +'<fornavn>' + %trimr(xfornavn) + '</fornavn>'
   +'<detaljer>J</detaljer>'
   +'</dsf:hentDetaljer>'
   +'</soap:Body>'
   +'</soap:Envelope>';



   HTTP_setCCSIDs(1208: 0);  // CCSID 1208 = UTF-8

   rc = http_url_post_xml(
   'https://ws-test.infotorg.no/ws/EDB/Folkeregisteret.pl'
                     : %addr(SOAP) + 2
                     : %len(SOAP)
                     : *NULL
                     : %paddr(Incoming)
                     : *NULL
                     : HTTP_TIMEOUT
                     : HTTP_USERAGENT
                     : 'text/xml; charset=utf-8');



   We use httpapi v1.17 and expat 2.0.0.



   Best regards,

   Magne

References

   1. http://schemas.xmlsoap.org/soap/envelope/";'
   2. http://ws-test.infotorg.no/xml/Admin/Brukersesjon/2006-07-'
   3. http://ws-'/
   4. http://ws-test.infotorg.no'/
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------