me.chanjar.weixin.mp.bean.message

## 类 WxMpXmlMessage

- java.lang.Object
- - me.chanjar.weixin.mp.bean.message.WxMpXmlMessage

所有已实现的接口:
  Serializable

    public class WxMpXmlMessage
    extends Object
    implements Serializable

     微信推送过来的消息，xml格式
     部分未注释的字段的解释请查阅相关微信开发文档：
     接收普通消息
     接收事件推送

作者:
  chanjarster
另请参阅:
  序列化表格

### 嵌套类概要

嵌套类
`static class` `WxMpXmlMessage.HardWare`
`static class` `WxMpXmlMessage.ScanCodeInfo`
`static class` `WxMpXmlMessage.SendLocationInfo`
`static class` `WxMpXmlMessage.SendPicsInfo`

### 构造器概要

构造器
构造器和说明
`WxMpXmlMessage()`

### 方法概要

方法
`static WxMpXmlMessage` `fromEncryptedXml(InputStream is, WxMpConfigStorage wxMpConfigStorage, String timestamp, String nonce, String msgSignature)`
`static WxMpXmlMessage` `fromEncryptedXml(String encryptedXml, WxMpConfigStorage wxMpConfigStorage, String timestamp, String nonce, String msgSignature)` 从加密字符串转换
`static WxMpXmlMessage` `fromXml(InputStream is)`
`static WxMpXmlMessage` `fromXml(String xml)`
`String` `getCardId()`
`String` `getContent()`
`Long` `getCreateTime()`
`String` `getDescription()`
`String` `getDeviceId()`
`Integer` `getDeviceStatus()`
`String` `getDeviceType()`
`Integer` `getErrorCount()`
`String` `getEvent()`
`String` `getEventKey()`
`Long` `getExpiredTime()`
`String` `getFailReason()`
`Long` `getFailTime()`
`Integer` `getFilterCount()`
`String` `getFormat()`
`String` `getFriendUserName()`
`String` `getFromKfAccount()`
`String` `getFromUser()`
`WxMpXmlMessage.HardWare` `getHardWare()`
`Integer` `getIsGiveByFriend()`
`String` `getKfAccount()`
`String` `getLabel()`
`Double` `getLatitude()`
`Double` `getLocationX()`
`Double` `getLocationY()`
`Double` `getLongitude()`
`String` `getMediaId()`
`Long` `getMenuId()`
`String` `getMsg()`
`Long` `getMsgId()`
`String` `getMsgType()` 当接受用户消息时，可能会获得以下值： `WxConsts.XML_MSG_TEXT` `WxConsts.XML_MSG_IMAGE` `WxConsts.XML_MSG_VOICE` `WxConsts.XML_MSG_VIDEO` `WxConsts.XML_MSG_LOCATION` `WxConsts.XML_MSG_LINK` `WxConsts.XML_MSG_EVENT`
`String` `getOldUserCardCode()`
`Integer` `getOpType()`
`Integer` `getOuterId()`
`String` `getPicUrl()`
`String` `getPoiId()`
`Double` `getPrecision()`
`String` `getRecognition()`
`String` `getResult()`
`Double` `getScale()`
`WxMpXmlMessage.ScanCodeInfo` `getScanCodeInfo()`
`WxMpXmlMessage.SendLocationInfo` `getSendLocationInfo()`
`WxMpXmlMessage.SendPicsInfo` `getSendPicsInfo()`
`Integer` `getSentCount()`
`String` `getStatus()`
`String` `getStoreUniqId()`
`String` `getThumbMediaId()`
`String` `getTicket()`
`String` `getTitle()`
`String` `getToKfAccount()`
`Integer` `getTotalCount()`
`String` `getToUser()`
`String` `getUrl()`
`String` `getUserCardCode()`
`void` `setCardId(String cardId)`
`void` `setContent(String content)`
`void` `setCreateTime(Long createTime)`
`void` `setDescription(String description)`
`void` `setDeviceId(String deviceId)`
`void` `setDeviceStatus(Integer deviceStatus)`
`void` `setDeviceType(String deviceType)`
`void` `setErrorCount(Integer errorCount)`
`void` `setEvent(String event)`
`void` `setEventKey(String eventKey)`
`void` `setExpiredTime(Long expiredTime)`
`void` `setFailReason(String failReason)`
`void` `setFailTime(Long failTime)`
`void` `setFilterCount(Integer filterCount)`
`void` `setFormat(String format)`
`void` `setFriendUserName(String friendUserName)`
`void` `setFromKfAccount(String fromKfAccount)`
`void` `setFromUser(String fromUser)`
`void` `setHardWare(WxMpXmlMessage.HardWare hardWare)`
`void` `setIsGiveByFriend(Integer isGiveByFriend)`
`void` `setKfAccount(String kfAccount)`
`void` `setLabel(String label)`
`void` `setLatitude(Double latitude)`
`void` `setLocationX(Double locationX)`
`void` `setLocationY(Double locationY)`
`void` `setLongitude(Double longitude)`
`void` `setMediaId(String mediaId)`
`void` `setMenuId(Long menuId)`
`void` `setMsg(String msg)`
`void` `setMsgId(Long msgId)`
`void` `setMsgType(String msgType)` 当发送消息的时候使用： `WxConsts.XML_MSG_TEXT` `WxConsts.XML_MSG_IMAGE` `WxConsts.XML_MSG_VOICE` `WxConsts.XML_MSG_VIDEO` `WxConsts.XML_MSG_NEWS` `WxConsts.XML_MSG_MUSIC`
`void` `setOldUserCardCode(String oldUserCardCode)`
`void` `setOpType(Integer opType)`
`void` `setOuterId(Integer outerId)`
`void` `setPicUrl(String picUrl)`
`void` `setPoiId(String poiId)`
`void` `setPrecision(Double precision)`
`void` `setRecognition(String recognition)`
`void` `setResult(String result)`
`void` `setScale(Double scale)`
`void` `setScanCodeInfo(WxMpXmlMessage.ScanCodeInfo scanCodeInfo)`
`void` `setSendLocationInfo(WxMpXmlMessage.SendLocationInfo sendLocationInfo)`
`void` `setSendPicsInfo(WxMpXmlMessage.SendPicsInfo sendPicsInfo)`
`void` `setSentCount(Integer sentCount)`
`void` `setStatus(String status)`
`void` `setStoreUniqId(String storeUniqId)`
`void` `setThumbMediaId(String thumbMediaId)`
`void` `setTicket(String ticket)`
`void` `setTitle(String title)`
`void` `setToKfAccount(String toKfAccount)`
`void` `setTotalCount(Integer totalCount)`
`void` `setToUser(String toUser)`
`void` `setUrl(String url)`
`void` `setUserCardCode(String userCardCode)`
`String` `toString()`

