diff --git a/DHL/Entity/Base.php b/DHL/Entity/Base.php index 7a568b3..25fc3de 100644 --- a/DHL/Entity/Base.php +++ b/DHL/Entity/Base.php @@ -230,9 +230,9 @@ public function initFromXML($xml) { $xml = simplexml_load_string(str_replace('req:', '', $xml)); - if ((string) $xml->Response->Status->Condition->ConditionCode != '') + if ((string) $xml->AWBInfo->Status->Condition->ConditionCode != '') { - $errorMsg = ((string) $xml->Response->Status->Condition->ConditionCode) . ' : ' . ((string) $xml->Response->Status->Condition->ConditionData); + $errorMsg = ((string) $xml->AWBInfo->Status->Condition->ConditionCode) . ' : ' . ((string) $xml->AWBInfo->Status->Condition->ConditionCode); throw new \Exception('Error returned from DHL webservice : ' . $errorMsg); }