I have a PHP SOAP server (using nuSOAP with wsdl) that send the content of a html page. Of course, the HTML can be coded with differents encoding and here is when the problems appear. If I used a PHP SOAP client I can send the encoding like this:
- $clienteSOAP = new SoapClient ("http://test.mine.com/wsdl/filemanager?wsdl",
- array ('encoding' => 'ISO-8859-15'));
- $clienteSOAP->__soapCall ("Test.uploadHTML",
- array (file_get_contents ('/home/КОЛЛЕКЦИЯ_РОДНИК_ПРЕМИУМ.html')));
And if I put the correct encoding, has never failed so far. But when I use a C# client, how can I put the encoding in the web service petition? In C# the code is:
- System.IO.StreamReader html = new System.IO.StreamReader (
- "C:\\Documents and Settings\\КОЛЛЕКЦИЯ_РОДНИК_ПРЕМИУМ.html"
- ,System.Text.Encoding.GetEncoding("iso-8859-15"));
- string contenido = html.ReadToEnd();
- html.Close();
-
- Test.FileManager upload = new Test.FileManager();
- string resultado = upload.TestUploadHTML (contenido);
Test.FileManager is a Web reference of the wsdl, and when I see the "upload html" some characters aren't correct.
Thanks in advance.