All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.weixinmp.outbound.passive.PassiveImageMessage Maven / Gradle / Ivy

The newest version!
package net.sf.weixinmp.outbound.passive;

import java.text.MessageFormat;
/**
 * 回复图片消息




12345678





参数	是否必须	说明
ToUserName	是	接收方帐号(收到的OpenID)
FromUserName	是	开发者微信号
CreateTime	是	消息创建时间 (整型)
MsgType	是	image
MediaId	是	通过上传多媒体文件,得到的id。
 * @author Alex
 *
 */
public class PassiveImageMessage extends PassiveStringMessage {
	private final static String xmlTemplate = "{2}";
	public PassiveImageMessage(String to, String from, String mediaId) {
		super("text/xml;charset=utf-8", MessageFormat.format(xmlTemplate, to, from, (System.currentTimeMillis()/1000)+"", mediaId));
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy