Could fix encoding bug in webservices (registration.soap) see BT#4158 (code is commented)

skala
Julio Montoya 13 years ago
parent a9d52662fb
commit 571dba9e80
  1. 10
      main/inc/lib/nusoap/nusoap.php
  2. 3
      main/webservices/registration.soap.php

@ -3722,7 +3722,7 @@ class nusoap_server extends nusoap_base {
} }
$this->send_response(); $this->send_response();
} elseif (preg_match('/wsdl/', $qs) ){ } elseif (preg_match('/wsdl/', $qs) ){
$this->debug("In service, this is a request for WSDL"); $this->debug("In service, this is a request for WSDL");
if ($this->externalWSDLURL){ if ($this->externalWSDLURL){
if (strpos($this->externalWSDLURL, "http://") !== false) { // assume URL if (strpos($this->externalWSDLURL, "http://") !== false) { // assume URL
$this->debug("In service, re-direct for WSDL"); $this->debug("In service, re-direct for WSDL");
@ -4548,6 +4548,9 @@ class nusoap_server extends nusoap_base {
} }
$this->wsdl = new wsdl; $this->wsdl = new wsdl;
//$this->wsdl->soap_defencoding = $this->soap_defencoding;
$this->wsdl->serviceName = $serviceName; $this->wsdl->serviceName = $serviceName;
$this->wsdl->endpoint = $endpoint; $this->wsdl->endpoint = $endpoint;
$this->wsdl->namespaces['tns'] = $namespace; $this->wsdl->namespaces['tns'] = $namespace;
@ -5470,8 +5473,9 @@ class wsdl extends nusoap_base {
* @access public * @access public
*/ */
function serialize($debug = 0) function serialize($debug = 0)
{ {
$xml = '<?xml version="1.0" encoding="ISO-8859-1"?>'; /* $xml = '<?xml version="1.0" encoding="'.$this->soap_defencoding.'"?>';*/
$xml = '<?xml version="1.0" encoding="ISO-8859-1"?>';
$xml .= "\n<definitions"; $xml .= "\n<definitions";
foreach($this->namespaces as $k => $v) { foreach($this->namespaces as $k => $v) {
$xml .= " xmlns:$k=\"$v\""; $xml .= " xmlns:$k=\"$v\"";

@ -51,6 +51,9 @@ function WSHelperVerifyKey($params) {
// Create the server instance // Create the server instance
$server = new soap_server(); $server = new soap_server();
//$server->soap_defencoding = 'UTF-8';
// Initialize WSDL support // Initialize WSDL support
$server->configureWSDL('WSRegistration', 'urn:WSRegistration'); $server->configureWSDL('WSRegistration', 'urn:WSRegistration');

Loading…
Cancel
Save