• 大小: 2KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-16
  • 语言: Java
  • 标签: SGIP  彩信  java  SP  

资源简介

SGIP 彩信 java SP 接口 SGIP 彩信 java SP 接口 SGIP 彩信 java SP 接口

资源截图

代码片段和文件信息

import com.cmcc.mm7.vasp.message.*;
import com.cmcc.mm7.vasp.service.MM7Sender;
import org.apache.commons.lang.*;
import sun.misc.base64Encoder;
import sun.misc.base64Decoder;
import com.cmcc.mm7.vasp.common.*;
import java.io.*;
import java.util.*;
import org.apache.log4j.*;
import javax.xml.soap.MimeHeader;
import java.text.*;
import com.cmcc.mm7.vasp.conf.*;

public class MMSSend
{

  MMSSend(List listpicString phoneNo)
  {
    final MM7Config mm7Config = new MM7Config(“./config/mm7Config.xml“);
     mm7Config.setConnConfigName(“./config/ConnConfig.xml“);

                try
                {
                        SimpleDateFormat sdf = new SimpleDateFormat(“yyyy-MM-dd‘T‘HH:mm:ss“);
                        MM7SubmitReq submit = new MM7SubmitReq();
                        submit.setTransactionID(“10000005“);
                        submit.addTo(phoneNo);//添加发送代码
                        submit.setVASID(“74781“);
                        submit.setVASPID(“10655811“);
                        submit.setServiceCode(“1“);
                        //submit.setSenderAddress(“5555“);
                        submit.setSubject(“MMS图片“);
                        submit.setChargedPartyID(“10655811“);
                        submit.setChargedParty((byte)4);
                        submit.setDeliveryReport(true);
                        //submit.setReplyCharging(true);
                        //submit.setReplyChargingSize(100);
                        //submit.setReplyDeadline(sdf.parse(“2005-03-23T15:35:00“));
                        //submit.setMessageClass(“Personal“);
                        //submit.setReadReply(true);
                        //submit.setEarliestDeliveryTime(sdf.parse(“2005-03-21T21:35:00“));
                        //submit.setExpiryDate(sdf.parse(“2004-03-11T17:00:00“));
                        //submit.setPriority((byte)2);
                        //submit.setMessageClass(“Personal“);
                        //submit.setReplyDeadline(sdf.parse(“2004-03-03T23:59:59“));

                        MMContent content = new MMContent();
                        content.setContentType(MMConstants.ContentType.MULTIPART_RELATED);
                        content.setContentID(“mm7Test“);
                        for(int i=0;i                        {
                        MMContent sub1 = MMContent.createFromFile((String)listpic.get(i));
                        sub1.setContentID((String)listpic.get(i));
                        sub1.setContentType(MMConstants.ContentType.JPEG);
                        content.addSubContent(sub1);
                        }
 /*                     String ss = “这是一个测试MMS“;
                        byte[] bb = null;
                        bb = ss.getBytes();
                        InputStream input = new ByteArrayInputStream(bb);
                        MMContent sub2 = MMContent.createFromStream(input);
                        sub2.setC

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        309  2004-03-05 15:43  config\ConnConfig.xml

     文件        715  2009-02-16 09:40  config\mm7Config.xml

     文件       7873  2009-02-16 09:48  MMSSend.java

     目录          0  2009-02-12 14:33  config

----------- ---------  ---------- -----  ----

                 8897                    4


评论

共有 条评论