The link on the page didn't work because we've recently migrated from Trac 0.10.6 to 1.0.1. Links of this form no longer work:
/attachment/wiki/XmlRpcPlugin/trac_xml_rpc_example_java.zip?format=raw
So I changed it to:
/raw-attachment/wiki/XmlRpcPlugin/trac_xml_rpc_example_java.zip
As Olemis described, the link in the attachment section worked fine, it was just the link in the page content that was broken.