Re: Wrong character set returned
- From: "Matt Dockerty" <matt@xxxxxxxxxxxxx>
- Date: Tue, 21 Jul 2009 11:04:44 +0100
I sorted this, it was actually the client encoding that was wrong. If you happen to be getting the same problem and you're using the nusoap client, the fix is:
$client->http_encoding = "utf-8";
$client->soap_defencoding = "utf-8";
PHP and .net can actually talk. Well I'll be... :)
--Matt
"Matt Dockerty" <matt@xxxxxxxxxxxxx> wrote in message news:#g9uAMeCKHA.4608@xxxxxxxxxxxxxxxxxxxxxxx
Hi,.
I've got a WCF / IIS hosted web service set up to communicate in UTF-8 and a PHP client which requires this. Parsing the WSDL, XSD etc all occurs in UTF-8 (Content-Type: text/xml; charset=utf-8). When it gets round to interfacing with the actual web service it suddenly changes to Content-Type: text/xml; ISO-8559-1, which causes an HTTP 451 error since the client is expecting a different content type.
How can I get the whole service conversation to happen in UTF-8? I can't seem to find any more options to set apart from the charset in my binding configuration.
Any help much appreciated.
--Matt
PS, here's my binding config:
<basicHttpBinding>
<binding
name="basicHttpBinding"
allowCookies="true"
bypassProxyOnLocal="true"
closeTimeout="00:05:00"
hostNameComparisonMode="Exact"
maxBufferPoolSize="524288"
maxBufferSize="524288"
maxReceivedMessageSize="16384"
messageEncoding="Mtom"
openTimeout="00:01:00"
receiveTimeout="00:01:00"
sendTimeout="00:01:00"
textEncoding="UTF-8"
transferMode="Buffered"
useDefaultWebProxy="false">
<security mode="Message">
<transport clientCredentialType="Windows"
proxyCredentialType="None"
realm="" />
<message
algorithmSuite="TripleDesSha256"
clientCredentialType="UserName"/>
</security>
<readerQuotas maxDepth="32"
maxStringContentLength="99999"
maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
</binding>
</basicHttpBinding>
- References:
- Wrong character set returned
- From: Matt Dockerty
- Wrong character set returned
- Prev by Date: Wrong character set returned
- Next by Date: Retaining Carriage Returns in result of WCF WebMethod
- Previous by thread: Wrong character set returned
- Next by thread: Retaining Carriage Returns in result of WCF WebMethod
- Index(es):
Relevant Pages
|