Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Shipping API 1.3.2.2. sales_order_shipment.create. returning error [102] Cannot create an empty shipment
 
Ian Foster
Jr. Member
 
Total Posts:  3
Joined:  2009-03-13
 

sales_order_shipment.create

Version 1.3.2.2’s release notes (http://www.magentocommerce.com/download/release_notes#Release Notes - Magento 1.3.2.2 (July 1, 2009) fixed the bug where Magento despatched all items on an order even when only some of the items had been despatched :-

Fixed #12378: Shipping all order items items when I ship all products from one order item via soap

This was a big issue for me and had to stop using the despatch interface.

I have now switched the despatch interface back on assuming all should be ok now but the API is now complaining that I’m trying to create an empty shipment.

The sales_order_shipment.create shipping api states :-
string orderIncrementId - order increment id
array itemsQty - items qty to ship as associative array (order_item_id ⇒ qty)
string comment - shipment comment (optional)
boolean email - send e-mail flag (optional)
boolean includeComment - include comment in e-mail flag (optional)

The structure my visual basic 6.0 program is passing the the shipment API is :-

- : ShipmentAR :  : Variant(0 to 4)

: ShipmentAR(0) : “100000253 “ : Variant/String

: ShipmentAR(1) :  : Variant/Variant(0 to 1)
: ShipmentAR(1)(0) : 565 : Variant/Long <--- this is a valid item id
: ShipmentAR(1)(1) : 1 : Variant/Long

: ShipmentAR(2) : “DHL@HOME 24HR - Tracking Number: 000xxxxx “ : Variant/String

: ShipmentAR(3) : False : Variant/Boolean
: ShipmentAR(4) : False : Variant/Boolean

Is anyone else having the same issue with the despatch API ?
Has anyone got this to work using a Visual Basic 6 client ?

I’m thinking of adding a bit more debug code into the API so I can trace the code to see how the variables are being received via the API.
Which source code modules would I change in \app\code\core\Mage\Api order to do this ? (i.e where’s the sales_order_shipment.create code ?)

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ian Foster
Jr. Member
 
Total Posts:  3
Joined:  2009-03-13
 

I have this working now.

The Magetno shipping API assumes that NULLs are used for unused array elements.

I was using SPACE - ascii(32) and Magento API thinks, as the array element is not null, you have specified something.
It then checks the length and reports an empty shipment field.

If your using a windows client make sure that you set any array elements to vbnull and not space when calling Magento API’s

 
Magento Community Magento Community
Magento Community
Magento Community
 
akewmagento
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2011-06-12
 

102     Invalid data givenDetails in error message.

data given is invalid.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top