SOAP-ERROR: Encoding: string … is not a valid utf-8 string
2016-08-01 11:30
1116 查看
PHP 利用SOAP调用webservice 传输汉字数据时,开发环境使用GBK模式,报上述错误,解决方法,在配置中使用如下语句:
$server = new SoapServer(null, array(
'uri' =>'http://soap/',
'encoding'=>'ISO-8859-1'
//'location'=>'http://61.160.96.114:8000/inc/service/serverSoap.php'
));
$soap = new SoapClient(null, array(
'location'=>'http://61.160.96.114:8000/inc/service/serverSoap.php',
'uri' =>'http://soap/',
'encoding'=>'ISO-8859-1'
));
$server = new SoapServer(null, array(
'uri' =>'http://soap/',
'encoding'=>'ISO-8859-1'
//'location'=>'http://61.160.96.114:8000/inc/service/serverSoap.php'
));
$soap = new SoapClient(null, array(
'location'=>'http://61.160.96.114:8000/inc/service/serverSoap.php',
'uri' =>'http://soap/',
'encoding'=>'ISO-8859-1'
));
相关文章推荐
- newStringUTF出现input is not valid Modified UTF-8错误解决办法
- JNI WARNING: NewStringUTF input is not valid Modified UTF-8: illegal start byte 0xb0
- JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal continuation byte 0x12
- JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal continuation byte 0x3f
- JNI WARNING: NewStringUTF input is not valid Modified UTF-8: illegal start byte 0xf5
- Error occurred in deployment step ‘Activate Features’: Operation is not valid due to the current state of the object
- A SOAP 1.2 message is not valid when sent to a SOAP 1.1 only endpoint.
- 01:39:40,599 ERROR [http-bio-8080-exec-58][MVCPortlet:362] search.jsp is not a valid include
- javascript 错误 "Uncaught TypeError: string is not a function"
- error : 'AddString' : is not a member of 'CWnd'
- JNI WARNING: input is not valid Modified UTF-8
- ERROR spi.SqlExceptionHelper : 'Infinity' is not a valid numeric or approximate numeric value 问题解决
- Error: The computer you chose is not a valid license server
- crash - JNI WARNING: input is not valid modified utf-8: illegal continuation byte
- Error: An App ID with identifier "*****" is not avaliable. Please enter a different string.
- Uncaught TypeError: string is not a function
- [转]error - Operation is not valid due to the current state of the object.
- 'Operation is not valid due to the current state of the object' error during postback
- Google Chrome: Uncaught TypeError: String is not a function.
- JSF Validation Error: Value is not valid错误