[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Antwort: Re: HTTPAPI - Problem consuming WCF webservice - HTTP/1.1 400 Bad Request
That clearly indicates that the web service expects utf-8 encoded data,
doesn't it? In that case I would change the encoding from 819 to 1208:
HTTP_setCCSIDs(1208: 0); // CCSID 1208 = UTF-8
You may also consider to not remove the header line but instead change it to:
<?xml version="1.0" encoding="utf-8"?>
Thomas.
Am 15.09.2010 15:40, schrieb kmiller@xxxxxxxxx:
>
> I did some more testing, and the program only works when I remove the
> encoding="iso-8859-1" from the first line and have 'text/xml;
> charset=utf-8' for the content type. I tried to add the encoding
> ="iso-8859-1" to the first line and removed the charset=utf-8 in the
> content type, and it did not work.
>
> Kevin
>
>
>
>
>
> Scott Klement
> <sk@xxxxxxxxxxxxxxxx> To: HTTPAPI and FTPAPI Projects<ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> Sent by: cc:
> ftpapi-bounces@xxxxxxxxxxx Subject: Re: Antwort: Re: HTTPAPI - Problem consuming WCF webservice -
> klement.com HTTP/1.1 400 Bad Request
>
>
> 09/14/2010 03:42 PM
> Please respond to HTTPAPI
> and FTPAPI Projects
>
>
>
>
>
>
> Aha! I missed that he specified the charset in the content-type! That
> certainly explains the problem... if you tell it that the
> charset=utf-8 in the content-type, and specify<?xml
> encoding="iso-8859-1" ?> in the processing declarations, you are clearly
> giving the web service conflicting information.
>
> So it's rejecting the iso-8859-1 (even though that _is_ what is being
> sent) because Kevin already told the web service that it's utf-8.
>
>
> On 9/14/2010 2:06 PM, Thomas Raddatz wrote:
>>
>> New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819.
> ProtLoc=0
>>
>> But the content type is set to "utf-8":
>>
>> Content-Type: text/xml; charset=utf-8
>>
>> I wonder what encoding actually is expected by the web service.
> -----------------------------------------------------------------------
> 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
-----------------------------------------------------------------------