SOAP-ERROR: Encoding: string … is not a valid utf-8 string

前端 未结 6 604
情书的邮戳
情书的邮戳 2021-01-02 22:10

Hi I have a web service built using the Zend Framework. One of the methods is intended to send details about an order. I ran into some encoding issue. One of the values bein

6条回答
  •  没有蜡笔的小新
    2021-01-02 22:53

    What about change the encoding settings:

    SERVER:

    $server = new SoapServer("some.wsdl", array('encoding'=>'ISO-8859-1')); // for 'windows-1252' too
    

    CLIENT:

    $server = new SoapClient("some.wsdl", array('encoding'=>'ISO-8859-1')); // for 'windows-1252' too
    

    ... then the conversion is done automatically to UTF-8, I had the similiar problem, so this helped me, so it is tested

提交回复
热议问题