Hi,
Has anybody tested Sakai REST web services with SoapUI? (or any other ws open source tool?)
What kind of authentication can I use and how can I do it?
Being more specific, when I send a request to one of the services at /direct/describe I keep getting an HTTP 403 access forbidden. So, this SoapUI offers several authorization types, namely: Basic (http), NLTM, SPNEGO/Kerberos, OAuth 1.0 and 2.0. The question is, which one can I use and how can I do it?
Cookies are fine for browsers (or a browser plugin like Postman), but how about a program like SoapUI or an application that needs to consume those services?
I would try the rest services at /sakai-ws/rest
They are not very RESTful, just a plain http version of the soap services.
There you have the login service which gives back a session that you use in later calls.
I have not used them myself, but I guess you have to use the wsdl of the soap services as documentation (try /sakai-ws in the browser)
/Jonas
I tried it but it gave me a "No service was found.":
https://qa11-mysql.nightly.sakaiproject.org/sakai-ws/rest
To unsubscribe from this group and stop receiving emails from it, send an email to sakai-dev+unsubscribe@apereo.org.
To post to this group, send email to saka...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/sakai-dev/.
--
You received this message because you are subscribed to the Google Groups "Sakai Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sakai-dev+unsubscribe@apereo.org.
To post to this group, send email to saka...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/sakai-dev/.
--
You received this message because you are subscribed to the Google Groups "Sakai Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sakai-dev+unsubscribe@apereo.org.
To post to this group, send email to saka...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/sakai-dev/.
--
You received this message because you are subscribed to the Google Groups "Sakai Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sakai-dev+unsubscribe@apereo.org.
To post to this group, send email to saka...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/sakai-dev/.
--
You received this message because you are subscribed to the Google Groups "Sakai Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sakai-dev+unsubscribe@apereo.org.
Each endpoint has its own address, see them all at the bottom of the document
https://qa11-mysql.nightly.sakaiproject.org/sakai-ws
To login, send a GET to /sakai-ws/rest/login/login?id=userId&pw=password
You get back a session as a single string.
Compound values are transformed to xml.
Either use soapUI to discover the documentation of the endpoints, or look in the code in the “webservices” module.
Thank you for your answer Steve. In fact, I need some more information. I am trying to modify the data of a user via direct/ RESTful web services. This is how I am proceeding:
(I have previously set session.parameter.allow=true on my sakai.properties)
I send a POST request to
/direct/session.json?_username=admin&_password=admin
and I get an HTTP 201 with a session id like 5046d160-464d-432b-aa49-5b3d4d43d1a6.
So far, everything looks good. Then I send a PUT request to
/direct/user/{userID}.json?lastName=SomeLastName&_validateSession=true&sakai.session=5046d160-464d-432b-aa49-5b3d4d43d1a6
Then I get an HTTP 204 which according to the direct/user/describe documentation has to have modified the user information; however, when I do a /direct/user/{userID}.json I still see the same lastName.
Raw response example:
============================================================================================================
Am I doing what I am supposed to do? Or is there something wrong with this service?
Thank you
No changes at all. This is my query:
select * from sakai_user where email = .....
Any ideas about what could be wrong?
Thank you.
I've got it! This is because I was using an unnecessary json extension.
localhost_access_log.txt: