Re: Wrong character set returned

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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>


.



Relevant Pages

  • Re: Implementing a common SOAP Header across multiple Web Service Pages
    ... to set a client up to reference multiple Web ... the Web Service site would ... Your point about leaving the ASMX page as lean as possible and acting just ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Implementing a common SOAP Header across multiple Web Service Pages
    ... between my Web Service application and the client. ... public string SID; ... Web Service page, rather than to a dozen or so separate Web Service pages ... You can easily create a .ASMX file ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Still Need desperate help to start with ASP NET - simplified problems - HELP!!
    ... You could do it as a web service. ... The handler can draw on the webservice for information and db lookup. ... IE posts data AJAX to handler on web server ... featured application (say thick client) which does a lot of complicate ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: WSE 3.0, SoapReceiver and Kerberos encryption
    ... I have a machine we'll call 'Service' which exposes a web service called ... I have defined a WSE 3.0 policy that sets up Kerberos Security. ... I have a machine we'll call 'Client'. ... format when the "target Web service is created using a SoapReceiver ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: UsernameOverTransportSecurity+SSL Confusion, please help
    ... But when I go to my web service: ... I have under IIS settings for my WebService? ... I will have a private key on the server, and I will give the private key to ... The client will automatically get the public key and negotiate a key to ...
    (microsoft.public.dotnet.framework.webservices.enhancements)