Advertisement
Guest User

ecmaService.php

a guest
Jul 10th, 2011
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.14 KB | None | 0 0
  1. <?php
  2. class userLogin {
  3.   public $username; // string
  4.   public $password; // string
  5. }
  6.  
  7. class userLoginResponse {
  8.   public $token; // string
  9. }
  10.  
  11.  
  12. /**
  13.  * ecmasService class
  14.  *
  15.  *
  16.  *
  17.  * @author    {author}
  18.  * @copyright {copyright}
  19.  * @package   {package}
  20.  */
  21. class ecmasService extends SoapClient {
  22.  
  23.   private static $classmap = array(
  24.                                     'userLogin' => 'userLogin',
  25.                                     'userLoginResponse' => 'userLoginResponse',
  26.                                    );
  27.  
  28.   public function ecmasService($wsdl = "a.wsdl", $options = array()) {
  29.     foreach(self::$classmap as $key => $value) {
  30.       if(!isset($options['classmap'][$key])) {
  31.         $options['classmap'][$key] = $value;
  32.       }
  33.     }
  34.     parent::__construct($wsdl, $options);
  35.   }
  36.  
  37.   /**
  38.    *
  39.    *
  40.    * @param userLogin $parameters
  41.    * @return userLoginResponse
  42.    */
  43.   public function userLogin(userLogin $parameters) {
  44.     return $this->__soapCall('userLogin', array($parameters),       array(
  45.             'uri' => 'urn:ecmasService',
  46.             'soapaction' => ''
  47.            )
  48.       );
  49.   }
  50.  
  51. }
  52.  
  53. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement