I have an external application and I have to update the billing and shipping details of an existing order. The problem is that the billing city doesn't get saved with the rest of the data. I'm using Magento 1.8. The code was inspired by this thread: Change shipping and billing address from order programmatically
$order = Mage::getModel('sales/order')->load($orderId);
$shippingAddress = Mage::getModel('sales/order_address')->load($order->getShippingAddress()->getId());
$billingAddress = Mage::getModel('sales/order_address')->load($order->getBillingAddress()->getId());
$shippingAddress = Mage::getModel('sales/order_address')
->setFirstname("value")
->setLastname("value")
->setCompany("value")
->setStreet("value"))
->setCity("value")
->setRegion("value")
->setPostcode("value")
->setTelephone("value")->save();
$billingAddress = Mage::getModel('sales/order_address')
->setFirstname("value")
->setLastname("value")
->setCompany("value")
->setStreet("value"))
->setCity("value")
->setRegion("value")
->setPostcode("value")
->setTelephone("value")->save();