Webservice: ppt2lp remote call upgraded to recent version of NuSOAP #WIP

pull/4415/head
Yannick Warnier 3 years ago
parent 2c31c17099
commit 6e8811c205
  1. 4
      main/lp/openoffice_document.class.php
  2. 18
      main/webservices/additional_webservices.php

@ -333,7 +333,7 @@ abstract class OpenofficeDocument extends learnpath
// the following issue:
// SoapClient::__doRequest(): SSL: Connection reset by peer
}
$client = new SoapClient(null, $options);
$client = new \nusoap_client(null, $options);
$result = '';
$file_data = base64_encode(file_get_contents($file['tmp_name']));
@ -349,7 +349,7 @@ abstract class OpenofficeDocument extends learnpath
];
try {
$result = $client->__call('wsConvertPpt', ['pptData' => $params]);
$result = $client->__call('wsConvertPpt', $params);
} catch (Exception $e) {
error_log('['.time().'] Chamilo SOAP call error: '.$e->getMessage());
}

@ -158,6 +158,18 @@ $options = [
'location' => $webCodePath.'webservices/additional_webservices.php',
];
$soapServer = new SoapServer(null, $options);
$soapServer->addFunction('wsConvertPpt');
$soapServer->handle();
$soapServer = new \nusoap_server(null, $options);
$soapServer->register(
'wsConvertPpt',
[
'secret_key' => 'xsd:string',
'file_data' => 'xsd:base64Binary',
'file_name' => 'xsd:string',
'service_ppt2lp_size' => 'xsd:string',
],
[
'data' => 'xsd:string'
]
);
$soapServer->configureWSDL('wsConvertPpt');
$soapServer->service($HTTP_RAW_POST_DATA);

Loading…
Cancel
Save