echo "Created Customer Id={$resultingCustomerObj->Id}.\n\n";
//
// Sparse Update Customer Obj
//
//  * Change the value of an element
//  * Turn on the 'sparse' flag
//  * unset some element that you've decided to suppress from the Sparse Update
//  * Check response body and see that the suppressed element's prior value lives on (desirable)
//
$resultingCustomerObj->GivenName = "New Name " . rand();
$resultingCustomerObj->sparse = 'true';
unset($resultingCustomerObj->PrintOnCheckName);
// remove some elements that would normally be present
$xmlBody = XmlObjectSerializer::getPostXmlFromArbitraryEntity($resultingCustomerObj, $urlResource);
echo "About to do a Sparse Update on {$resultingCustomerObj->Id}:\n{$xmlBody}\n\n";
$resultingCustomerUpdatedObj = $dataService->Update($resultingCustomerObj);
$xmlBody = XmlObjectSerializer::getPostXmlFromArbitraryEntity($resultingCustomerUpdatedObj, $urlResource);
echo "Completed a Sparse Update on {$resultingCustomerObj->Id} - updated object state is:\n{$xmlBody}\n\n";
/*
Created Customer Id=1139.

About to do a Sparse Update on 1139:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Customer xmlns:ns0="http://schema.intuit.com/finance/v3" sparse="true">
  <ns0:Id>1139</ns0:Id>
  <ns0:SyncToken>0</ns0:SyncToken>
  <ns0:MetaData>
    <ns0:CreateTime>2013-08-26T10:25:55-07:00</ns0:CreateTime>
    <ns0:LastUpdatedTime>2013-08-26T10:25:55-07:00</ns0:LastUpdatedTime>
  </ns0:MetaData>
  <ns0:GivenName>New Name 860282650</ns0:GivenName>