예제 #1
0
 /**
  * Calls a web service on any URL
  * Uses constant("SERVICES_INTERMEDIATE_ENCODING") for wrapping, which is SOAP by default
  * 
  * @param String $Endpoint WSDL
  * @param string $Method name
  * @param Array $Params
  * @return Mixed
  */
 function CallSoap($Endpoint, $Method, $Params, $isWSDL = false, $Session = false)
 {
     j::$App->LoadSystemModule("plugin.nusoap.nusoap");
     $soap = new nusoap_client($Endpoint, $isWSDL);
     $CookiePath = $this->Hostname($Endpoint) . "_cookies";
     if ($Session) {
         $soap->UpdateCookies(j::LoadSession($CookiePath));
     }
     $Result = $soap->call($Method, $Params);
     if ($Session) {
         j::SaveSession($CookiePath, $soap->getCookies());
     }
     return $Result;
 }