Commit 957005c6 authored by Quxl's avatar Quxl

x

parent a2c98628
...@@ -68,7 +68,7 @@ public class SI004INVENTORYSyncOutServiceTask { ...@@ -68,7 +68,7 @@ public class SI004INVENTORYSyncOutServiceTask {
File folder = jarFile.getParentFile(); File folder = jarFile.getParentFile();
String absolutePath = folder.getAbsolutePath(); String absolutePath = folder.getAbsolutePath();
String wsdlLocation = "file:///" + absolutePath + "/" + WSDLPATH + "/SI_004_INVENTORY_SyncOutService.wsdl"; String wsdlLocation = "file:///" + absolutePath + "/" + WSDLPATH + "/SI_004_INVENTORY_SyncOutService.wsdl";
SI004INVENTORYSyncOut service = ServiceFactory.create(SI004INVENTORYSyncOut.class, wsdlLocation, "http://distributors.edi.digital.cn.se.com", "SI_004_INVENTORY_SyncOutService", username, password); SI004INVENTORYSyncOut service = ServiceFactory.create(SI004INVENTORYSyncOut.class, wsdlLocation, SI004INVENTORYSyncOutService.SERVICE, SI004INVENTORYSyncOutService.HTTPPort, username, password);
this.sendData(service); this.sendData(service);
} }
......
...@@ -68,7 +68,7 @@ public class SI011ACTUALSALESSyncOutServiceTask { ...@@ -68,7 +68,7 @@ public class SI011ACTUALSALESSyncOutServiceTask {
File folder = jarFile.getParentFile(); File folder = jarFile.getParentFile();
String absolutePath = folder.getAbsolutePath(); String absolutePath = folder.getAbsolutePath();
String wsdlLocation = "file:///" + absolutePath + "/" + WSDLPATH + "/SI_011_ACTUAL_SALES_SyncOutService.wsdl"; String wsdlLocation = "file:///" + absolutePath + "/" + WSDLPATH + "/SI_011_ACTUAL_SALES_SyncOutService.wsdl";
SI011ACTUALSALESSyncOut service = ServiceFactory.create(SI011ACTUALSALESSyncOut.class, wsdlLocation, "http://distributors.edi.digital.cn.se.com", "SI_011_ACTUAL_SALES_SyncOutService", username, password); SI011ACTUALSALESSyncOut service = ServiceFactory.create(SI011ACTUALSALESSyncOut.class, wsdlLocation, SI011ACTUALSALESSyncOutService.SERVICE, SI011ACTUALSALESSyncOutService.HTTPPort, username, password);
this.sendData(service); this.sendData(service);
} }
......
...@@ -19,11 +19,11 @@ import com.egolm.sso.config.XRException; ...@@ -19,11 +19,11 @@ import com.egolm.sso.config.XRException;
public class ServiceFactory { public class ServiceFactory {
public static <T> T create(Class<T> requiredType, String wsdlLocation, String namespace, String serviceName, String username, String password) { public static <T> T create(Class<T> requiredType, String wsdlLocation, QName serviceQName, QName portQName, String username, String password) {
return create(requiredType, wsdlLocation, namespace, serviceName, username, password, PasswordType.PasswordText); return create(requiredType, wsdlLocation, serviceQName, portQName, username, password, PasswordType.PasswordText);
} }
public static <T> T create(Class<T> requiredType, String wsdlLocation, String namespace, String serviceName, String username, String password, PasswordType passwordType) { public static <T> T create(Class<T> requiredType, String wsdlLocation, QName serviceQName, QName portQName, String username, String password, PasswordType passwordType) {
try { try {
Map<String, Object> pro = new HashMap<String, Object>(); Map<String, Object> pro = new HashMap<String, Object>();
pro.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN); pro.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
...@@ -38,9 +38,8 @@ public class ServiceFactory { ...@@ -38,9 +38,8 @@ public class ServiceFactory {
} }
}); });
URL WSDL_URL = new URL(wsdlLocation); URL WSDL_URL = new URL(wsdlLocation);
QName qName = new QName(namespace, serviceName); Service dyService = Service.create(WSDL_URL, serviceQName);
Service dyService = Service.create(WSDL_URL, qName); T service = dyService.getPort(portQName, requiredType);
T service = dyService.getPort(requiredType);
ClientProxy.getClient(service).getOutInterceptors().add(new WSS4JOutInterceptor(pro)); ClientProxy.getClient(service).getOutInterceptors().add(new WSS4JOutInterceptor(pro));
return service; return service;
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
...@@ -48,12 +47,11 @@ public class ServiceFactory { ...@@ -48,12 +47,11 @@ public class ServiceFactory {
} }
} }
public static <T> T create(Class<T> requiredType, String wsdlLocation, String namespace, String serviceName) { public static <T> T create(Class<T> requiredType, String wsdlLocation, QName serviceQName, QName portQName) {
try { try {
URL WSDL_URL = new URL(wsdlLocation); URL WSDL_URL = new URL(wsdlLocation);
QName qName = new QName(namespace, serviceName); Service dyService = Service.create(WSDL_URL, serviceQName);
Service dyService = Service.create(WSDL_URL, qName); T service = dyService.getPort(portQName, requiredType);
T service = dyService.getPort(requiredType);
return service; return service;
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
throw new XRException(e); throw new XRException(e);
......
...@@ -67,7 +67,7 @@ public class ZMISD009SOCREATIONServiceTask { ...@@ -67,7 +67,7 @@ public class ZMISD009SOCREATIONServiceTask {
File folder = jarFile.getParentFile(); File folder = jarFile.getParentFile();
String absolutePath = folder.getAbsolutePath(); String absolutePath = folder.getAbsolutePath();
String wsdlLocation = "file:///" + absolutePath + "/" + WSDLPATH + "/Z_MI_SD_009_SO_CREATION.wsdl"; String wsdlLocation = "file:///" + absolutePath + "/" + WSDLPATH + "/Z_MI_SD_009_SO_CREATION.wsdl";
ZMISD009SOCREATION service = ServiceFactory.create(ZMISD009SOCREATION.class, wsdlLocation, "http://schneider-distributor.com/", "Z_MI_SD_009_SO_CREATIONService", username, password); ZMISD009SOCREATION service = ServiceFactory.create(ZMISD009SOCREATION.class, wsdlLocation, ZMISD009SOCREATIONService.SERVICE, ZMISD009SOCREATIONService.ZMISD009SOCREATIONPort, username, password);
this.sendData(service); this.sendData(service);
} }
......
...@@ -311,5 +311,11 @@ ...@@ -311,5 +311,11 @@
location="http://sapdpo00.cn.schneider-electric.com:50000/XISOAPAdapter/MessageServlet?senderParty=&amp;senderService=BC_DISTRIBUTORS_EDI&amp;receiverParty=&amp;receiverService=&amp;interface=SI_004_INVENTORY_SyncOut&amp;interfaceNamespace=http%3A%2F%2Fdistributors.edi.digital.cn.se.com" location="http://sapdpo00.cn.schneider-electric.com:50000/XISOAPAdapter/MessageServlet?senderParty=&amp;senderService=BC_DISTRIBUTORS_EDI&amp;receiverParty=&amp;receiverService=&amp;interface=SI_004_INVENTORY_SyncOut&amp;interfaceNamespace=http%3A%2F%2Fdistributors.edi.digital.cn.se.com"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" /> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
</wsdl:port> </wsdl:port>
<wsdl:port name="HTTPS_Port"
binding="p1:SI_004_INVENTORY_SyncOutBinding">
<soap:address
location="https://sapdpo00.cn.schneider-electric.com:50001/XISOAPAdapter/MessageServlet?senderParty=&amp;senderService=BC_DISTRIBUTORS_EDI&amp;receiverParty=&amp;receiverService=&amp;interface=SI_004_INVENTORY_SyncOut&amp;interfaceNamespace=http%3A%2F%2Fdistributors.edi.digital.cn.se.com"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
</wsdl:port>
</wsdl:service> </wsdl:service>
</wsdl:definitions> </wsdl:definitions>
\ No newline at end of file
...@@ -326,5 +326,11 @@ ...@@ -326,5 +326,11 @@
location="http://sapdpo00.cn.schneider-electric.com:50000/XISOAPAdapter/MessageServlet?senderParty=&amp;senderService=BC_DISTRIBUTORS_EDI&amp;receiverParty=&amp;receiverService=&amp;interface=SI_011_ACTUAL_SALES_SyncOut&amp;interfaceNamespace=http%3A%2F%2Fdistributors.edi.digital.cn.se.com" location="http://sapdpo00.cn.schneider-electric.com:50000/XISOAPAdapter/MessageServlet?senderParty=&amp;senderService=BC_DISTRIBUTORS_EDI&amp;receiverParty=&amp;receiverService=&amp;interface=SI_011_ACTUAL_SALES_SyncOut&amp;interfaceNamespace=http%3A%2F%2Fdistributors.edi.digital.cn.se.com"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" /> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
</wsdl:port> </wsdl:port>
<wsdl:port name="HTTPS_Port"
binding="p1:SI_011_ACTUAL_SALES_SyncOutBinding">
<soap:address
location="https://sapdpo00.cn.schneider-electric.com:50001/XISOAPAdapter/MessageServlet?senderParty=&amp;senderService=BC_DISTRIBUTORS_EDI&amp;receiverParty=&amp;receiverService=&amp;interface=SI_011_ACTUAL_SALES_SyncOut&amp;interfaceNamespace=http%3A%2F%2Fdistributors.edi.digital.cn.se.com"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
</wsdl:port>
</wsdl:service> </wsdl:service>
</wsdl:definitions> </wsdl:definitions>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="Z_MI_SD_009_SO_CREATION" targetNamespace="http://schneider-distributor.com/" xmlns:p1="http://schneider-distributor.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xsd:schema targetNamespace="http://schneider-distributor.com/" xmlns="http://schneider-distributor.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="Z_MT_SD_009_SO_CREATION" type="Z_DT_SD_009_SO_CREATION" />
<xsd:complexType name="Z_DT_SD_009_SO_CREATION">
<xsd:sequence>
<xsd:element name="Header">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">a3b37530b5ca11dbadee001641a70fb2</xsd:appinfo>
<xsd:documentation xml:lang="ZH">Header Line</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="BSTKD_E" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">a3b37531b5ca11dbafa9001641a70fb2</xsd:appinfo>
<xsd:documentation xml:lang="ZH">Customer purchase order number</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="36" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="VBELN" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">d7dd56f0b5ca11db8a66001641a70fb2</xsd:appinfo>
<xsd:documentation xml:lang="ZH">Quotation Number</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="10" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="BSTDK" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">d7dd56f1b5ca11dbad16001641a70fb2</xsd:appinfo>
<xsd:documentation xml:lang="ZH">PO Date</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="8" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="KUNNR" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">d7dd56f2b5ca11db954a001641a70fb2</xsd:appinfo>
<xsd:documentation xml:lang="ZH">Sold-to party</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="10" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="KGNNR" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">d7dd56f3b5ca11dbc0dc001641a70fb2</xsd:appinfo>
<xsd:documentation xml:lang="ZH">Ship-to party</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="10" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="QTFLAG" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">ebf40260b5ca11dbc7e0001641a70fb2</xsd:appinfo>
<xsd:documentation xml:lang="ZH">Quotation Flag</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ITEM" minOccurs="0" maxOccurs="unbounded" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">f60110b0b67711db827c001641a70fb2</xsd:appinfo>
<xsd:documentation xml:lang="ZH">ITEM DATA</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="POSNR" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">f60110b1b67711dba026001641a70fb2</xsd:appinfo>
<xsd:documentation xml:lang="ZH">Item number</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="6" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="VTEXT" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">f60110b2b67711dbc938001641a70fb2</xsd:appinfo>
<xsd:documentation xml:lang="ZH">Item number of the underlying customer purchase order</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="40" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="MATNR" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">f60110b3b67711dbc52c001641a70fb2</xsd:appinfo>
<xsd:documentation xml:lang="ZH">Material Number</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="18" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="KWMENG" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">f60110b4b67711db9a2b001641a70fb2</xsd:appinfo>
<xsd:documentation xml:lang="ZH">Quantity Quantity</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="15" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="EDATU" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">f60110b5b67711db9b3f001641a70fb2</xsd:appinfo>
<xsd:documentation xml:lang="ZH">Customer request delivery date</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="8" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="Z_MT_SD_009_SO_CREATION">
<wsdl:part name="Z_MT_SD_009_SO_CREATION" element="p1:Z_MT_SD_009_SO_CREATION" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" />
</wsdl:message>
<wsdl:portType name="Z_MI_SD_009_SO_CREATION">
<wsdl:operation name="Z_MI_SD_009_SO_CREATION">
<wsdl:input message="p1:Z_MT_SD_009_SO_CREATION" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="Z_MI_SD_009_SO_CREATIONBinding" type="p1:Z_MI_SD_009_SO_CREATION" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
<wsdl:operation name="Z_MI_SD_009_SO_CREATION">
<soap:operation soapAction="http://sap.com/xi/WebService/soap1.1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
<wsdl:input>
<soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Z_MI_SD_009_SO_CREATIONService">
<wsdl:port name="Z_MI_SD_009_SO_CREATIONPort" binding="p1:Z_MI_SD_009_SO_CREATIONBinding" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<soap:address location="http://xiprd:8000/sap/xi/engine?type=entry&amp;version=3.0&amp;Sender.Service=S000000002&amp;Interface=http%3A%2F%2Fschneider-distributor.com%2F%5EZ_MI_SD_009_SO_CREATION" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
\ No newline at end of file
package test;
import com.egolm.sso.clients.ServiceFactory;
import com.egolm.sso.services.confirm_quotation.ConfirmQuotationService;
import com.egolm.sso.services.confirm_quotation.Z_MT_SD_008_SO_CONFIRM_QUOTATION;
import com.egolm.sso.util.StringUtil;
import com.egolm.sso.util.XMLUtil;
public class ConfirmQuotationTest {
public static void main(String[] args) throws Exception {
String wsdlLocation = "http://localhost:8080/api/services/confirm_quotation?wsdl";
String namespace = "http://confirm_quotation.sso.egolm.com";
String serviceName = "ConfirmQuotationService";
ConfirmQuotationService service = ServiceFactory.create(ConfirmQuotationService.class, wsdlLocation, namespace, serviceName, "test", "", null);
String XML = StringUtil.readText("D:/data/sso/008-1.XML");
Z_MT_SD_008_SO_CONFIRM_QUOTATION Z_MT_SD_008_SO_CONFIRM_QUOTATION = XMLUtil.toBeanByJxab(XML, Z_MT_SD_008_SO_CONFIRM_QUOTATION.class);
service.execute(Z_MT_SD_008_SO_CONFIRM_QUOTATION);
}
}
package test;
import com.egolm.sso.clients.ServiceFactory;
import com.egolm.sso.services.dn_deletion.DELETED_DOCUMENTS;
import com.egolm.sso.services.dn_deletion.DNDeletionService;
import com.egolm.sso.util.StringUtil;
import com.egolm.sso.util.XMLUtil;
public class DeletionServiceTest {
public static void main(String[] args) throws Exception {
String wsdlLocation = "http://localhost:8080/api/services/dn_deletion?wsdl";
String namespace = "http://dn_deletion.sso.egolm.com";
String serviceName = "DNDeletionService";
DNDeletionService service = ServiceFactory.create(DNDeletionService.class, wsdlLocation, namespace, serviceName, "test", "", null);
String XML = StringUtil.readText("D:/data/sso/010.XML");
DELETED_DOCUMENTS DELETED_DOCUMENTS = XMLUtil.toBeanByJxab(XML, DELETED_DOCUMENTS.class);
service.execute(DELETED_DOCUMENTS);
}
}
package test;
import java.io.File;
import com.egolm.sso.services.material_master.Z_MT_SD_001_MATERIAL_MASTER;
import com.egolm.sso.util.DateUtil;
import com.egolm.sso.util.StringUtil;
import com.egolm.sso.util.XMLUtil;
public class MaterialMasterServiceErrorTest {
// public static void main(String[] args) throws Exception {
// String wsdlLocation = "http://10.204.15.9:8080/api/services/material_master?wsdl";
// String namespace = "http://material_master.sso.egolm.com";
// String serviceName = "MaterialMasterService";
// MaterialMasterService service = ServiceFactory.create(MaterialMasterService.class, wsdlLocation, namespace, serviceName);
// File folder = new File("C:\\Users\\Quxl\\Desktop\\error");
// File[] files = folder.listFiles();
// for(File file : files) {
// String XML = StringUtil.readText(file);
// Z_MT_SD_001_MATERIAL_MASTER Z_MT_SD_001_MATERIAL_MASTER = XMLUtil.toBeanByJxab(XML, Z_MT_SD_001_MATERIAL_MASTER.class);
// Z_MT_SD_001_MATERIAL_MASTER.getRECORD().getHEADER_SENDING().getDATUM();
// service.execute(Z_MT_SD_001_MATERIAL_MASTER);
// }
// }
public static void main(String[] args) throws Exception {
File folder = new File("C:\\Users\\Quxl\\Desktop\\error");
File[] files = folder.listFiles();
for(File file : files) {
try {
System.out.print(file.getName());
String XML = StringUtil.readText(file);
Z_MT_SD_001_MATERIAL_MASTER Z_MT_SD_001_MATERIAL_MASTER = XMLUtil.toBeanByJxab(XML, Z_MT_SD_001_MATERIAL_MASTER.class);
String dateString = Z_MT_SD_001_MATERIAL_MASTER.getRECORD().getHEADER_SENDING().getDATUM();
System.out.println("----------" + DateUtil.parseDate(dateString, DateUtil.FMT_DATE) );
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
This diff is collapsed.
package test;
import java.io.File;
import java.net.URL;
import org.springframework.boot.system.ApplicationHome;
import com.egolm.sso.clients.Z_MI_SD_009_SO_CREATION.ZDTSD009SOCREATION;
import com.egolm.sso.clients.Z_MI_SD_009_SO_CREATION.ZMISD009SOCREATION;
import com.egolm.sso.clients.Z_MI_SD_009_SO_CREATION.ZMISD009SOCREATIONService;
public class OSCreationServiceTest {
public static void main(String[] args) throws Exception {
ApplicationHome home = new ApplicationHome(OSCreationServiceTest.class);
File jarFile = home.getSource();
File folder = jarFile.getParentFile();
String absolutePath = folder.getAbsolutePath();
String wsdlLocation = "file://////" + absolutePath + "/wsdl/Z_MI_SD_009_SO_CREATION.wsdl";
System.out.println(wsdlLocation);
ZMISD009SOCREATIONService service = new ZMISD009SOCREATIONService(new URL(wsdlLocation));
ZMISD009SOCREATION ZMISD009SOCREATION = service.getZMISD009SOCREATIONPort();
ZMISD009SOCREATION.zMISD009SOCREATION(getZMTSD009SOCREATION());
}
private static ZDTSD009SOCREATION getZMTSD009SOCREATION() {
return null;
}
}
package test;
import com.egolm.sso.clients.ServiceFactory;
import com.egolm.sso.services.prforma_invoice.PrformaInvoiceService;
import com.egolm.sso.services.prforma_invoice.Z_MT_SD_005_PERFORM_INVOICE;
import com.egolm.sso.util.StringUtil;
import com.egolm.sso.util.XMLUtil;
public class PrformaInvoiceServiceTest {
public static void main(String[] args) throws Exception {
String wsdlLocation = "http://localhost:8080/api/services/prforma_invoice?wsdl";
String namespace = "http://prforma_invoice.sso.egolm.com";
String serviceName = "PrformaInvoiceService";
PrformaInvoiceService service = ServiceFactory.create(PrformaInvoiceService.class, wsdlLocation, namespace, serviceName, "test", "");
String XML = StringUtil.readText("D:/data/sso/005.XML");
Z_MT_SD_005_PERFORM_INVOICE Z_MT_SD_005_PERFORM_INVOICE = XMLUtil.toBeanByJxab(XML, Z_MT_SD_005_PERFORM_INVOICE.class);
service.execute(Z_MT_SD_005_PERFORM_INVOICE);
}
}
package test;
import com.egolm.sso.clients.ServiceFactory;
import com.egolm.sso.services.price_list.PriceListService;
import com.egolm.sso.services.price_list.Z_MT_SD_002_PRICE_LIST;
import com.egolm.sso.util.StringUtil;
import com.egolm.sso.util.XMLUtil;
public class PriceListServiceTest {
public static void main(String[] args) throws Exception {
String wsdlLocation = "http://localhost:8080/api/services/price_list?wsdl";
String namespace = "http://price_list.sso.egolm.com";
String serviceName = "PriceListService";
PriceListService service = ServiceFactory.create(PriceListService.class, wsdlLocation, namespace, serviceName, "test", "");
String XML = StringUtil.readText("D:/data/sso/002.XML");
Z_MT_SD_002_PRICE_LIST Z_MT_SD_002_PRICE_LIST = XMLUtil.toBeanByJxab(XML, Z_MT_SD_002_PRICE_LIST.class);
service.execute(Z_MT_SD_002_PRICE_LIST);
}
}
package test;
import com.egolm.sso.clients.ServiceFactory;
import com.egolm.sso.services.shipping_notfirmation.ShippingNotificationService;
import com.egolm.sso.services.shipping_notfirmation.Z_MT_SD_007_SHIPPING_NOTFIRMATION_FILE;
import com.egolm.sso.util.StringUtil;
import com.egolm.sso.util.XMLUtil;
public class ShippingNotificationTest {
public static void main(String[] args) throws Exception {
String wsdlLocation = "http://localhost:8080/api/services/shipping_notification?wsdl";
String namespace = "http://shipping_notfirmation.sso.egolm.com";
String serviceName = "ShippingNotificationService";
ShippingNotificationService service = ServiceFactory.create(ShippingNotificationService.class, wsdlLocation, namespace, serviceName, "test", "");
String XML = StringUtil.readText("D:/data/sso/007.XML");
Z_MT_SD_007_SHIPPING_NOTFIRMATION_FILE Z_MT_SD_007_SHIPPING_NOTFIRMATION_FILE = XMLUtil.toBeanByJxab(XML, Z_MT_SD_007_SHIPPING_NOTFIRMATION_FILE.class);
service.execute(Z_MT_SD_007_SHIPPING_NOTFIRMATION_FILE);
}
}
package test;
import java.util.Date;
import java.util.TimeZone;
import com.egolm.sso.util.DateUtil;
public class Test {
public static void main(String[] args) {
TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
System.out.println(TimeZone.getDefault());
System.out.println(DateUtil.formatDate(new Date(), "yyyy-MM-dd HH:mm:ss"));
}
}
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