Hearsay is not allowed as evidence (normally) in court (at least in the Common Law system used in the U.S.). This is a completely separate issue from whether publishing classified secrets is a crime, even when these secrets are themselves hearsay.
However, you’re right that the Espionage Act doesn’t seem to make that illegal. The U.S. would have a pretty flimsy case here. Here’s hoping that Sweden won’t extradite! (Whether Assange committed rape is another completely separate issue.)