2

I am trying to access a SharePoint 2013 from axis2 webservice through a java application. The SharePoint 2013 is configured in both windows and claims authentication, now my code is like this

AuthenticationStub authenticationStub = new AuthenticationStub(sharepointContext.getSiteURL() + "/" + authenticationWSExt);
authenticationStub._getServiceClient().getOptions().setProperty(
                 org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, authCtx);
authenticationStub._getServiceClient().getOptions().setProperty(
                 org.apache.axis2.transport.http.HTTPConstants.REUSE_HTTP_CLIENT, "false");
List<org.apache.commons.httpclient.Header> headers = new ArrayList<org.apache.commons.httpclient.Header>();
        org.apache.commons.httpclient.Header header = new org.apache.commons.httpclient.Header();
        header.setName("X-FORMS_BASED_AUTH_ACCEPTED");
        header.setValue("f");
        headers.add(header);
        authenticationStub._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.HTTP_HEADERS, headers);
AuthenticationStub.Login login = new AuthenticationStub.Login();
login.setUsername(sharepointContext.getUserName());
login.setPassword(sharepointContext.getPassword());
logWriter.finer(methodName, "logged in as user name : " + sharepointContext.getUserName());
authenticationStub.login(login);

So I am saying to authenticate through windows classic mode, but still I am getting

Site is not configured for claims forms authentication

Why is that? What did I miss? Should I set some other parameter? Or what should I change so that my authentication is successful?

  • Did you get a resolution for your issue? – SanSharma May 14 '14 at 13:42
  • No i didn't get the solution yet. Still stuck in the same problem. Can you give me any suggestions ? – user3271648 May 16 '14 at 14:12
1

Just in case someone is still looking for a resolution here, this might help:

http://msdn.microsoft.com/en-us/library/hh124553(v=office.14).aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.