Search in sources :

Example 31 with SoapObject

use of org.ksoap2.serialization.SoapObject in project ETSMobile-Android2 by ApplETS.

the class WebServiceSoap method GetFicheData.

public FicheEmploye GetFicheData(final String Id) throws Exception {
    return (FicheEmploye) execute(new IWcfMethod() {

        @Override
        public ExtendedSoapSerializationEnvelope CreateSoapEnvelope() {
            ExtendedSoapSerializationEnvelope __envelope = createEnvelope();
            SoapObject __soapReq = new SoapObject("http://etsmtl.ca/", "GetFicheData");
            __envelope.setOutputSoapObject(__soapReq);
            PropertyInfo __info = null;
            __info = new PropertyInfo();
            __info.namespace = "http://etsmtl.ca/";
            __info.name = "Id";
            __info.type = PropertyInfo.STRING_CLASS;
            __info.setValue(Id);
            __soapReq.addProperty(__info);
            return __envelope;
        }

        @Override
        public Object ProcessResult(ExtendedSoapSerializationEnvelope __envelope, SoapObject __result) throws Exception {
            return (FicheEmploye) getResult(FicheEmploye.class, __result, "GetFicheDataResult", __envelope);
        }
    }, "http://etsmtl.ca/GetFicheData");
}
Also used : SoapObject(org.ksoap2.serialization.SoapObject) ArrayOfFicheEmploye(ca.etsmtl.applets.etsmobile.model.ArrayOfFicheEmploye) FicheEmploye(ca.etsmtl.applets.etsmobile.model.FicheEmploye) PropertyInfo(org.ksoap2.serialization.PropertyInfo)

Example 32 with SoapObject

use of org.ksoap2.serialization.SoapObject in project ETSMobile-Android2 by ApplETS.

the class WebServiceSoap method execute.

protected Object execute(IWcfMethod wcfMethod, String methodName) throws Exception {
    org.ksoap2.transport.Transport __httpTransport = createTransport();
    ExtendedSoapSerializationEnvelope __envelope = wcfMethod.CreateSoapEnvelope();
    sendRequest(methodName, __envelope, __httpTransport);
    Object __retObj = __envelope.bodyIn;
    if (__retObj instanceof org.ksoap2.SoapFault) {
        org.ksoap2.SoapFault __fault = (org.ksoap2.SoapFault) __retObj;
        throw convertToException(__fault, __envelope);
    } else {
        SoapObject __result = (SoapObject) __retObj;
        return wcfMethod.ProcessResult(__envelope, __result);
    }
}
Also used : SoapObject(org.ksoap2.serialization.SoapObject) SoapObject(org.ksoap2.serialization.SoapObject)

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