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");
}
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);
}
}
Aggregations