简体   繁体   中英

Consume Sharepoint Office 365 web services from Java application

I am trying to consume Sharepoint Online Office 365 out-of-the-box web services ( Lists.asmx ) from Java application (from the moment SoapUI 5.3 )

I tried with all 3 types of authentications ( Basic , NTLM , SPNEGO/Kerberos ) but always get 403 FORBIDDEN error

If I add X-FORMS_BASED_AUTH_ACCEPTED=f header, I get 401 UNAUTHORIZED or empty return stream depending on authentication type

I've checked SharePoint 2010: consuming web services from NetSuite - 403 Forbidden error and tried to used Authentication.asmx before but always get PasswordNotMatch error, although I am sure password is correct

I also checked Authenticating Office 365 SharePoint Online OOTB services , but no luck

All tests are done in both Windows and Ubuntu environments to avoid NTLM fails when consuming SharePoint web service from Java?

The user I use to connect to Sharepoint Online is OK. It has admin rights and I can connect through a browser without any problem.

What do I miss?

Only answer can be given with what you tell us is : You have to look what your service wsdl asking for example: http://www.webservicex.net/globalweather.asmx service located here have contract(wsdl) like that: http://www.webservicex.net/globalweather.asmx?wsdl

Which is don't have any ws-security policy so no authentication required but probably your service wsdl going to have some security requirments and you have to fulfill them.

This happened to me trying to make a request to SharePoint web services using Postman. I was also receiving the forbidden error while I had tested the credentials another way and they were working fine. It turned out it was another parameter that needed to be set but was showing as forbidden.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM