Description WSDL2PHP tool will generate you the client or service PHP code for your WSDL.    
       
Your WSDL      
 
 
 
 
 
 
   
       
 
<?php
 
// PHP classes corresponding to the data types in defined in WSDL
 
class matrixAdd {
 
    /**
     * @var (object)Matrix
     */
    public $param0;
 
    /**
     * @var (object)Matrix
     */
    public $param1;
 
}
 
class Matrix {
 
    /**
     * @var array[0, unbounded] of (object)MatrixRow
     */
    public $rows;
 
}
 
class MatrixRow {
 
    /**
     * @var array[0, unbounded] of int
     */
    public $columns;
 
}
 
class matrixAddResponse {
 
    /**
     * @var (object)Matrix
     */
    public $return;
 
}
 
class simpleAdd {
 
    /**
     * @var int
     */
    public $param0;
 
    /**
     * @var int
     */
    public $param1;
 
}
 
class simpleAddResponse {
 
    /**
     * @var int
     */
    public $return;
 
}
 
// define the class map
$class_map = array(
    "matrixAdd" => "matrixAdd",
    "Matrix" => "Matrix",
    "MatrixRow" => "MatrixRow",
    "matrixAddResponse" => "matrixAddResponse",
    "simpleAdd" => "simpleAdd",
    "simpleAddResponse" => "simpleAddResponse");
 
// define PHP functions that maps to WSDL operations 
/**
 * Service function matrixAdd
 * @param object of matrixAdd $input 
 * @return object of matrixAddResponse 
 */
function matrixAdd($input) {
    // TODO: fill in the business logic
    // NOTE: $input is of type matrixAdd
    // NOTE: should return an object of type matrixAddResponse
 
}
 
 
/**
 * Service function simpleAdd
 * @param object of simpleAdd $input 
 * @return object of simpleAddResponse 
 */
function simpleAdd($input) {
    // TODO: fill in the business logic
    // NOTE: $input is of type simpleAdd
    // NOTE: should return an object of type simpleAddResponse
 
}
 
 
// define the operations map
$operations = array(
    "matrixAdd" => "matrixAdd",
    "simpleAdd" => "simpleAdd");
 
// define the actions => operations map
$actions = array(
    "urn:matrixAdd" => "matrixAdd",
    "urn:simpleAdd" => "simpleAdd");
 
// create service in WSDL mode
$service = new WSService(array ("wsdl" =>"http://labs.wso2.org/wsf/php/example.xml",
        "actions" => $actions,
        "classmap" => $class_map,
        "operations" => $operations));
 
// process client requests and reply 
$service->reply();
 
?>
 
   
       
Rating
(4)
   

Comments

Date Author Comment
Dec 31 1969 04:00:00 PM