/**
 * Get Get Fulfillment Order Action Sample
 * Gets competitive pricing and related information for a product identified by
 * the MarketplaceId and ASIN.
 *
 * @param FBAOutboundServiceMWS_Interface $service instance of FBAOutboundServiceMWS_Interface
 * @param mixed $request FBAOutboundServiceMWS_Model_GetFulfillmentOrder or array of parameters
 */
function invokeGetFulfillmentOrder(FBAOutboundServiceMWS_Interface $service, $request)
{
    try {
        $response = $service->GetFulfillmentOrder($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 (FBAOutboundServiceMWS_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";
    }
}