PHP code example of camcima / camcima-soap-client
1. Go to this page and download the library: Download camcima/camcima-soap-client library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
camcima / camcima-soap-client example snippets
$soapClient = new \Camcima\Soap\Client($wsdl, $options, $sslVerifyPeer);
$curlOptions = array(
CURLOPT_CRLF => true,
CURLOPT_SSL_VERIFYPEER => true
);
$soapClient = new \Camcima\Soap\Client($wsdl, $options);
$soapClient->setCurlOptions($curlOptions);
// Mandatory cURL Options
CURLOPT_POST => true
CURLOPT_HEADER => true
$curlOptions = $soapClient->getCurlOptions();
$soapClient->useProxy('proxy.local', 8080, CURLPROXY_SOCKS5);
$soapClient->setProxyAuth('proxy_user', 'proxy_password');
$soapClient = new Client($wsdlUrl, ['login' => 'joelogin', 'password' => 'joepassword']);
$soapClient->setUserAgent('MyUserAgent/1.0');
$soapClient->setLowerCaseFirst(true);
$soapClient->setKeepNullProperties(true);
$soapClient->setDebug(true);
$soapClient->setDebugLogFilePath(__DIR__ . '/../../../../log/debug.log');
$soapClient->getCommunicationLog();
$soapClient = new Client($wsdlUrl);
$soapResult = $soapClient->GetCityForecastByZIP($getForecastByZip);
$resultClassmap = array(
'GetCityForecastByZIPResult' => '\Camcima\Soap\Test\Fixtures\GetCityForecastByZIPResult',
'ForecastResult' => '\Camcima\Soap\Test\Fixtures\ForecastResult',
'array|Forecast' => '\Camcima\Soap\Test\Fixtures\ForecastEntry',
'Temperatures' => '\Camcima\Soap\Test\Fixtures\Temperatures',
'ProbabilityOfPrecipiation' => '\Camcima\Soap\Test\Fixtures\ProbabilityOfPrecipiation'
);
$getCityForecastByZIPResult = $soapClient->mapSoapResult($soapResult, 'GetCityForecastByZIPResult', $resultClassmap, true);
$mapping = array(
'array|Forecast' => '\Camcima\Soap\Test\Fixtures'
);
$mapping = array(
'ForecastIcons' => 'array'
);
$resultClassNamespace = '\MyProject\SOAP\Result\\';
public function mapSoapResult($soapResult, $rootClassName, array $resultClassMap = array(), $resultClassNamespace = '', $skipRootObject = false);