141 Star 1.2K Fork 345

RHQYZ / DotNetCore.SKIT.FlurlHttpClient.Wechat

 / 详情

企业微信所有回调XML解析bug

已完成
创建于  
2022-04-14 14:26

⚠⚠ 请注意:不符合格式要求的 Issue 可能会被直接关闭。

通过client.DeserializeEventFromXml < ChangeContactEvent > (callbackXML);后
解析得到
"UserExtendedAttribute": {
"AttributeList": null
}
所有扩展属性都是null

审批回调也是解析数据不完整

评论 (4)

WonderfulCode-Tong 创建了任务
WonderfulCode-Tong 修改了描述
WonderfulCode-Tong 修改了描述
RHQYZ 添加了
 
bug
标签
展开全部操作日志

可以给个你收到的回调完整 XML 么?有敏感内容可以先脱敏一下。

微信回调后解密出来的

<xml>
	<ToUserName><![CDATA[wwc4b06920eb9a6dd9]]></ToUserName>
	<FromUserName><![CDATA[sys]]></FromUserName>
	<CreateTime>1649936774</CreateTime>
	<MsgType><![CDATA[event]]></MsgType>
	<Event><![CDATA[change_contact]]></Event>
	<ChangeType><![CDATA[update_user]]></ChangeType>
	<UserID><![CDATA[DaChengZi]]></UserID>
	<ExtAttr>
		<Item>
			<Name><![CDATA[测试数据]]></Name>
			<Value><![CDATA[adfgadfgad3rasdf]]></Value>
			<Type>0</Type>
			<Text>
				<Value><![CDATA[adfgadfgad3rasdf]]></Value>
			</Text>
		</Item>
		<Item>
			<Name><![CDATA[测试网页]]></Name>
			<Type>1</Type>
			<Web>
				<Url><![CDATA[http://12456.com]]></Url>
				<Title><![CDATA[谁发给]]></Title>
			</Web>
		</Item>
	</ExtAttr>
</xml>

序列化后的变量值
{
"SuiteId": null,
"AuthorizerCorpId": null,
"ActionType": "update_user",
"Name": null,
"UserId": "DaChengZi",
"NewUserId": null,
"UserAlias": null,
"UserDepartmentIds": null,
"UserDepartmentLeaderStatus": null,
"UserMainDepartmentId": null,
"UserEmail": null,
"UserBusinessEmail": null,
"UserMobileNumber": null,
"UserTeleNumber": null,
"UserGender": null,
"UserAddress": null,
"UserPosition": null,
"UserAvatarUrl": null,
"UserStatus": null,
"UserExtendedAttribute": {
"AttributeList": null
},
"DepartmentId": null,
"DepartmentParentId": null,
"DepartmentOrder": null,
"TagId": null,
"TagAddedUserIds": null,
"TagRemovedUserIds": null,
"TagAddedDepartmentIds": null,
"TagRemovedDepartmentIds": null,
"ToUserName": "wwc4b06920eb9a6dd9",
"FromUserName": "sys",
"MsgType": "event",
"Event": "change_contact",
"CreateTime": 1649936774,
"InfoType": null,
"TimeStamp": null
}
主要就是 UserExtendedAttribute 是一个空数组
var eventModel = client.DeserializeEventFromXml(postString);
4月11号更新过包,然后就出错了。

感谢反馈,已定位到问题,我们会尽快发布修订包。

RHQYZ 任务状态待办的 修改为进行中

Fix this on release v2.7.1.

RHQYZ 任务状态进行中 修改为已完成

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(2)
628099 fudiwei 1627875359
C#
1
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
git@gitee.com:fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
fudiwei
DotNetCore.SKIT.FlurlHttpClient.Wechat
DotNetCore.SKIT.FlurlHttpClient.Wechat

搜索帮助