diff --git a/src/nusoap.php b/src/nusoap.php index 4444414..d0a3e61 100644 --- a/src/nusoap.php +++ b/src/nusoap.php @@ -3842,7 +3842,7 @@ function service($data) } } elseif ($this->wsdl) { $this->debug("In service, serialize WSDL"); - header("Content-Type: text/xml; charset=ISO-8859-1\r\n"); + header("Content-Type: text/xml; charset={$this->soap_defencoding}\r\n"); print $this->wsdl->serialize($this->debug_flag); if ($this->debug_flag) { $this->debug('wsdl:'); @@ -3851,7 +3851,7 @@ function service($data) } } else { $this->debug("In service, there is no WSDL"); - header("Content-Type: text/html; charset=ISO-8859-1\r\n"); + header("Content-Type: text/html; charset={$this->soap_defencoding}\r\n"); print "This service does not provide WSDL"; } } elseif ($this->wsdl) { @@ -3859,7 +3859,7 @@ function service($data) print $this->wsdl->webDescription(); } else { $this->debug("In service, no Web description"); - header("Content-Type: text/html; charset=ISO-8859-1\r\n"); + header("Content-Type: text/html; charset={$this->soap_defencoding}\r\n"); print "This service does not provide a Web description"; } } @@ -4692,6 +4692,7 @@ function configureWSDL($serviceName, $namespace = false, $endpoint = false, $sty $this->wsdl = new wsdl; $this->wsdl->serviceName = $serviceName; + $this->wsdl->soap_defencoding = $this->soap_defencoding; $this->wsdl->endpoint = $endpoint; $this->wsdl->namespaces['tns'] = $namespace; $this->wsdl->namespaces['soap'] = 'http://schemas.xmlsoap.org/wsdl/soap/'; @@ -5642,7 +5643,7 @@ function popout(){ // Hides message */ function serialize($debug = 0) { - $xml = ''; + $xml = 'soap_defencoding . '"?>'; $xml .= "\nnamespaces as $k => $v) { $xml .= " xmlns:$k=\"$v\"";