سلام
من می خوام یه فایل WSDL برای کلاس زیر درست کنم و یک SOAP سرور با php ایجاد کنم
اگر ممکنه دوستان کمک کنید.
کد PHP:
<?php
class BankSOAP {
    public function 
getTran($username$password$callBackURL$price) {
        
$query mysql_query("SELECT * FROM `shops` WHERE shopUserName='$username' AND shopPassword='$password' LIMIT 1");
        if (
mysql_num_rows($query) == 1) {
            
mysql_query("INSERT INTO `tran` (`tid` ,`s` ,`cUserName` ,`UserName` ,`callBackURL` ,`price`)VALUES (NULL , '1', '', '$username', '$callBackURL', '$price');");
            
$tid mysql_insert_id();
            return array(
"tid"=>$tid,"s"=>1);
        } else {
            return 
0;
        }
    }
    public function 
checkPayment($tid) {
        
$query mysql_query("SELECT * FROM `tran` WHERE tid='$tid' LIMIT 1");
        
$row mysql_fetch_array($query);
        
$s $row['s'];
        if (
$s == 2)
        {
            return 
2;
        } else {
            return 
3;
        }
    }
    public function 
reversePayment($tid) {
        
$query mysql_query("SELECT * FROM `tran` WHERE tid='$tid' LIMIT 1");
        
$row mysql_fetch_array($query);
        
$s $row['s'];
        
$UserName $row['UserName'];
        
$cUserName $row['cUserName'];
        
$price $row['price'];
        if(
$s == 2) {
            
$query2 mysql_query("SELECT * FROM `customer` WHERE cUserName='$cUserName'");
            
$query3 mysql_query("SELECT * FROM `shops` WHERE UserName='$UserName'");
            
$row2 mysql_fetch_array($query2);
            
$row3 mysql_fetch_array($query3);
            
$ccash $row2['cash'] + $price;
            
$scash $row3['cash'] - $price;
            
mysql_query("UPDATE `tran` SET `s` = '4' WHERE `tran`.`tid` =$tid;");
            return 
4;
        } else {
            return 
5;
        }
    }
}
?>