/**
  * sample_AddItem::dispatchCall()
  * 
  * Dispatch the call
  *
  * @param array $params array of parameters for the eBay API call
  * 
  * @return boolean success
  */
 public function dispatchCall($params)
 {
     $a = new ShippingServiceOptionsType();
     $a->setShippingService('UPS2ndDay');
     $a->setShippingServicePriority('1');
     $a->setShippingServiceCost('5');
     $b = new ShippingDetailsType();
     //print '<pre>'.print_r(get_class_methods($b),true).'</pre><br>';
     $b->setShippingServiceOptions($a);
     //$b->setDefaultShippingCost(5);
     $b->setShippingType('Flat');
     $req = new AddItemRequestType();
     $item = new ItemType();
     $item->setTitle($params['Title']);
     $item->setQuantity($params['Quantity']);
     $item->setCurrency($params['Currency']);
     $item->setCountry($params['Country']);
     $item->setStartPrice($params['StartPrice']);
     $item->setListingDuration($params['ListingDuration']);
     $item->setLocation($params['Location']);
     $item->setPaymentMethods($params['PaymentMethods']);
     $item->setListingType($params['ListingType']);
     $item->setDescription($params['Description']);
     $item->ShippingService = 'UPS Ground';
     $item->setShippingDetails($b);
     //print '<pre>'.print_r(get_class_methods($a),true).'</pre><br>';
     //$this->dumpObject($a);
     //$this->dumpObject($item);
     $primaryCategory = new CategoryType();
     $primaryCategory->setCategoryID($params['CategoryID']);
     $item->setPrimaryCategory($primaryCategory);
     $req->setItem($item);
     $res = $this->proxy->AddItem($req);
     $this->dumpObject($res);
     if ($this->testValid($res)) {
         $this->dumpObject($res);
         return true;
     } else {
         return false;
     }
 }