/**
 * Get List Inventory Supply By Next Token Action Sample
 * Gets competitive pricing and related information for a product identified by
 * the MarketplaceId and ASIN.
 *
 * @param FBAInventoryServiceMWS_Interface $service instance of FBAInventoryServiceMWS_Interface
 * @param mixed $request FBAInventoryServiceMWS_Model_ListInventorySupplyByNextToken or array of parameters
 */
function invokeListInventorySupplyByNextToken(FBAInventoryServiceMWS_Interface $service, $request)
{
    try {
        $response = $service->ListInventorySupplyByNextToken($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 (FBAInventoryServiceMWS_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";
    }
}