111 lines
4.6 KiB
Java
111 lines
4.6 KiB
Java
|
package com.kofax.kmc.klo.logistics.service;
|
||
|
|
||
|
import com.kofax.kmc.klo.logistics.webservice.KofaxWebServiceResponseBase;
|
||
|
import com.kofax.kmc.klo.logistics.webservice.calls.KofaxWebServiceCallBase;
|
||
|
import com.kofax.kmc.kut.utilities.CertificateValidatorListener;
|
||
|
import com.kofax.mobile.sdk._internal.k;
|
||
|
import com.kofax.mobile.sdk.ak.d;
|
||
|
import java.util.List;
|
||
|
import o.C15280gmP;
|
||
|
import o.C15281gmQ;
|
||
|
import o.InterfaceC15276gmJ;
|
||
|
import o.gjJ;
|
||
|
import o.gmO;
|
||
|
import o.gmY;
|
||
|
|
||
|
/* loaded from: classes3.dex */
|
||
|
public class KofaxWebServiceConnectorService {
|
||
|
public static KofaxWebServiceResponseBase executeKMSSoapCall(KofaxWebServiceCallBase kofaxWebServiceCallBase) throws Exception {
|
||
|
return kofaxWebServiceCallBase.populateFromResponse(executeKMSSoapCall(kofaxWebServiceCallBase.getNamespace(), kofaxWebServiceCallBase.getMethodName(), kofaxWebServiceCallBase.getServiceCall(), kofaxWebServiceCallBase.getSoapAction(), kofaxWebServiceCallBase.getParamNames(), kofaxWebServiceCallBase.getParamValues(), kofaxWebServiceCallBase.getCertificateValidatorListener()));
|
||
|
}
|
||
|
|
||
|
public static gmO executeKMSSoapCall(String str, String str2, String str3, String str4, List<String> list, List<Object> list2, CertificateValidatorListener certificateValidatorListener) throws Exception {
|
||
|
try {
|
||
|
C15280gmP c15280gmP = new C15280gmP();
|
||
|
c15280gmP.f = true;
|
||
|
gmO gmo = new gmO(str, str2);
|
||
|
for (int i = 0; i < list.size(); i++) {
|
||
|
Object obj = list2.get(i);
|
||
|
String str5 = list.get(i);
|
||
|
if (obj instanceof InterfaceC15276gmJ) {
|
||
|
C15281gmQ c15281gmQ = new C15281gmQ();
|
||
|
c15281gmQ.m = str5;
|
||
|
c15281gmQ.l = str;
|
||
|
c15281gmQ.a(obj);
|
||
|
gmo.b.addElement(c15281gmQ);
|
||
|
} else {
|
||
|
gmo.d(str5, obj.toString());
|
||
|
}
|
||
|
}
|
||
|
c15280gmP.b(gmo);
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
sb.append("nameSpace -> ");
|
||
|
sb.append(str);
|
||
|
k.b("KofaxWebServiceConnectorService.executeKMSSoapCall", sb.toString());
|
||
|
StringBuilder sb2 = new StringBuilder();
|
||
|
sb2.append("methodName -> ");
|
||
|
sb2.append(str2);
|
||
|
k.b("KofaxWebServiceConnectorService.executeKMSSoapCall", sb2.toString());
|
||
|
StringBuilder sb3 = new StringBuilder();
|
||
|
sb3.append("serviceUrl -> ");
|
||
|
sb3.append(str3);
|
||
|
k.b("KofaxWebServiceConnectorService.executeKMSSoapCall", sb3.toString());
|
||
|
StringBuilder sb4 = new StringBuilder();
|
||
|
sb4.append("soapAction -> ");
|
||
|
sb4.append(str4);
|
||
|
k.b("KofaxWebServiceConnectorService.executeKMSSoapCall", sb4.toString());
|
||
|
gmY a = d.a(str3, certificateValidatorListener);
|
||
|
a.e(str4, c15280gmP);
|
||
|
StringBuilder sb5 = new StringBuilder();
|
||
|
sb5.append("requestDump -> ");
|
||
|
sb5.append(a.f);
|
||
|
k.b("KofaxWebServiceConnectorService.executeKMSSoapCall", sb5.toString());
|
||
|
StringBuilder sb6 = new StringBuilder();
|
||
|
sb6.append("responseDump -> ");
|
||
|
sb6.append(a.g);
|
||
|
k.b("KofaxWebServiceConnectorService.executeKMSSoapCall", sb6.toString());
|
||
|
return (gmO) c15280gmP.a();
|
||
|
} catch (Exception e) {
|
||
|
StringBuilder sb7 = new StringBuilder("Error executing soap call. nameSpace -> ");
|
||
|
sb7.append(str);
|
||
|
sb7.append(", methodName -> ");
|
||
|
sb7.append(str2);
|
||
|
sb7.append(", serviceUrl -> ");
|
||
|
sb7.append(str3);
|
||
|
throw new Exception(sb7.toString(), e);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static String getVerySafeSoapProperty(gmO gmo, String str, String str2) {
|
||
|
Integer num;
|
||
|
if (str != null) {
|
||
|
for (int i = 0; i < gmo.b.size(); i++) {
|
||
|
try {
|
||
|
if (str.equals(((C15281gmQ) gmo.b.elementAt(i)).m)) {
|
||
|
num = Integer.valueOf(i);
|
||
|
break;
|
||
|
}
|
||
|
} catch (Exception unused) {
|
||
|
return str2;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
num = null;
|
||
|
String str3 = "";
|
||
|
if (num != null) {
|
||
|
Object property = gmo.getProperty(num.intValue());
|
||
|
if (property != null) {
|
||
|
str3 = property.toString();
|
||
|
}
|
||
|
} else if (str2 != null) {
|
||
|
str3 = str2.toString();
|
||
|
}
|
||
|
if (!gjJ.b((CharSequence) str3)) {
|
||
|
if (str3.equals("anyType{}")) {
|
||
|
return str2;
|
||
|
}
|
||
|
}
|
||
|
return str3;
|
||
|
}
|
||
|
}
|