/** * Get Get Service Status Action Sample * Gets competitive pricing and related information for a product identified by * the MarketplaceId and ASIN. * * @param MarketplaceWebServiceOrders_Interface $service instance of MarketplaceWebServiceOrders_Interface * @param mixed $request MarketplaceWebServiceOrders_Model_GetServiceStatus or array of parameters */ function invokeGetServiceStatus(MarketplaceWebServiceOrders_Interface $service, $request) { try { $response = $service->GetServiceStatus($request); echo "Service Response\n"; echo "=============================================================================\n"; $dom = new DOMDocument(); $dom->loadXML($response->toXML()); $dom->preserveWhiteSpace = false; $dom->formatOutput = true; echo $dom->saveXML(); echo "ResponseHeaderMetadata: " . $response->getResponseHeaderMetadata() . "\n"; } catch (MarketplaceWebServiceOrders_Exception $ex) { echo "Caught Exception: " . $ex->getMessage() . "\n"; echo "Response Status Code: " . $ex->getStatusCode() . "\n"; echo "Error Code: " . $ex->getErrorCode() . "\n"; echo "Error Type: " . $ex->getErrorType() . "\n"; echo "Request ID: " . $ex->getRequestId() . "\n"; echo "XML: " . $ex->getXML() . "\n"; echo "ResponseHeaderMetadata: " . $ex->getResponseHeaderMetadata() . "\n"; } }