<?php
/**
 * This file aims to show you how to use this generated package.
 * In addition, the goal is to show which methods are available and the fist needed parameter(s)
 * You have to use an associative array such as:
 * - the key must be a constant beginning with WSDL_ from AbstractSoapClientbase class each generated ServiceType class extends this class
 * - the value must be the corresponding key value (each option matches a {@link http://www.php.net/manual/en/soapclient.soapclient.php} option)
 * $options = array(
 * \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_URL => 'https://b2b.soglasie.ru/schema/upload-test/upload.wsdl',
 * \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_TRACE => true,
 * \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_LOGIN => 'you_secret_login',
 * \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_PASSWORD => 'you_secret_password',
 * );
 * etc....
 */
require_once __DIR__ . '/vendor/autoload.php';
/**
 * Minimal options
 */
$options = array(
    \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_URL => 'https://b2b.soglasie.ru/schema/upload-test/upload.wsdl',
    \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_CLASSMAP => \soglasie\ClassMap::get(),
);
/**
 * Samples for Get ServiceType
 */
$get = new \soglasie\ServiceType\Get($options);
/**
 * Sample call for GetTemplateList operation/method
 */
if ($get->GetTemplateList(new \soglasie\StructType\GetTemplateList()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for GetStatusPackage operation/method
 */
if ($get->GetStatusPackage(new \soglasie\StructType\GetStatusPackage()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for GetStatusObject operation/method
 */
if ($get->GetStatusObject(new \soglasie\StructType\GetStatusObject()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for GetCatalogList operation/method
 */
if ($get->GetCatalogList(new \soglasie\StructType\GetCatalogList()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for GetCatalogInfo operation/method
 */
if ($get->GetCatalogInfo(new \soglasie\StructType\GetCatalogInfo()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for GetDocumentList operation/method
 */
if ($get->GetDocumentList(new \soglasie\StructType\GetDocumentList()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for GetSchema operation/method
 */
if ($get->GetSchema(new \soglasie\StructType\GetSchema()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for GetDocument operation/method
 */
if ($get->GetDocument(new \soglasie\StructType\GetDocument()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for GetCodeIKP operation/method
 */
if ($get->GetCodeIKP(new \soglasie\StructType\GetCodeIKP()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Samples for Load ServiceType
 */
$load = new \soglasie\ServiceType\Load($options);
/**
 * Sample call for LoadObject operation/method
 */
if ($load->LoadObject(new \soglasie\StructType\LoadObject()) !== false) {
    print_r($load->getResult());
} else {
    print_r($load->getLastError());
}
/**
 * Sample call for LoadPackage operation/method
 */
if ($load->LoadPackage(new \soglasie\StructType\LoadPackage()) !== false) {
    print_r($load->getResult());
} else {
    print_r($load->getLastError());
}
/**
 * Samples for Recall ServiceType
 */
$recall = new \soglasie\ServiceType\Recall($options);
/**
 * Sample call for RecallObject operation/method
 */
if ($recall->RecallObject(new \soglasie\StructType\RecallObject()) !== false) {
    print_r($recall->getResult());
} else {
    print_r($recall->getLastError());
}
