Search in sources :

Example 16 with SoapObject

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

Example 17 with SoapObject

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

Example 18 with SoapObject

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

Example 19 with SoapObject

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

Example 20 with SoapObject

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");
}
Also used : ArrayOfService(ca.etsmtl.applets.etsmobile.model.ArrayOfService) 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