An Ocean City church that has provided beds for people experiencing homelessness is challenging the town in federal court, arguing that efforts to stop the shelter violate its religious rights.