Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6840903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:54:03+00:00 2026-05-26T23:54:03+00:00

I have a PHP SOAP server (using nuSOAP with wsdl) that send the content

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:54:04+00:00Added an answer on May 26, 2026 at 11:54 pm

    nusoap internally uses the php function xml_parser_create, that only supports: ISO-8859-1, UTF-8 and US-ASCII. For this reason, this library don’t works well with other encoding. Great PacHecoPe…

    UPDATE: The best option, in my case, is read the archive in its original encoding and transform it to utf-8:

    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();
    
    System.Text.UTF8Encoding encoder = new System.Text.UTF8Encoding();
    byte[] bytes = System.Text.Encoding.UTF8.GetBytes (contenido);
    string contenidoUTF8 = encoder.GetString(bytes);
    
    upload.RequestEncoding = System.Text.Encoding.GetEncoding("UTF-8");
    
    Test.FileManager upload = new Test.FileManager();
    string resultado = upload.TestUploadHTML (contenidoUTF8);
    

    UPDATE2: With encoding that not supported in UTF-8 like big5, don’t work very well the above code. For this reason, it’s better don’t make the transform to UTF-8 and set the parameter with the content of html like base64Binary, in the wsdl.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP SOAP server (using nuSOAP) that I consume with a C#-based
Is that possible to have a single PHP SOAP server which will handle requests
I am building (in PHP) a SOAP server that is configured by its WSDL
I have to write soap wsdl server in php. Requirement: request:two parameters say startDate
I have written a webservice using the PHP SOAP classes. It has functions to
I have a RPC encoded PHP webservice that returns a simple soap envelope with
I am using ASIHTTPRequest in IOS. I have aloso a wsdl/soap web services. when
I have a PHP SOAP web service, using CakePHP, which is returning a variable
I have to create a PHP SOAP client that sends leads, but I have
I have a site that uses the php SOAP client to connect to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.