use of org.ksoap2.serialization.SoapObject in project ETSMobile-Android2 by ApplETS.
the class SignetsMobileSoap method listeSessions.
/**
* Liste de toutes les sessions o�� l'��tudiant a ��t�� actif �� l'��TS, en
* version courte (A2011) et longue (Automne 2011)
*/
public ListeDeSessions listeSessions(final String codeAccesUniversel, final String motPasse) throws Exception {
return (ListeDeSessions) execute(new IWcfMethod() {
@Override
public ExtendedSoapSerializationEnvelope CreateSoapEnvelope() {
ExtendedSoapSerializationEnvelope __envelope = createEnvelope();
SoapObject __soapReq = new SoapObject("http://etsmtl.ca/", "listeSessions");
__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 (ListeDeSessions) getResult(ListeDeSessions.class, __result, "listeSessionsResult", __envelope);
}
}, "http://etsmtl.ca/listeSessions");
}
use of org.ksoap2.serialization.SoapObject in project ETSMobile-Android2 by ApplETS.
the class SignetsMobileSoap method echo.
public String echo(final String chaine) throws Exception {
return (String) execute(new IWcfMethod() {
@Override
public ExtendedSoapSerializationEnvelope CreateSoapEnvelope() {
ExtendedSoapSerializationEnvelope __envelope = createEnvelope();
SoapObject __soapReq = new SoapObject("http://etsmtl.ca/", "echo");
__envelope.setOutputSoapObject(__soapReq);
PropertyInfo __info = null;
__info = new PropertyInfo();
__info.namespace = "http://etsmtl.ca/";
__info.name = "chaine";
__info.type = PropertyInfo.STRING_CLASS;
__info.setValue(chaine);
__soapReq.addProperty(__info);
return __envelope;
}
@Override
public Object ProcessResult(ExtendedSoapSerializationEnvelope __envelope, SoapObject __result) throws Exception {
Object obj = __result.getProperty("echoResult");
if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
SoapPrimitive j = (SoapPrimitive) __result.getProperty("echoResult");
return j.toString();
}
return null;
}
}, "http://etsmtl.ca/echo");
}
use of org.ksoap2.serialization.SoapObject in project ETSMobile-Android2 by ApplETS.
the class SignetsMobileSoap method execute.
protected Object execute(IWcfMethod wcfMethod, String methodName) throws java.lang.Exception {
org.ksoap2.transport.Transport __httpTransport = createTransport();
ExtendedSoapSerializationEnvelope __envelope = wcfMethod.CreateSoapEnvelope();
sendRequest(methodName, __envelope, __httpTransport);
Object __retObj = __envelope.bodyIn;
if (__retObj instanceof SoapFault) {
SoapFault __fault = (SoapFault) __retObj;
throw convertToException(__fault, __envelope);
} else {
SoapObject __result = (SoapObject) __retObj;
return wcfMethod.ProcessResult(__envelope, __result);
}
}
use of org.ksoap2.serialization.SoapObject in project ETSMobile-Android2 by ApplETS.
the class SignetsMobileSoap method HelloWorld.
public String HelloWorld() throws Exception {
return (String) execute(new IWcfMethod() {
@Override
public ExtendedSoapSerializationEnvelope CreateSoapEnvelope() {
ExtendedSoapSerializationEnvelope __envelope = createEnvelope();
SoapObject __soapReq = new SoapObject("http://etsmtl.ca/", "HelloWorld");
__envelope.setOutputSoapObject(__soapReq);
PropertyInfo __info = null;
return __envelope;
}
@Override
public Object ProcessResult(ExtendedSoapSerializationEnvelope __envelope, SoapObject __result) throws Exception {
Object obj = __result.getProperty("HelloWorldResult");
if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
SoapPrimitive j = (SoapPrimitive) __result.getProperty("HelloWorldResult");
return j.toString();
}
return null;
}
}, "http://etsmtl.ca/HelloWorld");
}
use of org.ksoap2.serialization.SoapObject in project ETSMobile-Android2 by ApplETS.
the class SignetsMobileSoap method infoEtudiant.
/**
* Information de base sur l'��tudiant: nom, pr��nom, code permanent, solde
*/
public Etudiant infoEtudiant(final String codeAccesUniversel, final String motPasse) throws Exception {
return (Etudiant) execute(new IWcfMethod() {
@Override
public ExtendedSoapSerializationEnvelope CreateSoapEnvelope() {
ExtendedSoapSerializationEnvelope __envelope = createEnvelope();
SoapObject __soapReq = new SoapObject("http://etsmtl.ca/", "infoEtudiant");
__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 (Etudiant) getResult(Etudiant.class, __result, "infoEtudiantResult", __envelope);
}
}, "http://etsmtl.ca/infoEtudiant");
}
Aggregations