public class WxCpXmlMessage extends Object implements Serializable
微信推送过来的消息,也是同步回复给用户的消息,xml格式 相关字段的解释看微信开发者文档: http://mp.weixin.qq.com/wiki/index.php?title=接收普通消息 http://mp.weixin.qq.com/wiki/index.php?title=接收事件推送 http://mp.weixin.qq.com/wiki/index.php?title=接收语音识别结果
| 限定符和类型 | 类和说明 |
|---|---|
static class |
WxCpXmlMessage.ScanCodeInfo |
static class |
WxCpXmlMessage.SendLocationInfo |
static class |
WxCpXmlMessage.SendPicsInfo |
| 构造器和说明 |
|---|
WxCpXmlMessage() |
| 限定符和类型 | 方法和说明 |
|---|---|
static WxCpXmlMessage |
fromEncryptedXml(InputStream is,
WxCpConfigStorage wxCpConfigStorage,
String timestamp,
String nonce,
String msgSignature) |
static WxCpXmlMessage |
fromEncryptedXml(String encryptedXml,
WxCpConfigStorage wxCpConfigStorage,
String timestamp,
String nonce,
String msgSignature)
从加密字符串转换.
|
protected static WxCpXmlMessage |
fromXml(InputStream is) |
protected static WxCpXmlMessage |
fromXml(String xml) |
String |
getMsgType()
当接受用户消息时,可能会获得以下值:
WxConsts.XmlMsgType#TEXT
WxConsts.XmlMsgType#IMAGE
WxConsts.XmlMsgType#VOICE
WxConsts.XmlMsgType#VIDEO
WxConsts.XmlMsgType#LOCATION
WxConsts.XmlMsgType#LINK
WxConsts.XmlMsgType#EVENT
|
void |
setMsgType(String msgType)
当发送消息的时候使用:
WxConsts.XmlMsgType#TEXT
WxConsts.XmlMsgType#IMAGE
WxConsts.XmlMsgType#VOICE
WxConsts.XmlMsgType#VIDEO
WxConsts.XmlMsgType#NEWS
|
String |
toString() |
protected static WxCpXmlMessage fromXml(String xml)
protected static WxCpXmlMessage fromXml(InputStream is)
public static WxCpXmlMessage fromEncryptedXml(String encryptedXml, WxCpConfigStorage wxCpConfigStorage, String timestamp, String nonce, String msgSignature)
public static WxCpXmlMessage fromEncryptedXml(InputStream is, WxCpConfigStorage wxCpConfigStorage, String timestamp, String nonce, String msgSignature)
public String getMsgType()
当接受用户消息时,可能会获得以下值:WxConsts.XmlMsgType#TEXTWxConsts.XmlMsgType#IMAGEWxConsts.XmlMsgType#VOICEWxConsts.XmlMsgType#VIDEOWxConsts.XmlMsgType#LOCATIONWxConsts.XmlMsgType#LINKWxConsts.XmlMsgType#EVENT
public void setMsgType(String msgType)
当发送消息的时候使用:WxConsts.XmlMsgType#TEXTWxConsts.XmlMsgType#IMAGEWxConsts.XmlMsgType#VOICEWxConsts.XmlMsgType#VIDEOWxConsts.XmlMsgType#NEWS
Copyright © 2017. All rights reserved.