[ Index ]
 

Code source de Mantis 1.1.0rc3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/api/soap/ -> mantisconnect.php (source)

   1  <?php
   2      # MantisConnect - A webservice interface to Mantis Bug Tracker
   3      # Copyright (C) 2004-2007  Victor Boctor - vboctor@users.sourceforge.net
   4      # This program is distributed under dual licensing.  These include
   5      # GPL and a commercial licenses.  Victor Boctor reserves the right to
   6      # change the license of future releases.
   7      # See docs/ folder for more details
   8  
   9      # --------------------------------------------------------
  10      # $Id: mantisconnect.php,v 1.1 2007-07-18 06:52:47 vboctor Exp $
  11      # --------------------------------------------------------
  12  
  13      $t_current_dir = dirname( __FILE__ ) . DIRECTORY_SEPARATOR;
  14      $t_nusoap_dir  = $t_current_dir . 'nusoap';
  15  
  16      # includes nusoap classes
  17      chdir( $t_nusoap_dir );
  18      require_once( 'nusoap.php' );
  19      chdir( $t_current_dir );
  20  
  21      # create server
  22      $l_oServer = new soap_server();
  23  
  24      # namespace
  25      $t_namespace = 'http://futureware.biz/mantisconnect';
  26  
  27      # wsdl generation
  28      $l_oServer->debug_flag = false;
  29      $l_oServer->configureWSDL( 'MantisConnect', $t_namespace );
  30      $l_oServer->wsdl->schemaTargetNamespace = $t_namespace;
  31      // The following will make the default encoding UTF-8 instead of ISO-8859-1
  32      // WS-I Basic Profile requires UTF-8 or UTF-16 as the encoding for interoperabilty
  33      // reasons.  This will correctly handle a large number of languages besides English.
  34      $l_oServer->xml_encoding = "UTF-8";
  35      $l_oServer->soap_defencoding = "UTF-8";
  36      $l_oServer->decode_utf8 = false;
  37      
  38      
  39  
  40  
  41      ###
  42      ###  PUBLIC TYPES
  43      ###
  44  
  45      ### StringArray
  46      $l_oServer->wsdl->addComplexType(
  47          'StringArray',
  48          'complexType',
  49          'array',
  50          '',
  51          'SOAP-ENC:Array',
  52          array(),
  53          array(array(
  54              'ref'                => 'SOAP-ENC:arrayType',
  55              'wsdl:arrayType'    => 'xsd:string[]'
  56          )),
  57          'xsd:string'
  58      );
  59  
  60  
  61      ### ObjectRef
  62      $l_oServer->wsdl->addComplexType(
  63          'ObjectRef',
  64          'complexType',
  65          'struct',
  66          'all',
  67          '',
  68          array(
  69              'id'    =>    array( 'name' => 'id',        'type' => 'xsd:integer',     'minOccurs' => '0'),
  70              'name'    =>    array( 'name' => 'name',    'type' => 'xsd:string',     'minOccurs' => '0')
  71          )
  72      );
  73  
  74      ### ObjectRefArray
  75      $l_oServer->wsdl->addComplexType(
  76          'ObjectRefArray',
  77          'complexType',
  78          'array',
  79          '',
  80          'SOAP-ENC:Array',
  81          array(),
  82          array(array(
  83              'ref'                => 'SOAP-ENC:arrayType',
  84              'wsdl:arrayType'    => 'tns:ObjectRef[]'
  85          )),
  86          'tns:ObjectRef'
  87      );
  88  
  89  
  90      ### AccountData
  91      $l_oServer->wsdl->addComplexType(
  92          'AccountData',
  93          'complexType',
  94          'struct',
  95          'all',
  96          '',
  97          array(
  98              'id'        =>    array( 'name' => 'id',            'type' => 'xsd:integer',    'minOccurs' => '0'),
  99              'name'        =>    array( 'name' => 'name',        'type' => 'xsd:string',    'minOccurs' => '0'),
 100              'real_name'    =>    array( 'name' => 'real_name',    'type' => 'xsd:string',    'minOccurs' => '0'),
 101              'email'        =>    array( 'name' => 'email',        'type' => 'xsd:string',    'minOccurs' => '0')
 102          )
 103      );
 104  
 105      ### AccountDataArray
 106      $l_oServer->wsdl->addComplexType(
 107          'AccountDataArray',
 108          'complexType',
 109          'array',
 110          '',
 111          'SOAP-ENC:Array',
 112          array(),
 113          array(array(
 114              'ref'                => 'SOAP-ENC:arrayType',
 115              'wsdl:arrayType'    => 'tns:AccountData[]'
 116          )),
 117          'tns:AccountData'
 118      );
 119  
 120  
 121      ### AttachmentData
 122      $l_oServer->wsdl->addComplexType(
 123          'AttachmentData',
 124          'complexType',
 125          'struct',
 126          'all',
 127          '',
 128          array(
 129              'id'                =>    array( 'name' => 'id',                'type' => 'xsd:integer',     'minOccurs' => '0'),
 130              'filename'            =>    array( 'name' => 'filename',        'type' => 'xsd:string',     'minOccurs' => '0'),
 131              'size'                =>    array( 'name' => 'size',            'type' => 'xsd:integer',     'minOccurs' => '0'),
 132              'content_type'        =>    array( 'name' => 'content_type',    'type' => 'xsd:string',     'minOccurs' => '0'),
 133              'date_submitted'    =>    array( 'name' => 'date_submitted',    'type' => 'xsd:dateTime',     'minOccurs' => '0'),
 134              'download_url'        =>    array( 'name' => 'download_url',    'type' => 'xsd:anyURI',     'minOccurs' => '0')
 135          )
 136      );
 137  
 138  
 139      ### AttachmentDataArray
 140      $l_oServer->wsdl->addComplexType(
 141          'AttachmentDataArray',
 142          'complexType',
 143          'array',
 144          '',
 145          'SOAP-ENC:Array',
 146          array(),
 147          array(array(
 148              'ref'                => 'SOAP-ENC:arrayType',
 149              'wsdl:arrayType'    => 'tns:AttachmentData[]'
 150          )),
 151          'tns:AttachmentData'
 152      );
 153  
 154  
 155      ### ProjectAttachmentData
 156      $l_oServer->wsdl->addComplexType(
 157          'ProjectAttachmentData',
 158          'complexType',
 159          'struct',
 160          'all',
 161          '',
 162          array(
 163              'id'                =>    array( 'name' => 'id',                'type' => 'xsd:integer',     'minOccurs' => '0'),
 164              'filename'            =>    array( 'name' => 'filename',        'type' => 'xsd:string',     'minOccurs' => '0'),
 165              'title'                =>    array( 'name' => 'title',            'type' => 'xsd:string',     'minOccurs' => '0'),
 166              'description'        =>    array( 'name' => 'description',        'type' => 'xsd:string',     'minOccurs' => '0'),
 167              'size'                =>    array( 'name' => 'size',            'type' => 'xsd:integer',     'minOccurs' => '0'),
 168              'content_type'        =>    array( 'name' => 'content_type',    'type' => 'xsd:string',     'minOccurs' => '0'),
 169              'date_submitted'    =>    array( 'name' => 'date_submitted',    'type' => 'xsd:dateTime',     'minOccurs' => '0'),
 170              'download_url'        =>    array( 'name' => 'download_url',    'type' => 'xsd:anyURI',     'minOccurs' => '0')
 171          )
 172      );
 173  
 174  
 175      ### ProjectAttachmentDataArray
 176      $l_oServer->wsdl->addComplexType(
 177          'ProjectAttachmentDataArray',
 178          'complexType',
 179          'array',
 180          '',
 181          'SOAP-ENC:Array',
 182          array(),
 183          array(array(
 184              'ref'                => 'SOAP-ENC:arrayType',
 185              'wsdl:arrayType'    => 'tns:ProjectAttachmentData[]'
 186          )),
 187          'tns:ProjectAttachmentData'
 188      );
 189  
 190  
 191      ### RelationshipData
 192      $l_oServer->wsdl->addComplexType(
 193          'RelationshipData',
 194          'complexType',
 195          'struct',
 196          'all',
 197          '',
 198          array(
 199              'id'        =>    array( 'name' => 'id',            'type' => 'xsd:integer',    'minOccurs' => '0'),
 200              'type'        =>    array( 'name' => 'type',        'type' => 'tns:ObjectRef',     'minOccurs' => '0'),
 201              'target_id'    =>    array( 'name' => 'target_id',    'type' => 'xsd:integer',     'minOccurs' => '0')
 202          )
 203      );
 204  
 205      ### RelationshipDataArray
 206      $l_oServer->wsdl->addComplexType(
 207          'RelationshipDataArray',
 208          'complexType',
 209          'array',
 210          '',
 211          'SOAP-ENC:Array',
 212          array(),
 213          array(array(
 214              'ref'                => 'SOAP-ENC:arrayType',
 215              'wsdl:arrayType'    => 'tns:RelationshipData[]'
 216          )),
 217          'tns:RelationshipData'
 218      );
 219  
 220  
 221      ### IssueNoteData
 222      $l_oServer->wsdl->addComplexType(
 223          'IssueNoteData',
 224          'complexType',
 225          'struct',
 226          'all',
 227          '',
 228          array(
 229              'id'                =>    array( 'name' => 'id',                'type' => 'xsd:integer', 'minOccurs' => '0'),
 230              'reporter'            =>    array( 'name' => 'reporter',        'type' => 'tns:AccountData', 'minOccurs' => '0'),
 231              'text'                =>    array( 'name' => 'text',            'type' => 'xsd:string', 'minOccurs' => '0'),
 232              'view_state'        =>    array( 'name' => 'view_state',        'type' => 'tns:ObjectRef', 'minOccurs' => '0'),
 233              'date_submitted'    =>    array( 'name' => 'date_submitted',    'type' => 'xsd:dateTime', 'minOccurs' => '0'),
 234              'last_modified'        =>    array( 'name' => 'last_modified',    'type' => 'xsd:dateTime', 'minOccurs' => '0')
 235          )
 236      );
 237  
 238  
 239      ### IssueNoteDataArray
 240      $l_oServer->wsdl->addComplexType(
 241          'IssueNoteDataArray',
 242          'complexType',
 243          'array',
 244          '',
 245          'SOAP-ENC:Array',
 246          array(),
 247          array(array(
 248              'ref'                => 'SOAP-ENC:arrayType',
 249              'wsdl:arrayType'    => 'tns:IssueNoteData[]'
 250          )),
 251          'tns:IssueNoteData'
 252      );
 253  
 254  
 255      ### IssueData
 256      $l_oServer->wsdl->addComplexType(
 257          'IssueData',
 258          'complexType',
 259          'struct',
 260          'all',
 261          '',
 262          array(
 263              'id'            =>    array( 'name' => 'id',                'type' => 'xsd:integer',     'minOccurs' => '0' ),
 264              'view_state'    =>    array( 'name' => 'view_state',        'type' => 'tns:ObjectRef',     'minOccurs' => '0' ),
 265              'last_updated'    =>    array( 'name' => 'last_updated',    'type' => 'xsd:dateTime',     'minOccurs' => '0' ),
 266  
 267              'project'    =>    array( 'name' => 'project',        'type' => 'tns:ObjectRef',     'minOccurs' => '0' ),
 268              'category'    =>    array( 'name' => 'category',    'type' => 'xsd:string',     'minOccurs' => '0' ),
 269              'priority'    =>    array( 'name' => 'priority',    'type' => 'tns:ObjectRef',     'minOccurs' => '0' ),
 270              'severity'    =>    array( 'name' => 'severity',    'type' => 'tns:ObjectRef',     'minOccurs' => '0' ),
 271              'status'    =>    array( 'name' => 'status',        'type' => 'tns:ObjectRef',    'minOccurs' => '0' ),
 272  
 273              'reporter'            =>    array( 'name' => 'reporter',        'type' => 'tns:AccountData',    'minOccurs' => '0' ),
 274              'summary'            =>    array( 'name' => 'summary',            'type' => 'xsd:string',     'minOccurs' => '0' ),
 275              'version'            =>    array( 'name' => 'version',            'type' => 'xsd:string',     'minOccurs' => '0' ),
 276              'build'                =>    array( 'name' => 'build',            'type' => 'xsd:string',     'minOccurs' => '0' ),
 277              'platform'            =>    array( 'name' => 'platform',        'type' => 'xsd:string',     'minOccurs' => '0' ),
 278              'os'                =>    array( 'name' => 'os',                'type' => 'xsd:string',     'minOccurs' => '0' ),
 279              'os_build'            =>    array( 'name' => 'os_build',        'type' => 'xsd:string',     'minOccurs' => '0' ),
 280              'reproducibility'    =>    array( 'name' => 'reproducibility', 'type' => 'tns:ObjectRef',     'minOccurs' => '0' ),
 281              'date_submitted'    =>    array( 'name' => 'date_submitted',    'type' => 'xsd:dateTime',     'minOccurs' => '0' ),
 282  
 283              'sponsorship_total' =>    array( 'name' => 'sponsorship_total',    'type' => 'xsd:integer',     'minOccurs' => '0' ),
 284  
 285              'handler'        =>    array( 'name' => 'handler',        'type' => 'tns:AccountData',     'minOccurs' => '0' ),
 286              'projection'    =>    array( 'name' => 'projection',    'type' => 'tns:ObjectRef',     'minOccurs' => '0' ),
 287              'eta'            =>    array( 'name' => 'eta',            'type' => 'tns:ObjectRef',     'minOccurs' => '0' ),
 288  
 289              'resolution'        =>    array( 'name' => 'resolution',        'type' => 'tns:ObjectRef',     'minOccurs' => '0' ),
 290              'fixed_in_version'    =>    array( 'name'=>'fixed_in_version',    'type' => 'xsd:string',     'minOccurs' => '0' ),
 291  
 292              'description'                =>    array( 'name' => 'description',                'type' => 'xsd:string',     'minOccurs' => '0' ),
 293              'steps_to_reproduce'        =>    array( 'name' => 'steps_to_reproduce',        'type' => 'xsd:string',     'minOccurs' => '0' ),
 294              'additional_information'    =>    array( 'name' => 'additional_information',    'type' => 'xsd:string',     'minOccurs' => '0' ),
 295  
 296              'attachments'                =>    array( 'name' => 'attachments',             'type' => 'tns:AttachmentDataArray',     'minOccurs' => '0' ),
 297              'relationships'                =>    array( 'name' => 'relationships',            'type' => 'tns:RelationshipDataArray',     'minOccurs' => '0' ),
 298              'notes'                        =>    array( 'name' => 'notes',                    'type' => 'tns:IssueNoteDataArray',     'minOccurs' => '0' ),
 299              'custom_fields'                =>  array( 'name' => 'custom_fields',            'type' => 'tns:CustomFieldValueForIssueDataArray',     'minOccurs' => '0' )
 300          )
 301      );
 302  
 303      ### IssueDataArray
 304      $l_oServer->wsdl->addComplexType(
 305          'IssueDataArray',
 306          'complexType',
 307          'array',
 308          '',
 309          'SOAP-ENC:Array',
 310          array(),
 311          array(array(
 312              'ref'                => 'SOAP-ENC:arrayType',
 313              'wsdl:arrayType'    => 'tns:IssueData[]'
 314          )),
 315          'tns:IssueData'
 316      );
 317      
 318      
 319      ### IssueHeaderData
 320      $l_oServer->wsdl->addComplexType(
 321          'IssueHeaderData',
 322          'complexType',
 323          'struct',
 324          'all',
 325          '',
 326          array(
 327              'id'            =>    array( 'name' => 'id',                'type' => 'xsd:integer' ),
 328              'view_state'    =>    array( 'name' => 'view_state',        'type' => 'xsd:integer' ),
 329              'last_updated'    =>    array( 'name' => 'last_updated',    'type' => 'xsd:dateTime' ),
 330  
 331              'project'    =>    array( 'name' => 'project',        'type' => 'xsd:integer' ),
 332              'category'    =>    array( 'name' => 'category',    'type' => 'xsd:string' ),
 333              'priority'    =>    array( 'name' => 'priority',    'type' => 'xsd:integer' ),
 334              'severity'    =>    array( 'name' => 'severity',    'type' => 'xsd:integer' ),
 335              'status'    =>    array( 'name' => 'status',        'type' => 'xsd:integer' ),
 336  
 337              'reporter'            =>    array( 'name' => 'reporter',        'type' => 'xsd:integer' ),
 338              'summary'            =>    array( 'name' => 'summary',            'type' => 'xsd:string' ),
 339              'handler'        =>    array( 'name' => 'handler',        'type' => 'xsd:integer' ),
 340              'resolution'        =>    array( 'name' => 'resolution',        'type' => 'xsd:integer' ),
 341              
 342              'attachments_count'    =>    array( 'name' => 'attachments_count',     'type' => 'xsd:integer' ),
 343              'notes_count'    =>    array( 'name' => 'notes_count',     'type' => 'xsd:integer' ),
 344          )
 345      );
 346  
 347      ### IssueHeaderDataArray
 348      $l_oServer->wsdl->addComplexType(
 349          'IssueHeaderDataArray',
 350          'complexType',
 351          'array',
 352          '',
 353          'SOAP-ENC:Array',
 354          array(),
 355          array(array(
 356              'ref'                => 'SOAP-ENC:arrayType',
 357              'wsdl:arrayType'    => 'tns:IssueHeaderData[]'
 358          )),
 359          'tns:IssueHeaderData'
 360      );
 361  
 362  
 363      ### ProjectData
 364      $l_oServer->wsdl->addComplexType(
 365          'ProjectData',
 366          'complexType',
 367          'struct',
 368          'all',
 369          '',
 370          array(
 371              'id'            =>    array( 'name' => 'id',            'type' => 'xsd:integer',    'minOccurs' => '0' ),
 372              'name'            =>    array( 'name' => 'name',        'type' => 'xsd:string',    'minOccurs' => '0' ),
 373              'status'        =>    array( 'name' => 'status',        'type' => 'tns:ObjectRef',    'minOccurs' => '0' ),
 374              'enabled'        =>    array( 'name' => 'enabled',        'type' => 'xsd:boolean',    'minOccurs' => '0' ),
 375              'view_state'    =>    array( 'name' => 'view_state',    'type' => 'tns:ObjectRef',    'minOccurs' => '0' ),
 376              'access_min'    =>    array( 'name' => 'access_min',    'type' => 'tns:ObjectRef',    'minOccurs' => '0' ),
 377              'file_path'        =>    array( 'name' => 'file_path',    'type' => 'xsd:string',    'minOccurs' => '0' ),
 378              'description'    =>    array( 'name' => 'description',    'type' => 'xsd:string',    'minOccurs' => '0' ),
 379              'subprojects'    =>    array( 'name' => 'subprojects',    'type' => 'tns:ProjectDataArray', 'minOccurs' => '0' )
 380          )
 381      );
 382  
 383      ### ProjectDataArray
 384      $l_oServer->wsdl->addComplexType(
 385          'ProjectDataArray',
 386          'complexType',
 387          'array',
 388          '',
 389          'SOAP-ENC:Array',
 390          array(),
 391          array(array(
 392              'ref'                => 'SOAP-ENC:arrayType',
 393              'wsdl:arrayType'    => 'tns:ProjectData[]'
 394          )),
 395          'tns:ProjectData'
 396      );
 397  
 398  
 399      ### ProjectVersionData
 400      $l_oServer->wsdl->addComplexType(
 401          'ProjectVersionData',
 402          'complexType',
 403          'struct',
 404          'all',
 405          '',
 406          array(
 407              'id'            =>    array( 'name' => 'id',            'type' => 'xsd:integer',     'minOccurs' => '0' ),
 408              'name'            =>    array( 'name' => 'name',        'type' => 'xsd:string',     'minOccurs' => '0' ),
 409              'project_id'    =>    array( 'name' => 'project_id',    'type' => 'xsd:integer',     'minOccurs' => '0' ),
 410              'date_order'    =>    array( 'name' => 'date_order',    'type' => 'xsd:dateTime',     'minOccurs' => '0' ),
 411              'description'    =>    array( 'name' => 'description',    'type' => 'xsd:string',     'minOccurs' => '0' ),
 412              'released'        =>    array( 'name' => 'released',    'type' => 'xsd:boolean',     'minOccurs' => '0' )
 413          )
 414      );
 415  
 416      ### ProjectVersionDataArray
 417      $l_oServer->wsdl->addComplexType(
 418          'ProjectVersionDataArray',
 419          'complexType',
 420          'array',
 421          '',
 422          'SOAP-ENC:Array',
 423          array(),
 424          array(array(
 425              'ref'                => 'SOAP-ENC:arrayType',
 426              'wsdl:arrayType'    => 'tns:ProjectVersionData[]'
 427          )),
 428          'tns:ProjectVersionData'
 429      );
 430  
 431  
 432      ### FilterData
 433      $l_oServer->wsdl->addComplexType(
 434          'FilterData',
 435          'complexType',
 436          'struct',
 437          'all',
 438          '',
 439          array(
 440              'id'            =>    array( 'name' => 'id',                'type' => 'xsd:integer',     'minOccurs' => '0' ),
 441              'owner'            =>    array( 'name' => 'owner',            'type' => 'tns:AccountData',     'minOccurs' => '0' ),
 442              'project_id'    =>    array( 'name' => 'project_id',        'type' => 'xsd:integer',     'minOccurs' => '0' ),
 443              'is_public'        =>    array( 'name' => 'is_public',        'type' => 'xsd:boolean',     'minOccurs' => '0' ),
 444              'name'            =>    array( 'name' => 'name',            'type' => 'xsd:string',     'minOccurs' => '0' ),
 445              'filter_string'    =>    array( 'name' => 'filter_string',    'type' => 'xsd:string',     'minOccurs' => '0' )
 446          )
 447      );
 448  
 449      ### FilterDataArray
 450      $l_oServer->wsdl->addComplexType(
 451          'FilterDataArray',
 452          'complexType',
 453          'array',
 454          '',
 455          'SOAP-ENC:Array',
 456          array(),
 457          array(array(
 458              'ref'                => 'SOAP-ENC:arrayType',
 459              'wsdl:arrayType'    => 'tns:FilterData[]'
 460          )),
 461          'tns:FilterData'
 462      );
 463  
 464      ### CustomFieldDefinitionData
 465      $l_oServer->wsdl->addComplexType(
 466          'CustomFieldDefinitionData',
 467          'complexType',
 468          'struct',
 469          'all',
 470          '',
 471          array(
 472              'field'                =>    array( 'name' => 'field',            'type' => 'tns:ObjectRef',     'minOccurs' => '0'),
 473              'type'                =>    array( 'name' => 'type',            'type' => 'xsd:integer',     'minOccurs' => '0'),
 474              'possible_values'    =>    array( 'name' => 'possible_values',    'type' => 'xsd:string',     'minOccurs' => '0'),
 475              'default_value'        =>    array( 'name' => 'default_value',    'type' => 'xsd:string',     'minOccurs' => '0'),
 476              'valid_regexp'        =>    array( 'name' => 'valid_regexp',    'type' => 'xsd:string',     'minOccurs' => '0'),
 477              'access_level_r'    =>    array( 'name' => 'access_level_r',    'type' => 'xsd:integer',     'minOccurs' => '0'),
 478              'access_level_rw'    =>    array( 'name' => 'access_level_rw',    'type' => 'xsd:integer',     'minOccurs' => '0'),
 479              'length_min'        =>    array( 'name' => 'length_min',        'type' => 'xsd:integer',     'minOccurs' => '0'),
 480              'length_max'        =>    array( 'name' => 'length_max',        'type' => 'xsd:integer',     'minOccurs' => '0'),
 481              'advanced'            =>    array( 'name' => 'advanced',        'type' => 'xsd:boolean',     'minOccurs' => '0'),
 482              'display_report'    =>    array( 'name' => 'display_report',    'type' => 'xsd:boolean',     'minOccurs' => '0'),
 483              'display_update'    =>    array( 'name' => 'display_update',    'type' => 'xsd:boolean',     'minOccurs' => '0'),
 484              'display_resolved'    =>    array( 'name' => 'display_resolved','type' => 'xsd:boolean',     'minOccurs' => '0'),
 485              'display_closed'    =>    array( 'name' => 'display_closed',    'type' => 'xsd:boolean',     'minOccurs' => '0'),
 486              'require_report'    =>    array( 'name' => 'require_report',    'type' => 'xsd:boolean',     'minOccurs' => '0'),
 487              'require_update'    =>    array( 'name' => 'require_update',    'type' => 'xsd:boolean',     'minOccurs' => '0'),
 488              'require_resolved'    =>    array( 'name' => 'require_resolved','type' => 'xsd:boolean',     'minOccurs' => '0'),
 489              'require_closed'    =>    array( 'name' => 'require_closed',    'type' => 'xsd:boolean',     'minOccurs' => '0')
 490          )
 491      );
 492  
 493  
 494      ### CustomFieldDefinitionDataArray
 495      $l_oServer->wsdl->addComplexType(
 496          'CustomFieldDefinitionDataArray',
 497          'complexType',
 498          'array',
 499          '',
 500          'SOAP-ENC:Array',
 501          array(),
 502          array(array(
 503              'ref'                => 'SOAP-ENC:arrayType',
 504              'wsdl:arrayType'    => 'tns:CustomFieldDefinitionData[]'
 505          )),
 506          'tns:CustomFieldDefinitionData'
 507      );
 508  
 509  
 510      ### CustomFieldLinkForProjectData
 511      $l_oServer->wsdl->addComplexType(
 512          'CustomFieldLinkForProjectData',
 513          'complexType',
 514          'struct',
 515          'all',
 516          '',
 517          array(
 518              'field'                =>    array( 'name' => 'field',            'type' => 'tns:ObjectRef',     'minOccurs' => '0'),
 519              'sequence'            =>    array( 'name' => 'sequence',        'type' => 'xsd:byte',     'minOccurs' => '0')
 520          )
 521      );
 522  
 523  
 524      ### CustomFieldLinkForProjectDataArray
 525      $l_oServer->wsdl->addComplexType(
 526          'CustomFieldLinkForProjectDataArray',
 527          'complexType',
 528          'array',
 529          '',
 530          'SOAP-ENC:Array',
 531          array(),
 532          array(array(
 533              'ref'                => 'SOAP-ENC:arrayType',
 534              'wsdl:arrayType'    => 'tns:CustomFieldLinkForProjectData[]'
 535          )),
 536          'tns:CustomFieldLinkForProjectData'
 537      );
 538  
 539  
 540      ### CustomFieldValueForIssueData
 541      $l_oServer->wsdl->addComplexType(
 542          'CustomFieldValueForIssueData',
 543          'complexType',
 544          'struct',
 545          'all',
 546          '',
 547          array(
 548              'field'                =>    array( 'name' => 'field',            'type' => 'tns:ObjectRef',     'minOccurs' => '0'),
 549              'value'                =>    array( 'name' => 'value',            'type' => 'xsd:string',     'minOccurs' => '0')
 550          )
 551      );
 552  
 553  
 554      ### CustomFieldValueForIssueDataArray
 555      $l_oServer->wsdl->addComplexType(
 556          'CustomFieldValueForIssueDataArray',
 557          'complexType',
 558          'array',
 559          '',
 560          'SOAP-ENC:Array',
 561          array(),
 562          array(array(
 563              'ref'                => 'SOAP-ENC:arrayType',
 564              'wsdl:arrayType'    => 'tns:CustomFieldValueForIssueData[]'
 565          )),
 566          'tns:CustomFieldValueForIssueData'
 567      );
 568  
 569  
 570      ###
 571      ###  PUBLIC METHODS
 572      ###
 573  
 574      ### mc_version
 575      $l_oServer->register( 'mc_version',
 576          array(),
 577          array(
 578              'return'    =>    'xsd:string'
 579          ),
 580          $t_namespace
 581      );
 582  
 583      ###
 584      ###  PUBLIC METHODS (defined in mc_enum_api.php)
 585      ###
 586  
 587      ### mc_enum_status
 588      $l_oServer->register( 'mc_enum_status',
 589          array(
 590              'username'    =>    'xsd:string',
 591              'password'    =>    'xsd:string'
 592          ),
 593          array(
 594              'return'    =>    'tns:ObjectRefArray'
 595          ),
 596          $t_namespace,
 597          false, false, false,
 598          'Get the enumeration for statuses.'
 599      );
 600  
 601      ### mc_enum_priorities
 602      $l_oServer->register( 'mc_enum_priorities',
 603          array(
 604              'username'    =>    'xsd:string',
 605              'password'    =>    'xsd:string'
 606          ),
 607          array(
 608              'return'    =>    'tns:ObjectRefArray'
 609          ),
 610          $t_namespace,
 611          false, false, false,
 612          'Get the enumeration for priorities.'
 613      );
 614  
 615      ### mc_enum_severities
 616      $l_oServer->register( 'mc_enum_severities',
 617          array(
 618              'username'    =>    'xsd:string',
 619              'password'    =>    'xsd:string'
 620          ),
 621          array(
 622              'return'    =>    'tns:ObjectRefArray'
 623          ),
 624          $t_namespace,
 625          false, false, false,
 626          'Get the enumeration for severities.'
 627      );
 628  
 629      ### mc_enum_reproducibilities
 630      $l_oServer->register( 'mc_enum_reproducibilities',
 631          array(
 632              'username'    =>    'xsd:string',
 633              'password'    =>    'xsd:string'
 634          ),
 635          array(
 636              'return'    =>    'tns:ObjectRefArray'
 637          ),
 638          $t_namespace,
 639          false, false, false,
 640          'Get the enumeration for reproducibilities.'
 641      );
 642  
 643      ### mc_enum_projections
 644      $l_oServer->register( 'mc_enum_projections',
 645          array(
 646              'username'    =>    'xsd:string',
 647              'password'    =>    'xsd:string'
 648          ),
 649          array(
 650              'return'    =>    'tns:ObjectRefArray'
 651          ),
 652          $t_namespace,
 653          false, false, false,
 654          'Get the enumeration for projections.'
 655      );
 656  
 657      ### mc_enum_etas
 658      $l_oServer->register( 'mc_enum_etas',
 659          array(
 660              'username'    =>    'xsd:string',
 661              'password'    =>    'xsd:string'
 662          ),
 663          array(
 664              'return'    =>    'tns:ObjectRefArray'
 665          ),
 666          $t_namespace,
 667          false, false, false,
 668          'Get the enumeration for ETAs.'
 669      );
 670  
 671      ### mc_enum_resolutions
 672      $l_oServer->register( 'mc_enum_resolutions',
 673          array(
 674              'username'    =>    'xsd:string',
 675              'password'    =>    'xsd:string'
 676          ),
 677          array(
 678              'return'    =>    'tns:ObjectRefArray'
 679          ),
 680          $t_namespace,
 681          false, false, false,
 682          'Get the enumeration for resolutions.'
 683      );
 684  
 685      ### mc_enum_access_levels
 686      $l_oServer->register( 'mc_enum_access_levels',
 687          array(
 688              'username'    =>    'xsd:string',
 689              'password'    =>    'xsd:string'
 690          ),
 691          array(
 692              'return'    =>    'tns:ObjectRefArray'
 693          ),
 694          $t_namespace,
 695          false, false, false,
 696          'Get the enumeration for access levels.'
 697      );
 698  
 699      ### mc_enum_project_status
 700      $l_oServer->register( 'mc_enum_project_status',
 701          array(
 702              'username'    =>    'xsd:string',
 703              'password'    =>    'xsd:string'
 704          ),
 705          array(
 706              'return'    =>    'tns:ObjectRefArray'
 707          ),
 708          $t_namespace,
 709          false, false, false,
 710          'Get the enumeration for project statuses.'
 711      );
 712  
 713      ### mc_enum_project_view_states
 714      $l_oServer->register( 'mc_enum_project_view_states',
 715          array(
 716              'username'    =>    'xsd:string',
 717              'password'    =>    'xsd:string'
 718          ),
 719          array(
 720              'return'    =>    'tns:ObjectRefArray'
 721          ),
 722          $t_namespace,
 723          false, false, false,
 724          'Get the enumeration for project view states.'
 725      );
 726  
 727      ### mc_enum_view_states
 728      $l_oServer->register( 'mc_enum_view_states',
 729          array(
 730              'username'    =>    'xsd:string',
 731              'password'    =>    'xsd:string'
 732          ),
 733          array(
 734              'return'    =>    'tns:ObjectRefArray'
 735          ),
 736          $t_namespace,
 737          false, false, false,
 738          'Get the enumeration for view states.'
 739      );
 740  
 741      ### mc_enum_custom_field_types
 742      $l_oServer->register( 'mc_enum_custom_field_types',
 743          array(
 744              'username'    =>    'xsd:string',
 745              'password'    =>    'xsd:string'
 746          ),
 747          array(
 748              'return'    =>    'tns:ObjectRefArray'
 749          ),
 750          $t_namespace,
 751          false, false, false,
 752          'Get the enumeration for custom field types.'
 753      );
 754  
 755      ### mc_enum_get (should vanish as it has been replaced by more-high level versions)
 756      $l_oServer->register( 'mc_enum_get',
 757          array(
 758              'username'        =>    'xsd:string',
 759              'password'        =>    'xsd:string',
 760              'enumeration'    =>    'xsd:string'
 761          ),
 762          array(
 763              'return'    =>    'xsd:string'
 764          ),
 765          $t_namespace,
 766          false, false, false,
 767          'Get the enumeration for the specified enumeration type.'
 768      );
 769  
 770  
 771      ###
 772      ###  PUBLIC METHODS (defined in mc_issue_api.php)
 773      ###
 774  
 775      ### mc_issue_exists
 776      $l_oServer->register( 'mc_issue_exists',
 777          array(
 778              'username'    =>    'xsd:string',
 779              'password'    =>    'xsd:string',
 780              'issue_id'    =>    'xsd:integer'
 781          ),
 782          array(
 783              'return'    =>    'xsd:boolean'
 784          ),
 785          $t_namespace,
 786          false, false, false,
 787          'Check there exists an issue with the specified id.'
 788      );
 789  
 790      ### mc_issue_get
 791      $l_oServer->register( 'mc_issue_get',
 792          array(
 793              'username'    =>    'xsd:string',
 794              'password'    =>    'xsd:string',
 795              'issue_id'    =>    'xsd:integer'
 796          ),
 797          array(
 798              'return'    =>    'tns:IssueData'
 799          ),
 800          $t_namespace,
 801          false, false, false,
 802          'Get the issue with the specified id.'
 803      );
 804  
 805      ### mc_issue_get_biggest_id
 806      $l_oServer->register( 'mc_issue_get_biggest_id',
 807          array(
 808              'username'    =>    'xsd:string',
 809              'password'    =>    'xsd:string',
 810              'project_id'=>    'xsd:integer'
 811          ),
 812          array(
 813              'return'    =>    'xsd:integer'
 814          ),
 815          $t_namespace,
 816          false, false, false,
 817          'Get the latest submitted issue in the specified project.'
 818      );
 819  
 820      ### mc_issue_get_id_from_summary (should be replaced with a more general search that returns matching issues directly)
 821      $l_oServer->register( 'mc_issue_get_id_from_summary',
 822          array(
 823              'username'    =>    'xsd:string',
 824              'password'    =>    'xsd:string',
 825              'summary'    =>    'xsd:string'
 826          ),
 827          array(
 828              'return'    =>    'xsd:integer'
 829          ),
 830          $t_namespace,
 831          false, false, false,
 832          'Get the id of the issue with the specified summary.'
 833      );
 834  
 835      ### mc_issue_add
 836      $l_oServer->register( 'mc_issue_add',
 837          array(
 838              'username'    =>    'xsd:string',
 839              'password'    =>    'xsd:string',
 840              'issue'        =>    'tns:IssueData'
 841          ),
 842          array(
 843              'return'    =>    'xsd:integer'
 844          ),
 845          $t_namespace,
 846          false, false, false,
 847          'Submit the specified issue details.'
 848      );
 849  
 850      ### mc_issue_update
 851      $l_oServer->register( 'mc_issue_update',
 852          array(
 853              'username' => 'xsd:string',
 854              'password' => 'xsd:string',
 855              'issueId' => 'xsd:integer',
 856              'issue' => 'tns:IssueData'
 857               ),
 858          array(
 859              'return' => 'xsd:boolean'
 860          ),
 861          $t_namespace,
 862          false, false, false,
 863          'Update Issue method.'
 864      );
 865  
 866      ### mc_issue_delete
 867      $l_oServer->register( 'mc_issue_delete',
 868          array(
 869              'username'    =>    'xsd:string',
 870              'password'    =>    'xsd:string',
 871              'issue_id'    =>    'xsd:integer'
 872          ),
 873          array(
 874              'return'    =>    'xsd:boolean'
 875          ),
 876          $t_namespace,
 877          false, false, false,
 878          'Delete the issue with the specified id.'
 879      );
 880  
 881      ### mc_issue_note_add
 882       $l_oServer->register( 'mc_issue_note_add',
 883           array(
 884              'username'    =>    'xsd:string',
 885               'password'    =>    'xsd:string',
 886               'issue_id'    =>    'xsd:integer',
 887               'note'         =>    'tns:IssueNoteData'
 888           ),
 889           array(
 890              'return'    =>    'xsd:integer'
 891          ),
 892           $t_namespace,
 893          false, false, false,
 894          'Submit a new note.'
 895       );
 896  
 897      ### mc_issue_note_delete
 898      $l_oServer->register( 'mc_issue_note_delete',
 899          array(
 900              'username'    =>    'xsd:string',
 901              'password'    =>    'xsd:string',
 902              'issue_note_id'    =>    'xsd:integer'
 903          ),
 904          array(
 905              'return'    =>    'xsd:boolean'
 906          ),
 907          $t_namespace,
 908          false, false, false,
 909          'Delete the note with the specified id.'
 910      );
 911      
 912      ### mc_issue_relationship_add
 913       $l_oServer->register( 'mc_issue_relationship_add',
 914           array(
 915              'username'        =>    'xsd:string',
 916               'password'        =>    'xsd:string',
 917               'issue_id'        =>    'xsd:integer',
 918               'relationship'    =>    'tns:RelationshipData'
 919           ),
 920           array(
 921              'return'    =>    'xsd:integer'
 922          ),
 923           $t_namespace,
 924          false, false, false,
 925          'Submit a new relationship.'
 926       );
 927  
 928      ### mc_issue_relationship_delete
 929      $l_oServer->register( 'mc_issue_relationship_delete',
 930          array(
 931              'username'            =>    'xsd:string',
 932              'password'            =>    'xsd:string',
 933              'issue_id'            =>    'xsd:integer',
 934              'relationship_id'    =>    'xsd:integer'
 935          ),
 936          array(
 937              'return'    =>    'xsd:boolean'
 938          ),
 939          $t_namespace,
 940          false, false, false,
 941          'Delete the relationship for the specified issue.'
 942      );
 943      
 944      ### mc_issue_attachment_add
 945       $l_oServer->register( 'mc_issue_attachment_add',
 946           array(
 947              'username'    =>    'xsd:string',
 948               'password'    =>    'xsd:string',
 949               'issue_id'    =>    'xsd:integer',
 950               'name'        =>    'xsd:string',
 951               'file_type'    =>    'xsd:string',
 952               'content'    =>    'xsd:base64Binary'
 953           ),
 954           array(
 955              'return'    =>    'xsd:integer'
 956          ),
 957           $t_namespace,
 958          false, false, false,
 959          'Submit a new issue attachment.'
 960       );
 961  
 962       ### mc_issue_attachment_delete
 963      $l_oServer->register( 'mc_issue_attachment_delete',
 964          array(
 965              'username'    =>    'xsd:string',
 966              'password'    =>    'xsd:string',
 967              'issue_attachment_id'    =>    'xsd:integer'
 968          ),
 969          array(
 970              'return'    =>    'xsd:boolean'
 971          ),
 972          $t_namespace,
 973          false, false, false,
 974          'Delete the issue attachment with the specified id.'
 975      );
 976  
 977      ### mc_attachment_get
 978      $l_oServer->register( 'mc_issue_attachment_get',
 979          array(
 980              'username'        =>    'xsd:string',
 981              'password'        =>    'xsd:string',
 982              'issue_attachment_id'            =>    'xsd:integer'
 983          ),
 984          array(
 985              'return'    =>    'xsd:base64Binary'
 986          ),
 987          $t_namespace,
 988          false, false, false,
 989          'Get the data for the specified issue attachment.'
 990      );
 991  
 992  
 993      ###
 994      ###  PUBLIC METHODS (defined in mc_project_api.php)
 995      ###
 996      
 997      ### mc_project_add
 998      $l_oServer->register( 'mc_project_add',
 999          array( 
1000              'username' => 'xsd:string',
1001              'password' => 'xsd:string',
1002              'project' => 'tns:ProjectData'
1003          ),
1004          array(
1005              'return' => 'xsd:integer'
1006          ),
1007          $t_namespace,
1008          false, false, false,
1009          'Add a new project to the tracker (must have admin privileges)'
1010      );
1011      
1012      ### mc_project_delete
1013      $l_oServer->register( 'mc_project_delete',
1014          array( 
1015              'username' => 'xsd:string',
1016              'password' => 'xsd:string',
1017              'project_id' => 'xsd:integer'
1018          ),
1019          array(
1020              'return' => 'xsd:boolean'
1021          ),
1022          $t_namespace,
1023          false, false, false,
1024          'Add a new project to the tracker (must have admin privileges)'
1025      );
1026      
1027      
1028      ### mc_project_get_issues
1029      $l_oServer->register( 'mc_project_get_issues',
1030          array( 
1031              'username' => 'xsd:string',
1032              'password' => 'xsd:string',
1033              'project_id' => 'xsd:integer',
1034              'page_number' => 'xsd:integer',
1035              'per_page' => 'xsd:integer'
1036          ),
1037          array(
1038              'return' => 'tns:IssueDataArray'
1039          ),
1040          $t_namespace,
1041          false, false, false,
1042          'Get the issues that match the specified project id and paging details.'
1043      );
1044      
1045      ### mc_project_get_issue_headers
1046      $l_oServer->register( 'mc_project_get_issue_headers',
1047          array( 
1048              'username' => 'xsd:string',
1049              'password' => 'xsd:string',
1050              'project_id' => 'xsd:integer',
1051              'page_number' => 'xsd:integer',
1052              'per_page' => 'xsd:integer'
1053          ),
1054          array(
1055              'return' => 'tns:IssueHeaderDataArray'
1056          ),
1057          $t_namespace,
1058          false, false, false,
1059          'Get the issue headers that match the specified project id and paging details.'
1060      );
1061      
1062      ### mc_project_get_users
1063      $l_oServer->register( 'mc_project_get_users',
1064          array(
1065              'username'    =>    'xsd:string',
1066              'password'    =>    'xsd:string',
1067              'project_id'    =>    'xsd:integer',
1068              'access'    =>    'xsd:integer'
1069          ),
1070          array(
1071              'return'    =>    'tns:AccountDataArray'
1072          ),
1073          $t_namespace,
1074          false, false, false,
1075          'Get appropriate users assigned to a project by access level.'
1076      );    
1077  
1078      ### mc_projects_get_user_accessible
1079      $l_oServer->register( 'mc_projects_get_user_accessible',
1080          array(
1081              'username'    =>    'xsd:string',
1082              'password'    =>    'xsd:string'
1083          ),
1084          array(
1085              'return'    =>    'tns:ProjectDataArray'
1086          ),
1087          $t_namespace,
1088          false, false, false,
1089          'Get the list of projects that are accessible to the logged in user.'
1090      );
1091  
1092      ### mc_project_get_categories
1093      $l_oServer->register( 'mc_project_get_categories',
1094          array(
1095              'username'        =>    'xsd:string',
1096              'password'        =>    'xsd:string',
1097              'project_id'    =>    'xsd:integer'
1098          ),
1099          array(
1100              'return'    =>    'tns:StringArray'
1101          ),
1102          $t_namespace,
1103          false, false, false,
1104          'Get the categories belonging to the specified project.'
1105      );
1106  
1107      ### mc_project_get_versions
1108      $l_oServer->register( 'mc_project_get_versions',
1109          array(
1110              'username'        =>    'xsd:string',
1111              'password'        =>    'xsd:string',
1112              'project_id'    =>    'xsd:integer'
1113          ),
1114          array(
1115              'return'    =>    'tns:ProjectVersionDataArray'
1116          ),
1117          $t_namespace,
1118          false, false, false,
1119          'Get the versions belonging to the specified project.'
1120      );
1121      
1122      ### mc_project_version_add
1123      $l_oServer->register( 'mc_project_version_add',
1124          array(
1125              'username'        =>    'xsd:string',
1126              'password'        =>    'xsd:string',
1127              'version'        =>    'tns:ProjectVersionData'
1128          ),
1129          array(
1130              'return'    =>    'xsd:integer'
1131          ),
1132          $t_namespace,
1133          false, false, false,
1134          'Submit the specified version details.'
1135      );
1136      
1137      ### mc_project_version_update
1138      $l_oServer->register( 'mc_project_version_update',
1139          array(
1140              'username'        =>    'xsd:string',
1141              'password'        =>    'xsd:string',
1142              'version_id'    =>    'xsd:integer',
1143              'version'        =>    'tns:ProjectVersionData'
1144          ),
1145          array(
1146              'return'    =>    'xsd:boolean'
1147          ),
1148          $t_namespace,
1149          false, false, false,
1150          'Update version method.'
1151      );
1152      
1153      ### mc_project_version_delete
1154      $l_oServer->register( 'mc_project_version_delete',
1155          array(
1156              'username'        =>    'xsd:string',
1157              'password'        =>    'xsd:string',
1158              'version_id'    =>    'xsd:integer'
1159          ),
1160          array(
1161              'return'    =>    'xsd:boolean'
1162          ),
1163          $t_namespace,
1164          false, false, false,
1165          'Delete the version with the specified id.'
1166      );
1167  
1168      ### mc_project_get_released_versions
1169      $l_oServer->register( 'mc_project_get_released_versions',
1170          array(
1171              'username'        =>    'xsd:string',
1172              'password'        =>    'xsd:string',
1173              'project_id'    =>    'xsd:integer'
1174          ),
1175          array(
1176              'return'    =>    'tns:ProjectVersionDataArray'
1177          ),
1178          $t_namespace,
1179          false, false, false,
1180          'Get the released versions that belong to the specified project.'
1181      );
1182  
1183      ### mc_project_get_unreleased_versions
1184      $l_oServer->register( 'mc_project_get_unreleased_versions',
1185          array(
1186              'username'        =>    'xsd:string',
1187              'password'        =>    'xsd:string',
1188              'project_id'    =>    'xsd:integer'
1189          ),
1190          array(
1191              'return'    =>    'tns:ProjectVersionDataArray'
1192          ),
1193          $t_namespace,
1194          false, false, false,
1195          'Get the unreleased version that belong to the specified project.'
1196      );
1197      
1198      ### mc_project_get_unreleased_versions
1199      $l_oServer->register( 'mc_project_get_attachments',
1200          array(
1201              'username'        =>    'xsd:string',
1202              'password'        =>    'xsd:string',
1203              'project_id'    =>    'xsd:integer'
1204          ),
1205          array(
1206              'return'    =>    'tns:ProjectAttachmentDataArray'
1207          ),
1208          $t_namespace,
1209          false, false, false,
1210          'Get the attachments that belong to the specified project.'
1211      );
1212      
1213      ## mc_project_get_custom_fields
1214      ### mc_project_get_unreleased_versions
1215      $l_oServer->register( 'mc_project_get_custom_fields',
1216          array(
1217              'username'        =>    'xsd:string',
1218              'password'        =>    'xsd:string',
1219              'project_id'    =>    'xsd:integer'
1220          ),
1221          array(
1222              'return'    =>    'tns:CustomFieldDefinitionDataArray'
1223          ),
1224          $t_namespace,
1225          false, false, false,
1226          'Get the custom fields that belong to the specified project.'
1227      );    
1228      
1229      ### mc_project_attachment_get
1230      $l_oServer->register( 'mc_project_attachment_get',
1231          array(
1232              'username'        =>    'xsd:string',
1233              'password'        =>    'xsd:string',
1234              'project_attachment_id'            =>    'xsd:integer'
1235          ),
1236          array(
1237              'return'    =>    'xsd:base64Binary'
1238          ),
1239          $t_namespace,
1240          false, false, false,
1241          'Get the data for the specified project attachment.'
1242      );
1243      
1244      ### mc_issue_attachment_add
1245       $l_oServer->register( 'mc_project_attachment_add',
1246           array(
1247              'username'        =>    'xsd:string',
1248               'password'        =>    'xsd:string',
1249               'project_id'    =>    'xsd:integer',
1250               'name'            =>    'xsd:string',
1251               'title'            =>    'xsd:string',
1252               'description'    =>    'xsd:string',
1253               'file_type'        =>    'xsd:string',
1254               'content'        =>    'xsd:base64Binary'
1255           ),
1256           array(
1257              'return'    =>    'xsd:integer'
1258          ),
1259           $t_namespace,
1260          false, false, false,
1261          'Submit a new project attachment.'
1262       );
1263       
1264        ### mc_project_attachment_delete
1265      $l_oServer->register( 'mc_project_attachment_delete',
1266          array(
1267              'username'    =>    'xsd:string',
1268              'password'    =>    'xsd:string',
1269              'project_attachment_id'    =>    'xsd:integer'
1270          ),
1271          array(
1272              'return'    =>    'xsd:boolean'
1273          ),
1274          $t_namespace,
1275          false, false, false,
1276          'Delete the project attachment with the specified id.'
1277      );
1278  
1279  
1280      ###
1281      ###  PUBLIC METHODS (defined in mc_filter_api.php)
1282      ###
1283  
1284      ### mc_filter_get
1285      $l_oServer->register( 'mc_filter_get',
1286          array(
1287              'username'        =>    'xsd:string',
1288              'password'        =>    'xsd:string',
1289              'project_id'    =>    'xsd:integer'
1290          ),
1291          array(
1292              'return'    =>    'tns:FilterDataArray'
1293          ),
1294          $t_namespace,
1295          false, false, false,
1296          'Get the filters defined for the specified project.'
1297      );
1298  
1299      ### mc_filter_get_issues
1300      $l_oServer->register( 'mc_filter_get_issues',
1301          array(
1302              'username'        =>    'xsd:string',
1303              'password'        =>    'xsd:string',
1304              'project_id'    =>    'xsd:integer',
1305              'filter_id'        =>    'xsd:integer',
1306              'page_number'    =>    'xsd:integer',
1307              'per_page'        =>    'xsd:integer'
1308          ),
1309          array(
1310              'return'    =>    'tns:IssueDataArray'
1311          ),
1312          $t_namespace,
1313          false, false, false,
1314          'Get the issues that match the specified filter and paging details.'
1315      );
1316      
1317      ### mc_filter_get_issue_headers
1318      $l_oServer->register( 'mc_filter_get_issue_headers',
1319          array(
1320              'username'        =>    'xsd:string',
1321              'password'        =>    'xsd:string',
1322              'project_id'    =>    'xsd:integer',
1323              'filter_id'        =>    'xsd:integer',
1324              'page_number'    =>    'xsd:integer',
1325              'per_page'        =>    'xsd:integer'
1326          ),
1327          array(
1328              'return' => 'tns:IssueHeaderDataArray'
1329          ),
1330          $t_namespace,
1331          false, false, false,
1332          'Get the issue headers that match the specified filter and paging details.'
1333      );
1334  
1335  
1336      ### mc_config_get_string
1337      $l_oServer->register( 'mc_config_get_string',
1338          array(
1339              'username'        =>    'xsd:string',
1340              'password'        =>    'xsd:string',
1341              'config_var'    =>    'xsd:string'
1342          ),
1343          array(
1344              'return'    =>    'xsd:string'
1345          ),
1346          $t_namespace,
1347          false, false, false,
1348          'Get the value for the specified configuration variable.'
1349      );
1350  
1351      ### mc_issue_checkin
1352      $l_oServer->register( 'mc_issue_checkin',
1353          array(
1354              'username'    =>    'xsd:string',
1355              'password'    =>    'xsd:string',
1356              'issue_id'    =>    'xsd:integer',
1357              'comment'    =>    'xsd:string',
1358              'fixed'        =>    'xsd:boolean'
1359          ),
1360          array(
1361              'return'    =>    'xsd:boolean'
1362          ),
1363          $t_namespace,
1364          false, false, false,
1365          'Notifies Mantis of a check-in for the issue with the specified id.'
1366      );
1367  
1368      ###
1369      ###  IMPLEMENTATION
1370      ###
1371  
1372      /**
1373       * Checks if the request for the webservice is a documentation request (eg:
1374       * WSDL) or an actual webservice call.
1375       *
1376       * The implementation of this method is based on soap_server::service().
1377       *
1378       * @param $p_service    The webservice class instance.
1379       * @param $p_data       The input that is based on the post data.
1380       */
1381  	function mci_is_webservice_call( $p_service, $p_data )
1382      {
1383          global $QUERY_STRING;
1384          global $_SERVER;
1385  
1386          if ( isset( $_SERVER['QUERY_STRING'] ) ) {
1387              $t_qs = $_SERVER['QUERY_STRING'];
1388          } elseif( isset( $GLOBALS['QUERY_STRING'] ) ) {
1389              $t_qs = $GLOBALS['QUERY_STRING'];
1390          } elseif( isset( $QUERY_STRING ) && $QUERY_STRING != '' ) {
1391              $t_qs = $QUERY_STRING;
1392          }
1393  
1394          if ( isset( $t_qs ) && ereg( 'wsdl', $t_qs ) ){
1395              return false;
1396          } elseif ( $p_data == '' && $p_service->wsdl ) {
1397              return false;
1398          } else {
1399              return true;
1400          }
1401       }
1402  
1403      # pass incoming (posted) data
1404      if ( isset( $HTTP_RAW_POST_DATA ) ) {
1405          $t_input = $HTTP_RAW_POST_DATA;
1406      } else {
1407          $t_input = implode( "\r\n", file( 'php://input' ) );
1408      }
1409  
1410      # only include the Mantis / MantisConnect related files, if the current
1411       # request is a webservice call (rather than webservice documentation request,
1412       # eg: WSDL).
1413      if ( mci_is_webservice_call( $l_oServer, $t_input ) ) {
1414          require_once ( $t_current_dir . 'mc_core.php' );
1415      }
1416  
1417      # Execute whatever is requested from the webservice.
1418      $l_oServer->service( $t_input );
1419  ?>


Généré le : Thu Nov 29 09:42:17 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics