Heat the butter in a pan and sweat the onion without colouring for about five minutes. Add three-quarters of the ham and all the celery and cook until the ham is lightly gold and the celery softened.
Add the potatoes and cook for two to three minutes. Add the herbs and stock and simmer for 10 minutes until the potatoes and beans are tender. Meanwhile blanch the beans for 3 minutes in boiling salted water then drain and refresh in cold water. Set aside.
Liquidise the soup in a blender and return to the heat. Stir in the beans, sweetcorn and reserved ham and season, being mindful the ham is quite salty.