Open rkumarsriv opened 3 years ago
Hello What kind of sharepoint instance are you trying to access to (OnPremises / Online)? Are you using valid credentials? I mean, your user and password allows you to navigate the site you are trying to query with de API? In the README.md the examples show the idea of how to use the API, but not a valid sharepoint site and credentials. You have to test it against your own instance and with your own valid user pass. If i get more information about what code is throwing the exception maybe i can provide more help
Thanks for the quick response. The sharepoint is on Azure. The credentials are valid as I am able to access it from browser. Here is the full stacktrace:
Exception in thread "main" com.panxoloto.sharepoint.rest.helper.AuthenticationException: Authentication has failed : Authentication Failure
at com.panxoloto.sharepoint.rest.helper.AuthenticationResponseParser.parseAuthenticationResponse(AuthenticationResponseParser.java:40)
at com.panxoloto.sharepoint.rest.helper.AuthTokenHelperOnline.getSecurityTokenUsingUserName(AuthTokenHelperOnline.java:133)
at com.panxoloto.sharepoint.rest.helper.AuthTokenHelperOnline.receiveSecurityToken(AuthTokenHelperOnline.java:110)
at com.panxoloto.sharepoint.rest.helper.AuthTokenHelperOnline.init(AuthTokenHelperOnline.java:182)
at com.panxoloto.sharepoint.rest.PLGSharepointClientOnline.init(PLGSharepointClientOnline.java:75)
at com.panxoloto.sharepoint.rest.PLGSharepointClientOnline.
In the exception i see you are using the Online Client instance. If you are not using sharepoint online and you have a On Premises instance installed on azure you should use the OnPremises instance.
PLGSharepointOnPremisesClient constructor parameters is not clear to me. If "Path part" is stored in spSitePrefix then what would spSiteUrl contain? Could you please give an example for spSiteUrl and spSitePrefix .
Thanks.
Has anyone experienced this error?
com.panxoloto.sharepoint.rest.helper.AuthenticationException: Could not parse authentication response : Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found at com.panxoloto.sharepoint.rest.helper.AuthenticationResponseParser.parseAuthenticationResponse(AuthenticationResponseParser.java:46) at com.panxoloto.sharepoint.rest.helper.AuthTokenHelperOnline.getSecurityTokenUsingUserName(AuthTokenHelperOnline.java:133) at com.panxoloto.sharepoint.rest.helper.AuthTokenHelperOnline.receiveSecurityToken(AuthTokenHelperOnline.java:110) at com.panxoloto.sharepoint.rest.helper.AuthTokenHelperOnline.init(AuthTokenHelperOnline.java:182)
[SOLUTION] for Java 11, include:
I have to take a look and make some tests with latests java versions.
I am trying to do "Get lists of a site" by using your code sample in README.md I am getting AuthenticationException at AuthenticationResponseParser.java:40.
Thank you for your help. -R kumar