public String disableSaleOut(JSONObject jsonObject)
throws ServiceException, MalformedURLException, RemoteException {
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String operateDate=sdf.format(new Date());
Map map = new HashMap();
map.put("orderCode", jsonObject.get("DocumentNumber"));
map.put("operateDate", operateDate);
String returnVaule = "";
net.sf.json.JSONObject json = net.sf.json.JSONObject.fromObject(map);
org.apache.axis.client.Service service = new org.apache.axis.client.Service();
String endpoint = SaleOutInfo_endpoint;
String namespace = SaleOutInfo_namespace;
String methodName = DisableSaleOut_methodName;
Call call = null;
try {
call = (Call) service.createCall();
} catch (ServiceException e1) {
e1.printStackTrace();
}
try {
call.setTargetEndpointAddress(new java.net.URL(endpoint));
} catch (MalformedURLException e1) {
e1.printStackTrace();
}
call.setUseSOAPAction(true);
call.setSOAPActionURI("");
call.setOperationName(new QName(namespace, methodName));
call.addParameter(new javax.xml.namespace.QName(namespace, "param"),
org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN);// document访问格式,必须
try {
Object[] cs = new Object[1]; // 参数
cs[0] = json.toString();
returnVaule = (String) call.invoke(cs);
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return returnVaule;
}