『壹』 現在有一個發送簡訊的WebService介面,怎麼調用呢是必須建一個WebService項目嗎Web project項目不行嗎
WebService介面可以直接在Web項目里使用,在你的項目里添加服務引用就可以了
『貳』 如何用java的web程序實現簡訊業務
看你要如何實現了,簡單的使用GSM貓,這個需要通過串口向貓發送命令,然後由貓來負責發送和接收簡訊。
另外可以直接向移動申請簡訊服務,通過他們提供的簡訊介面(CMPP3.0)發送和接收簡訊,大型的簡訊應用都是通過這種方式。不過這種方式,如果你的簡訊量達不到一定數量,是不會給你開通的。那樣,你可能需要自己去找其它服務商代理了。
我以前做過一個項目,就是應為簡訊量不夠,沒有開通簡訊網關服務,沒有辦法用貓的形式做的。
不過,不要向我要代碼,涉及到保密。當然代碼很簡單,就是熟悉你選用的貓的串口協議,然後利用樓上提到的java通信API通過串口發送和接收數據就可以了。
補充回答:
需要Sun的通信API http://java.sun.com/procts/javacomm/
如果你需要,可以留下mail,我可以發給你。
『叄』 http和web的簡訊驗證碼介面有何區別
1、http簡訊驗證碼介面和web簡訊驗證碼介面所屬的協議方式不同。其中HTTPService基於http協議,而webservice基於soap協議。
2、數據處理的效率不一樣。相對來說,使用http簡訊驗證碼介面的效率比較高一些,它支持客戶/伺服器模式,運行速度很快,當有用戶遇到操作請求的時候,只需要傳送請求,其方法還有路徑的選擇上比較靈活,而HTTP對發送任意類型的不同的數據進行回饋,只不過每一次只能處理一個請求,所以傳輸的時候效率比較高。而web簡訊驗證碼介面也有自己的優勢,當遇到一些比較復雜麻煩的數據類型時,處理起來更加有效。
3、跨域處理不同。當選用http這種方式時比較單一,不能進行跨域處理,如果有需要想要調用一個其它應用上的服務時,則需要藉助web。
通俗的來講,不論是使用http簡訊驗證碼介面還是web簡訊驗證碼介面都可以實現你所想要完成的簡訊驗證、簡訊群發此類的功能,只不過它們在進行處理時的協議不一樣。web就是使用soap協議且能處理一些比較復雜的數據,而httpservice通過post和get方式,可以完成你在本地服務時的一些內容,在不牽涉到跨域時,完全可以滿足你的需求。
『肆』 怎麼做簡訊的webService介面和第三方伺服器端
你需要按介面說明寫個service,然後配置成WebService,service三個方法里的具體邏輯根據業務需求寫
在spring里配置WebService 很簡單,給你一個xfire配置示例
<import resource="classpath:org/codehaus/xfire/spring/xfire.xml" />
<bean id="wsExporter" class="org.codehaus.xfire.spring.remoting.XFireExporter">
<property name="serviceFactory" ref="xfire.serviceFactory"/>
<property name="xfire" ref="xfire"/>
<property name="serviceBean" ref="[service實現的bean]"/>
<property name="serviceClass" value="[service介面類]"/>
<property name="name" value="[對外暴露的webservice名稱]"></property>
</bean>
『伍』 不知道哪家簡訊平台有Web Service簡訊介面呢
美聯軟通,就可以通過調用Web Service發起請求,快速實現簡訊下發,而且他家的簡訊平台業務服務范圍也非常廣泛的。
『陸』 要給客戶部署簡訊發布系統,web方式,有開發介面,請推薦幾個方案備選
接入式兩種:1、web式:根據戶配給政企客戶管理員帳號/密碼通互聯網web式登陸行業簡訊平台使用;2、二發接入式:電信提供二發介面客戶根據電信提供二發工具包自行或由第三提供解決案並進行二發接入行業簡訊平台便於客戶更高效使用辦公自化系統及產管理系統 謝謝您電信產品關注祝您愉快 信息沒解決您問題登錄廣東電信手機商城(http://m.gd.189.cn)向線客服求助7X24線喔
『柒』 簡訊webservices介面怎麼實現
採用web Service介面實現簡訊收發, 本程序適合網關版本v1.0開發。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using SMS.cn.woxp.gateway;
using System.IO;
using System.Xml;
namespace SMS
{
* 如果發送失敗原因與通道有關.可能是由於某些原因導致通道關閉.請切換其它通道使用
* 簡訊通道發送出現延時比較長.建議切換通道發送.[任何簡訊網關都會出現簡訊延時.請諒解]
*/
public partial class Form1 : Form
{
private cn.woxp.gateway.WebSMS wsms = new SMS.cn.woxp.gateway.WebSMS();
private string strIdentity = "";
public Form1()
{
InitializeComponent();
}
private void label7_Click(object sender, EventArgs e)
{
}
private void Form1_Load(object sender, EventArgs e)
{
this.l_money.Text = "0.00";
}
private bool CheckGate()
{
int temp = 0;
if (this.t_eid.Text.ToString().Trim() == "" || this.t_gateid.Text.ToString().Trim() == "" || this.t_pwd.Text.ToString().Trim() == "" || this.t_uid.Text.ToString().Trim() == "")
{
MessageBox.Show("網關參數輸入不全!請重新輸入", "網關參數配置", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (!Int32.TryParse(this.t_eid.Text.ToString().Trim(), out temp) || !Int32.TryParse(this.t_gateid.Text.ToString().Trim(),out temp))
{
MessageBox.Show("企業代碼或者網關通道ID必須為數字!請重新輸入.", "網關參數配置", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
return true;
}
private void button1_Click(object sender, EventArgs e)
{
this.button1.Enabled = false;
if (!CheckGate())
{
this.button1.Enabled = true;
return;
}
if (this.t_sendNo.Text.ToString().Trim() == "" || this.t_sendMemo.Text.ToString().Trim() == "")
{
MessageBox.Show("請輸入目標號碼和簡訊內容", "發送簡訊", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.t_sendNo.Focus();
this.button1.Enabled = true;
return;
}
if (this.t_sendTime.Text.ToString().Trim() != "")
{
DateTime dt;
if (!DateTime.TryParse(this.t_sendTime.Text.ToString().Trim(), out dt))
{
MessageBox.Show("定時發送格式不正確!", "發送簡訊", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.button1.Enabled = true;
this.t_sendTime.Focus();
return;
}
if (dt <= DateTime.Now)
{
MessageBox.Show("定時發送時間必須大於當前時間!", "發送簡訊", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.button1.Enabled = true;
return;
}
}
strIdentity= wsms.GetIdentityMark(Int32.Parse(this.t_eid.Text.ToString().Trim()),this.t_uid.Text.ToString().Trim(),this.t_pwd.Text.ToString().Trim(),Int32.Parse(this.t_gateid.Text.ToString().Trim()));
if(strIdentity == null || strIdentity =="")
{
MessageBox.Show("獲取身份標識串失敗!", "發送簡訊", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.button1.Enabled = true;
return;
}
string js="";
//全速提交簡訊
SendResult status = wsms.FastSend(strIdentity,this.t_sendNo.Text.ToString().Trim(),this.t_sendMemo.Text.ToString().Trim(),this.t_sendTime.Text.ToString().Trim(),"");
if(status.RetCode>0)
{
this.l_money.Text = wsms.GetMoney(strIdentity).ToString("0.00");
js="發送成功!共發送:"+status.RetCode.ToString()+"條";
MessageBox.Show(js, "發送簡訊狀態", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
js="發送失敗,代碼:"+status.RetCode.ToString().Trim()+",原因:"+status.ErrorDesc;
MessageBox.Show(js, "發送簡訊狀態", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
this.button1.Enabled = true;
}
/// <summary>
/// 收到的XML轉成dataset型
/// </summary>
/// <param name="xmlData"></param>
/// <returns></returns>
public DataSet ConvertXMLToDataSet(string xmlData)
{
StringReader stream = null;
XmlTextReader reader = null;
try
{
DataSet xmlDS = new DataSet();
stream = new StringReader(xmlData);
reader = new XmlTextReader(stream);
xmlDS.ReadXml(reader);
return xmlDS;
}
catch (Exception ex)
{
string strTest = ex.Message;
return null;
}
finally
{
if (reader != null)
reader.Close();
}
}
private void button2_Click(object sender, EventArgs e)
{
this.button2.Enabled = false;
if (!CheckGate())
{
this.button2.Enabled = true;
return;
}
strIdentity = wsms.GetIdentityMark(Int32.Parse(this.t_eid.Text.ToString().Trim()), this.t_uid.Text.ToString().Trim(), this.t_pwd.Text.ToString().Trim(), Int32.Parse(this.t_gateid.Text.ToString().Trim()));
if (strIdentity == null || strIdentity == "")
{
MessageBox.Show("獲取身份標識串失敗!", "發送簡訊", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.button1.Enabled = true;
return;
}
string xml = wsms.ReadXml(strIdentity);
if (xml == null || xml.ToString().Trim()=="")
{
MessageBox.Show("沒有收到回復簡訊!", "接收簡訊", MessageBoxButtons.OK, MessageBoxIcon.Information);
this.button2.Enabled = true;
return;
}
DataSet ds = new DataSet();
try
{
int code = 0;
if (Int32.TryParse(xml, out code))
{
MessageBox.Show("載入簡訊失敗,原因:" +wsms.GetErrorHint(code), "接收簡訊", MessageBoxButtons.OK, MessageBoxIcon.Information);
this.button2.Enabled = true;
return;
}
ds = ConvertXMLToDataSet(xml);
}
catch(Exception ex)
{
MessageBox.Show("載入簡訊異常,原因:"+ex.Message, "接收簡訊", MessageBoxButtons.OK, MessageBoxIcon.Information);
this.button2.Enabled = true;
return;
}
this.dgv_receive.DataSource = ds.Tables[0];
this.button2.Enabled = true;
}
private void button3_Click(object sender, EventArgs e)
{
this.t_sendMemo.Text = "";
this.t_sendNo.Text = "";
this.t_sendTime.Text = "";
this.button1.Enabled = true;
this.button2.Enabled = true;
this.button3.Enabled = true;
}
}
}
『捌』 合通啟簡訊web介面怎麼用
介面對接完成後,即可進行簡訊測試