找回密码
 注册
广告投放 虚位以待【阿里云】2核2G云新老同享 99元/年,续费同价做网站就用糖果主机-sugarhosts.comJtti.com-新加坡服务器,美国服务器,香港服务器
查看: 316|回复: 4

PHP下创建简单的WebServices

[复制链接]
发表于 2008 年 1 月 29 日 14:43:11 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
以前没玩过WebServices.结果最近手里的工作都TM是WebServices的..
发现WebServices挺好玩的..
Server:

    <?php
    require_once('nusoap.php');
    $s = new soap_server();
    $s->register('getPortalRequest');    //注册WebServices的方法
    $s->service($HTTP_RAW_POST_DATA);
    function getPortalRequest($serial,$rand){
    $result=$serial."|".$rand;
    return $result;
    }
    ?>

Client:

    <?php
    require_once('nusoap.php');
    $parameters = array("serial"=>"Y","rand"=>"N");
    $soapclient = new soapclient('http://localhost:60000/new-ori/alltest/test-webservices-server.php');
    $resXml = $soapclient->call('getPortalRequest',$parameters);
    Print_R($resXml);
    ?>

还没弄明白怎么创建wsdl的WebServices

以后做网站就容易很多了,弄一套数据做好WebServices,然后其他就直接调接口就好了

都不用什么外链数据库
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
发表于 2008 年 1 月 29 日 16:23:27 | 显示全部楼层
【腾讯云】2核2G云服务器新老同享 99元/年,续费同价
不懂
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2008 年 1 月 29 日 19:53:20 | 显示全部楼层
这东西主要是做B2B的,分布式服务用的。
wsdl相当于一个接口,
我上学期学过的,做了个银行贷款转卖的程序
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2008 年 1 月 30 日 00:26:52 | 显示全部楼层
怎么用的
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2008 年 2 月 2 日 14:01:10 | 显示全部楼层
木技术。。。
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|金光论坛

GMT+8, 2025 年 2 月 4 日 03:59 , Processed in 0.044930 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表