PHP code example of itmh / service-tools-soap-old

1. Go to this page and download the library: Download itmh/service-tools-soap-old 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/ */

    

itmh / service-tools-soap-old example snippets



$soapClient = new \Camcima\Soap\Client($wsdl, $options);


$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 = 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);


$mapping = array(
    'array|Forecast' => '\Camcima\Soap\Test\Fixtures'
);


$resultClassNamespace = '\MyProject\SOAP\Result\\';