Partial shipment through Magento API

We came across what appered to be a bug when creating a shipment through the Magento API works when passing an empty array as itemsQty because it seems to assume that means everything shipped and will create a shipment for the full order.
Passing a full or partial shipment in the format implied by the documentation http://www.magentocommerce.com/api/soap/sales/salesOrderShipment/sales_order_shipment.create.html (hard coded IDs included for legibility):
$itemsQty = array(927 => '1',941 => '1');
(for all combinations of quoting and/or hard-coding of the values of order_item_id and qty)
results in SOAP that ignores the actual data and fulfills the whole order.

Steps to reproduce:
Launch the script calling
$result = $proxy->call($session, 'sales_order_shipment.create', array('100000002', array(3 => 1, 4 => 1), 'Some comment', false, true));
assuming 3 and 4 to be Product ID.

Resolution: items need to be passed as array (order_item_id => qty, order_item_id => qty, ...) where order_item_id is not the actual product item_id, but the id of the representing item for current order, in other words the same product created in Magento would have different order_item_id for every order the item has been purchased within. order_item_id (item_id) needs to be received for representing product_id from array $result by calling $result = $proxy->call($session, 'sales_order.info', '100000002');
Example result:
[item_id] => 3
[order_id] => 2
[parent_item_id] =>
[quote_item_id] => 3
[store_id] => 1
[created_at] => 2012-02-06 22:02:41
[updated_at] => 2012-02-06 23:07:24
[product_id] => 2
Correct call:
$result = $proxy->call($session, 'sales_order_shipment.create', array('100000002', array(3 => 1, 4 => 1), 'Some comment', false, true));
where ' 3 ' is the order_item_id representing product item_id ' 2 ' , ' 4 ' is the order_item_id representing product item_id ' 1 ' in my test case scenario.

Cheers!

We Love Our Customers

    Team of US based Certified Magento Engineers will work directly with you (no middle-men) to make sure MagePhobia provides best quality technical services. Some of our Magento Engineers are ex-Magento employees who built Magento for several years and know Magento inside-out.
    MagePhobia provides affordable
Magento Services with one of the best quality on the market.
    Our US based Technical Support is provided exclusively by our Certified Magento Developers and System Administrators, and is available 24/7 via ticketing, chat, and phone.
    MagePhobia offers short and long-term contracts as well as 'per job' basis contracts. We refund in case of unsatisfactory results which, we believe, will not occur ever.

We are all-in for customer satisfaction!