0

クライアントで WSDL Web サービスを作成しましたが、このエラーが発生しました

Array ( [faultcode] => SOAP-ENV:Server [faultstring] => SOAP-ERROR: Encoding: string 'Luik / Li\xe8...' is not a valid utf-8 string )

追加しようとしまし$server->setEncoding('UTF-8');たが、以下の API 呼び出しでエラーが発生するのは私のサーバー スクリプトです。

ini_set("soap.wsdl_cache_enabled", "0"); 
$server = new SoapServer('hello.wsdl', array('uri' => 'http://schemas.xmlsoap.org/wsdl/','classmap' => 'helloclass') );
$server->setClass('hello');
$server->handle();

function getDIDArea()
{
   $ret_final = new soapVar($ErrorMessage, SOAP_ENC_ARRAY,NULL, "urn:helloWSDL");
   return $ret_final;
}

hello.wsdl

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:helloWSDL" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:helloWSDL">

クライアントコード:

require_once "nusoap.php";
$soapclient= new soapclient('http://localhost/WebGetServer.wsdl', true);
$SoapResult = $soapclient->call("hello", $parameters,'urn:hello');
print_r($SoapResult);

常に同じエラーを返します。これはサーバーから返された結果ですLuik / Liège

4

0 に答える 0