/**
  * //typograf.artlebedev.ru/webservices/
  */
 private function artlebedev($data)
 {
     $request = new CSOAPRequest("ProcessText", "http://typograf.artlebedev.ru/webservices/");
     $request->addParameter("text", htmlspecialchars($data));
     $request->addParameter("entityType", $entityType);
     $request->addParameter("useBr", $useBr);
     $request->addParameter("useP", $useP);
     $request->addParameter("maxNobr", $maxNobr);
     $request->addParameter("quotA", $quotA);
     $request->addParameter("quotB", $quotB);
     $client = new CSOAPClient('typograf.artlebedev.ru', '/webservices/typograf.asmx');
     $response = $client->send($request);
     return $response->Value['ProcessTextResult'];
 }
Esempio n. 2
0
 function TestComponent()
 {
     global $APPLICATION;
     $client = new CSOAPClient("bitrix.soap", $APPLICATION->GetCurPage());
     $client->setLogin("admin");
     $client->setPassword("123456");
     $request = new CSOAPRequest("GetHTTPUserInfo", CWebService::GetDefaultTargetNS());
     //$request->addParameter("stub", 0);
     $response = $client->send($request);
     if ($response->FaultString) {
         echo $response->FaultString;
     } else {
         echo "Call GetHTTPUserInfo(): <br>" . mydump($response->Value) . "<br>";
     }
 }
Esempio n. 3
0
 function Request($server, $page, $port, $method, $namespace, $login, $password, $arParams)
 {
     if (!CModule::IncludeModule("webservice")) {
         return false;
     }
     global $APPLICATION;
     $client = new CSOAPClient($server, $page, $port);
     $client->setLogin($login);
     $client->setPassword($password);
     $request = new CSOAPRequest($method, $namespace, $arParams);
     $response = $client->send($request);
     if (is_object($response) && $response->isFault()) {
         if (XDI_XML_ERROR_DEBUG) {
             CXDImport::WriteToLog("ERROR: Incorrect webservice response. Raw response: " . $client->getRawResponse(), "RXML");
         }
         return false;
     } else {
         if (XDI_XML_DEBUG) {
             CXDImport::WriteToLog("Successfull webservice response. Raw response: " . $client->getRawResponse(), "RXML");
         }
         if (is_object($response)) {
             return $response->Value;
         } else {
             return false;
         }
     }
 }
Esempio n. 4
0
 /**
  * If is authentificate
  *
  * @return bool|void
  */
 function isAuthentificate()
 {
     $options = array("encoding" => $this->encoding);
     try {
         $soap_client = new CSOAPClient($this->type_soap);
         $password = $this->getPassword();
         $soap_client->make($this->host, $this->user, $password, $this->type_echange, $options, null, null, $this->local_cert, $this->passphrase, false, $this->verify_peer, $this->cafile, $this->wsdl_external);
         $soap_client->checkServiceAvailability();
     } catch (Exception $e) {
         $this->_reachable = 1;
         $this->_message = $e->getMessage();
         return false;
     }
     return true;
 }
Esempio n. 5
0
 * @author   SARL OpenXtrem <*****@*****.**>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  SVN: $Id:$
 * @link     http://www.mediboard.org
 */
CCanDo::checkAdmin();
// Check params
if (null == ($exchange_source_name = CValue::get("exchange_source_name"))) {
    CAppUI::stepAjax("Aucun nom de source d'échange spécifié", UI_MSG_ERROR);
}
/** @var CSourceSOAP $exchange_source */
$exchange_source = CExchangeSource::get($exchange_source_name, "soap", true, null, false);
if (!$exchange_source) {
    CAppUI::stepAjax("Aucune source d'échange disponible pour ce nom : '{$exchange_source_name}'", UI_MSG_ERROR);
}
if (!$exchange_source->host) {
    CAppUI::stepAjax("Aucun hôte pour la source d'échange : '{$exchange_source_name}'", UI_MSG_ERROR);
}
$options = array("encoding" => $exchange_source->encoding);
$soap_client = new CSOAPClient($exchange_source->type_soap);
$soap_client->make($exchange_source->host, $exchange_source->user, $exchange_source->getPassword(), $exchange_source->type_echange, $options, null, null, $exchange_source->local_cert, $exchange_source->passphrase, $exchange_source->safe_mode, $exchange_source->verify_peer, $exchange_source->cafile, $exchange_source->wsdl_external);
if (!$soap_client || $soap_client->client->soap_client_error) {
    CAppUI::stepAjax("Impossible de joindre la source de donnée : '{$exchange_source_name}'", UI_MSG_ERROR);
} else {
    CAppUI::stepAjax("Connecté à la source '{$exchange_source_name}'");
}
try {
    $soap_client->client->checkServiceAvailability();
} catch (CMbException $e) {
    $e->stepAjax();
}