[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Error : Invalid byte 2 of 3-byte UTF-8 sequence
Hi,
I am new with HTTPAPI.
I try to use it to consume a Web Service and I have this error :
"Invalid byte 2 of 3-byte UTF-8 sequence"
And I do not understand why.
I used SoapUI to do the same test and it works !
Can I have help ?
Here below extracts from my program and from the result file
My program is based on EXAMPLE18.
SOAP =
'<?xml version="1.0" encoding="iso-8859-1"?>'
+'<SOAP:Envelope'
+' xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"'
+' xmlns:drc="http://drc99.euronautical.com/">'
+'<SOAP:Header/>'
+'<SOAP:Body>'
+' <drc:constructionInputParameters>'
+' <drc:user>'
+' <drc:userpass>'
+' <drc:name>************</drc:name>'
+' <drc:pwd type="text">*******</drc:pwd>'
+' </drc:userpass>'
+' </drc:user>'
+' <drc:companyName>AAF</drc:companyName>'
+' <drc:sessionId>IFRAru</drc:sessionId>'
+' <drc:departure>'+ %trim(DepApt) +'</drc:departure>'
+' <drc:destination>'+ %trim(ArrApt) +'</drc:destination>'
+' <drc:aircraft>'
+' <drc:rodosAcftId>'
+' <drc:aircraftNameOrType>'+ %trim(AcType)
+'</drc:aircraftNameOrType>'
+' </drc:rodosAcftId>'
+' </drc:aircraft>'
+' </drc:constructionInputParameters>'
+' </tns:ConversionRate>'
+'</SOAP:Body>'
+'</SOAP:Envelope>';
rc =
http_url_post(
'http://192.36.95.109:8080/drc/drc'
: %addr(SOAP) +
2
:
%len(SOAP)
:
'/tmp/DrcMsg.txt'
:
HTTP_TIMEOUT
: HTTP_USERAGENT
:
'text/xml'
:
'http://192.36.95.109:8080/drc/drc/constructRoutes');
The result in file DrcMsg.txt is :
<?xml version="1.0" ?><S:Envelope
xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><construct
ionOutput xmlns="http://drc99.euronautical.com/"><?xml
version="1.0" encoding="ISO-8859-1" ?>
<drcresp version="1.0">
<errors>
<errs>
<err>Invalid byte 2 of 3-byte UTF-8
sequence.</err></errs>
</errors>
</drcresp></constructionOutput></S:Body></S:Envelope>
I have joined the file httpapi_debug.txt in this mail.
Thanks in advance to all helpers !
Alain RUAS
Technical Manager
(33) 562 747 500
HTTPAPI Ver 1.23 released 2008-04-24
OS/400 Ver V5R4M0
http_url_post(): entered
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry : 2
DNS resolver options: x'00000136'
DNS default domain: IFRFRANCE.COM
DNS server found: 192.168.168.204
DNS server found: 192.168.168.207
DNS server found: 62.160.110.3
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST http://192.36.95.109:8080/drc/drc HTTP/1.1
Host: 192.36.95.109:8080
User-Agent: http-api/1.23
Content-Type: text/xml
SOAPAction: http://192.36.95.109:8080/drc/drc/constructRoutes
Expect: 100-continue
Content-Length: 785
recvresp(): entered
SetError() £43: CommTCP_read: No 100-Continue (error ignored)
senddoc(): entered
<?xml version="1.0" encoding="iso-8859-1"?><SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:drc="http://drc99.euronautical.com/"><SOAP:Header/><SOAP:Body> <drc:constructionInputParameters> <drc:user> <drc:userpass> <drc:name>StephaneàSAFE</drc:name> <drc:pwd type="text">test789</drc:pwd> </drc:userpass> </drc:user> <drc:companyName>AAF</drc:companyName> <drc:sessionId>IFRAru</drc:sessionId> <drc:departure>ORY</drc:departure> <drc:destination>TLS</drc:destination> <drc:aircraft> <drc:rodosAcftId> <drc:aircraftNameOrType>733Z</drc:aircraftNameOrType> </drc:rodosAcftId> </drc:aircraft> </drc:constructionInputParameters> </tns:ConversionRate></SOAP:Body></SOAP:Envelope>
recvresp(): entered
HTTP/1.0 200 OK
X-Powered-By: Servlet/2.5
Server: Sun Java System Application Server 9.1_01
Content-Type: text/xml;charset="utf-8"
Content-Length: 474
Date: Wed, 17 Sep 2008 10:15:23 GMT
X-Cache: MISS from junon.capmedia.fr
X-Cache-Lookup: MISS from junon.capmedia.fr:8011
Via: 1.0 junon.capmedia.fr:8011 (squid/2.6.STABLE5)
Proxy-Connection: close
SetError() £13: HTTP/1.0 200 OK
recvdoc parms: identity 474
header_load_cookies() entered
recvdoc(): entered
SetError() £0:
<?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><constructionOutput xmlns="http://drc99.euronautical.com/"><?xml version="1.0" encoding="ISO-8859-1" ?>
<drcresp version="1.0">
<errors>
<errs>
<err>Invalid byte 2 of 3-byte UTF-8 sequence.</err></errs>
</errors>
</drcresp></constructionOutput></S:Body></S:Envelope>
http_close(): entered
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------