The A350 and the 787 are not really in direct competition, only the smallest A350 (A350-800) competes with the largest 787 (787-9). So I shall compare these two aircraft. It must be remembered that the A350 is actually in competition with the 777 and that the larger variants of the A350 will have better statistics than the stats shown below. Passengers (maximum): A350-800: 440 787-9: 290 Range: A350-800: 8,500 nmi 787-9: 8500nmi MTOW: A350-800: 259t 787-9: 251t MLW: A350-800: 193t 787-9: 193t Cruise (Mach): A350-800: 0.85 787-9: 0.85 Maximum (Mach): A350-800: 0.89 787-9: 0.89 Service Ceiling: A350-800: 43,100ft 787-9: 43,000ft Engines: A350-800: RR Trent XWB 787-9: GEnx or RR Trent 1000 Maximum Thrust: A350-800: 79,000lbf 787-9: 71,000lbf Cost ($millions): A350-800: 245.5 787-9: 200 As this comparison shows, the two are very equally matched, the only differences being cost and seats but these two cancel each other out. Sales cannot be compared yet as the 787-9 is already available whereas the A350 isn't. As I have previously said, the A350 and 787 are not in direct competition, with the 787 being a large variant of the family and the A350 being a small variant of the family. To summarise, the 787-9 is a big version of a smaller plane with smaller engines whereas the A350-800 is a condensed version of a large airliner. This means that the A350-800 is a more advanced airliner (e.g better and more powerful engines) than the 787-9 and if cost were no factor, the A350-800 would be the only choice for any airline.
It is possible to make the flight non-stop with ultra long-range aircraft like the Boeing 777-200LR and Airbus A340-500 however they would not be able to carry enough passengers to make the trip economically feasible. Basically the passenger's weight plus the fuel weight would exceed the maximum weight the plane is certified to take off with. As a result the airline would have to carry very few passengers, most likely in an all business-class or first-class arrangement. Singapore Airlines does this with their non-stop NY-Singapore route which is the longest in the world. It takes 19 hours each way and the plane is all business class seating. The problem with this is that there are very few people willing to pay $12,000+ per seat to fly non-stop. In the future it will be much more feasible. Both the new Boeing 787 and Airbus A350 XWB are designed to make ultra-long haul flights less expensive. You may yet see a non-stop NYC-SYD flight in the near future.