Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

rev 1.8.2 added operation get_message_contacts + the two operations …

…get_primary_role_incourse and has_role_incourse where not emitted in WSDL version 2 since they were not declared in mdl_soapserver class
  • Loading branch information...
commit 0f2193de095d766a676c7f2c71b94f229a885e77 1 parent 2de7b00
@patrickpollet authored
View
BIN  dist/moodlews_ksoap2_1.8.2.jar
Binary file not shown
View
63 src/net/patrickpollet/moodlews/core/Mdl_soapserverBindingStub.java
@@ -17,7 +17,7 @@
import net.patrickpollet.ksoap2.*;
public class Mdl_soapserverBindingStub extends KSoap2BindingStubBase{
- public Mdl_soapserverBindingStub(String service_url, String nameSpace,boolean debug) {
+ public Mdl_soapserverBindingStub(String service_url, String nameSpace, boolean debug) {
super(service_url,nameSpace,debug);
}
@@ -1952,6 +1952,26 @@ public int count_users_bycourse(int client, java.lang.String sesskey, java.lang.
return null;
}
}
+ public net.patrickpollet.moodlews.core.ContactRecord[] get_message_contacts(int client, java.lang.String sesskey, java.lang.String userid, java.lang.String useridfield) {
+ final String METH_NAME = "get_message_contacts";
+ MySoapSerializationEnvelope envelope = this.makeEnvelope(METH_NAME);
+ envelope.addProperty("client",client);
+ envelope.addProperty("sesskey",sesskey);
+ envelope.addProperty("userid",userid);
+ envelope.addProperty("useridfield",useridfield);
+ HttpTransportSE httpTransport = this.makeHttpTransport();
+ try {
+ httpTransport.call(METH_NAME, envelope);
+ SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn;
+ SoapObject response = (SoapObject) resultsRequestSOAP.getProperty(0);
+ this.logInfo(METH_NAME, response);
+ List ret=this.getList(response,new ContactRecord(this.NAMESPACE));
+ return (ContactRecord[]) ret.toArray( new ContactRecord[0]);
+ } catch (Exception e) {
+ this.logError(httpTransport, e);
+ return null;
+ }
+ }
public net.patrickpollet.moodlews.core.MessageRecord[] get_messages(int client, java.lang.String sesskey, java.lang.String userid, java.lang.String useridfield) {
final String METH_NAME = "get_messages";
MySoapSerializationEnvelope envelope = this.makeEnvelope(METH_NAME);
@@ -2132,6 +2152,26 @@ public int get_my_id(int client, java.lang.String sesskey) {
return 0;
}
}
+ public int get_primaryrole_incourse(int client, java.lang.String sesskey, java.lang.String userid, java.lang.String useridfield, java.lang.String courseid, java.lang.String courseidfield) {
+ final String METH_NAME = "get_primaryrole_incourse";
+ MySoapSerializationEnvelope envelope = this.makeEnvelope(METH_NAME);
+ envelope.addProperty("client",client);
+ envelope.addProperty("sesskey",sesskey);
+ envelope.addProperty("userid",userid);
+ envelope.addProperty("useridfield",useridfield);
+ envelope.addProperty("courseid",courseid);
+ envelope.addProperty("courseidfield",courseidfield);
+ HttpTransportSE httpTransport = this.makeHttpTransport();
+ try {
+ httpTransport.call(METH_NAME, envelope);
+ Integer response = (Integer) envelope.getResponse();
+ this.logInfo(METH_NAME, response);
+ return response.intValue();
+ } catch (Exception e) {
+ this.logError(httpTransport, e);
+ return 0;
+ }
+ }
public net.patrickpollet.moodlews.core.QuizRecord get_quiz(int client, java.lang.String sesskey, int quizid, java.lang.String format) {
final String METH_NAME = "get_quiz";
MySoapSerializationEnvelope envelope = this.makeEnvelope(METH_NAME);
@@ -2459,6 +2499,27 @@ public int get_my_id(int client, java.lang.String sesskey) {
return null;
}
}
+ public boolean has_role_incourse(int client, java.lang.String sesskey, java.lang.String userid, java.lang.String useridfield, java.lang.String courseid, java.lang.String courseidfield, int roleid) {
+ final String METH_NAME = "has_role_incourse";
+ MySoapSerializationEnvelope envelope = this.makeEnvelope(METH_NAME);
+ envelope.addProperty("client",client);
+ envelope.addProperty("sesskey",sesskey);
+ envelope.addProperty("userid",userid);
+ envelope.addProperty("useridfield",useridfield);
+ envelope.addProperty("courseid",courseid);
+ envelope.addProperty("courseidfield",courseidfield);
+ envelope.addProperty("roleid",roleid);
+ HttpTransportSE httpTransport = this.makeHttpTransport();
+ try {
+ httpTransport.call(METH_NAME, envelope);
+ Boolean response = (Boolean) envelope.getResponse();
+ this.logInfo(METH_NAME, response);
+ return response.booleanValue();
+ } catch (Exception e) {
+ this.logError(httpTransport, e);
+ return false;
+ }
+ }
public net.patrickpollet.moodlews.core.LoginReturn login(java.lang.String username, java.lang.String password) {
final String METH_NAME = "login";
MySoapSerializationEnvelope envelope = this.makeEnvelope(METH_NAME);
View
21 src/net/patrickpollet/moodlewsold/core/MoodleWSBindingStub.java
@@ -17,7 +17,7 @@
import net.patrickpollet.ksoap2.*;
public class MoodleWSBindingStub extends KSoap2BindingStubBase{
- public MoodleWSBindingStub(String service_url, String nameSpace,boolean debug) {
+ public MoodleWSBindingStub(String service_url, String nameSpace, boolean debug) {
super(service_url,nameSpace,debug);
}
@@ -2733,4 +2733,23 @@ public int count_activities(int client, java.lang.String sesskey, java.lang.Stri
return null;
}
}
+ public net.patrickpollet.moodlewsold.core.GetMessageContactsReturn get_message_contacts(int client, java.lang.String sesskey, java.lang.String userid, java.lang.String useridfield) {
+ final String METH_NAME = "get_message_contacts";
+ MySoapSerializationEnvelope envelope = this.makeEnvelope(METH_NAME);
+ envelope.addProperty("client",client);
+ envelope.addProperty("sesskey",sesskey);
+ envelope.addProperty("userid",userid);
+ envelope.addProperty("useridfield",useridfield);
+ HttpTransportSE httpTransport = this.makeHttpTransport();
+ try {
+ httpTransport.call(METH_NAME, envelope);
+ SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn;
+ SoapObject response = (SoapObject) resultsRequestSOAP.getProperty(0);
+ this.logInfo(METH_NAME, response);
+ return (GetMessageContactsReturn)KSoap2Utils.getObject(response,new GetMessageContactsReturn(this.NAMESPACE));
+ } catch (Exception e) {
+ this.logError(httpTransport, e);
+ return null;
+ }
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.