例子只提供发送接口示例,其他接口调用方法雷同!
PHP JAVA Python ASP.NET ASP C/C++
JAVA
发送短信请求示例

package com.lanz.lanzcrm.util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

/**
 * 发送短信
 * 
 */
public class SendSMS {
	/**
	 * 发送短信
	 * 
	 * @param UserID
	 *            账号
	 * @param Account
	 *            用户名
	 * @param Password
	 *            密码 SHA1
	 * @param phones
	 *            接收的手机号码
	 * @param Content
	 *            发送内容 内容需要转码 GBK的URLENCODE编码
	 * @return JSONObject 发送后返回的信息
	 */
	public static JSONObject sendPhone(String UserID, String Account, String Password, String phones, String Content) {
		// 短信按照70个字数计费为一条短信,但当短信内容大于70字时,即为长短信长短信计费按66个字数计费为一条短信,最长不超过500字
		String ReturnXJ = "1"; // 返回值格式 默认XML格式 如果需要JSON格式 该值填写 “1”

		String urlStr = "http://域名/LANZGateway/DirectSendSMSs.asp";
		// 签名后缀
		String sign = "【浪驰软件】";
		// 返回值字符串
		String sTotalString = "";
		try {
			URL url = new URL(urlStr);
			// 创建HttpURLConnection对象
			HttpURLConnection connection = (HttpURLConnection) url.openConnection();

			// 设置HttpURLConnection参数
			// 设定请求的方法为"POST",默认是GET
			connection.setRequestMethod("POST");
			// 设置是否向httpUrlConnection输出,因为这个是post请求,参数要放在http正文内,因此需要设为true,
			// 默认情况下是false;
			connection.setDoOutput(true);
			// 设定传送的内容类型是可序列化的java对象
			// (如果不设此项,在传送序列化对象时,当WEB服务默认的不是这种类型时可能抛java.io.EOFException)
			connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
			// 此处getOutputStream会隐含的进行connect(连接) 编码方式是:"GB2312"
			OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream(), "gbk");
			StringBuffer post = new StringBuffer();
			post.append("UserID=" + UserID);
			post.append("&Account=" + Account);
			post.append("&Password=" + Password);
			post.append("&Content=" + Content + sign);
			post.append("&Phones=" + phones);
			post.append("&ReturnXJ=" + ReturnXJ);

			// 发送请求参数
			out.write(post.toString());
			// flush输出流的缓冲
			out.flush();
			// 关闭输出流
			out.close();

			String sCurrentLine;
			sCurrentLine = "";
			sTotalString = "";
			InputStream l_urlStream;
			// 获取URL的响应
			l_urlStream = connection.getInputStream();
			// 定义BufferedReader输入流来读取URL的响应
			BufferedReader l_reader = new BufferedReader(new InputStreamReader(l_urlStream, "gbk"));
			while ((sCurrentLine = l_reader.readLine()) != null) {
				sTotalString += sCurrentLine + "\r\n";// 循环接收返回值,返回值格式根据ReturnXJ的参数对应返回xml或json【均为String格式,需要用相关方法或者包解析使用】
			}
		} catch (IOException e) {
			e.printStackTrace();
		}

		JSONObject result = JSON.parseObject(sTotalString);
		System.out.println("短信服务器返回信息:"+result);
		// int ErrorNum = result.getIntValue("ErrorNum");
		// if (ErrorNum == ReturnCodeConstant.OK) {
		// flag = true;
		// }
		return result;
	}
	
	
}

	
返回值
XML:
<?xml version="1.0" encoding="GB2312"?>
<LANZ_ROOT>
<ErrorNum>0</ErrorNum>
<JobID>2321313130</JobID>
<PhonesSend>98</PhonesSend>
<ErrPhones>13855556666;13611112222</ErrPhones>
<DeductionSMSs>1000</DeductionSMSs>
</LANZ_ROOT>

JSON:
{
"LANZ_ROOT": {
"ErrorNum": "0",
"JobID": "2321313130",
"PhonesSend": "98",
"ErrPhones": "13855556666;13611112222",
"DeductionSMSs": "1000"
}
}