use of org.ksoap2.serialization.SoapObject in project ETSMobile-Android2 by ApplETS.
the class WebServiceSoap method RechercheDate.
public ArrayOfFicheEmployeDate RechercheDate(final String FiltreNom, final String FiltrePrenom, final String FiltreServiceCode) throws Exception {
return (ArrayOfFicheEmployeDate) execute(new IWcfMethod() {
@Override
public ExtendedSoapSerializationEnvelope CreateSoapEnvelope() {
ExtendedSoapSerializationEnvelope __envelope = createEnvelope();
SoapObject __soapReq = new SoapObject("http://etsmtl.ca/", "RechercheDate");
__envelope.setOutputSoapObject(__soapReq);
PropertyInfo __info = null;
__info = new PropertyInfo();
__info.namespace = "http://etsmtl.ca/";
__info.name = "FiltreNom";
__info.type = PropertyInfo.STRING_CLASS;
__info.setValue(FiltreNom);
__soapReq.addProperty(__info);
__info = new PropertyInfo();
__info.namespace = "http://etsmtl.ca/";
__info.name = "FiltrePrenom";
__info.type = PropertyInfo.STRING_CLASS;
__info.setValue(FiltrePrenom);
__soapReq.addProperty(__info);
__info = new PropertyInfo();
__info.namespace = "http://etsmtl.ca/";
__info.name = "FiltreServiceCode";
__info.type = PropertyInfo.STRING_CLASS;
__info.setValue(FiltreServiceCode);
__soapReq.addProperty(__info);
return __envelope;
}
@Override
public Object ProcessResult(ExtendedSoapSerializationEnvelope __envelope, SoapObject __result) throws Exception {
return (ArrayOfFicheEmployeDate) getResult(ArrayOfFicheEmployeDate.class, __result, "RechercheDateResult", __envelope);
}
}, "http://etsmtl.ca/RechercheDate");
}
use of org.ksoap2.serialization.SoapObject in project ETSMobile-Android2 by ApplETS.
the class Helper method convertToSoapObject.
public static Object convertToSoapObject(Element element) {
if (element.getChildCount() == 0 || (element.getChildCount() == 1 && !(element.getChild(0) instanceof Element))) {
SoapPrimitive primitive = new SoapPrimitive(element.getNamespace(), element.getName(), element.getChildCount() == 1 ? element.getText(0) : null);
return primitive;
} else {
SoapObject obj = new SoapObject(element.getNamespace(), element.getName());
for (int i = 0; i < element.getChildCount(); i++) {
Element childElement = element.getElement(i);
Object childObject = convertToSoapObject(childElement);
if (childObject instanceof SoapObject) {
SoapObject soapObj = (SoapObject) childObject;
obj.addProperty(soapObj.getName(), childObject);
} else {
SoapPrimitive primitive = (SoapPrimitive) childObject;
obj.addProperty(primitive.getName(), primitive);
}
}
return obj;
}
}
use of org.ksoap2.serialization.SoapObject in project ETSMobile-Android2 by ApplETS.
the class SignetsMobileSoap method getResult.
Object getResult(Class destObj, SoapObject source, String resultName, ExtendedSoapSerializationEnvelope __envelope) throws Exception {
if (source.hasProperty(resultName)) {
Object j = source.getProperty(resultName);
if (j == null) {
return null;
}
Object instance = __envelope.get((AttributeContainer) j, destObj);
return instance;
} else if (source.getName().equals(resultName)) {
Object instance = __envelope.get(source, destObj);
return instance;
}
return null;
}
use of org.ksoap2.serialization.SoapObject in project ETSMobile-Android2 by ApplETS.
the class SignetsMobileSoap method listeCoequipiers.
/**
* Liste de co��quipiers de l'��tudiant pour le cours-groupe et l'��l��ment
* d'��valuation pass��s en param��tre: nom, pr��nom et courriel
*/
public listeDesCoequipiers listeCoequipiers(final String codeAccesUniversel, final String motPasse, final String pSigle, final String pGroupe, final String pSession, final String pNomElementEval) throws Exception {
return (listeDesCoequipiers) execute(new IWcfMethod() {
@Override
public ExtendedSoapSerializationEnvelope CreateSoapEnvelope() {
ExtendedSoapSerializationEnvelope __envelope = createEnvelope();
SoapObject __soapReq = new SoapObject("http://etsmtl.ca/", "listeCoequipiers");
__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);
__info = new PropertyInfo();
__info.namespace = "http://etsmtl.ca/";
__info.name = "pSigle";
__info.type = PropertyInfo.STRING_CLASS;
__info.setValue(pSigle);
__soapReq.addProperty(__info);
__info = new PropertyInfo();
__info.namespace = "http://etsmtl.ca/";
__info.name = "pGroupe";
__info.type = PropertyInfo.STRING_CLASS;
__info.setValue(pGroupe);
__soapReq.addProperty(__info);
__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 = "pNomElementEval";
__info.type = PropertyInfo.STRING_CLASS;
__info.setValue(pNomElementEval);
__soapReq.addProperty(__info);
return __envelope;
}
@Override
public Object ProcessResult(ExtendedSoapSerializationEnvelope __envelope, SoapObject __result) throws Exception {
return (listeDesCoequipiers) getResult(listeDesCoequipiers.class, __result, "listeCoequipiersResult", __envelope);
}
}, "http://etsmtl.ca/listeCoequipiers");
}
use of org.ksoap2.serialization.SoapObject in project ETSMobile-Android2 by ApplETS.
the class SignetsMobileSoap method lireHoraireDesSeances.
public listeSeances lireHoraireDesSeances(final String codeAccesUniversel, final String motPasse, final String pCoursGroupe, final String pSession, final String pDateDebut, final String pDateFin) throws java.lang.Exception {
return (listeSeances) execute(new IWcfMethod() {
@Override
public Object ProcessResult(ExtendedSoapSerializationEnvelope __envelope, SoapObject __result) throws Exception {
return (listeSeances) getResult(listeSeances.class, __result, "lireHoraireDesSeancesResult", __envelope);
}
@Override
public ExtendedSoapSerializationEnvelope CreateSoapEnvelope() throws Exception {
ExtendedSoapSerializationEnvelope __envelope = createEnvelope();
SoapObject __soapReq = new SoapObject("http://etsmtl.ca/", "lireHoraireDesSeances");
__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);
__info = new PropertyInfo();
__info.namespace = "http://etsmtl.ca/";
__info.name = "pCoursGroupe";
__info.type = PropertyInfo.STRING_CLASS;
__info.setValue(pCoursGroupe);
__soapReq.addProperty(__info);
__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 = "pDateDebut";
__info.type = PropertyInfo.STRING_CLASS;
__info.setValue(pDateDebut);
__soapReq.addProperty(__info);
__info = new PropertyInfo();
__info.namespace = "http://etsmtl.ca/";
__info.name = "pDateFin";
__info.type = PropertyInfo.STRING_CLASS;
__info.setValue(pDateFin);
__soapReq.addProperty(__info);
return __envelope;
}
}, "http://etsmtl.ca/lireHoraireDesSeances");
}
Aggregations