Call Web API using soap in moodle

Call Web API using soap in moodle

by yasha jain -
Number of replies: 4

Hi,

I want to call moodle web api using soap. My url is 

/webservice/soap/server.php?wsdl=1&wstoken=dfdfg&wsfunction=core_user_get_users&criteria[0][key]=email&criteria[0][value]=abc@moodle.com.

But it gives the error 'The web service description parameter named 'grades' is an single or multiple structure. It can not be set as VALUE_OPTIONAL. Check web service description'.

Please help and reply as soon as possible.


Thanks

Average of ratings: -
In reply to yasha jain

Re: Call Web API using soap in moodle

by Luis de Vasconcelos -

I'm guessing here...

The error message says: 'The web service description parameter named 'grades' is an single or multiple structure. It can not be set as VALUE_OPTIONAL." So "grades" is a required option in your web service but your url does not contain the expected "grades" parameter:

/webservice/soap/server.php?wsdl=1&wstoken=dfdfg&wsfunction=core_user_get_users&criteria[0][key]=email&criteria[0][value]=abc@moodle.com

What happens when you change the web service code so that it includes the "grades" parameter in that url like this?

/webservice/soap/server.php?wsdl=1&wstoken=dfdfg&wsfunction=core_user_get_users&criteria[0][key]=email&criteria[0][value]=abc@moodle.com&grades=something


In reply to Luis de Vasconcelos

Re: Call Web API using soap in moodle

by yasha jain -

Thanks for your reply.

I tried and add grades in the url but it gives same error.

In reply to yasha jain

Re: Call Web API using soap in moodle

by yasha jain -

I read that wsdl is not currently compatible with java or .net. In future, will wsdl compatible with java or .net?