正在查看: St.John's v1.0.9 应用的 SoapObjectProvider.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: St.John's v1.0.9 应用的 SoapObjectProvider.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.mcb.stjohnsemschool.activity;
import android.content.Context;
import com.mcb.stjohnsemschool.utils.AppConstants;
import org.ksoap2.SoapFault;
import org.ksoap2.serialization.PropertyInfo;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
public class SoapObjectProvider {
private static String TAG = "SoapObjectProvider";
public static String accesToken = "hjysgt87e-andparentid-84376-mcb-dt34986tj";
static String namespace = "http://tempuri.org/";
public static SoapObject GetStudentOnlineExaminations(Context context, int i, int i2) {
SoapObject soapObject = new SoapObject(namespace, "GET_StudentOnlineExaminations");
PropertyInfo propertyInfo = new PropertyInfo();
propertyInfo.namespace = namespace;
propertyInfo.setName("StudentEnrollmentID");
propertyInfo.setValue(Integer.valueOf(i));
propertyInfo.setType(Integer.class);
soapObject.addProperty(propertyInfo);
PropertyInfo propertyInfo2 = new PropertyInfo();
propertyInfo2.namespace = namespace;
propertyInfo2.setName("AcademicYearID");
propertyInfo2.setValue(Integer.valueOf(i2));
propertyInfo2.setType(Integer.class);
soapObject.addProperty(propertyInfo2);
PropertyInfo propertyInfo3 = new PropertyInfo();
propertyInfo3.namespace = namespace;
propertyInfo3.setName("apikey");
propertyInfo3.setValue(accesToken);
propertyInfo3.setType(String.class);
soapObject.addProperty(propertyInfo3);
try {
return callWebService(namespace + "GET_StudentOnlineExaminations", soapObject, AppConstants.getParentAppServiceUrl(context));
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static SoapObject GetStudentOnlineExaminationsQuestions(Context context, int i, int i2, int i3) {
SoapObject soapObject = new SoapObject(namespace, "GET_StudentOnlineExaminations_Questions_New");
PropertyInfo propertyInfo = new PropertyInfo();
propertyInfo.namespace = namespace;
propertyInfo.setName("UserID");
propertyInfo.setValue(Integer.valueOf(i));
propertyInfo.setType(Integer.class);
soapObject.addProperty(propertyInfo);
PropertyInfo propertyInfo2 = new PropertyInfo();
propertyInfo2.namespace = namespace;
propertyInfo2.setName("StudentEnrollmentID");
propertyInfo2.setValue(Integer.valueOf(i2));
propertyInfo2.setType(Integer.class);
soapObject.addProperty(propertyInfo2);
PropertyInfo propertyInfo3 = new PropertyInfo();
propertyInfo3.namespace = namespace;
propertyInfo3.setName("OnlineExaminationID");
propertyInfo3.setValue(Integer.valueOf(i3));
propertyInfo3.setType(Integer.class);
soapObject.addProperty(propertyInfo3);
PropertyInfo propertyInfo4 = new PropertyInfo();
propertyInfo4.namespace = namespace;
propertyInfo4.setName("apikey");
propertyInfo4.setValue(accesToken);
propertyInfo4.setType(String.class);
soapObject.addProperty(propertyInfo4);
try {
return callWebService(namespace + "GET_StudentOnlineExaminations_Questions_New", soapObject, AppConstants.getParentAppServiceUrl(context));
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static SoapObject SaveOnlineExaminationAnswers(Context context, int i, String str, int i2, int i3, int i4) {
SoapObject soapObject = new SoapObject(namespace, "Save_OnlineExaminationAnswers_New");
PropertyInfo propertyInfo = new PropertyInfo();
propertyInfo.namespace = namespace;
propertyInfo.setName("UserID");
propertyInfo.setValue(Integer.valueOf(i));
propertyInfo.setType(Integer.class);
soapObject.addProperty(propertyInfo);
PropertyInfo propertyInfo2 = new PropertyInfo();
propertyInfo2.namespace = namespace;
propertyInfo2.setName("answersjson");
propertyInfo2.setValue(str);
propertyInfo2.setType(String.class);
soapObject.addProperty(propertyInfo2);
PropertyInfo propertyInfo3 = new PropertyInfo();
propertyInfo3.namespace = namespace;
propertyInfo3.setName("OnlineExaminationID");
propertyInfo3.setValue(Integer.valueOf(i2));
propertyInfo3.setType(Integer.class);
soapObject.addProperty(propertyInfo3);
PropertyInfo propertyInfo4 = new PropertyInfo();
propertyInfo4.namespace = namespace;
propertyInfo4.setName("StudentEnrollmentID");
propertyInfo4.setValue(Integer.valueOf(i3));
propertyInfo4.setType(Integer.class);
soapObject.addProperty(propertyInfo4);
PropertyInfo propertyInfo5 = new PropertyInfo();
propertyInfo5.namespace = namespace;
propertyInfo5.setName("IsFinished");
propertyInfo5.setValue(Integer.valueOf(i4));
propertyInfo5.setType(Integer.class);
soapObject.addProperty(propertyInfo5);
PropertyInfo propertyInfo6 = new PropertyInfo();
propertyInfo6.namespace = namespace;
propertyInfo6.setName("apikey");
propertyInfo6.setValue(accesToken);
propertyInfo6.setType(String.class);
soapObject.addProperty(propertyInfo6);
try {
return callWebService(namespace + "Save_OnlineExaminationAnswers_New", soapObject, AppConstants.getParentAppServiceUrl(context));
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static SoapObject GetStudentOnlineExaminationsAnswers(Context context, int i, int i2) {
SoapObject soapObject = new SoapObject(namespace, "GET_StudentOnlineExaminations_Answers");
PropertyInfo propertyInfo = new PropertyInfo();
propertyInfo.namespace = namespace;
propertyInfo.setName("StudentEnrollmentID");
propertyInfo.setValue(Integer.valueOf(i));
propertyInfo.setType(Integer.class);
soapObject.addProperty(propertyInfo);
PropertyInfo propertyInfo2 = new PropertyInfo();
propertyInfo2.namespace = namespace;
propertyInfo2.setName("OnlineExaminationID");
propertyInfo2.setValue(Integer.valueOf(i2));
propertyInfo2.setType(Integer.class);
soapObject.addProperty(propertyInfo2);
PropertyInfo propertyInfo3 = new PropertyInfo();
propertyInfo3.namespace = namespace;
propertyInfo3.setName("apikey");
propertyInfo3.setValue(accesToken);
propertyInfo3.setType(String.class);
soapObject.addProperty(propertyInfo3);
try {
return callWebService(namespace + "GET_StudentOnlineExaminations_Answers", soapObject, AppConstants.getParentAppServiceUrl(context));
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static SoapObject GetOnlineExaminationSyllabus(Context context, int i) {
SoapObject soapObject = new SoapObject(namespace, "GET_OnlineExaminationSyllabus");
PropertyInfo propertyInfo = new PropertyInfo();
propertyInfo.namespace = namespace;
propertyInfo.setName("OnlineExaminationID");
propertyInfo.setValue(Integer.valueOf(i));
propertyInfo.setType(Integer.class);
soapObject.addProperty(propertyInfo);
PropertyInfo propertyInfo2 = new PropertyInfo();
propertyInfo2.namespace = namespace;
propertyInfo2.setName("apikey");
propertyInfo2.setValue(accesToken);
propertyInfo2.setType(String.class);
soapObject.addProperty(propertyInfo2);
try {
return callWebService(namespace + "GET_OnlineExaminationSyllabus", soapObject, AppConstants.getParentAppServiceUrl(context));
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static SoapObject GetStudentDetailsLearning(Context context, int i, int i2) {
SoapObject soapObject = new SoapObject(namespace, "GetStudentDetails_Learning");
PropertyInfo propertyInfo = new PropertyInfo();
propertyInfo.namespace = namespace;
propertyInfo.setName("StudentEnrollmentID");
propertyInfo.setValue(Integer.valueOf(i));
propertyInfo.setType(Integer.class);
soapObject.addProperty(propertyInfo);
PropertyInfo propertyInfo2 = new PropertyInfo();
propertyInfo2.namespace = namespace;
propertyInfo2.setName("AcademicYearID");
propertyInfo2.setValue(Integer.valueOf(i2));
propertyInfo2.setType(Integer.class);
soapObject.addProperty(propertyInfo2);
PropertyInfo propertyInfo3 = new PropertyInfo();
propertyInfo3.namespace = namespace;
propertyInfo3.setName("apikey");
propertyInfo3.setValue(accesToken);
propertyInfo3.setType(String.class);
soapObject.addProperty(propertyInfo3);
try {
return callWebService(namespace + "GetStudentDetails_Learning", soapObject, AppConstants.getParentAppServiceUrl(context));
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
private static SoapObject callWebService(String str, SoapObject soapObject, String str2) {
SoapObject soapObject2 = null;
try {
SoapSerializationEnvelope soapSerializationEnvelope = new SoapSerializationEnvelope(110);
soapSerializationEnvelope.setOutputSoapObject(soapObject);
soapSerializationEnvelope.dotNet = true;
soapSerializationEnvelope.bodyOut = soapObject;
soapSerializationEnvelope.encodingStyle = "http://www.w3.org/2001/XMLSchema";
HttpTransportSE httpTransportSE = new HttpTransportSE(str2, 120000);
httpTransportSE.debug = true;
httpTransportSE.call(str, soapSerializationEnvelope);
if (soapSerializationEnvelope.bodyIn instanceof SoapFault) {
String str3 = ((SoapFault) soapSerializationEnvelope.bodyIn).faultstring;
} else {
soapObject2 = (SoapObject) soapSerializationEnvelope.bodyIn;
}
} catch (Exception e) {
e.printStackTrace();
}
return soapObject2;
}
}