The Protoevangelium (“proto-gospel) of James, a document from the middle of the second century AD, is an early source affirming the sexual and physical virginity of Mary after the birth of Jesus (the physical side of Mary’s [perpetual] virginity is what is stressed in Roman Catholic dogmatic theology, something I discuss in detail in chapter 4 of my book, Behold the Mother of My Lord: Towards a Mormon Mariology [2017], pp. 83-138). However, the document has (correctly) being rejected as being historically reliable, let alone being a custodian of an authentic apostolic tradition that is not in the biblical texts (in this instance, the perpetual virginity of Mary). Reflecting this overwhelming scholarly consensus, Helmut Koester summarized the scholarly consensus, one held by even believing Roman Catholic scholars:
The topic of the Proto-Gospel of James is not the birth of Jesus, but the birth and virginity of Mary. It was written for the glorification of Mary and is, thus, a surprisingly early witness for the rapid expansion of biographical legends, not only about Jesus—that is already evident in the infancy narratives of Matthew and Luke—but also about Jesus’ mother and her parents. But while the stories about the birth of Jesus still reveals the eschatological message of the proclamation of a new age with all its political implications, the Proto-Gospel of James exclusively caters to the interests of personal piety and, possibly, to an incipient cult of the mother of Jesus, analogous to the cult of a hero or heroine of the Hellenistic-Roman world.
The author has no real knowledge of the Temple of Jerusalem and its cult, no matter how often reference is made to Jewish ritual and purity rules. There are numerous allusions to, and borrowings from, the Biblical stories of Saran and Hannah as well as from the canonical Gospels’ story of Mary. But rarely does the author copy slavishly. Rather, the author’s piety is wholly shaped by the language of the Bible. In this respect the analogy to the canonical gospel’s infancy narratives is very close. However, the heroine of the story, Anna and her daughter Mary, are not Jewish women but examples of Hellenistic piety. Female sterility, the sorrow of Anna, could be a theme in any culture, Jewish, Greek, or Roman. But pregnancy of the “widow”—as is said of Anna—and virginity, combined with divine conception, here even extended to the “virgin birth,” are presented in this writing as the mystery of the female that demands worship. That Mary remains a virgin even after she has given birth introduces the ascetic ideal of a life-long commitment to virginity. One is encountering a dimension of piety, in the form of a personal legend in the Hellenistic style, that is especially concerned with the role of the female in the process of the revelation’s appearance in the flesh. The miraculous signs of the Synoptic Gospels’ story that signify the arrival of the divine are here replaced by the wondrous virtues of virginity and ascetic dedication. (Helmut Koester, Ancient Christian Gospels: Their History and Development [London: SCM Press, 1990], 310-11)
To read an attempt to defend the Protoevangelium of James being more historically reliable than the scholarly consensus holds, see Appendix 5: The Protoevangelium of James (pp. 246-60) in the book by Eastern Orthodox scholar and priest Laurent Cleenewerck, Aiparthenos | Ever-Virgin? Understanding the Orthodox Catholic Doctrine of the Perpetual Virginity of Mary (one of the best modern works to defend the perpetual virginity of Mary form an “Epiphanian” perspective [one that holds that the brothers and sisters of Jesus were children from a prior marriage of Joseph, something that the Protoevangelium of James presents]).