0

Is there any way that I can bundle multiple SOAP API calls into a single transaction, such that if one or more fails the entire transaction is rolled back?

In my particular case, I am attempting to post a shipment and add tracking information. However if the posting of the shipment or adding tracking information fails, I would like to log the error and retry once it is resolved. This would be better than having a shipment without tracking information.

If this is not possible in the current SOAP API, I will delete the shipment upon failure. I would prefer to use a transaction though.

2
  • It's not possible out of the box. You could check the return value of your last SOAP call and continue your update depending on the return. Commented Apr 3, 2014 at 16:29
  • That is the kind of logic that I plan to implement, just hoping there was a better way.
    – Ryan Gates
    Commented Apr 3, 2014 at 16:33

1 Answer 1

1

No, this is not possible. The closest Magento comes is the call method — in the XML-RPC and V1 SOAP APIs. This method allows you to send multiple method calls in a single HTTP request. While I've never looked deeply into it, it's always been my assumption call isn't available in the V2 API since coming up with a typed WSDL for it would be impossible.

Unfortunately, call has no rollback mechanism. If you want this functionality, you'd need to write a custom extension that implements a custom API method, and then install extension into your system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.