It is certain that a real matrimony was contracted by Joseph and Mary. Still Mary is called "espoused" to Joseph ("his mother Mary was espoused to Joseph", Matthew 1:18) because the matrimony was never consummated. The term spouse is applied to married people until their marriage is consummated (Colvenerius, Cal. Marian., 23 Jan.). (Source)
Excerpts below from Mystical City of God by Venerable Mary of Agreda:
God spoke in sleep to the high priest, saint Simeon, and commanded him to arrange for the marriage of Mary, the daughter of Joachim and Anne of Nazareth; since He regarded Her with special care and love. The holy priest answered, asking what was his will in regard to the person, whom the maiden Mary was to marry and to whom She was to give Herself as Spouse. The Lord instructed Him to call together the other priests and learned persons and to tell them that this Maiden was left alone and an orphan and that She did not desire to be married; but that, as it was a custom for the firstborn maidens not to leave the temple without being provided for, it was proper She should be married to whomever it seemed good to them.
The most prudent Virgin, with a countenance betokening virginal modesty, answered the priest with great composure and humility: "Sir, as far as my inclinations are concerned, I desire to preserve perpetual chastity during all my life; for I wished to dedicate myself to God in the service of this holy temple in return for the great blessings which I have received in it; I never had the intention or the desire to enter the state of matrimony, since I consider myself incapable of fulfilling the duties connected with it. This was my inclination, but thou, my master, who art to me in place of God, wilt teach me what is according to his holy Will," "My Daughter," answered the priest, "thy holy desires are acceptable to the Lord; but remember, that no maiden of Israel abstains from marriage as long as we expect the coming of the Messias conformably to the divine prophecies. Therefore all who obtain issue of children among our people, esteem themselves happy and blessed. In the matrimonial state Thou canst serve God truly and in great perfection; and in order that Thou mayest obtain a companion according to the heart of God and who will be conformable to thy wishes, we will pray to the Lord, as I have told Thee, asking Him to single out a husband for Thee, who shall be pleasing to Him and of the line of David; do Thou also pray continually for the same favor, in order that the Most High may favor Thee and may direct us all."
This happened nine days before the one appointed for the execution and realization of their resolve. During this time the most holy Virgin multiplied her prayers, beseeching the Lord with incessant tears and sighs, to fulfill his divine pleasure in that which She had so much at heart. On one of those nine days the Lord appeared to Her and said to Her: "My Spouse and my Dove, let thy afflicted heart expand and let it not be disturbed or sad; I will attend to thy yearnings and to thy requests, I will direct all things, and will govern the priests by my enlightenment; I will give Thee a spouse selected by Myself, and one who will put no hindrance to thy holy desires, but who, by my grace will prosper Thee in them. I will find for Thee a perfect man conformable to my heart and I will choose him from the number of my servants; my power is infinite, and my protection and aid shall never fail Thee."
...On the day on which...our Princess Mary completed the fourteenth year of her life, the men, who at that time in the city of Jerusalem were descendants of the tribe of Juda and of the race of David, gathered together in the temple. The sovereign Lady was also of that lineage. Among the number was Joseph, a native of Nazareth. and then living in Jerusalem; for he was one of the descendants of the royal race of David. He was then thirty-three years of age, of handsome person and pleasing countenance, but also of incomparable modesty and gravity; above all he was most chaste in thought and conduct, and most saintly in all his inclinations. From his twelfth year he had made and kept the vow of chastity. He was related to the Virgin Mary in the third degree, and was known for the utmost purity of his life, holy and irreprehensible in the eyes of God and of men.
All these unmarried men gathered in the temple and prayed to the Lord conjointly with the priests. in order to be governed by the holy Spirit in what they were about to do. The Most High spoke to the heart of the highpriest, inspiring him to place into the hands of each one of the young men a dry stick, with the command that each ask his Majesty with a lively faith, to single out the one whom He had chosen as the spouse of Mary. And as the sweet odor of her virtue and nobility, the fame of her beauty, her possessions and her modesty, and her position as being the firstborn in her family was known to all of them, each one coveted the happiness of meriting Her as a spouse. Among them all only the humble and most upright Joseph thought himself unworthy of such a great blessing; and remembering the vow of chastity which he had made and resolving anew its perpetual observance, he resigned himself to God's will, leaving it all to his disposal and being filled at the same time with a veneration and esteem greater than that of any of the others for the most noble maiden Mary.
While they were thus engaged in prayer the staff which Joseph held was seen to blossom and at the same time a dove of purest white and resplendent with admirable light, was seen to descend and rest upon the head of the saint, while in the interior of his heart God spoke: "Joseph, my servant, Mary shall be thy Spouse; accept Her with attentive reverence, for She is acceptable in my eyes, just and most pure in soul and body, and thou shalt do all that She shall say to Thee." At this manifestation and token from heaven the priests declared saint Joseph as the spouse selected by God himself for the maiden Mary. Calling Her forth for her espousal, the Chosen one issued forth like the sun, more resplendent than the moon, and She entered into the presence of all with a countenance more beautiful than that of an angel, incomparable in the charm of her beauty, nobility and grace; and the priests espoused Her to the most chaste and holy of men, saint Joseph.
...She betook Herself with her spouse Joseph to Nazareth, the native city of this most fortunate married couple. Joseph, although he had been born in that place, had, by the providential disposition of circumstances, decided to live for some time in Jerusalem. Thus it happened that he so improved his fortune as to become the spouse of Her, whom God had chosen to be his own Mother.
...She spoke to her spouse Saint Joseph, and said to him:...At a tender age, being compelled thereto by the force of this truth, which, with the knowledge of the deceitfulness of visible things, his divine light made known to me, I consecrated myself to God by a perpetual vow of chastity in body and soul; his I am and Him I acknowledge as my Spouse and Lord, with fixed resolve to preserve for Him my chastity. I beseech thee, my master, to help me in fulfilling this vow, while in all other things I will be thy servant, willing to work for the comfort of thy life as long as mine shall last. Yield, my spouse, to this resolve and make a like resolve, in order that, offering ourselves as an acceptable sacrifice to our eternal God, He may receive us in the odor of sweetness and bestow on us the eternal goods for which we hope."
The most chaste spouse Joseph, full of interior joy at the words of his heavenly Spouse, answered Her: "My Mistress, in making known to me thy chaste and welcome sentiments, thou hast penetrated and dilated my heart. I have not opened my thoughts to Thee before knowing thy own. I also acknowledge myself under greater obligation to the Lord of creation than other men; for very early He has called me by his true enlightenment to love Him with an upright heart; and I desire Thee to know, Lady, that at the age of twelve years I also made a promise to serve the Most High in perpetual chastity. On this account I now gladly ratify this vow in order not to impede thy own; in the presence of his Majesty I promise to aid Thee, as far as in me lies, in serving Him and loving Him according to thy full desires. I will be, with the divine grace, thy most faithful servant and companion, and I pray Thee accept my chaste love and hold me as thy brother, without ever entertaining any other kind of love, outside the one which Thou owest to God and after God to me. In this conversation the Most High confirmed anew the virtue of chastity in the heart of saint Joseph, and the pure and holy love due to his most holy spouse Mary. This love the saint already had in an eminent degree, and the Lady herself augmented it sweetly, dilating his heart by her most prudent discourse.
By divine operation the two most holy and chaste Spouses felt an incomparable joy and consolation. The heavenly Princess, as one who is the Mistress of all virtues and who in all things pursued the highest perfection of all virtues, lovingly corresponded to the desires of saint Joseph. The Most High also gave to saint Joseph new purity and complete command over his natural inclinations, so that without hindrance or any trace of sensual desires, but with admirable and new grace, he might serve his spouse Mary, and in Her, execute his will and pleasure.