同步事件发布
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
trigger_code | String | 必须 | AAAAAAGGCxGWPSEFYr2ABCAC | 事件编码 | |
content | Json | 必须 | { "tradeId": "12345678", "buyAmount": "1", "auctionTitle": "商品标题" } | 事件内容 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
data | EventPublishResponse | 事件返回值 | |
|
1 2 3 4 5 6 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); TopEventPublishRequest req = new TopEventPublishRequest(); req.setTriggerCode( "AAAAAAGGCxGWPSEFYr2ABCAC" ); req.setContentString( "{ \"tradeId\": \"12345678\", \"buyAmount\": \"1\", \"auctionTitle\": \"商品标题\" }" ); TopEventPublishResponse rsp = client.execute(req, sessionKey); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | < top_event_publish_response > < data > < response_list > < process_response > < process_instance_id >f8f622f6-b784-4c3e-964f-be3ae6a92ead</ process_instance_id > < process_success >true</ process_success > < biz_success >true</ biz_success > < process_error_code >500</ process_error_code > < process_error_msg >system-error</ process_error_msg > < process_remark >系统开小差了</ process_remark > < process_data >{"title":"abc"}</ process_data > </ process_response > </ response_list > < trace_id >5706620716801475064311088bf6ab</ trace_id > < execute_process >true</ execute_process > </ data > </ top_event_publish_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|