### 从类继承的方法 java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### 构造器详细资料

#### WxMpXmlMessage

    public WxMpXmlMessage()

### 方法详细资料

#### fromXml

    public static WxMpXmlMessage fromXml(String xml)

#### fromXml

    public static WxMpXmlMessage fromXml(InputStream is)

#### fromEncryptedXml

    public static WxMpXmlMessage fromEncryptedXml(String encryptedXml,
                                  WxMpConfigStorage wxMpConfigStorage,
                                  String timestamp,
                                  String nonce,
                                  String msgSignature)

从加密字符串转换

参数:
  `encryptedXml` -
  `wxMpConfigStorage` -
  `timestamp` -
  `nonce` -
  `msgSignature` -

#### fromEncryptedXml

    public static WxMpXmlMessage fromEncryptedXml(InputStream is,
                                  WxMpConfigStorage wxMpConfigStorage,
                                  String timestamp,
                                  String nonce,
                                  String msgSignature)

#### getOpType

    public Integer getOpType()

#### setOpType

    public void setOpType(Integer opType)

#### getDeviceStatus

    public Integer getDeviceStatus()

#### setDeviceStatus

    public void setDeviceStatus(Integer deviceStatus)

#### getHardWare

    public WxMpXmlMessage.HardWare getHardWare()

#### setHardWare

    public void setHardWare(WxMpXmlMessage.HardWare hardWare)

#### getDeviceType

    public String getDeviceType()

#### setDeviceType

    public void setDeviceType(String deviceType)

#### getDeviceId

    public String getDeviceId()

#### setDeviceId

    public void setDeviceId(String deviceId)

#### getExpiredTime

    public Long getExpiredTime()

#### setExpiredTime

    public void setExpiredTime(Long expiredTime)

#### getFailTime

    public Long getFailTime()

#### setFailTime

    public void setFailTime(Long failTime)

#### getFailReason

    public String getFailReason()

#### setFailReason

    public void setFailReason(String failReason)

#### getStoreUniqId

    public String getStoreUniqId()

#### setStoreUniqId

    public void setStoreUniqId(String storeUniqId)

#### getPoiId

    public String getPoiId()

#### setPoiId

    public void setPoiId(String poiId)

#### getResult

    public String getResult()

#### setResult

    public void setResult(String result)

#### getMsg

    public String getMsg()

#### setMsg

    public void setMsg(String msg)

#### getToUser

    public String getToUser()

#### setToUser

    public void setToUser(String toUser)

#### getCreateTime

    public Long getCreateTime()

#### setCreateTime

    public void setCreateTime(Long createTime)

#### getMsgType

    public String getMsgType()

     当接受用户消息时，可能会获得以下值：
     WxConsts.XML_MSG_TEXT
     WxConsts.XML_MSG_IMAGE
     WxConsts.XML_MSG_VOICE
     WxConsts.XML_MSG_VIDEO
     WxConsts.XML_MSG_LOCATION
     WxConsts.XML_MSG_LINK
     WxConsts.XML_MSG_EVENT

#### setMsgType

    public void setMsgType(String msgType)

     当发送消息的时候使用：
     WxConsts.XML_MSG_TEXT
     WxConsts.XML_MSG_IMAGE
     WxConsts.XML_MSG_VOICE
     WxConsts.XML_MSG_VIDEO
     WxConsts.XML_MSG_NEWS
     WxConsts.XML_MSG_MUSIC

