📄 xsmse_submit.java
字号:
// Decompiled by DJ v2.9.9.61 Copyright 2000 Atanas Neshkov Date: 2003-1-3 17:35:39
// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
// Decompiler options: packimports(3)
// Source File Name: xsmse_submit.java
package cncgw.xsms;
import java.io.PrintStream;
// Referenced classes of package cncgw.xsms:
// OutOfBoundsException
public final class xsmse_submit
{
public xsmse_submit()
{
}
public void set_media_type(String s)
throws OutOfBoundsException
{
if(s.length() > 50)
{
OutOfBoundsException e = new OutOfBoundsException();
throw e;
}else{
media_type = s;
}
}
public void set_service_type(String s)
throws OutOfBoundsException
{
if(s.length() > 6)
{
OutOfBoundsException e = new OutOfBoundsException();
throw e;
}else{
service_type = s;
}
}
public void set_source_address_ton(byte source_ton)
{
source_address_ton = source_ton;
}
public void set_source_address_npi(byte source_npi)
{
source_address_npi = source_npi;
}
public void set_source_address(String s)
throws OutOfBoundsException
{
if(s.length() > 21)
{
OutOfBoundsException e = new OutOfBoundsException();
throw e;
}else{
source_address = s;
}
}
public void set_dest_address_ton(byte dest_ton)
{
dest_address_ton = dest_ton;
}
public void set_dest_address_npi(byte dest_npi)
{
dest_address_npi = dest_npi;
}
public void set_destination_address(String s)
throws OutOfBoundsException
{
if(s.length() > 21)
{
OutOfBoundsException e = new OutOfBoundsException();
throw e;
}else{
destination_address = s;
}
}
public void set_esm_class(byte esm_class)
{
this.esm_class = esm_class;
}
public void set_protocol_ID(byte protocol_id)
{
this.protocol_id = protocol_id;
}
public void set_priority_flag(byte priority_flag)
{
this.priority_flag = priority_flag;
}
public void set_schedule_delivery_time(String s)
throws OutOfBoundsException
{
if(s.length() > 17)
{
OutOfBoundsException e = new OutOfBoundsException();
throw e;
}else{
schedule_delivery_time = s;
}
}
public void set_validity_peroid(String s)
throws OutOfBoundsException
{
if(s.length() > 17)
{
OutOfBoundsException e = new OutOfBoundsException();
throw e;
}else{
validity_peroid = s;
}
}
public void set_registered_delivery_flag(byte registered_delivery_flag)
{
this.registered_delivery_flag = registered_delivery_flag;
}
public void set_replace_if_present_flag(byte replace_if_present_flag)
{
this.replace_if_present_flag = replace_if_present_flag;
}
public void set_data_coding(byte data_coding)
{
this.data_coding = data_coding;
}
public void set_sm_default_msg_id(String s)
throws OutOfBoundsException
{
if(s.length() > 3)
{
OutOfBoundsException e = new OutOfBoundsException();
throw e;
}else{
sm_default_msg_id = s;
}
}
public void set_sm_length(int sm_length)
throws OutOfBoundsException
{
if(sm_length > 0x78)
{
OutOfBoundsException e = new OutOfBoundsException();
throw e;
} else
{
this.sm_length = sm_length;
return;
}
}
public void set_short_message_text(String s)
throws OutOfBoundsException
{
if(s.length() > 120)
{
OutOfBoundsException e = new OutOfBoundsException();
throw e;
}else{
short_message_text = s;
}
}
public void set_fee_Type(String s)
throws OutOfBoundsException
{
if(s.length() > 2)
{
OutOfBoundsException e = new OutOfBoundsException();
throw e;
}else{
fee_Type = s;
}
}
public void set_fee_userType(String s)
throws OutOfBoundsException
{
if(s.length() > 3)
{
OutOfBoundsException e = new OutOfBoundsException();
throw e;
}else{
fee_userType = s;
}
}
public void set_fee_terminal(String s)
throws OutOfBoundsException
{
if(s.length() > 21)
{
OutOfBoundsException e = new OutOfBoundsException();
throw e;
}else{
fee_terminal = s;
}
}
public String get_dst_addr() //返回目的手机号
{
return destination_address;
}
public String get_src_addr() //返回源手机号
{
return source_address;
}
public String get_short_msg() //取得短信内容
{
return short_message_text;
}
protected void printAllField()
{
System.out.println("下面是准备发送的submit包--------:");
System.out.println("media_type:" + media_type);
System.out.println("service_type:" + service_type);
System.out.println("source_address:" + source_address);
System.out.println("destination_address:" + destination_address);
System.out.println("esm_class:" + esm_class);
System.out.println("protocol_id:" + protocol_id);
System.out.println("schedule_delivery_time:" + schedule_delivery_time);
System.out.println("validity_peroid:" + validity_peroid);
System.out.println("registered_delivery_flag:" + registered_delivery_flag);
System.out.println("replace_if_present_flag:" + replace_if_present_flag);
System.out.println("data_coding:" + data_coding);
System.out.println("sm_default_msg_id:" + sm_default_msg_id);
System.out.println("sm_length:" + sm_length);
System.out.println("short_message_text:" + short_message_text);
System.out.println("fee_Type:" + fee_Type);
System.out.println("fee_userType:" + fee_userType);
System.out.println("fee_terminal:" + fee_terminal);
System.out.println("----------------------submit包结束!");
}
protected String media_type;
protected String service_type;
protected byte source_address_ton = 0;
protected byte source_address_npi = 0;
protected String source_address;
protected byte dest_address_ton = 0;
protected byte dest_address_npi = 0;
protected String destination_address;
protected byte esm_class;
protected byte protocol_id = 0;
protected byte priority_flag;
protected String schedule_delivery_time;
protected String validity_peroid;
protected byte registered_delivery_flag;
protected byte replace_if_present_flag;
protected byte data_coding;
protected String sm_default_msg_id = "0";
protected int sm_length;
protected String short_message_text;
protected String fee_Type;
protected String fee_userType;
protected String fee_terminal;
public static String getSubmitBodyXml(String mediac,String service_typec,String source_addressc,String destination_addressc,
byte esm_classc,byte priority_flagc,String schedule_delivery_timec,String validity_peroidc,
byte registered_delivery_flagc,byte replace_if_present_flagc,byte data_codingc,String sm_default_msg_idc,
int sm_lengthc,String short_message_textc,String fee_typec,String fee_userTypec,String fee_terminalc)
{
StringBuffer sb = new StringBuffer();
sb.append("<message_body>");
sb.append("<media_type>"+mediac+"</media_type>");
sb.append("<service_type>"+service_typec+"</service_type>");
sb.append("<source_address_ton>0</source_address_ton>");
sb.append("<source_address_npi>0</source_address_npi>");
sb.append("<source_address>"+source_addressc+"</source_address>");
sb.append("<dest_address_ton>0</dest_address_ton>");
sb.append("<dest_address_npi>0</dest_address_npi>");
sb.append("<destination_address>"+destination_addressc+"</destination_address>");
sb.append("<esm_class>"+esm_classc+"</esm_class>");
sb.append("<protocol_id>0</protocol_id>");
sb.append("<priority_flag>"+priority_flagc+"</priority_flag>");
sb.append("<schedule_delivery_time>"+schedule_delivery_timec+"</schedule_delivery_time>");
sb.append("<validity_peroid>"+validity_peroidc+"</validity_peroid>");
sb.append("<registered_delivery_flag>"+registered_delivery_flagc+"</registered_delivery_flag>");
sb.append("<replace_if_present_flag>"+replace_if_present_flagc+"</replace_if_present_flag>");
sb.append("<data_coding>"+data_codingc+"</data_coding>");
sb.append("<sm_default_msg_id>"+sm_default_msg_idc+"</sm_default_msg_id>");
sb.append("<sm_length>"+sm_lengthc+"</sm_length>");
sb.append("<short_message_text>"+short_message_textc+"</short_message_text>");
sb.append("<fee_type>"+fee_typec+"</fee_type>");
sb.append("<fee_userType>"+fee_userTypec+"</fee_userType>");
sb.append("<fee_terminal>"+fee_terminalc+"</fee_terminal>");
sb.append("</message_body>");
sb.append("</xsmp>");
return sb.toString();
}
private int seqNo;
public int get_seqNo() //返回手机号
{
return seqNo;
}
public void set_seqNo(int seq){
seqNo = seq;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -