I assume you have a modifiied line with your own server and token for:
However if you are using Moodle 2.0 as you say, you do need to switch the library into legacy mode. This is because the default is to call the "core_" wsfunctions. By switching to legacy mode, all the calls use the "moodle_" wsfunctions within Moodle. Moodle 2.0 does not have the "core_" wsfunctions so your error might be being caused by this issue.
You need to add:
before you call any methods which will access the Moodle server. This only has to be added once as it is a static attribute of the class.