参数:
  `msgType` -

#### getContent

    public String getContent()

#### setContent

    public void setContent(String content)

#### getMsgId

    public Long getMsgId()

#### setMsgId

    public void setMsgId(Long msgId)

#### getPicUrl

    public String getPicUrl()

#### setPicUrl

    public void setPicUrl(String picUrl)

#### getMediaId

    public String getMediaId()

#### setMediaId

    public void setMediaId(String mediaId)

#### getFormat

    public String getFormat()

#### setFormat

    public void setFormat(String format)

#### getThumbMediaId

    public String getThumbMediaId()

#### setThumbMediaId

    public void setThumbMediaId(String thumbMediaId)

#### getLocationX

    public Double getLocationX()

#### setLocationX

    public void setLocationX(Double locationX)

#### getLocationY

    public Double getLocationY()

#### setLocationY

    public void setLocationY(Double locationY)

#### getScale

    public Double getScale()

#### setScale

    public void setScale(Double scale)

#### getLabel

    public String getLabel()

#### setLabel

    public void setLabel(String label)

#### getTitle

    public String getTitle()

#### setTitle

    public void setTitle(String title)

#### getDescription

    public String getDescription()

#### setDescription

    public void setDescription(String description)

#### getUrl

    public String getUrl()

#### setUrl

    public void setUrl(String url)

#### getEvent

    public String getEvent()

#### setEvent

    public void setEvent(String event)

#### getEventKey

    public String getEventKey()

#### setEventKey

    public void setEventKey(String eventKey)

#### getTicket

    public String getTicket()

#### setTicket

    public void setTicket(String ticket)

#### getLatitude

    public Double getLatitude()

#### setLatitude

    public void setLatitude(Double latitude)

#### getLongitude

    public Double getLongitude()

#### setLongitude

    public void setLongitude(Double longitude)

#### getPrecision

    public Double getPrecision()

#### setPrecision

    public void setPrecision(Double precision)

#### getRecognition

    public String getRecognition()

#### setRecognition

    public void setRecognition(String recognition)

#### getFromUser

    public String getFromUser()

#### setFromUser

    public void setFromUser(String fromUser)

#### getStatus

    public String getStatus()

#### setStatus

    public void setStatus(String status)

#### getTotalCount

    public Integer getTotalCount()

#### setTotalCount

    public void setTotalCount(Integer totalCount)

#### getFilterCount

    public Integer getFilterCount()

#### setFilterCount

    public void setFilterCount(Integer filterCount)

#### getSentCount

    public Integer getSentCount()

#### setSentCount

    public void setSentCount(Integer sentCount)

#### getErrorCount

    public Integer getErrorCount()

#### setErrorCount

    public void setErrorCount(Integer errorCount)

#### getCardId

    public String getCardId()

#### setCardId

    public void setCardId(String cardId)

#### getFriendUserName

    public String getFriendUserName()

#### setFriendUserName

    public void setFriendUserName(String friendUserName)

#### getIsGiveByFriend

    public Integer getIsGiveByFriend()

#### setIsGiveByFriend

    public void setIsGiveByFriend(Integer isGiveByFriend)

#### getUserCardCode

    public String getUserCardCode()

#### setUserCardCode

    public void setUserCardCode(String userCardCode)

#### getOldUserCardCode

    public String getOldUserCardCode()

#### setOldUserCardCode

    public void setOldUserCardCode(String oldUserCardCode)

#### getOuterId

    public Integer getOuterId()

#### setOuterId

    public void setOuterId(Integer outerId)

#### getScanCodeInfo

    public WxMpXmlMessage.ScanCodeInfo getScanCodeInfo()

#### setScanCodeInfo

    public void setScanCodeInfo(WxMpXmlMessage.ScanCodeInfo scanCodeInfo)

#### getSendPicsInfo

    public WxMpXmlMessage.SendPicsInfo getSendPicsInfo()

#### setSendPicsInfo

    public void setSendPicsInfo(WxMpXmlMessage.SendPicsInfo sendPicsInfo)

#### getSendLocationInfo

    public WxMpXmlMessage.SendLocationInfo getSendLocationInfo()

#### setSendLocationInfo

    public void setSendLocationInfo(WxMpXmlMessage.SendLocationInfo sendLocationInfo)

#### getMenuId

    public Long getMenuId()

#### setMenuId

    public void setMenuId(Long menuId)

#### getKfAccount

    public String getKfAccount()

#### setKfAccount

    public void setKfAccount(String kfAccount)

#### getToKfAccount

    public String getToKfAccount()

#### setToKfAccount

    public void setToKfAccount(String toKfAccount)

#### getFromKfAccount

    public String getFromKfAccount()

#### setFromKfAccount

    public void setFromKfAccount(String fromKfAccount)

#### toString

    public String toString()

覆盖:
  `toString` 在类中 `Object`