I'm trying a SOAP Client with PHP. It is ok as i simply know it. But there is a problem when the Data contains Special Character
inside.

in the data.)Following is the sample:
header('Content-Type: text/plain; charset=UTF-8');
$client = new SoapClient('http://www.example.com/webservice.asmx?WSDL', array('trace' => 1, 'encoding'=>'UTF-8'));
$result_1 = $client->GetText();
$result_2 = $client->GetText_withSpecialCharacter(); //Data contains `` hex-code (♫ Special Character)
var_dump($result_1);
var_dump($result_2);
$result_1
properly$result_2
(It always returns BLANK)Please suggest me what should i do with it?
You can try setting the encoding to UTF-8
Example
$client = new SoapClient('http://www.example.com/webservice.asmx?WSDL', array('trace' => 1, 'encoding'=>' UTF-8'));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With