Injuries Php Sample
<?php
class InjuriesRequest {
  public $TeamId; // integer
  public $LeagueId; // integer
}
 
class InjuriesType {
  public $League; // LeagueType
  public $time; // dateTime
}
 
class LeagueType {
  public $Team; // TeamType
  public $id; // integer
  public $name; // string
}
 
class TeamType {
  public $Player; // PlayerType
  public $abbr; // string
  public $id; // integer
  public $name; // string
}
 
class PlayerType {
  public $Injury; // InjuryType
  public $firstName; // string
  public $id; // integer
  public $important; // boolean
  public $lastName; // string
}
 
class InjuryType {
  public $Status; // string
  public $date; // date
  public $desc; // string
  public $id; // integer
  public $pos; // string
}
 
/**
 * InjuriesService class
 * 
 *  
 * 
* @author    Matthew Belzberg - Don Best Sports
 * @copyright Creative Commons Attribution 3.0 Unported License
 * @package   donbest.samples.php
 */
class InjuriesService extends SoapClient {
 
  private static $classmap = array(
                                    'InjuriesRequest' => 'InjuriesRequest',
                                    'InjuriesType' => 'InjuriesType',
                                    'LeagueType' => 'LeagueType',
                                    'TeamType' => 'TeamType',
                                    'PlayerType' => 'PlayerType',
                                    'InjuryType' => 'InjuryType',
                                   );
 
  public function InjuriesService($wsdl = "http://feeds.donbest.com/webservices/injuries.wsdl", $options = array()) {
    foreach(self::$classmap as $key => $value) {
      if(!isset($options['classmap'][$key])) {
        $options['classmap'][$key] = $value;
      }
    }
    parent::__construct($wsdl, $options);
  }
 
  /**
   *  
   *
   * @param InjuriesRequest $InjuriesRequest
   * @return InjuriesType
   */
  public function Injuries(InjuriesRequest $InjuriesRequest,$username,$password)  {
 
    $authheader = sprintf('
        <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
             <wsse:UsernameToken>
                <wsse:Username>%s</wsse:Username>
                <wsse:Password>%s</wsse:Password>
             </wsse:UsernameToken>
        </wsse:Security>
    ', htmlspecialchars($username), htmlspecialchars($password));
 
    $authvars = new SoapVar($authheader,XSD_ANYXML);
    $header=new SoapHeader("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "Security",$authvars);
    $this->__setSoapHeaders($header);
 
    return $this->__soapCall('Injuries', array($InjuriesRequest),       array(
            'uri' => 'http://donbest.com/injuries/definitions',
            'soapaction' => '',
            $header
           )
      );
  }
 
}
 
?>
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License