Boeing announced the Boeing 787 right after Airbus committed to the A380 - Airbus was going for the VLA market, which Boeing had dominated since they launched the Boeing 747 in the 70s as they had no effective competition in that particular market segment.
Once Airbus committed themselves to the VLA segment, Boeing committed itself to the smaller 250 seat segment, in which it already had an aging product in the Boeing 767 - sales of which were rapidly tailing off, and customers were demanding something more efficient.
Airbus responded by announcing a package of updates to their A330 airliner, but customer demand was poor - a lot of large customers wanted an all new fuselage design (the Airbus A330 and A340, both circa 1990 in vintage, used the same fuselage as the A300, which preceded them by 20 years), and carbon fiber as a primary structural component, so Airbus went back to the drawing board and came up with the A350XWB.
Its an aircraft that "Airbus didnt want to build" in the same vein as Boeing "didnt want to build" the Boeing 787, as that program only came about after customers outright rejected Boeings Sonic Cruiser concept in the years leading up to the 787s program launch - the 787 uses many of the same technologies (the carbon fiber barrels for the fuselage), and is a direct follow on from a prior program that was rejected by customers.
Interestingly enough, the Airbus A330, which customers didn't want an updated model of, has sold well over 500 aircraft since that "rejection". You never can tell....