String apiKey="key*****";
com.kjy.client2.InOrder inOrder=new com.kjy.client2.InOrder();
inOrder.setSourceId("856387356565");
inOrder.setCreateMode("0");
inOrder.setOrderType("1");
inOrder.setIsUrgent("0");
inOrder.setIsLocked("0");
inOrder.setPaymentMethod("0");
inOrder.setFlag("0");
inOrder.setWarehouseCode("lhc");
inOrder.setWarehouseName("流花仓");
inOrder.setWarehouseAddressName("广东省广州市南沙区");
inOrder.setWarehouseStreet("测试流花仓");
inOrder.setWarehouseContact("lee");
inOrder.setWarehouseContactTelephone("02089399334434");
inOrder.setVendorCode("msd");
inOrder.setCreateUserName("lee");
inOrder.setShipper("56");
inOrder.setShipperCountryCode("CN");
inOrder.setShipperAddressId("CN");
inOrder.setShipperAddressName("某某村");
inOrder.setShipperStreet("某某村");
inOrder.setShipperProvince("广东省");
inOrder.setShipperCity("广东市");
inOrder.setShipperArea("天河区");
inOrder.setShipperContact("xiaoxu");
inOrder.setShipperContactTelephone("12345");
inOrder.setShipperContactMobile("123456");
inOrder.setShipperContactEmail("123456@qq.com");
inOrder.setLicensePlate("粤B123455");
inOrder.setReceivedQty(0);
inOrder.setTotalQty(5);
inOrder.setTotalVol(6.0);
inOrder.setTotalPrice(1.2);
inOrder.setInBatchNo("196941654");
inOrder.setTransportationType("1");
inOrder.setPickWeight(10.0);
inOrder.setPickPrice(10.0);
inOrder.setPackingNo("10");
inOrder.setCardBoard(10L);
com.kjy.client2.InOrderCargo
inOrderCargo=new com.kjy.client2.InOrderCargo();
inOrderCargo.setProductCode("msdshangpin01");
inOrderCargo.setPlanQty(10);
inOrderCargo.setUnreceiveQty(0);
inOrderCargo.setReceivedQty(0);
inOrderCargo.setUnitPrice(10.11);
inOrderCargo.setSubtotalPrice(10.0);
List<com.kjy.client2.InOrderCargo>
orderCargoList=new ArrayList<com.kjy.client2.InOrderCargo>();
orderCargoList.add(inOrderCargo);
inOrder.setOrderCargoList(orderCargoList);
com.kjy.client2.OrderWS query = (com.kjy.client2.OrderWS)
getWSObject(http://store.kjy.cn/ecscm/services/orderService?wsdl");
com.kjy.client2.Result
resutl=query.addInOrder(apiKey, inOrder);
System.out.println(resutl.isIsSuccess()+">>"+
resutl.getErrorCode()+">>>"+resutl.getMsg());
InOrder inOrder = new InOrder();
inOrder.id = string.Empty;
inOrder.createMode = string.Empty;
inOrder.sourceId = string.Empty;
inOrder.orderType = string.Empty;
inOrder.isUrgent = string.Empty;
inOrder.isLocked = string.Empty;
inOrder.paymentMethod = string.Empty;
inOrder.flag = string.Empty;
inOrder.warehouseId = string.Empty;
inOrder.warehouseCode = string.Empty;
inOrder.warehouseName = string.Empty;
inOrder.warehouseAddressName = string.Empty;
inOrder.warehouseStreet = string.Empty;
inOrder.warehouseContact = string.Empty;
inOrder.warehouseContactTelephone = string.Empty;
inOrder.warehouseContactMobile = string.Empty;
inOrder.vendorId = string.Empty;
inOrder.vendorCode = string.Empty;
inOrder.vendorName = string.Empty;
inOrder.createUserName = string.Empty;
inOrder.createTime = DateTime.Now;
inOrder.planArriveTime = DateTime.Now;
inOrder.shipper = string.Empty;
inOrder.shipperCountryCode = string.Empty;
inOrder.shipperAddressId = string.Empty;
inOrder.shipperAddressName = string.Empty;
inOrder.shipperStreet = string.Empty;
inOrder.shipperProvince = string.Empty;
inOrder.shipperCity = string.Empty;
inOrder.shipperArea = string.Empty;
inOrder.shipperContact = string.Empty;
inOrder.shipperContactTelephone = string.Empty;
inOrder.shipperContactMobile = string.Empty;
inOrder.shipperContactEmail = string.Empty;
inOrder.licensePlate = string.Empty;
inOrder.driver = string.Empty;
inOrder.driverMobile = string.Empty;
inOrder.receivedQty = 1;
inOrder.totalQty = 1;
inOrder.totalVol = 1;
inOrder.totalWeight = 1;
inOrder.totalPrice = 1;
inOrder.memo = string.Empty;
inOrder.communicateMemo = string.Empty;
inOrder.inBatchNo = string.Empty;
inOrder.transportationType = string.Empty;
inOrder.pickWeight = 1;
inOrder.pickPrice = 1;
inOrder.packingNo = string.Empty;
inOrder.cardBoard = 1;
inOrder.box = 1;
inOrder.declarationDate = DateTime.Now;
inOrder.customsDeclaration = string.Empty;
inOrder.isPackagingMaterials = string.Empty;
List<InOrderCargo> inOrderCargos = new List<InOrderCargo>();
InOrderCargo inOrderCargo = new InOrderCargo();
inOrderCargo.productId = string.Empty;
inOrderCargo.productCode = string.Empty;
inOrderCargo.productName = string.Empty;
inOrderCargo.barcode = string.Empty;
inOrderCargo.planQty = 1;
inOrderCargo.unreceiveQty = 1;
inOrderCargo.receivedQty = 1;
inOrderCargo.unitPrice = 1;
inOrderCargo.subtotalPrice = 1;
inOrder.orderCargoList = inOrderCargos.ToArray();
WarehouseService.OrderWSClient wsClient = new WarehouseService.OrderWSClient();
StockDemo.WarehouseService.Result result = wsClient.addInOrder("apiKey", inOrder);
if (result.isSuccess)
{
true
}
else
{
false
}