use of org.ksoap2.serialization.SoapObject in project ETSMobile-Android2 by ApplETS.
the class ExtendedSoapSerializationEnvelope method writeObjectBody.
@Override
public void writeObjectBody(XmlSerializer writer, KvmSerializable obj) throws IOException {
if (obj instanceof AttributeContainer) {
AttributeContainer soapObject = (AttributeContainer) obj;
int cnt = soapObject.getAttributeCount();
for (int counter = 0; counter < cnt; counter++) {
AttributeInfo attributeInfo = new AttributeInfo();
soapObject.getAttributeInfo(counter, attributeInfo);
writer.attribute(attributeInfo.getNamespace(), attributeInfo.getName(), attributeInfo.getValue() != null ? attributeInfo.getValue().toString() : "");
}
}
super.writeObjectBody(writer, obj);
}
use of org.ksoap2.serialization.SoapObject in project ETSMobile-Android2 by ApplETS.
the class SignetsMobileSoap method donneesAuthentificationValides.
/**
* Retourne 'true' si le code d'acc��s universel et le mot de passe sont
* valides dans AD des ��tudiants
*/
public Boolean donneesAuthentificationValides(final String codeAccesUniversel, final String motPasse) throws Exception {
return (Boolean) execute(new IWcfMethod() {
@Override
public ExtendedSoapSerializationEnvelope CreateSoapEnvelope() {
ExtendedSoapSerializationEnvelope __envelope = createEnvelope();
SoapObject __soapReq = new SoapObject("http://etsmtl.ca/", "donneesAuthentificationValides");
__envelope.setOutputSoapObject(__soapReq);
PropertyInfo __info = null;
__info = new PropertyInfo();
__info.namespace = "http://etsmtl.ca/";
__info.name = "codeAccesUniversel";
__info.type = PropertyInfo.STRING_CLASS;
__info.setValue(codeAccesUniversel);
__soapReq.addProperty(__info);
__info = new PropertyInfo();
__info.namespace = "http://etsmtl.ca/";
__info.name = "motPasse";
__info.type = PropertyInfo.STRING_CLASS;
__info.setValue(motPasse);
__soapReq.addProperty(__info);
return __envelope;
}
@Override
public Object ProcessResult(ExtendedSoapSerializationEnvelope __envelope, SoapObject __result) throws Exception {
Object obj = __result.getProperty("donneesAuthentificationValidesResult");
if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
SoapPrimitive j = (SoapPrimitive) __result.getProperty("donneesAuthentificationValidesResult");
return new Boolean(j.toString());
}
return null;
}
}, "http://etsmtl.ca/donneesAuthentificationValides");
}
use of org.ksoap2.serialization.SoapObject in project ETSMobile-Android2 by ApplETS.
the class SignetsMobileSoap method listeCours.
/**
* Liste de tous les cours de l'��tudiant: sigle, groupe, session,
* programme, cote finale, nombre de cr��dits et titre du cours, tri��e par
* session et sigle.
*/
public ListeDeCours listeCours(final String codeAccesUniversel, final String motPasse) throws Exception {
return (ListeDeCours) execute(new IWcfMethod() {
@Override
public ExtendedSoapSerializationEnvelope CreateSoapEnvelope() {
ExtendedSoapSerializationEnvelope __envelope = createEnvelope();
SoapObject __soapReq = new SoapObject("http://etsmtl.ca/", "listeCours");
__envelope.setOutputSoapObject(__soapReq);
PropertyInfo __info = null;
__info = new PropertyInfo();
__info.namespace = "http://etsmtl.ca/";
__info.name = "codeAccesUniversel";
__info.type = PropertyInfo.STRING_CLASS;
__info.setValue(codeAccesUniversel);
__soapReq.addProperty(__info);
__info = new PropertyInfo();
__info.namespace = "http://etsmtl.ca/";
__info.name = "motPasse";
__info.type = PropertyInfo.STRING_CLASS;
__info.setValue(motPasse);
__soapReq.addProperty(__info);
return __envelope;
}
@Override
public Object ProcessResult(ExtendedSoapSerializationEnvelope __envelope, SoapObject __result) throws Exception {
return (ListeDeCours) getResult(ListeDeCours.class, __result, "listeCoursResult", __envelope);
}
}, "http://etsmtl.ca/listeCours");
}
use of org.ksoap2.serialization.SoapObject in project ETSMobile-Android2 by ApplETS.
the class SignetsMobileSoap method lireHoraire.
/**
* Liste des cours pour le trimestre et le sigle de cours partiel pass��s en
* param��tres. Tous les CTN1 �� l'hiver 2012, par exemple
*/
public listeCoursHoraire lireHoraire(final String pSession, final String prefixeSigleCours) throws Exception {
return (listeCoursHoraire) execute(new IWcfMethod() {
@Override
public ExtendedSoapSerializationEnvelope CreateSoapEnvelope() {
ExtendedSoapSerializationEnvelope __envelope = createEnvelope();
SoapObject __soapReq = new SoapObject("http://etsmtl.ca/", "lireHoraire");
__envelope.setOutputSoapObject(__soapReq);
PropertyInfo __info = null;
__info = new PropertyInfo();
__info.namespace = "http://etsmtl.ca/";
__info.name = "pSession";
__info.type = PropertyInfo.STRING_CLASS;
__info.setValue(pSession);
__soapReq.addProperty(__info);
__info = new PropertyInfo();
__info.namespace = "http://etsmtl.ca/";
__info.name = "prefixeSigleCours";
__info.type = PropertyInfo.STRING_CLASS;
__info.setValue(prefixeSigleCours);
__soapReq.addProperty(__info);
return __envelope;
}
@Override
public Object ProcessResult(ExtendedSoapSerializationEnvelope __envelope, SoapObject __result) throws Exception {
return (listeCoursHoraire) getResult(listeCoursHoraire.class, __result, "lireHoraireResult", __envelope);
}
}, "http://etsmtl.ca/lireHoraire");
}
use of org.ksoap2.serialization.SoapObject in project ETSMobile-Android2 by ApplETS.
the class WebServiceSoap method GetListeDepartement.
public ArrayOfService GetListeDepartement() throws Exception {
return (ArrayOfService) execute(new IWcfMethod() {
@Override
public ExtendedSoapSerializationEnvelope CreateSoapEnvelope() {
ExtendedSoapSerializationEnvelope __envelope = createEnvelope();
SoapObject __soapReq = new SoapObject("http://etsmtl.ca/", "GetListeDepartement");
__envelope.setOutputSoapObject(__soapReq);
PropertyInfo __info = null;
return __envelope;
}
@Override
public Object ProcessResult(ExtendedSoapSerializationEnvelope __envelope, SoapObject __result) throws Exception {
return (ArrayOfService) getResult(ArrayOfService.class, __result, "GetListeDepartementResult", __envelope);
}
}, "http://etsmtl.ca/GetListeDepartement");
}
Aggregations