I would think that the base document is the UMCJ. I do not think that the UCMJ specifies that homosexuality itself is a crime but it does deal with such issues as sodomy and conduct prejudicial to the service. The UCMJ is promulgated and authorized by Congress. Congress is the sole arbitrator of these issues under the constitution despite contrary court rulings from judges gone wild.
Article 125Sodomy
Text
(a) Any person subject to this chapter who engages in unnatural carnal copulation with another person of the same or opposite sex or with an animal is guilty of sodomy. Penetration, however slight, is sufficient to complete the offense.
(b) Any person found guilty of sodomy shall by punished as a court-martial may direct.
Elements.
(1) That the accused engaged in unnatural carnal copulation with a certain other person or with an animal. (Note: Add either or both of the following elements, if applicable)
(2) That the act was done with a child under the age of 16.
(3) That the act was done by force and without the consent of the other person.
There was a one minute spot on Armed Forces Radio today, that warned gay soldiers not to celebrate to early because it was still against numerous articles of the UCMJ, and it would be enforced