The court said Poland had been wrong in not recognising a marriage between two Polish citizens in Germany.