Java Client for Android - Webservices?

Java Client for Android - Webservices?

by Giulio Valente -
Number of replies: 4

Hi all,

I'm starting developing an open source moodle client for android for a moodle that use shibboleth for the login. But probably my first version will allow to login only the system users.

After some research on the web I figure out to approach to this:

1. Using the MoodleWS java library: I have sucessfully installed the plugin, but I can't find the jar library on the net (that's frustrating).

2. Using the MoodleRest and manually implement the services I will need: I have successfully created the webservice user and I tested some function using rest with the token, but I cannot use with the user information (user and pass) since I get an Access control exception as answer.

 

Can someone help me?

 

Thank you smile

Average of ratings: -
In reply to Giulio Valente

Re: Java Client for Android - Webservices?

by Bill Antonia -

Hi Giulio,

When I wrote the MoodleRest library I too had similar problems using username/password pairs. It was not until César contacted me and pointed out there was an & missing between the two parameters. This was fixed in the last update some time ago but you should check you have the most recent download http://moodlerestjava.sourceforge.net/ version 0.1.2

Another thing to watch out for is that username/password authentication does not work using server.php you have to use simpleserve.php instead.

Regards

Bill

In reply to Bill Antonia

Re: Java Client for Android - Webservices?

by Giulio Valente -

Hi,

thank you for your answer... The problem was about the authorized user for the webservice I created in moodle.

Now it works fine with all users and I just did the first Hello Moodle on android ;)

What I'm doing is to add more services that I need for client. Maybe I could extend your library for the community smile

Maybe do you know if there are already some services that will be useful to me (like a login that maintain a session) written in php, so that I can just add the java code?

Giulio

In reply to Giulio Valente

Re: Java Client for Android - Webservices?

by Bill Antonia -

Sounds good to increase the number of service functions, I'm hoping a function to retrive course context ids will be created soon, it's in the road map anyway, let me know how you get on.

As for maintaining sessions across calls, currently I don't think there are any regarding web services, you will have to store any data locally. I may be wrong though, this is just a feeling.

Regards

Bill

In reply to Bill Antonia

Re: Java Client for Android - Webservices?

by Giulio Valente -

My intention is to extend your library, is open source, right?

Maybe we can just create a repository on googlecode and work togheter with the other people are interested in. So it will possible to offer a complete webservice library with php and java functions.

Maybe do you know if there are already some implementations of additional webservices functions (php)?

Let me know. smile

-Giulio