公司做了一个饮食类的问题,测试好了几家短信接口,最后选择了56 短信网的短信接口(网址是:http://www.56dxw.com),为找一个短信接口,我们公司整理测试了一个月,主要是看稳定性和速度方面吧,觉得它们公司的不错,就选择它们公司了,因为公司总部将投入资金去推广这个网站,短信接口起到了非常重要的作用,所以,我们公司这一块比较慎重,选择短信接口就选择了很长的时间,我看过它们公司的接口文档,觉得接入应该比较简单的,所以,答应领导明天能把接口这一块弄好,现在让我郁闷的是,我调用它们的http的接口没有问题,但调用asp.net webservers的,老是出来 出错:服务器未能识别 HTTP 头 SOAPAction 的值
这个问题,找了很久没有找到原因,我问过我那个朋友,调用它们公司的也是webservers的,它的就可以,我的为啥不行呢
这是我写的一个调用56短信网webservers的例子,//网址:http://www.56dxw.com<?php
//短信接口测试程序
//$url = "http://jiekou.56dxw.com/sms/HttpInterface.aspx";
$webService_url = "http://jiekou.56dxw.com/WebServiceInterface.asmx";
$comid= "123"; //企业ID
$username= "test1"; //用户名
$userpwd= "99999"; //密码
$smsnumber= "1061"; //所用平台
$handtel= "1313131312"; //手机号
$sendcontent= "测试成功!success!";
$sendtime= ""; //定时时间
header("content-type:text ml;charset=utf-8");
require_once('nusoap/nusoap.php');
$soap = new soapclient($webService_url.'?WSDL', true); //web service 地址
$soap->soap_defencoding = 'utf-8';
$soap->decode_utf8 = false;
$result = $soap ->call("SendNote",array("handtels" => $handtel,"_content"=>$sendcontent, "userName"=> $username , "password"=>$userpwd , "cid"=>$comid, "_sendtime"=>"" , "_smsnumber"=>$smsnumber ));
if ($soap->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
echo '</pre>';
} else {
// Check for errors
$err = $soap->getError();
if ($err) {
// Display the error
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else { echo '<h2>Result</h2><pre>';
print_r($result);
echo '</pre>';
}
}
请高手帮助一下吧,明天急用呢.........
这个问题,找了很久没有找到原因,我问过我那个朋友,调用它们公司的也是webservers的,它的就可以,我的为啥不行呢
这是我写的一个调用56短信网webservers的例子,//网址:http://www.56dxw.com<?php
//短信接口测试程序
//$url = "http://jiekou.56dxw.com/sms/HttpInterface.aspx";
$webService_url = "http://jiekou.56dxw.com/WebServiceInterface.asmx";
$comid= "123"; //企业ID
$username= "test1"; //用户名
$userpwd= "99999"; //密码
$smsnumber= "1061"; //所用平台
$handtel= "1313131312"; //手机号
$sendcontent= "测试成功!success!";
$sendtime= ""; //定时时间
header("content-type:text ml;charset=utf-8");
require_once('nusoap/nusoap.php');
$soap = new soapclient($webService_url.'?WSDL', true); //web service 地址
$soap->soap_defencoding = 'utf-8';
$soap->decode_utf8 = false;
$result = $soap ->call("SendNote",array("handtels" => $handtel,"_content"=>$sendcontent, "userName"=> $username , "password"=>$userpwd , "cid"=>$comid, "_sendtime"=>"" , "_smsnumber"=>$smsnumber ));
if ($soap->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
echo '</pre>';
} else {
// Check for errors
$err = $soap->getError();
if ($err) {
// Display the error
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else { echo '<h2>Result</h2><pre>';
print_r($result);
echo '</pre>';
}
}
请高手帮助一下吧,明天急用呢.........
解决方案 »
- php get_headers 判断返回是否是200 碰到不存在的脚本执行超时
- linux服务器中,php页面中信号量锁住的问题,在线等
- 无法获取文本框内的值
- 如果做这个在线设计???谁会?
- PHP能否实现用户离线后的定期操作?
- 之前的问题:用什么方式来实现指定的电脑才可以登录,mac地址限制/ip地址限制/证书/控件等等什么方式可以?
- 这个功能怎么实现
- 用户输入变量值作为sql语句查询条件?
- 我在数据库中提取的数据中有单引号,双引号,或都同时存在的数据,如何取值后再以php操作sql?
- 为什么会这样?????
- 请大家给我推荐一个比较好的编辑器、
- 我用下面程序怎么显示不出来数据库列表啊?求高手解答
<?php
include_once('nusoap.php');
$url="http://jiekou.56dxw.com/WebServiceInterface.asmx?WSDL";
$type= "WSDL";
$charset="utf-8";
$param=array(
'handtels'=> "1313131312",//手机号
'_content'=> "hello",
'userName'=> "test1", //用户名
'password'=> "99999", //密码
'cid'=> "123", //企业ID
'_sendtime'=> "", //定时时间
'smsnumber'=> "1061", //所用平台
);$client = new nusoap_client($url,$type);
if($err = $client->getError()) exit($err);
$client->soap_defencoding = $charset;
$client->decode_utf8 = false;
$client->xml_encoding = $charset;
$result = $client->call("SendNote",$param,'','',false,true);print_r($result);
?>