mahkath have you solve it? I have the same problem…
If I login in the Alfresco Server with the same user-password that use my web-service-client and then do the logout, the method getContentAsInputStream works again… and my aplication provides the pdf files perfectly
This ocurs every morning… every night at 1.00am the Alfresco Server is shutdown to do backup works, so when I try to download a pdf file from my aplication the exception in the method getContentAsInputStream occurs