Foxtable(狐表)用户栏目专家坐堂 → 顺丰接口的问题


  共有10903人关注过本帖树形打印复制链接

主题:顺丰接口的问题

帅哥哟,离线,有人找我吗?
rjh4078
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐精 帖子:3361 积分:24802 威望:0 精华:0 注册:2012/3/26 21:47:00
顺丰接口的问题  发帖心情 Post By:2022/3/9 10:16:00 [显示全部帖子]

蓝版  按照我的理解合成到顺丰测试接口 之前提示参数不全 现在提示500 请指导一下
 下载信息  [文件大小:   下载次数: ]
点击浏览该文件:顺丰测试.txt




以下内容是专门发给有点蓝浏览


[此贴子已经被作者于2022/3/12 10:25:20编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
rjh4078
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐精 帖子:3361 积分:24802 威望:0 精华:0 注册:2012/3/26 21:47:00
  发帖心情 Post By:2022/3/12 11:17:00 [显示全部帖子]

蓝版  按照我的理解合成到顺丰测试接口 之前提示参数不全 现在提示500 请指导一下   相关ID已私信给您

 回到顶部
帅哥哟,离线,有人找我吗?
rjh4078
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐精 帖子:3361 积分:24802 威望:0 精华:0 注册:2012/3/26 21:47:00
  发帖心情 Post By:2022/3/12 12:00:00 [显示全部帖子]


 回到顶部
帅哥哟,离线,有人找我吗?
rjh4078
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐精 帖子:3361 积分:24802 威望:0 精华:0 注册:2012/3/26 21:47:00
  发帖心情 Post By:2022/3/12 14:11:00 [显示全部帖子]


以下内容是专门发给有点蓝浏览

改成这样 我参考这里的文档https://open.sf-express.com/developSupport/976720?authId=1 但是还是返回500错误 

 回到顶部
帅哥哟,离线,有人找我吗?
rjh4078
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐精 帖子:3361 积分:24802 威望:0 精华:0 注册:2012/3/26 21:47:00
  发帖心情 Post By:2022/3/12 17:41:00 [显示全部帖子]

只有C# Java php的

我找了个C#
示例仅供参考,详情请下载对应的SDK
参考链接:http://qiao.sf-express.com/pages/helpCenter/download.html

示例代码:
String CALL_URL_BOX ="http://sfapi-sbox.sf-express.com/sfexpressService";

CallExpressServiceTools client=CallExpressServiceTools.getInstance();
Map<String, String> params = new HashMap<String, String>();

params.put("partnerID", CLIENT_CODE);  // 顾客编码 ,对应丰桥上获取的clientCode

params.put("requestID", UUID.randomUUID().toString().replace("-", ""));

params.put("serviceCode",testService.getCode());// 接口服务码

params.put("timestamp", timeStamp);
    
params.put("msgData", msgData);
      
params.put("msgDigest", client.getMsgDigest(msgData,timeStamp,CHECK_WORD));//数据签名
        
String result = HttpClientUtil.post(CALL_URL_BOX, params);


 回到顶部
帅哥哟,离线,有人找我吗?
rjh4078
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐精 帖子:3361 积分:24802 威望:0 精华:0 注册:2012/3/26 21:47:00
  发帖心情 Post By:2022/3/12 19:35:00 [显示全部帖子]


以下内容是专门发给有点蓝浏览



辛苦蓝版

 回到顶部
帅哥哟,离线,有人找我吗?
rjh4078
  7楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐精 帖子:3361 积分:24802 威望:0 精华:0 注册:2012/3/26 21:47:00
  发帖心情 Post By:2022/3/13 21:25:00 [显示全部帖子]

感谢蓝版

 回到顶部
帅哥哟,离线,有人找我吗?
rjh4078
  8楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐精 帖子:3361 积分:24802 威望:0 精华:0 注册:2012/3/26 21:47:00
  发帖心情 Post By:2022/3/13 21:45:00 [显示全部帖子]

蓝版 再请教一下  返回的字符是

{"apiErrorMsg":"","apiResponseID":"00017F8372C52F3FE1B23EB1AA349A3F","apiResultCode":"A1000","apiResultData":"{\"success\":true,\"errorCode\":\"S0000\",\"errorMsg\":null,\"msgData\":{\"orderId\":\"OrderNum20200612224\",\"originCode\":\"755\",\"destCode\":\"020\",\"filterResult\":2,\"remark\":\"\",\"url\":null,\"paymentLink\":null,\"isUpstairs\":null,\"isSpecialWarehouseService\":null,\"mappingMark\":null,\"agentMailno\":null,\"returnExtraInfoList\":null,\"waybillNoInfoList\":[{\"waybillType\":1,\"waybillNo\":\"SF7444438396948\",\"boxNo\":null,\"length\":null,\"width\":null,\"height\":null,\"weight\":null,\"volume\":null}],\"routeLabelInfo\":[{\"code\":\"1000\",\"routeLabelData\":{\"waybillNo\":\"SF7444438396948\",\"sourceTransferCode\":\"755W\",\"sourceCityCode\":\"755\",\"sourceDeptCode\":\"755\",\"sourceTeamCode\":\"\",\"destCityCode\":\"020\",\"destDeptCode\":\"020NK\",\"destDeptCodeMapping\":\"020W\",\"destTeamCode\":\"050\",\"destTeamCodeMapping\":\"\",\"destTransferCode\":\"020W\",\"destRouteLabel\":\"020W-NK-050\",\"proName\":\"\",\"cargoTypeCode\":\"C201\",\"limitTypeCode\":\"T4\",\"expressTypeCode\":\"B1\",\"codingMapping\":\"H8-A-8\",\"codingMappingOut\":\"\",\"xbFlag\":\"0\",\"printFlag\":\"000000000\",\"twoDimensionCode\":\"MMM={'k1':'020W','k2':'020NK','k3':'050','k4':'T801','k5':'SF7444438396948','k6':'','k7':'134bf3d8'}\",\"proCode\":\"T  特快\",\"printIcon\":\"00000000\",\"abFlag\":\"\",\"destPortCode\":\"\",\"destCountry\":\"\",\"destPostCode\":\"\",\"goodsValueTotal\":\"\",\"currencySymbol\":\"\",\"cusBatch\":\"\",\"goodsNumber\":\"\",\"errMsg\":\"\",\"checkCode\":\"134bf3d8\",\"proIcon\":\"\",\"fileIcon\":\"\",\"fbaIcon\":\"\",\"icsmIcon\":\"\",\"destGisDeptCode\":\"020NK\",\"newIcon\":null,\"sendAreaCode\":null,\"destinationStationCode\":null,\"sxLabelDestCode\":null,\"sxDestTransferCode\":null,\"sxCompany\":null,\"newAbFlag\":null,\"destAddrKeyWord\":null,\"rongType\":null,\"waybillIconList\":null},\"message\":\"SF7444438396948:\"}],\"contactInfoList\":null,\"sendStartTm\":null,\"customerRights\":null,\"expressTypeId\":null}}"}


我通过编码转成了
{"apiErrorMsg":"","apiResponseID":"00017F8372C52F3FE1B23EB1AA349A3F","apiResultCode":"A1000","apiResultData":"{"success":true,"errorCode":"S0000","errorMsg":null,"msgData":{"orderId":"OrderNum20200612224","originCode":"755","destCode":"020","filterResult":2,"remark":"","url":null,"paymentLink":null,"isUpstairs":null,"isSpecialWarehouseService":null,"mappingMark":null,"agentMailno":null,"returnExtraInfoList":null,"waybillNoInfoList":[{"waybillType":1,"waybillNo":"SF7444438396948","boxNo":null,"length":null,"width":null,"height":null,"weight":null,"volume":null}],"routeLabelInfo":[{"code":"1000","routeLabelData":{"waybillNo":"SF7444438396948","sourceTransferCode":"755W","sourceCityCode":"755","sourceDeptCode":"755","sourceTeamCode":"","destCityCode":"020","destDeptCode":"020NK","destDeptCodeMapping":"020W","destTeamCode":"050","destTeamCodeMapping":"","destTransferCode":"020W","destRouteLabel":"020W-NK-050","proName":"","cargoTypeCode":"C201","limitTypeCode":"T4","expressTypeCode":"B1","codingMapping":"H8-A-8","codingMappingOut":"","xbFlag":"0","printFlag":"000000000","twoDimensionCode":"MMM={'k1':'020W','k2':'020NK','k3':'050','k4':'T801','k5':'SF7444438396948','k6':'','k7':'134bf3d8'}","proCode":"T  特快","printIcon":"00000000","abFlag":"","destPortCode":"","destCountry":"","destPostCode":"","goodsValueTotal":"","currencySymbol":"","cusBatch":"","goodsNumber":"","errMsg":"","checkCode":"134bf3d8","proIcon":"","fileIcon":"","fbaIcon":"","icsmIcon":"","destGisDeptCode":"020NK","newIcon":null,"sendAreaCode":null,"destinationStationCode":null,"sxLabelDestCode":null,"sxDestTransferCode":null,"sxCompany":null,"newAbFlag":null,"destAddrKeyWord":null,"rongType":null,"waybillIconList":null},"message":"SF7444438396948:"}],"contactInfoList":null,"sendStartTm":null,"customerRights":null,"expressTypeId":null}}"}

但是这个又不是一个标准的json格式 是哪里转换错了吗?

 回到顶部
帅哥哟,离线,有人找我吗?
rjh4078
  9楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐精 帖子:3361 积分:24802 威望:0 精华:0 注册:2012/3/26 21:47:00
  发帖心情 Post By:2022/3/13 21:57:00 [显示全部帖子]

原来这样 多谢蓝版

 回到顶部
帅哥哟,离线,有人找我吗?
rjh4078
  10楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐精 帖子:3361 积分:24802 威望:0 精华:0 注册:2012/3/26 21:47:00
  发帖心情 Post By:2022/3/13 22:16:00 [显示全部帖子]

蓝版 再次请教 
使用下列代码获取apiResultData中子节点要怎么获取呢,比如获取订单号,originCode,sendAreaCode
Dim dlg As New OpenFileDialog '定义一个新的OpenFileDialog
If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮
    Dim bw As String = FileSys.ReadAllText(dlg.FileName,Encoding.UTF8)
    Dim jo As JObject = JObject.Parse(bw)
    output.show(jo("apiResultData")("orderId").Tostring)
    
End If
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:jsontest.txt


 回到顶部
总数 15 1 2 下一页