Search in sources :

Example 21 with SoapObject

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");
}
Also used : ArrayOfFicheEmployeDate(ca.etsmtl.applets.etsmobile.model.ArrayOfFicheEmployeDate) SoapObject(org.ksoap2.serialization.SoapObject) PropertyInfo(org.ksoap2.serialization.PropertyInfo)

Example 22 with SoapObject

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;
    }
}
Also used : Element(org.kxml2.kdom.Element) SoapObject(org.ksoap2.serialization.SoapObject) SoapObject(org.ksoap2.serialization.SoapObject) SoapPrimitive(org.ksoap2.serialization.SoapPrimitive)

Example 23 with SoapObject

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;
}
Also used : SoapObject(org.ksoap2.serialization.SoapObject)

Example 24 with SoapObject

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");
}
Also used : ca.etsmtl.applets.etsmobile.model.listeDesCoequipiers(ca.etsmtl.applets.etsmobile.model.listeDesCoequipiers) SoapObject(org.ksoap2.serialization.SoapObject) PropertyInfo(org.ksoap2.serialization.PropertyInfo)

Example 25 with SoapObject

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");
}
Also used : ca.etsmtl.applets.etsmobile.model.listeSeances(ca.etsmtl.applets.etsmobile.model.listeSeances) SoapObject(org.ksoap2.serialization.SoapObject) PropertyInfo(org.ksoap2.serialization.PropertyInfo)

Aggregations

SoapObject (org.ksoap2.serialization.SoapObject)29 PropertyInfo (org.ksoap2.serialization.PropertyInfo)23 SoapPrimitive (org.ksoap2.serialization.SoapPrimitive)5 IOException (java.io.IOException)3 Handler (android.os.Handler)2 Message (android.os.Message)2 ArrayOfFicheEmploye (ca.etsmtl.applets.etsmobile.model.ArrayOfFicheEmploye)2 ListeDeCours (ca.etsmtl.applets.etsmobile.model.ListeDeCours)2 Entry (java.util.Map.Entry)2 SoapSerializationEnvelope (org.ksoap2.serialization.SoapSerializationEnvelope)2 HttpResponseException (org.ksoap2.transport.HttpResponseException)2 HttpTransportSE (org.ksoap2.transport.HttpTransportSE)2 Element (org.kxml2.kdom.Element)2 XmlPullParserException (org.xmlpull.v1.XmlPullParserException)2 ArrayOfFicheEmployeDate (ca.etsmtl.applets.etsmobile.model.ArrayOfFicheEmployeDate)1 ArrayOfService (ca.etsmtl.applets.etsmobile.model.ArrayOfService)1 Etudiant (ca.etsmtl.applets.etsmobile.model.Etudiant)1 FicheEmploye (ca.etsmtl.applets.etsmobile.model.FicheEmploye)1 ListeDeSessions (ca.etsmtl.applets.etsmobile.model.ListeDeSessions)1 ListeDesElementsEvaluation (ca.etsmtl.applets.etsmobile.model.ListeDesElementsEvaluation)1