AnsweredAssumed Answered

Webscript, Alf API, authentication, /wcservice unavailable

Question asked by qwerty on Oct 18, 2010
Latest reply on Oct 25, 2010 by rwetherall
Background

I've followed the guidlines as set out on http://wiki.alfresco.com/wiki/Java-backed_Web_Scripts_Samples for writing Java-backed webscripts.

My webscripts does it's job and uses some Alfresco APIs that require authentication. In order to authenticate I have tried stuff like
AuthenticationUtil.setRunAsUser(String)
where the parameter supplied is my username, "admin", "System", AuthenticationUtil.getAdminUserName() etc etc

That all works and I make sure the script cleans up with
AuthenticationUtil.clearCurrentSecurityContext()
at the end.

Problem

The problem is that after running my webscript I can no longer get anything under /wcservice. By that I mean I get a HTTP 200 response but it is blank.

My hunch is that it's to do with authentication stuff I described above.

If I clear my browser data I can once again access things under /wcservice, but obviously this "solution" is far from ideal.

Any ideas anybody?

Outcomes