TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAisMetaMctServerproductinfoRequest req = new AlibabaAisMetaMctServerproductinfoRequest();
AlibabaAisMetaMctServerproductinfoRequest.MctCaptureParam obj1 = new AlibabaAisMetaMctServerproductinfoRequest.MctCaptureParam();
obj1.setResult("Pass");
obj1.setDirectiveNumber("001");
obj1.setModel("F41.22.CYXXXX");
obj1.setNodeSn("20171123001");
obj1.setForm("2U1");
obj1.setParam("{\"timeout\":200}");
obj1.setRequestId("001");
obj1.setChassisSn("20171123001");
obj1.setOssFileKey("xxxx/ato/xxx/34567_AOI.txt");
obj1.setStationId(1L);
obj1.setVersion("{\"main_version\": \"001\"}");
obj1.setMessage("power failed");
obj1.setBoardSn("20171123001");
obj1.setFinishedTime(StringUtils.parseDateTime("2016-11-01 10:16:00"));
obj1.setMct("F41");
obj1.setBrand("Huawei");
obj1.setStationName("AOI");
obj1.setWorkorderId("XXX-001");
obj1.setManufacturerName("浪潮顺达");
obj1.setStartedTime(StringUtils.parseDateTime("2016-11-01 10:16:00"));
obj1.setType("MOC");
List<AlibabaAisMetaMctServerproductinfoRequest.TestCaseResultDto> list3 = new ArrayList<AlibabaAisMetaMctServerproductinfoRequest.TestCaseResultDto>();
AlibabaAisMetaMctServerproductinfoRequest.TestCaseResultDto obj4 = new AlibabaAisMetaMctServerproductinfoRequest.TestCaseResultDto();
list3.add(obj4);
obj4.setTestCase("CPU TEST");
obj4.setResult("Pass");
obj4.setErrorModel("CPU");
obj4.setErrorModelPnList("MG06ACA800E");
obj4.setErrorModelSnList("7930A02JFLFF");
obj4.setErrorMsg("CPU FAIL");
obj4.setStartedTime(StringUtils.parseDateTime("2016-11-01 10:16:00"));
obj4.setFinishedTime(StringUtils.parseDateTime("2016-11-01 10:18:00"));
obj1.setTestCaseResultList(list3);
req.setMctCaptureParam(obj1);
AlibabaAisMetaMctServerproductinfoResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaAisMetaMctServerproductinfoRequest req = new AlibabaAisMetaMctServerproductinfoRequest();
AlibabaAisMetaMctServerproductinfoRequest.MctCaptureParamDomain obj1 = new AlibabaAisMetaMctServerproductinfoRequest.MctCaptureParamDomain();
obj1.Result = "Pass";
obj1.DirectiveNumber = "001";
obj1.Model = "F41.22.CYXXXX";
obj1.NodeSn = "20171123001";
obj1.Form = "2U1";
obj1.Param = "{\"timeout\":200}";
obj1.RequestId = "001";
obj1.ChassisSn = "20171123001";
obj1.OssFileKey = "xxxx/ato/xxx/34567_AOI.txt";
obj1.StationId = 1L;
obj1.Version = "{\"main_version\": \"001\"}";
obj1.Message = "power failed";
obj1.BoardSn = "20171123001";
obj1.FinishedTime = DateTime.Parse(2016-11-01 10:16:00");
obj1.Mct = "F41";
obj1.Brand = "Huawei";
obj1.StationName = "AOI";
obj1.WorkorderId = "XXX-001";
obj1.ManufacturerName = "浪潮顺达";
obj1.StartedTime = DateTime.Parse(2016-11-01 10:16:00");
obj1.Type = "MOC";
List<AlibabaAisMetaMctServerproductinfoRequest.TestCaseResultDtoDomain> list3 = new List<AlibabaAisMetaMctServerproductinfoRequest.TestCaseResultDtoDomain>();
AlibabaAisMetaMctServerproductinfoRequest.TestCaseResultDtoDomain obj4 = new AlibabaAisMetaMctServerproductinfoRequest.TestCaseResultDtoDomain();
list3.Add(obj4);
obj4.TestCase = "CPU TEST";
obj4.Result = "Pass";
obj4.ErrorModel = "CPU";
obj4.ErrorModelPnList = "MG06ACA800E";
obj4.ErrorModelSnList = "7930A02JFLFF";
obj4.ErrorMsg = "CPU FAIL";
obj4.StartedTime = DateTime.Parse(2016-11-01 10:16:00");
obj4.FinishedTime = DateTime.Parse(2016-11-01 10:18:00");
obj1.TestCaseResultList= list3;
req.MctCaptureParam_ = obj1;
AlibabaAisMetaMctServerproductinfoResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaAisMetaMctServerproductinfoRequest;
$mct_capture_param = new MctCaptureParam;
$mct_capture_param->result="Pass";
$mct_capture_param->directive_number="001";
$mct_capture_param->model="F41.22.CYXXXX";
$mct_capture_param->node_sn="20171123001";
$mct_capture_param->form="2U1";
$mct_capture_param->param="{\"timeout\":200}";
$mct_capture_param->request_id="001";
$mct_capture_param->chassis_sn="20171123001";
$mct_capture_param->oss_file_key="xxxx/ato/xxx/34567_AOI.txt";
$mct_capture_param->station_id="1";
$mct_capture_param->version="{\"main_version\": \"001\"}";
$mct_capture_param->message="power failed";
$mct_capture_param->board_sn="20171123001";
$mct_capture_param->finished_time="2016-11-01 10:16:00";
$mct_capture_param->mct="F41";
$mct_capture_param->brand="Huawei";
$mct_capture_param->station_name="AOI";
$mct_capture_param->workorder_id="XXX-001";
$mct_capture_param->manufacturer_name="浪潮顺达";
$mct_capture_param->started_time="2016-11-01 10:16:00";
$mct_capture_param->type="MOC";
$test_case_result_list = new TestCaseResultDto;
$test_case_result_list->test_case="CPU TEST";
$test_case_result_list->result="Pass";
$test_case_result_list->error_model="CPU";
$test_case_result_list->error_model_pn_list="[MG06ACA800E]";
$test_case_result_list->error_model_sn_list="[7930A02JFLFF]";
$test_case_result_list->error_msg="CPU FAIL";
$test_case_result_list->started_time="2016-11-01 10:16:00";
$test_case_result_list->finished_time="2016-11-01 10:18:00";
$mct_capture_param->test_case_result_list = $test_case_result_list;
$req->setMctCaptureParam(json_encode($mct_capture_param));
$resp = $c->execute($req);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=alibaba.ais.meta.mct.serverproductinfo' \
-d 'partner_id=apidoc' \
-d 'sign=404E3498C1DC334D24095FD77E41A001' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-29+17%3A46%3A29' \
-d 'v=2.0' \
-d 'mct_capture_param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaAisMetaMctServerproductinfoRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.mct_capture_param=""
try:
resp= req.getResponse()
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"alibaba.ais.meta.mct.serverproductinfo");
add_param(pRequest,"mct_capture_param","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,NULL);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('alibaba.ais.meta.mct.serverproductinfo', {
'mct_capture_param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})