The church has been less than forthright with the implications of publicly recognizing same sex marriage, using "...no congregation or minister can be forced to officiate at a same-sex marriage unwillingly" more as an opiate to secure acquiescence without substantive defense for voices of dissent.

Legally the issue is not "discrimination" as any refusal is discrimination, but "whether discrimination by refusal of same sex marriage solely because of gender [sexual orientation] within a religious body which publicly declares recognition of same sex marriage is arbitrary".

The recent Supreme Court of Canada decision Syndicat Northcrest v. Amselem [2004] 2 S.C.R. 551
http://www.lexum.umontreal.ca/csc-scc/en/pub/2004/vol2/html/2004scr2_0551.html
definition of religious belief as specific to the individual not the religious body, "freedom of religion...does not require a person to prove that his or her religious practices are supported by any mandatory doctrine of faith", offers individuals defense for refusal which is not arbitrary within a religious body which publicly recognizes same sex marriage.

Also of interest is the statement "it is not within the expertise and purview of secular courts to adjudicate questions of religious doctrine".

The situation for congregations varies with the specific human rights legislation of different jurisdictions
http://www.cdp-hrc.uottawa.ca/links/sitescan_e.html

Quebec [the only jurisdiction which provides "...no priest or other minister of religion may, even in judicial proceedings, disclose confidential information revealed to him by reason of his position or profession, unless he is authorized to do so by the person who confided such information to him or by an express provision of law"] verbally permits refusal of same sex marriage only where the religious body permits congregations to refuse
http://www.cdpdj.qc.ca/en/commun/docs/charter.pdf

Ontario permits only the person registered under section 20 of the Marriage Act to refuse
http://192.75.156.68/DBLaws/Statutes/English/90h19_e.htm

the "doctrines, rites, usages or customs" referenced are those of the religious body, not of the congregation which has no separate status; and the province verbally interprets

Alberta interprets marriage as "with a person of the opposite sex".

Other jurisdictions have no provisions for refusal of same sex marriage other than "bona fide qualification" or "reasonable cause".

The Canadian Charter of Rights and Freedoms
http://laws.justice.gc.ca/en/charter/index.html
protects individuals not private bodies such as congregations, making wording of the refusal critical