Commit 91bf6c59 authored by Quxl's avatar Quxl

x

parent 957005c6
......@@ -18,6 +18,7 @@ import org.springframework.stereotype.Component;
import com.alibaba.fastjson.JSONObject;
import com.egolm.sso.clients.ServiceFactory;
import com.egolm.sso.clients.ServiceFactory.PasswordType;
import com.egolm.sso.config.XRException;
import com.egolm.sso.services.CommonService;
import com.egolm.sso.services.TraceService;
......@@ -68,7 +69,7 @@ public class SI004INVENTORYSyncOutServiceTask {
File folder = jarFile.getParentFile();
String absolutePath = folder.getAbsolutePath();
String wsdlLocation = "file:///" + absolutePath + "/" + WSDLPATH + "/SI_004_INVENTORY_SyncOutService.wsdl";
SI004INVENTORYSyncOut service = ServiceFactory.create(SI004INVENTORYSyncOut.class, wsdlLocation, SI004INVENTORYSyncOutService.SERVICE, SI004INVENTORYSyncOutService.HTTPPort, username, password);
SI004INVENTORYSyncOut service = ServiceFactory.create(SI004INVENTORYSyncOut.class, wsdlLocation, SI004INVENTORYSyncOutService.SERVICE, SI004INVENTORYSyncOutService.HTTPPort, username, password, PasswordType.PasswordText);
this.sendData(service);
}
......
......@@ -18,6 +18,7 @@ import org.springframework.stereotype.Component;
import com.alibaba.fastjson.JSONObject;
import com.egolm.sso.clients.ServiceFactory;
import com.egolm.sso.clients.ServiceFactory.PasswordType;
import com.egolm.sso.config.XRException;
import com.egolm.sso.services.CommonService;
import com.egolm.sso.services.TraceService;
......@@ -68,7 +69,7 @@ public class SI011ACTUALSALESSyncOutServiceTask {
File folder = jarFile.getParentFile();
String absolutePath = folder.getAbsolutePath();
String wsdlLocation = "file:///" + absolutePath + "/" + WSDLPATH + "/SI_011_ACTUAL_SALES_SyncOutService.wsdl";
SI011ACTUALSALESSyncOut service = ServiceFactory.create(SI011ACTUALSALESSyncOut.class, wsdlLocation, SI011ACTUALSALESSyncOutService.SERVICE, SI011ACTUALSALESSyncOutService.HTTPPort, username, password);
SI011ACTUALSALESSyncOut service = ServiceFactory.create(SI011ACTUALSALESSyncOut.class, wsdlLocation, SI011ACTUALSALESSyncOutService.SERVICE, SI011ACTUALSALESSyncOutService.HTTPPort, username, password, PasswordType.PasswordText);
this.sendData(service);
}
......
......@@ -19,10 +19,6 @@ import com.egolm.sso.config.XRException;
public class ServiceFactory {
public static <T> T create(Class<T> requiredType, String wsdlLocation, QName serviceQName, QName portQName, String username, String password) {
return create(requiredType, wsdlLocation, serviceQName, portQName, username, password, PasswordType.PasswordText);
}
public static <T> T create(Class<T> requiredType, String wsdlLocation, QName serviceQName, QName portQName, String username, String password, PasswordType passwordType) {
try {
Map<String, Object> pro = new HashMap<String, Object>();
......@@ -47,17 +43,6 @@ public class ServiceFactory {
}
}
public static <T> T create(Class<T> requiredType, String wsdlLocation, QName serviceQName, QName portQName) {
try {
URL WSDL_URL = new URL(wsdlLocation);
Service dyService = Service.create(WSDL_URL, serviceQName);
T service = dyService.getPort(portQName, requiredType);
return service;
} catch (MalformedURLException e) {
throw new XRException(e);
}
}
public enum PasswordType {
PasswordText, PasswordNone, PasswordDigest
}
......
......@@ -17,6 +17,7 @@ import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import com.egolm.sso.clients.ServiceFactory;
import com.egolm.sso.clients.ServiceFactory.PasswordType;
import com.egolm.sso.clients.Z_MI_SD_009_SO_CREATION.ZDTSD009SOCREATION.Header;
import com.egolm.sso.clients.Z_MI_SD_009_SO_CREATION.ZDTSD009SOCREATION.ITEM;
import com.egolm.sso.config.XRException;
......@@ -67,7 +68,7 @@ public class ZMISD009SOCREATIONServiceTask {
File folder = jarFile.getParentFile();
String absolutePath = folder.getAbsolutePath();
String wsdlLocation = "file:///" + absolutePath + "/" + WSDLPATH + "/Z_MI_SD_009_SO_CREATION.wsdl";
ZMISD009SOCREATION service = ServiceFactory.create(ZMISD009SOCREATION.class, wsdlLocation, ZMISD009SOCREATIONService.SERVICE, ZMISD009SOCREATIONService.ZMISD009SOCREATIONPort, username, password);
ZMISD009SOCREATION service = ServiceFactory.create(ZMISD009SOCREATION.class, wsdlLocation, ZMISD009SOCREATIONService.SERVICE, ZMISD009SOCREATIONService.ZMISD009SOCREATIONPort, username, password, PasswordType.PasswordText);
this.sendData(service);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment