Project

General

Profile

Bug #16082 ยป bug-3327.diff

Administrator Admin, 2006-12-11 22:30

View differences:

class.em_soap.php (working copy)
***************************************************************/
/* $Id$ */
// make sure some SOAP implementation is available
if (!defined('SOAP_1_2')) {
// if no native SOAP support is available we use nusoap (bundled)
require_once('class.nusoap.php');
}
/**
* Enter description here...
*
......
switch ($this->options['implementation']) {
case 'nusoap':
$this->client =& new soapclient($this->options['wsdl'], true);
$this->client->getProxy();
break;
case 'pearsoap':
$this->client =& new SOAP_Client($this->options['wsdl'], true);
class.em_terconnection.php (working copy)
***************************************************************/
if (!defined('SOAP_1_2')) {
require_once('class.nusoap.php');
# require_once('/usr/share/php/SOAP/Client.php');
}
require_once('class.em_soap.php');
/**
class.nusoap.php (working copy)
if($typeDef = $this->getTypeDef($type)){
$str .= '<'.$type;
if(is_array($typeDef['attrs'])){
foreach($attrs as $attName => $data){
$str .= " $attName=\"{type = ".$data['type']."}\"";
}
foreach($typeDef['attrs'] as $attName => $data){
$str .= " $attName=\"{type = ".$data['type']."}\"";
}
}
$str .= " xmlns=\"".$this->schema['targetNamespace']."\"";
if(count($typeDef['elements']) > 0){
$str .= ">";
foreach($typeDef['elements'] as $element => $eData){
$str .= $this->serializeTypeDef($element);
}
$str .= "</$type>";
$str .= ">";
foreach($typeDef['elements'] as $element => $eData){
$str .= $this->serializeTypeDef($element);
}
$str .= "</$type>";
} elseif($typeDef['typeClass'] == 'element') {
$str .= "></$type>";
$str .= "></$type>";
} else {
$str .= "/>";
$str .= "/>";
}
return $str;
}
......
$evalStr = $this->_getProxyClassCode($r);
//$this->debug("proxy class: $evalStr";
// eval the class
eval($evalStr);
// instantiate proxy object
eval("\$proxy = new soap_proxy_$r('');");
// transfer current wsdl data to the proxy thereby avoiding parsing the wsdl twice
$proxy->endpointType = 'wsdl';
$proxy->wsdlFile = $this->wsdlFile;
$proxy->wsdl = $this->wsdl;
$proxy->operations = $this->operations;
$proxy->defaultRpcParams = $this->defaultRpcParams;
// transfer other state
$proxy->username = $this->username;
$proxy->password = $this->password;
$proxy->authtype = $this->authtype;
$proxy->proxyhost = $this->proxyhost;
$proxy->proxyport = $this->proxyport;
$proxy->proxyusername = $this->proxyusername;
$proxy->proxypassword = $this->proxypassword;
$proxy->timeout = $this->timeout;
$proxy->response_timeout = $this->response_timeout;
$proxy->http_encoding = $this->http_encoding;
$proxy->persistentConnection = $this->persistentConnection;
$proxy->requestHeaders = $this->requestHeaders;
$proxy->soap_defencoding = $this->soap_defencoding;
$proxy->endpoint = $this->endpoint;
$proxy->forceEndpoint = $this->forceEndpoint;
return $proxy;
if(!$this->getError()) {
eval($evalStr);
// instantiate proxy object
if(class_exists('soap_proxy_'.$r)) {
eval("\$proxy = new soap_proxy_$r('');");
// transfer current wsdl data to the proxy thereby avoiding parsing the wsdl twice
$proxy->endpointType = 'wsdl';
$proxy->wsdlFile = $this->wsdlFile;
$proxy->wsdl = $this->wsdl;
$proxy->operations = $this->operations;
$proxy->defaultRpcParams = $this->defaultRpcParams;
// transfer other state
$proxy->username = $this->username;
$proxy->password = $this->password;
$proxy->authtype = $this->authtype;
$proxy->proxyhost = $this->proxyhost;
$proxy->proxyport = $this->proxyport;
$proxy->proxyusername = $this->proxyusername;
$proxy->proxypassword = $this->proxypassword;
$proxy->timeout = $this->timeout;
$proxy->response_timeout = $this->response_timeout;
$proxy->http_encoding = $this->http_encoding;
$proxy->persistentConnection = $this->persistentConnection;
$proxy->requestHeaders = $this->requestHeaders;
$proxy->soap_defencoding = $this->soap_defencoding;
$proxy->endpoint = $this->endpoint;
$proxy->forceEndpoint = $this->forceEndpoint;
return $proxy;
}
}
return $this->getError();
}
/**
    (1-1/1)