资源简介
中国移动彩信网关协议MM7 API含源代码 最新版的哦
从移动人员手里拿到的
代码片段和文件信息
import com.cmcc.mm7.vasp.service.*;
import com.cmcc.mm7.vasp.message.*;
import com.cmcc.mm7.vasp.conf.*;
import com.cmcc.mm7.vasp.common.*;
import java.net.*;
import java.io.*;
import java.util.*;
public class MyReceiver extends MM7Receiver
{
//处理到VASP的传送(deliver)多媒体消息
public MM7VASPRes doDeliver(MM7DeliverReq mm7DeliverReq) {
MM7DeliverRes res = new MM7DeliverRes();
int i = 0;
System.out.println(“transactionid=“ + mm7DeliverReq.getTransactionID());
if(mm7DeliverReq.isToExist())
{
List to = mm7DeliverReq.getTo();
for(i = 0;i < to.size();i ++)
{
System.out.println(“to=“+to.get(i));
}
}
if(mm7DeliverReq.isCcExist())
{
List cc = mm7DeliverReq.getCc();
for(i = 0;i < cc.size();i ++)
{
System.out.println(“cc=“+cc.get(i));
}
}
if(mm7DeliverReq.isBccExist())
{
List bcc = mm7DeliverReq.getBcc();
for(i = 0;i < bcc.size();i ++)
{
System.out.println(“bcc=“+bcc.get(i));
}
}
if(mm7DeliverReq.islinkedIDExist())
{
System.out.println(“linkedid=“+mm7DeliverReq.getlinkedID());
}
if(mm7DeliverReq.isMMSRelayServerIDExist())
{
System.out.println(“mmsrelayserverid=“+mm7DeliverReq.getMMSRelayServerID());
}
if(mm7DeliverReq.isPriorityExist())
{
System.out.println(“priority=“+mm7DeliverReq.getPriority());
}
if(mm7DeliverReq.isReplyChargingIDExist())
{
System.out.println(“replycharging=“+mm7DeliverReq.getReplyChargingID());
}
if(mm7DeliverReq.isSenderExist())
{
System.out.println(“sender=“+mm7DeliverReq.getSender());
}
if(mm7DeliverReq.isSubjectExist())
{
System.out.println(“subject=“+mm7DeliverReq.getSubject());
}
if(mm7DeliverReq.isTimeStampExist())
{
System.out.println(“timestamp=“+mm7DeliverReq.getTimeStamp());
}
if(mm7DeliverReq.isContentExist())
{
MMContent parentContent = mm7DeliverReq.getContent();
if(parentContent.isMultipart())
{
System.out.println(“multipart“);
List contentList = parentContent.getSubContents();
System.out.println(“i=“+contentList.size());
for(i = 0;i < contentList.size();i ++)
{
MMContent mmContent = (MMContent)contentList.get(i);
String contentID = mmContent.getContentID();
contentID = “zxme“ + i;
MMContentType mmContentType = mmContent.getContentType();
System.out.println(“contenttype=“+mmContentType.getPrimaryType()+“/“+mmContentType.getSubType());
if(mmContentType.getSubType().trim().equalsIgnoreCase(“jpeg“))
contentID = contentID + “.jpg“;
else if(mmContentType.getSubType().trim().equalsIgnoreCase(“gif“))
contentID = contentID + “.gif“;
else if(mmContentType.getSubType().trim().equalsIgnoreCase(“midi“))
contentID = contentID +
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 330 2006-06-20 15:44 config\ConnConfig.xm
文件 685 2006-06-20 15:57 config\mm7Config.xm
目录 0 2004-11-09 15:27 config
文件 122934 2006-07-22 12:21 classes\mm7api.jar
目录 0 2004-11-01 14:53 classes
文件 376 2004-03-16 20:24 doc\org\jdom\input\SAXBuilder.html
目录 0 2004-11-09 15:27 doc\org\jdom\input
目录 0 2004-11-09 15:27 doc\org\jdom
目录 0 2004-11-09 15:27 doc\org
文件 11170 2004-04-12 20:19 doc\com\cmcc\mm7\vasp\service\ClientSocketTest.html
文件 21669 2004-04-12 20:19 doc\com\cmcc\mm7\vasp\service\fr
文件 10280 2004-04-12 20:19 doc\com\cmcc\mm7\vasp\service\MM7AbstractReceiver.html
文件 19769 2004-04-12 20:19 doc\com\cmcc\mm7\vasp\service\MM7Receiver.html
文件 18873 2004-04-12 20:19 doc\com\cmcc\mm7\vasp\service\MM7ReceiveServlet.html
文件 14463 2004-04-12 20:19 doc\com\cmcc\mm7\vasp\service\MM7Sender.html
文件 14377 2004-03-22 12:44 doc\com\cmcc\mm7\vasp\service\MyReceiver.html
文件 1623 2004-04-12 20:18 doc\com\cmcc\mm7\vasp\service\package-fr
文件 6399 2004-04-12 20:18 doc\com\cmcc\mm7\vasp\service\package-summary.html
文件 7268 2004-04-12 20:18 doc\com\cmcc\mm7\vasp\service\package-tree.html
目录 0 2004-11-09 15:27 doc\com\cmcc\mm7\vasp\service
文件 17513 2004-04-12 20:18 doc\com\cmcc\mm7\vasp\message\MM7CancelReq.html
文件 11306 2004-04-12 20:18 doc\com\cmcc\mm7\vasp\message\MM7CancelRes.html
文件 31201 2004-04-12 20:18 doc\com\cmcc\mm7\vasp\message\MM7DeliverReq.html
文件 14202 2004-04-12 20:19 doc\com\cmcc\mm7\vasp\message\MM7DeliverRes.html
文件 23056 2004-04-12 20:19 doc\com\cmcc\mm7\vasp\message\MM7DeliveryReportReq.html
文件 11482 2004-04-12 20:19 doc\com\cmcc\mm7\vasp\message\MM7DeliveryReportRes.html
文件 12869 2004-04-12 20:19 doc\com\cmcc\mm7\vasp\message\MM7Message.html
文件 22833 2004-04-12 20:19 doc\com\cmcc\mm7\vasp\message\MM7ReadReplyReq.html
文件 11398 2004-04-12 20:19 doc\com\cmcc\mm7\vasp\message\MM7ReadReplyRes.html
文件 30180 2004-04-12 20:19 doc\com\cmcc\mm7\vasp\message\MM7ReplaceReq.html
............此处省略222个文件信息
- 上一篇:近代回归分析陈希孺
- 下一篇:历届网络工程师考试真题及答案
评论
共有 条评论