/**
* 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://appls-srv.araskargo.com.tr/arascargoservice/arascargoservice.asmx?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://appls-srv.araskargo.com.tr/arascargoservice/arascargoservice.asmx?wsdl',
\WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_CLASSMAP => ClassMap::get(),
);
/**
* Samples for Set ServiceType
*/
$set = new \ServiceType\Set($options);
/**
* Sample call for SetMeasurementSimulation operation/method
*/
if ($set->SetMeasurementSimulation(new \StructType\SetMeasurementSimulation()) !== false) {
print_r($set->getResult());
} else {
print_r($set->getLastError());
}
/**
* Sample call for SetCargoLineInfo operation/method
*/
if ($set->SetCargoLineInfo(new \StructType\SetCargoLineInfo()) !== false) {
print_r($set->getResult());
} else {
print_r($set->getLastError());
}
/**
* Sample call for SetSortedBag operation/method
*/
if ($set->SetSortedBag(new \StructType\SetSortedBag()) !== false) {
print_r($set->getResult());
} else {
print_r($set->getLastError());
}
/**
* Sample call for SetSortedBag2 operation/method
*/
if ($set->SetSortedBag2(new \StructType\SetSortedBag2()) !== false) {
print_r($set->getResult());
} else {
print_r($set->getLastError());
}
/**
* Sample call for SetSortedBag3 operation/method
*/
if ($set->SetSortedBag3(new \StructType\SetSortedBag3()) !== false) {
print_r($set->getResult());
} else {
print_r($set->getLastError());
}
/**
* Sample call for SetDispatchXML operation/method
*/
if ($set->SetDispatchXML(new \StructType\SetDispatchXML()) !== false) {
print_r($set->getResult());
} else {
print_r($set->getLastError());
}
/**
* Sample call for SetDispatch operation/method
*/
if ($set->SetDispatch(new \StructType\SetDispatch()) !== false) {
print_r($set->getResult());
} else {
print_r($set->getLastError());
}
/**
* Sample call for SetOrderPiece operation/method
*/
if ($set->SetOrderPiece(new \StructType\SetOrderPiece()) !== false) {
print_r($set->getResult());
} else {
print_r($set->getLastError());
}
/**
* Sample call for SetOrder operation/method
*/
if ($set->SetOrder(new \StructType\SetOrder()) !== false) {
print_r($set->getResult());
} else {
print_r($set->getLastError());
}
/**
* Sample call for SetAddress operation/method
*/
if ($set->SetAddress(new \StructType\SetAddress()) !== false) {
print_r($set->getResult());
} else {
print_r($set->getLastError());
}
/**
* Sample call for SetCanceledShipment operation/method
*/
if ($set->SetCanceledShipment(new \StructType\SetCanceledShipment()) !== false) {
print_r($set->getResult());
} else {
print_r($set->getLastError());
}
/**
* Samples for Get ServiceType
*/
$get = new \ServiceType\Get($options);
/**
* Sample call for GetAddressList operation/method
*/
if ($get->GetAddressList(new \StructType\GetAddressList()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetUndeliveredCargoSearch operation/method
*/
if ($get->GetUndeliveredCargoSearch(new \StructType\GetUndeliveredCargoSearch()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetWaitingCargoList operation/method
*/
if ($get->GetWaitingCargoList(new \StructType\GetWaitingCargoList()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetDeliveryList operation/method
*/
if ($get->GetDeliveryList(new \StructType\GetDeliveryList()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetCargoSendList operation/method
*/
if ($get->GetCargoSendList(new \StructType\GetCargoSendList()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetParentUnitAddress operation/method
*/
if ($get->GetParentUnitAddress(new \StructType\GetParentUnitAddress()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetUnitAddress operation/method
*/
if ($get->GetUnitAddress(new \StructType\GetUnitAddress()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetUnitCard operation/method
*/
if ($get->GetUnitCard(new \StructType\GetUnitCard()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetDuration operation/method
*/
if ($get->GetDuration(new \StructType\GetDuration()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetDeliveryList2 operation/method
*/
if ($get->GetDeliveryList2(new \StructType\GetDeliveryList2()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetCargoPieceList operation/method
*/
if ($get->GetCargoPieceList(new \StructType\GetCargoPieceList()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetPriceCalculation operation/method
*/
if ($get->GetPriceCalculation(new \StructType\GetPriceCalculation()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetServiceList operation/method
*/
if ($get->GetServiceList(new \StructType\GetServiceList()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetServiceType operation/method
*/
if ($get->GetServiceType(new \StructType\GetServiceType()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetRedirectionList operation/method
*/
if ($get->GetRedirectionList(new \StructType\GetRedirectionList()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetBackList operation/method
*/
if ($get->GetBackList(new \StructType\GetBackList()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetCargoReturn operation/method
*/
if ($get->GetCargoReturn(new \StructType\GetCargoReturn()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetCargoInfo operation/method
*/
if ($get->GetCargoInfo(new \StructType\GetCargoInfo()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetCityList operation/method
*/
if ($get->GetCityList(new \StructType\GetCityList()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetTown operation/method
*/
if ($get->GetTown(new \StructType\GetTown()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetUnit operation/method
*/
if ($get->GetUnit(new \StructType\GetUnit()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetUnitBranch operation/method
*/
if ($get->GetUnitBranch(new \StructType\GetUnitBranch()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetRegions operation/method
*/
if ($get->GetRegions(new \StructType\GetRegions()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetCargoSearch operation/method
*/
if ($get->GetCargoSearch(new \StructType\GetCargoSearch()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetCargoSearchByCode operation/method
*/
if ($get->GetCargoSearchByCode(new \StructType\GetCargoSearchByCode()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetSortedCargoInfo operation/method
*/
if ($get->GetSortedCargoInfo(new \StructType\GetSortedCargoInfo()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetCargoTransaction operation/method
*/
if ($get->GetCargoTransaction(new \StructType\GetCargoTransaction()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetCargoTransactionByWaybillId operation/method
*/
if ($get->GetCargoTransactionByWaybillId(new \StructType\GetCargoTransactionByWaybillId()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetDispatch operation/method
*/
if ($get->GetDispatch(new \StructType\GetDispatch()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetOrder operation/method
*/
if ($get->GetOrder(new \StructType\GetOrder()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetDispatchWithIntegrationCode operation/method
*/
if ($get->GetDispatchWithIntegrationCode(new \StructType\GetDispatchWithIntegrationCode()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetOrderWithIntegrationCode operation/method
*/
if ($get->GetOrderWithIntegrationCode(new \StructType\GetOrderWithIntegrationCode()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetCancelNewDoc operation/method
*/
if ($get->GetCancelNewDoc(new \StructType\GetCancelNewDoc()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetDeliveryInfo operation/method
*/
if ($get->GetDeliveryInfo(new \StructType\GetDeliveryInfo()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetMissingNewDoc operation/method
*/
if ($get->GetMissingNewDoc(new \StructType\GetMissingNewDoc()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetDeliveryInfodocID operation/method
*/
if ($get->GetDeliveryInfodocID(new \StructType\GetDeliveryInfodocID()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetIncomingCargoInfoBarcode operation/method
*/
if ($get->GetIncomingCargoInfoBarcode(new \StructType\GetIncomingCargoInfoBarcode()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Sample call for GetBarcode operation/method
*/
if ($get->GetBarcode(new \StructType\GetBarcode()) !== false) {
print_r($get->getResult());
} else {
print_r($get->getLastError());
}
/**
* Samples for Save ServiceType
*/
$save = new \ServiceType\Save($options);
/**
* Sample call for SaveAddress operation/method
*/
if ($save->SaveAddress(new \StructType\SaveAddress()) !== false) {
print_r($save->getResult());
} else {
print_r($save->getLastError());
}
/**
* Samples for Cancel ServiceType
*/
$cancel = new \ServiceType\Cancel($options);
/**
* Sample call for CancelCargoLineInfo operation/method
*/
if ($cancel->CancelCargoLineInfo(new \StructType\CancelCargoLineInfo()) !== false) {
print_r($cancel->getResult());
} else {
print_r($cancel->getLastError());
}
/**
* Sample call for CancelDispatch operation/method
*/
if ($cancel->CancelDispatch(new \StructType\CancelDispatch()) !== false) {
print_r($cancel->getResult());
} else {
print_r($cancel->getLastError());
}
/**
* Samples for Update ServiceType
*/
$update = new \ServiceType\Update($options);
/**
* Sample call for UpdateInvoiceWaybillNumber operation/method
*/
if ($update->UpdateInvoiceWaybillNumber(new \StructType\UpdateInvoiceWaybillNumber()) !== false) {
print_r($update->getResult());
} else {
print_r($update->getLastError());
}
/**
* Sample call for UpdateOrderPiecesVolume operation/method
*/
if ($update->UpdateOrderPiecesVolume(new \StructType\UpdateOrderPiecesVolume()) !== false) {
print_r($update->getResult());
} else {
print_r($update->getLastError());
}
Don't be shy, don't hesitate to contact us for any subject, we'll be glad to help.
This platform is provided to give developpers and non developpers a way to easily consume SOAP Web Services or share their own SOAP Web Services with extra features powered by the platform.
© 2025 Providr.IO