php webservice ios,php webservice soap

action.php文件内容

?php  Class Action {

public  total($num1,$num2){

$num1  $num2;

}

}

?

service.php文件内容

?php require ;

$server   SoapServer();

$serversetClass();

$serverhandle();

?

action.wsdl文件内容

?xml version encoding? ! WSDL file generated by Zend Studio.  definitions name targetNamespace xmlns:typens     xmlns:xsd     xmlns:soap     xmlns:soapenc     xmlns:wsdl     xmlns

message name

part name type/

part name type/

/message

message name

part name type/

/message

portType name

operation name

documentation

Enter description here...

/documentation

input message/

output message/

/operation

/portType

binding name type

soap:binding style transport/

operation name

soap:operation soapAction/

input

soap:body namespace use encodingStyle/

/input

output

soap:body namespace use encodingStyle/

/output

/operation

/binding

service name

port name binding

soap:address location/  !  访问service的路径

/port

/service /definitions

index.php文件内容

?php  $test  SoapClient();

$result  $testtotal(,);

echo $result;

?

其中index.php为调用接口的文件,service.php为接口的服务文件,运行index.php就可以直接得到接口返回的值

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值