WebSafe v1.1.41版本的 MD5 值为:96ed6df40dd84513ac3690256a6d64c4
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.at.wwka.common;
import android.content.Context;
import android.text.TextUtils;
import com.at.wwka.R;
import com.at.wwka.client.s;
import com.at.wwka.common.h;
import com.at.wwka.installer.LoginActivity;
import java.io.DataInputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
public class a {
public boolean a = false;
public String b = "";
public String c = "";
public Context d;
public a(LoginActivity loginActivity) {
this.d = loginActivity;
}
private h.b a(String str, String str2, String str3, String str4) {
OutputStream outputStream;
HttpURLConnection httpURLConnection;
OutputStream outputStream2;
int contentLength;
DataInputStream dataInputStream = null;
byte[] a = h.a(str2);
String num = Integer.toString(a.length);
h.b bVar = new h.b();
bVar.a = false;
try {
HttpURLConnection httpURLConnection2 = (HttpURLConnection) new URL(str).openConnection();
try {
httpURLConnection2.setRequestMethod("POST");
httpURLConnection2.setDoInput(true);
httpURLConnection2.setDoOutput(true);
httpURLConnection2.setRequestProperty("Connection", "Keep-Alive");
httpURLConnection2.setRequestProperty("Content-Type", "text/xml; charset=utf-8");
httpURLConnection2.setRequestProperty("Accept-Encoding", "identity");
httpURLConnection2.setRequestProperty("Host", str3);
httpURLConnection2.setRequestProperty("Content-Length", num);
httpURLConnection2.setRequestProperty("SOAPAction", str4);
DataInputStream dataInputStream2 = "Expect";
httpURLConnection2.setRequestProperty("Expect", "100-continue");
outputStream = httpURLConnection2.getOutputStream();
if (outputStream != null) {
try {
try {
try {
outputStream.write(a);
bVar.d = httpURLConnection2.getResponseCode();
try {
contentLength = httpURLConnection2.getContentLength();
dataInputStream2 = new DataInputStream(httpURLConnection2.getInputStream());
} catch (Exception e) {
e = e;
dataInputStream2 = null;
}
if (contentLength > 0 && dataInputStream2 != 0) {
try {
bVar.e = new byte[contentLength];
dataInputStream2.readFully(bVar.e);
bVar.a = true;
dataInputStream2 = dataInputStream2;
} catch (Exception e2) {
e = e2;
try {
Globals.a(e.getMessage());
bVar.c = e;
dataInputStream2 = dataInputStream2;
if (dataInputStream2 != 0) {
}
if (outputStream != null) {
}
if (httpURLConnection2 != null) {
}
} catch (Exception e3) {
dataInputStream = dataInputStream2;
httpURLConnection = httpURLConnection2;
e = e3;
outputStream2 = outputStream;
try {
bVar.c = e;
if (dataInputStream != null) {
try {
dataInputStream.close();
} catch (Exception e4) {
Globals.a(e4.getMessage());
}
}
if (outputStream2 != null) {
try {
outputStream2.close();
} catch (Exception e5) {
Globals.a(e5.getMessage());
}
}
if (httpURLConnection != null) {
try {
httpURLConnection.disconnect();
} catch (Exception e6) {
Globals.a(e6.getMessage());
}
}
return bVar;
} catch (Throwable th) {
th = th;
outputStream = outputStream2;
if (dataInputStream != null) {
}
if (outputStream != null) {
}
if (httpURLConnection != null) {
}
throw th;
}
}
return bVar;
}
}
} catch (Throwable th2) {
dataInputStream = dataInputStream2;
httpURLConnection = httpURLConnection2;
th = th2;
if (dataInputStream != null) {
try {
dataInputStream.close();
} catch (Exception e7) {
Globals.a(e7.getMessage());
}
}
if (outputStream != null) {
try {
outputStream.close();
} catch (Exception e8) {
Globals.a(e8.getMessage());
}
}
if (httpURLConnection != null) {
try {
httpURLConnection.disconnect();
} catch (Exception e9) {
Globals.a(e9.getMessage());
}
}
throw th;
}
} catch (Exception e10) {
httpURLConnection = httpURLConnection2;
e = e10;
outputStream2 = outputStream;
}
} catch (Throwable th3) {
httpURLConnection = httpURLConnection2;
th = th3;
if (dataInputStream != null) {
}
if (outputStream != null) {
}
if (httpURLConnection != null) {
}
throw th;
}
} else {
dataInputStream2 = 0;
}
if (dataInputStream2 != 0) {
try {
dataInputStream2.close();
} catch (Exception e11) {
Globals.a(e11.getMessage());
}
}
if (outputStream != null) {
try {
outputStream.close();
} catch (Exception e12) {
Globals.a(e12.getMessage());
}
}
if (httpURLConnection2 != null) {
try {
httpURLConnection2.disconnect();
} catch (Exception e13) {
Globals.a(e13.getMessage());
}
}
} catch (Exception e14) {
httpURLConnection = httpURLConnection2;
e = e14;
outputStream2 = null;
} catch (Throwable th4) {
outputStream = null;
httpURLConnection = httpURLConnection2;
th = th4;
}
} catch (Exception e15) {
e = e15;
outputStream2 = null;
httpURLConnection = null;
} catch (Throwable th5) {
th = th5;
outputStream = null;
httpURLConnection = null;
}
return bVar;
}
private boolean a(h.b bVar) {
if (!bVar.a || bVar.e == null) {
this.b = bVar.a();
return false;
}
b bVar2 = new b();
bVar2.a(bVar.e);
if (bVar2.a.booleanValue()) {
return true;
}
this.b = bVar2.b;
return false;
}
private String b(String str, String str2, String str3) {
return "<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s:Body><CreateAccount xmlns=\"http://tempuri.org/\"><firstName>" + str + "</firstName><lastName>" + str2 + "</lastName><email>" + str3 + "</email></CreateAccount></s:Body></s:Envelope>";
}
private boolean b(h.b bVar) {
if (!bVar.a || bVar.e == null) {
this.b = bVar.a();
return false;
}
b bVar2 = new b();
bVar2.a(bVar.e);
if (bVar2.a.booleanValue() && !TextUtils.isEmpty(bVar2.d)) {
this.c = bVar2.d;
new s(this.d).e(this.c);
return true;
}
this.b = bVar2.b;
if (bVar2.c == 4294967295L) {
this.b = this.d.getString(R.string.error_customer_exist);
return false;
}
return false;
}
private boolean c(String str) {
return b(a(Globals.l(), str, i.a(), i.b()));
}
public void a(String str, String str2, String str3) {
this.a = c(b(str, str2, str3));
}
public boolean a(String str) {
return a(a(Globals.l(), str, i.a(), i.c()));
}
public String b(String str) {
return "<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s:Body><ProvisionFreeTrialLicenseToAccount xmlns=\"http://tempuri.org/\"><authenticationToken>" + str + "</authenticationToken><platform>Android</platform></ProvisionFreeTrialLicenseToAccount></s:Body></s:Envelope>";
}
}