ERP接口调用公共方法。

Leon 4 years ago
parent d019920fd1
commit 7152bfc137

@ -26,7 +26,7 @@ public class ERPAPI {
String server = System.getProperty("ws.erp.server");
String port = System.getProperty("ws.erp.port");
return String.format("http://%s:%s/sap/bc/srt/wsdl/bndg_4DF8E6609FB5BB55E1000000AC10FBDF/wsdl11/allinone/ws_policy/document?sap-client=302", server, port);
return String.format("http://%s:%s/sap/bc/srt/rfc/sap/zws_zmes_prodordconf/302/zws_zmes_prodordconf/zws_zmes_prodordconf", server, port);
}
public static void apply(Object stubImpl) {

@ -1,7 +1,9 @@
package com.foreverwin.mesnac.console;
import com.foreverwin.mesnac.common.erp.ZprodordconfStruIn;
import com.foreverwin.mesnac.common.erp.ZprodordconfStruOut;
import com.foreverwin.mesnac.common.erp.holders.TableOfZprodordconfStruInHolder;
import com.foreverwin.mesnac.common.erp.holders.TableOfZprodordconfStruOutHolder;
import com.foreverwin.mesnac.common.util.ERPAPI;
import org.junit.Test;
import org.junit.runner.RunWith;
@ -40,9 +42,15 @@ public class TmdMc {
struIn.setIsm05(new BigDecimal(1));
struIn.setIsm06(new BigDecimal(1));
ZprodordconfStruIn [] zprodordconfStruIns = new ZprodordconfStruIn[]{struIn};
TableOfZprodordconfStruInHolder inHolder = new TableOfZprodordconfStruInHolder(zprodordconfStruIns);
String erpJson = ERPAPI.erpWebService().zmesProdordconf(inHolder, null);
ZprodordconfStruIn [] ins = new ZprodordconfStruIn[0];
ins[0] = struIn;
TableOfZprodordconfStruInHolder inHolder = new TableOfZprodordconfStruInHolder(ins);
//返回对象
ZprodordconfStruOut[] outs = new ZprodordconfStruOut[0];
outs[0] = new ZprodordconfStruOut();
TableOfZprodordconfStruOutHolder outHolder = new TableOfZprodordconfStruOutHolder(outs);
String erpJson = ERPAPI.erpWebService().zmesProdordconf(inHolder, outHolder);
System.out.println("ERP接口返回" + erpJson);
}
}

Loading…
Cancel
Save