[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

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

   1  <?php
   2  # MantisConnect - A webservice interface to Mantis Bug Tracker
   3  # Copyright (C) 2004-2011  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  // NuSOAP already performs compression,
  10  // so we prevent a double-compression.
  11  // See issue #11868 for details
  12  define( 'COMPRESSION_DISABLED', true);
  13  ini_set( 'zlib.output_compression', false );
  14  
  15  set_include_path( '../../library' );
  16  require_once( 'nusoap/nusoap.php' );
  17  
  18  # create server
  19  $l_oServer = new soap_server();
  20  
  21  # namespace
  22  $t_namespace = 'http://futureware.biz/mantisconnect';
  23  
  24  # wsdl generation
  25  $l_oServer->debug_flag = false;
  26  $l_oServer->configureWSDL( 'MantisConnect', $t_namespace );
  27  $l_oServer->wsdl->schemaTargetNamespace = $t_namespace;
  28  // The following will make the default encoding UTF-8 instead of ISO-8859-1
  29  // WS-I Basic Profile requires UTF-8 or UTF-16 as the encoding for interoperabilty
  30  // reasons.  This will correctly handle a large number of languages besides English.
  31  $l_oServer->xml_encoding = "UTF-8";
  32  $l_oServer->soap_defencoding = "UTF-8";
  33  $l_oServer->decode_utf8 = false;
  34  
  35  ###
  36  ###  PUBLIC TYPES
  37  ###
  38  
  39  ### StringArray
  40  $l_oServer->wsdl->addComplexType(
  41      'StringArray',
  42      'complexType',
  43      'array',
  44      '',
  45      'SOAP-ENC:Array',
  46      array(),
  47      array(array(
  48          'ref'                => 'SOAP-ENC:arrayType',
  49          'wsdl:arrayType'    => 'xsd:string[]'
  50      )),
  51      'xsd:string'
  52  );
  53  
  54  ### ObjectRef
  55  $l_oServer->wsdl->addComplexType(
  56      'ObjectRef',
  57      'complexType',
  58      'struct',
  59      'all',
  60      '',
  61      array(
  62          'id'    =>    array( 'name' => 'id',        'type' => 'xsd:integer',     'minOccurs' => '0'),
  63          'name'    =>    array( 'name' => 'name',    'type' => 'xsd:string',     'minOccurs' => '0')
  64      )
  65  );
  66  
  67  ### ObjectRefArray
  68  $l_oServer->wsdl->addComplexType(
  69      'ObjectRefArray',
  70      'complexType',
  71      'array',
  72      '',
  73      'SOAP-ENC:Array',
  74      array(),
  75      array(array(
  76          'ref'                => 'SOAP-ENC:arrayType',
  77          'wsdl:arrayType'    => 'tns:ObjectRef[]'
  78      )),
  79      'tns:ObjectRef'
  80  );
  81  
  82  ### AccountData
  83  $l_oServer->wsdl->addComplexType(
  84      'AccountData',
  85      'complexType',
  86      'struct',
  87      'all',
  88      '',
  89      array(
  90          'id'        =>    array( 'name' => 'id',            'type' => 'xsd:integer',    'minOccurs' => '0'),
  91          'name'        =>    array( 'name' => 'name',        'type' => 'xsd:string',    'minOccurs' => '0'),
  92          'real_name'    =>    array( 'name' => 'real_name',    'type' => 'xsd:string',    'minOccurs' => '0'),
  93          'email'        =>    array( 'name' => 'email',        'type' => 'xsd:string',    'minOccurs' => '0')
  94      )
  95  );
  96  
  97  ### AccountDataArray
  98  $l_oServer->wsdl->addComplexType(
  99      'AccountDataArray',
 100      'complexType',
 101      'array',
 102      '',
 103      'SOAP-ENC:Array',
 104      array(),
 105      array(array(
 106          'ref'                => 'SOAP-ENC:arrayType',
 107          'wsdl:arrayType'    => 'tns:AccountData[]'
 108      )),
 109      'tns:AccountData'
 110  );
 111  
 112  ### AttachmentData
 113  $l_oServer->wsdl->addComplexType(
 114      'AttachmentData',
 115      'complexType',
 116      'struct',
 117      'all',
 118      '',
 119      array(
 120          'id'                =>    array( 'name' => 'id',                'type' => 'xsd:integer',     'minOccurs' => '0'),
 121          'filename'            =>    array( 'name' => 'filename',        'type' => 'xsd:string',     'minOccurs' => '0'),
 122          'size'                =>    array( 'name' => 'size',            'type' => 'xsd:integer',     'minOccurs' => '0'),
 123          'content_type'        =>    array( 'name' => 'content_type',    'type' => 'xsd:string',     'minOccurs' => '0'),
 124          'date_submitted'    =>    array( 'name' => 'date_submitted',    'type' => 'xsd:dateTime',     'minOccurs' => '0'),
 125          'download_url'        =>    array( 'name' => 'download_url',    'type' => 'xsd:anyURI',     'minOccurs' => '0'),
 126          'user_id'            =>    array( 'name' => 'user_id',            'type' => 'xsd:integer',     'minOccurs' => '0')
 127      )
 128  );
 129  
 130  ### AttachmentDataArray
 131  $l_oServer->wsdl->addComplexType(
 132      'AttachmentDataArray',
 133      'complexType',
 134      'array',
 135      '',
 136      'SOAP-ENC:Array',
 137      array(),
 138      array(array(
 139          'ref'                => 'SOAP-ENC:arrayType',
 140          'wsdl:arrayType'    => 'tns:AttachmentData[]'
 141      )),
 142      'tns:AttachmentData'
 143  );
 144  
 145  ### ProjectAttachmentData
 146  $l_oServer->wsdl->addComplexType(
 147      'ProjectAttachmentData',
 148      'complexType',
 149      'struct',
 150      'all',
 151      '',
 152      array(
 153          'id'                =>    array( 'name' => 'id',                'type' => 'xsd:integer',     'minOccurs' => '0'),
 154          'filename'            =>    array( 'name' => 'filename',        'type' => 'xsd:string',     'minOccurs' => '0'),
 155          'title'                =>    array( 'name' => 'title',            'type' => 'xsd:string',     'minOccurs' => '0'),
 156          'description'        =>    array( 'name' => 'description',        'type' => 'xsd:string',     'minOccurs' => '0'),
 157          'size'                =>    array( 'name' => 'size',            'type' => 'xsd:integer',     'minOccurs' => '0'),
 158          'content_type'        =>    array( 'name' => 'content_type',    'type' => 'xsd:string',     'minOccurs' => '0'),
 159          'date_submitted'    =>    array( 'name' => 'date_submitted',    'type' => 'xsd:dateTime',     'minOccurs' => '0'),
 160          'download_url'        =>    array( 'name' => 'download_url',    'type' => 'xsd:anyURI',     'minOccurs' => '0'),
 161          'user_id'            =>    array( 'name' => 'user_id',            'type' => 'xsd:integer',     'minOccurs' => '0')
 162      )
 163  );
 164  
 165  ### ProjectAttachmentDataArray
 166  $l_oServer->wsdl->addComplexType(
 167      'ProjectAttachmentDataArray',
 168      'complexType',
 169      'array',
 170      '',
 171      'SOAP-ENC:Array',
 172      array(),
 173      array(array(
 174          'ref'                => 'SOAP-ENC:arrayType',
 175          'wsdl:arrayType'    => 'tns:ProjectAttachmentData[]'
 176      )),
 177      'tns:ProjectAttachmentData'
 178  );
 179  
 180  ### RelationshipData
 181  $l_oServer->wsdl->addComplexType(
 182      'RelationshipData',
 183      'complexType',
 184      'struct',
 185      'all',
 186      '',
 187      array(
 188          'id'        =>    array( 'name' => 'id',            'type' => 'xsd:integer',    'minOccurs' => '0'),
 189          'type'        =>    array( 'name' => 'type',        'type' => 'tns:ObjectRef',     'minOccurs' => '0'),
 190          'target_id'    =>    array( 'name' => 'target_id',    'type' => 'xsd:integer',     'minOccurs' => '0')
 191      )
 192  );
 193  
 194  ### RelationshipDataArray
 195  $l_oServer->wsdl->addComplexType(
 196      'RelationshipDataArray',
 197      'complexType',
 198      'array',
 199      '',
 200      'SOAP-ENC:Array',
 201      array(),
 202      array(array(
 203          'ref'                => 'SOAP-ENC:arrayType',
 204          'wsdl:arrayType'    => 'tns:RelationshipData[]'
 205      )),
 206      'tns:RelationshipData'
 207  );
 208  
 209  ### IssueNoteData
 210  $l_oServer->wsdl->addComplexType(
 211      'IssueNoteData',
 212      'complexType',
 213      'struct',
 214      'all',
 215      '',
 216      array(
 217          'id'                =>    array( 'name' => 'id',                'type' => 'xsd:integer', 'minOccurs' => '0'),
 218          'reporter'            =>    array( 'name' => 'reporter',        'type' => 'tns:AccountData', 'minOccurs' => '0'),
 219          'text'                =>    array( 'name' => 'text',            'type' => 'xsd:string', 'minOccurs' => '0'),
 220          'view_state'        =>    array( 'name' => 'view_state',        'type' => 'tns:ObjectRef', 'minOccurs' => '0'),
 221          'date_submitted'    =>    array( 'name' => 'date_submitted',    'type' => 'xsd:dateTime', 'minOccurs' => '0'),
 222          'last_modified'        =>    array( 'name' => 'last_modified',    'type' => 'xsd:dateTime', 'minOccurs' => '0'),
 223          'time_tracking'        =>     array( 'name' => 'time_tracking',    'type' => 'xsd:integer', 'minOccurs' => '0'),
 224          'note_type'            =>  array( 'name' => 'note_type',        'type' => 'xsd:integer', 'minOccurs' => '0'),
 225          'note_attr'            =>  array( 'name' => 'note_attr',        'type' => 'xsd:string', 'minOccurs' => '0')
 226      )
 227  );
 228  
 229  ### IssueNoteDataArray
 230  $l_oServer->wsdl->addComplexType(
 231      'IssueNoteDataArray',
 232      'complexType',
 233      'array',
 234      '',
 235      'SOAP-ENC:Array',
 236      array(),
 237      array(array(
 238          'ref'                => 'SOAP-ENC:arrayType',
 239          'wsdl:arrayType'    => 'tns:IssueNoteData[]'
 240      )),
 241      'tns:IssueNoteData'
 242  );
 243  
 244  ### IssueData
 245  $l_oServer->wsdl->addComplexType(
 246      'IssueData',
 247      'complexType',
 248      'struct',
 249      'all',
 250      '',
 251      array(
 252          'id'            =>    array( 'name' => 'id',                'type' => 'xsd:integer',     'minOccurs' => '0' ),
 253          'view_state'    =>    array( 'name' => 'view_state',        'type' => 'tns:ObjectRef',     'minOccurs' => '0' ),
 254          'last_updated'    =>    array( 'name' => 'last_updated',    'type' => 'xsd:dateTime',     'minOccurs' => '0' ),
 255  
 256          'project'    =>    array( 'name' => 'project',        'type' => 'tns:ObjectRef',     'minOccurs' => '0' ),
 257          'category'    =>    array( 'name' => 'category',    'type' => 'xsd:string',     'minOccurs' => '0' ),
 258          'priority'    =>    array( 'name' => 'priority',    'type' => 'tns:ObjectRef',     'minOccurs' => '0' ),
 259          'severity'    =>    array( 'name' => 'severity',    'type' => 'tns:ObjectRef',     'minOccurs' => '0' ),
 260          'status'    =>    array( 'name' => 'status',        'type' => 'tns:ObjectRef',    'minOccurs' => '0' ),
 261  
 262          'reporter'            =>    array( 'name' => 'reporter',        'type' => 'tns:AccountData',    'minOccurs' => '0' ),
 263          'summary'            =>    array( 'name' => 'summary',            'type' => 'xsd:string',     'minOccurs' => '0' ),
 264          'version'            =>    array( 'name' => 'version',            'type' => 'xsd:string',     'minOccurs' => '0' ),
 265          'build'                =>    array( 'name' => 'build',            'type' => 'xsd:string',     'minOccurs' => '0' ),
 266          'platform'            =>    array( 'name' => 'platform',        'type' => 'xsd:string',     'minOccurs' => '0' ),
 267          'os'                =>    array( 'name' => 'os',                'type' => 'xsd:string',     'minOccurs' => '0' ),
 268          'os_build'            =>    array( 'name' => 'os_build',        'type' => 'xsd:string',     'minOccurs' => '0' ),
 269          'reproducibility'    =>    array( 'name' => 'reproducibility', 'type' => 'tns:ObjectRef',     'minOccurs' => '0' ),
 270          'date_submitted'    =>    array( 'name' => 'date_submitted',    'type' => 'xsd:dateTime',     'minOccurs' => '0' ),
 271  
 272          'sponsorship_total' =>    array( 'name' => 'sponsorship_total',    'type' => 'xsd:integer',     'minOccurs' => '0' ),
 273  
 274          'handler'        =>    array( 'name' => 'handler',        'type' => 'tns:AccountData',     'minOccurs' => '0' ),
 275          'projection'    =>    array( 'name' => 'projection',    'type' => 'tns:ObjectRef',     'minOccurs' => '0' ),
 276          'eta'            =>    array( 'name' => 'eta',            'type' => 'tns:ObjectRef',     'minOccurs' => '0' ),
 277  
 278          'resolution'        =>    array( 'name' => 'resolution',        'type' => 'tns:ObjectRef',     'minOccurs' => '0' ),
 279          'fixed_in_version'    =>    array( 'name'=>'fixed_in_version',    'type' => 'xsd:string',     'minOccurs' => '0' ),
 280          'target_version'    =>    array( 'name'=>'target_version',    'type' => 'xsd:string',     'minOccurs' => '0' ),
 281  
 282          'description'                =>    array( 'name' => 'description',                'type' => 'xsd:string',     'minOccurs' => '0' ),
 283          'steps_to_reproduce'        =>    array( 'name' => 'steps_to_reproduce',        'type' => 'xsd:string',     'minOccurs' => '0' ),
 284          'additional_information'    =>    array( 'name' => 'additional_information',    'type' => 'xsd:string',     'minOccurs' => '0' ),
 285  
 286          'attachments'                =>    array( 'name' => 'attachments',             'type' => 'tns:AttachmentDataArray',     'minOccurs' => '0' ),
 287          'relationships'                =>    array( 'name' => 'relationships',            'type' => 'tns:RelationshipDataArray',     'minOccurs' => '0' ),
 288          'notes'                        =>    array( 'name' => 'notes',                    'type' => 'tns:IssueNoteDataArray',     'minOccurs' => '0' ),
 289          'custom_fields'                =>  array( 'name' => 'custom_fields',            'type' => 'tns:CustomFieldValueForIssueDataArray',     'minOccurs' => '0' ),
 290          'due_date'                    =>  array( 'name' => 'due_date',                'type' => 'xsd:dateTime',     'minOccurs' => '0' ),
 291          'monitors'                    =>  array( 'name' => 'monitors',                'type' => 'tns:AccountDataArray', 'minOccurs' => '0')
 292      )
 293  );
 294  
 295  ### IssueDataArray
 296  $l_oServer->wsdl->addComplexType(
 297      'IssueDataArray',
 298      'complexType',
 299      'array',
 300      '',
 301      'SOAP-ENC:Array',
 302      array(),
 303      array(array(
 304          'ref'                => 'SOAP-ENC:arrayType',
 305          'wsdl:arrayType'    => 'tns:IssueData[]'
 306      )),
 307      'tns:IssueData'
 308  );
 309  
 310  
 311  ### IssueHeaderData
 312  $l_oServer->wsdl->addComplexType(
 313      'IssueHeaderData',
 314      'complexType',
 315      'struct',
 316      'all',
 317      '',
 318      array(
 319          'id'            =>    array( 'name' => 'id',                'type' => 'xsd:integer' ),
 320          'view_state'    =>    array( 'name' => 'view_state',        'type' => 'xsd:integer' ),
 321          'last_updated'    =>    array( 'name' => 'last_updated',    'type' => 'xsd:dateTime' ),
 322  
 323          'project'    =>    array( 'name' => 'project',        'type' => 'xsd:integer' ),
 324          'category'    =>    array( 'name' => 'category',    'type' => 'xsd:string' ),
 325          'priority'    =>    array( 'name' => 'priority',    'type' => 'xsd:integer' ),
 326          'severity'    =>    array( 'name' => 'severity',    'type' => 'xsd:integer' ),
 327          'status'    =>    array( 'name' => 'status',        'type' => 'xsd:integer' ),
 328  
 329          'reporter'            =>    array( 'name' => 'reporter',        'type' => 'xsd:integer' ),
 330          'summary'            =>    array( 'name' => 'summary',            'type' => 'xsd:string' ),
 331          'handler'        =>    array( 'name' => 'handler',        'type' => 'xsd:integer' ),
 332          'resolution'        =>    array( 'name' => 'resolution',        'type' => 'xsd:integer' ),
 333  
 334          'attachments_count'    =>    array( 'name' => 'attachments_count',     'type' => 'xsd:integer' ),
 335          'notes_count'    =>    array( 'name' => 'notes_count',     'type' => 'xsd:integer' ),
 336      )
 337  );
 338  
 339  ### IssueHeaderDataArray
 340  $l_oServer->wsdl->addComplexType(
 341      'IssueHeaderDataArray',
 342      'complexType',
 343      'array',
 344      '',
 345      'SOAP-ENC:Array',
 346      array(),
 347      array(array(
 348          'ref'                => 'SOAP-ENC:arrayType',
 349          'wsdl:arrayType'    => 'tns:IssueHeaderData[]'
 350      )),
 351      'tns:IssueHeaderData'
 352  );
 353  
 354  ### ProjectData
 355  $l_oServer->wsdl->addComplexType(
 356      'ProjectData',
 357      'complexType',
 358      'struct',
 359      'all',
 360      '',
 361      array(
 362          'id'            =>    array( 'name' => 'id',            'type' => 'xsd:integer',    'minOccurs' => '0' ),
 363          'name'            =>    array( 'name' => 'name',        'type' => 'xsd:string',    'minOccurs' => '0' ),
 364          'status'        =>    array( 'name' => 'status',        'type' => 'tns:ObjectRef',    'minOccurs' => '0' ),
 365          'enabled'        =>    array( 'name' => 'enabled',        'type' => 'xsd:boolean',    'minOccurs' => '0' ),
 366          'view_state'    =>    array( 'name' => 'view_state',    'type' => 'tns:ObjectRef',    'minOccurs' => '0' ),
 367          'access_min'    =>    array( 'name' => 'access_min',    'type' => 'tns:ObjectRef',    'minOccurs' => '0' ),
 368          'file_path'        =>    array( 'name' => 'file_path',    'type' => 'xsd:string',    'minOccurs' => '0' ),
 369          'description'    =>    array( 'name' => 'description',    'type' => 'xsd:string',    'minOccurs' => '0' ),
 370          'subprojects'    =>    array( 'name' => 'subprojects',    'type' => 'tns:ProjectDataArray', 'minOccurs' => '0' ),
 371          'inherit_global'        =>    array( 'name' => 'inherit_global',        'type' => 'xsd:boolean',    'minOccurs' => '0' )
 372      )
 373  );
 374  
 375  ### ProjectDataArray
 376  $l_oServer->wsdl->addComplexType(
 377      'ProjectDataArray',
 378      'complexType',
 379      'array',
 380      '',
 381      'SOAP-ENC:Array',
 382      array(),
 383      array(array(
 384          'ref'                => 'SOAP-ENC:arrayType',
 385          'wsdl:arrayType'    => 'tns:ProjectData[]'
 386      )),
 387      'tns:ProjectData'
 388  );
 389  
 390  ### ProjectVersionData
 391  $l_oServer->wsdl->addComplexType(
 392      'ProjectVersionData',
 393      'complexType',
 394      'struct',
 395      'all',
 396      '',
 397      array(
 398          'id'            =>    array( 'name' => 'id',            'type' => 'xsd:integer',     'minOccurs' => '0' ),
 399          'name'            =>    array( 'name' => 'name',        'type' => 'xsd:string',     'minOccurs' => '0' ),
 400          'project_id'    =>    array( 'name' => 'project_id',    'type' => 'xsd:integer',     'minOccurs' => '0' ),
 401          'date_order'    =>    array( 'name' => 'date_order',    'type' => 'xsd:dateTime',     'minOccurs' => '0' ),
 402          'description'    =>    array( 'name' => 'description',    'type' => 'xsd:string',     'minOccurs' => '0' ),
 403          'released'        =>    array( 'name' => 'released',    'type' => 'xsd:boolean',     'minOccurs' => '0' ),
 404          'obsolete'        =>    array( 'name' => 'obsolete',    'type' => 'xsd:boolean',     'minOccurs' => '0' )
 405      )
 406  );
 407  
 408  ### ProjectVersionDataArray
 409  $l_oServer->wsdl->addComplexType(
 410      'ProjectVersionDataArray',
 411      'complexType',
 412      'array',
 413      '',
 414      'SOAP-ENC:Array',
 415      array(),
 416      array(array(
 417          'ref'                => 'SOAP-ENC:arrayType',
 418          'wsdl:arrayType'    => 'tns:ProjectVersionData[]'
 419      )),
 420      'tns:ProjectVersionData'
 421  );
 422  
 423  ### FilterData
 424  $l_oServer->wsdl->addComplexType(
 425      'FilterData',
 426      'complexType',
 427      'struct',
 428      'all',
 429      '',
 430      array(
 431          'id'            =>    array( 'name' => 'id',                'type' => 'xsd:integer',     'minOccurs' => '0' ),
 432          'owner'            =>    array( 'name' => 'owner',            'type' => 'tns:AccountData',     'minOccurs' => '0' ),
 433          'project_id'    =>    array( 'name' => 'project_id',        'type' => 'xsd:integer',     'minOccurs' => '0' ),
 434          'is_public'        =>    array( 'name' => 'is_public',        'type' => 'xsd:boolean',     'minOccurs' => '0' ),
 435          'name'            =>    array( 'name' => 'name',            'type' => 'xsd:string',     'minOccurs' => '0' ),
 436          'filter_string'    =>    array( 'name' => 'filter_string',    'type' => 'xsd:string',     'minOccurs' => '0' ),
 437          'url'           =>  array( 'name' => 'url',                'type' => 'xsd:string',     'minOccurs' => '0' )
 438      )
 439  );
 440  
 441  ### FilterDataArray
 442  $l_oServer->wsdl->addComplexType(
 443      'FilterDataArray',
 444      'complexType',
 445      'array',
 446      '',
 447      'SOAP-ENC:Array',
 448      array(),
 449      array(array(
 450          'ref'                => 'SOAP-ENC:arrayType',
 451          'wsdl:arrayType'    => 'tns:FilterData[]'
 452      )),
 453      'tns:FilterData'
 454  );
 455  
 456  ### CustomFieldDefinitionData
 457  $l_oServer->wsdl->addComplexType(
 458      'CustomFieldDefinitionData',
 459      'complexType',
 460      'struct',
 461      'all',
 462      '',
 463      array(
 464          'field'                =>    array( 'name' => 'field',            'type' => 'tns:ObjectRef',     'minOccurs' => '0'),
 465          'type'                =>    array( 'name' => 'type',            'type' => 'xsd:integer',     'minOccurs' => '0'),
 466          'possible_values'    =>    array( 'name' => 'possible_values',    'type' => 'xsd:string',     'minOccurs' => '0'),
 467          'default_value'        =>    array( 'name' => 'default_value',    'type' => 'xsd:string',     'minOccurs' => '0'),
 468          'valid_regexp'        =>    array( 'name' => 'valid_regexp',    'type' => 'xsd:string',     'minOccurs' => '0'),
 469          'access_level_r'    =>    array( 'name' => 'access_level_r',    'type' => 'xsd:integer',     'minOccurs' => '0'),
 470          'access_level_rw'    =>    array( 'name' => 'access_level_rw',    'type' => 'xsd:integer',     'minOccurs' => '0'),
 471          'length_min'        =>    array( 'name' => 'length_min',        'type' => 'xsd:integer',     'minOccurs' => '0'),
 472          'length_max'        =>    array( 'name' => 'length_max',        'type' => 'xsd:integer',     'minOccurs' => '0'),
 473          'advanced'              =>      array( 'name' => 'advanced',            'type' => 'xsd:boolean',        'minOccurs' => '0'),
 474          'display_report'    =>    array( 'name' => 'display_report',    'type' => 'xsd:boolean',     'minOccurs' => '0'),
 475          'display_update'    =>    array( 'name' => 'display_update',    'type' => 'xsd:boolean',     'minOccurs' => '0'),
 476          'display_resolved'    =>    array( 'name' => 'display_resolved','type' => 'xsd:boolean',     'minOccurs' => '0'),
 477          'display_closed'    =>    array( 'name' => 'display_closed',    'type' => 'xsd:boolean',     'minOccurs' => '0'),
 478          'require_report'    =>    array( 'name' => 'require_report',    'type' => 'xsd:boolean',     'minOccurs' => '0'),
 479          'require_update'    =>    array( 'name' => 'require_update',    'type' => 'xsd:boolean',     'minOccurs' => '0'),
 480          'require_resolved'    =>    array( 'name' => 'require_resolved','type' => 'xsd:boolean',     'minOccurs' => '0'),
 481          'require_closed'    =>    array( 'name' => 'require_closed',    'type' => 'xsd:boolean',     'minOccurs' => '0')
 482      )
 483  );
 484  
 485  ### CustomFieldDefinitionDataArray
 486  $l_oServer->wsdl->addComplexType(
 487      'CustomFieldDefinitionDataArray',
 488      'complexType',
 489      'array',
 490      '',
 491      'SOAP-ENC:Array',
 492      array(),
 493      array(array(
 494          'ref'                => 'SOAP-ENC:arrayType',
 495          'wsdl:arrayType'    => 'tns:CustomFieldDefinitionData[]'
 496      )),
 497      'tns:CustomFieldDefinitionData'
 498  );
 499  
 500  ### CustomFieldLinkForProjectData
 501  $l_oServer->wsdl->addComplexType(
 502      'CustomFieldLinkForProjectData',
 503      'complexType',
 504      'struct',
 505      'all',
 506      '',
 507      array(
 508          'field'                =>    array( 'name' => 'field',            'type' => 'tns:ObjectRef',     'minOccurs' => '0'),
 509          'sequence'            =>    array( 'name' => 'sequence',        'type' => 'xsd:byte',     'minOccurs' => '0')
 510      )
 511  );
 512  
 513  ### CustomFieldLinkForProjectDataArray
 514  $l_oServer->wsdl->addComplexType(
 515      'CustomFieldLinkForProjectDataArray',
 516      'complexType',
 517      'array',
 518      '',
 519      'SOAP-ENC:Array',
 520      array(),
 521      array(array(
 522          'ref'                => 'SOAP-ENC:arrayType',
 523          'wsdl:arrayType'    => 'tns:CustomFieldLinkForProjectData[]'
 524      )),
 525      'tns:CustomFieldLinkForProjectData'
 526  );
 527  
 528  ### CustomFieldValueForIssueData
 529  $l_oServer->wsdl->addComplexType(
 530      'CustomFieldValueForIssueData',
 531      'complexType',
 532      'struct',
 533      'all',
 534      '',
 535      array(
 536          'field'                =>    array( 'name' => 'field',            'type' => 'tns:ObjectRef',     'minOccurs' => '0'),
 537          'value'                =>    array( 'name' => 'value',            'type' => 'xsd:string',     'minOccurs' => '0')
 538      )
 539  );
 540  
 541  ### CustomFieldValueForIssueDataArray
 542  $l_oServer->wsdl->addComplexType(
 543      'CustomFieldValueForIssueDataArray',
 544      'complexType',
 545      'array',
 546      '',
 547      'SOAP-ENC:Array',
 548      array(),
 549      array(array(
 550          'ref'                => 'SOAP-ENC:arrayType',
 551          'wsdl:arrayType'    => 'tns:CustomFieldValueForIssueData[]'
 552      )),
 553      'tns:CustomFieldValueForIssueData'
 554  );
 555  
 556  ###
 557  ###  PUBLIC METHODS
 558  ###
 559  
 560  ### mc_version
 561  $l_oServer->register( 'mc_version',
 562      array(),
 563      array(
 564          'return'    =>    'xsd:string'
 565      ),
 566      $t_namespace
 567  );
 568  
 569  ###
 570  ###  PUBLIC METHODS (defined in mc_enum_api.php)
 571  ###
 572  
 573  ### mc_enum_status
 574  $l_oServer->register( 'mc_enum_status',
 575      array(
 576          'username'    =>    'xsd:string',
 577          'password'    =>    'xsd:string'
 578      ),
 579      array(
 580          'return'    =>    'tns:ObjectRefArray'
 581      ),
 582      $t_namespace,
 583      false, false, false,
 584      'Get the enumeration for statuses.'
 585  );
 586  
 587  ### mc_enum_priorities
 588  $l_oServer->register( 'mc_enum_priorities',
 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 priorities.'
 599  );
 600  
 601  ### mc_enum_severities
 602  $l_oServer->register( 'mc_enum_severities',
 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 severities.'
 613  );
 614  
 615  ### mc_enum_reproducibilities
 616  $l_oServer->register( 'mc_enum_reproducibilities',
 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 reproducibilities.'
 627  );
 628  
 629  ### mc_enum_projections
 630  $l_oServer->register( 'mc_enum_projections',
 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 projections.'
 641  );
 642  
 643  ### mc_enum_etas
 644  $l_oServer->register( 'mc_enum_etas',
 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 ETAs.'
 655  );
 656  
 657  ### mc_enum_resolutions
 658  $l_oServer->register( 'mc_enum_resolutions',
 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 resolutions.'
 669  );
 670  
 671  ### mc_enum_access_levels
 672  $l_oServer->register( 'mc_enum_access_levels',
 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 access levels.'
 683  );
 684  
 685  ### mc_enum_project_status
 686  $l_oServer->register( 'mc_enum_project_status',
 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 project statuses.'
 697  );
 698  
 699  ### mc_enum_project_view_states
 700  $l_oServer->register( 'mc_enum_project_view_states',
 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 view states.'
 711  );
 712  
 713  ### mc_enum_view_states
 714  $l_oServer->register( 'mc_enum_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 view states.'
 725  );
 726  
 727  ### mc_enum_custom_field_types
 728  $l_oServer->register( 'mc_enum_custom_field_types',
 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 custom field types.'
 739  );
 740  
 741  ### mc_enum_get (should vanish as it has been replaced by more-high level versions)
 742  $l_oServer->register( 'mc_enum_get',
 743      array(
 744          'username'        =>    'xsd:string',
 745          'password'        =>    'xsd:string',
 746          'enumeration'    =>    'xsd:string'
 747      ),
 748      array(
 749          'return'    =>    'xsd:string'
 750      ),
 751      $t_namespace,
 752      false, false, false,
 753      'Get the enumeration for the specified enumeration type.'
 754  );
 755  
 756  ###
 757  ###  PUBLIC METHODS (defined in mc_issue_api.php)
 758  ###
 759  
 760  ### mc_issue_exists
 761  $l_oServer->register( 'mc_issue_exists',
 762      array(
 763          'username'    =>    'xsd:string',
 764          'password'    =>    'xsd:string',
 765          'issue_id'    =>    'xsd:integer'
 766      ),
 767      array(
 768          'return'    =>    'xsd:boolean'
 769      ),
 770      $t_namespace,
 771      false, false, false,
 772      'Check there exists an issue with the specified id.'
 773  );
 774  
 775  ### mc_issue_get
 776  $l_oServer->register( 'mc_issue_get',
 777      array(
 778          'username'    =>    'xsd:string',
 779          'password'    =>    'xsd:string',
 780          'issue_id'    =>    'xsd:integer'
 781      ),
 782      array(
 783          'return'    =>    'tns:IssueData'
 784      ),
 785      $t_namespace,
 786      false, false, false,
 787      'Get the issue with the specified id.'
 788  );
 789  
 790  ### mc_issue_get_biggest_id
 791  $l_oServer->register( 'mc_issue_get_biggest_id',
 792      array(
 793          'username'    =>    'xsd:string',
 794          'password'    =>    'xsd:string',
 795          'project_id'=>    'xsd:integer'
 796      ),
 797      array(
 798          'return'    =>    'xsd:integer'
 799      ),
 800      $t_namespace,
 801      false, false, false,
 802      'Get the latest submitted issue in the specified project.'
 803  );
 804  
 805  ### mc_issue_get_id_from_summary (should be replaced with a more general search that returns matching issues directly)
 806  $l_oServer->register( 'mc_issue_get_id_from_summary',
 807      array(
 808          'username'    =>    'xsd:string',
 809          'password'    =>    'xsd:string',
 810          'summary'    =>    'xsd:string'
 811      ),
 812      array(
 813          'return'    =>    'xsd:integer'
 814      ),
 815      $t_namespace,
 816      false, false, false,
 817      'Get the id of the issue with the specified summary.'
 818  );
 819  
 820  ### mc_issue_add
 821  $l_oServer->register( 'mc_issue_add',
 822      array(
 823          'username'    =>    'xsd:string',
 824          'password'    =>    'xsd:string',
 825          'issue'        =>    'tns:IssueData'
 826      ),
 827      array(
 828          'return'    =>    'xsd:integer'
 829      ),
 830      $t_namespace,
 831      false, false, false,
 832      'Submit the specified issue details.'
 833  );
 834  
 835  ### mc_issue_update
 836  $l_oServer->register( 'mc_issue_update',
 837      array(
 838          'username' => 'xsd:string',
 839          'password' => 'xsd:string',
 840          'issueId' => 'xsd:integer',
 841          'issue' => 'tns:IssueData'
 842      ),
 843      array(
 844          'return' => 'xsd:boolean'
 845      ),
 846      $t_namespace,
 847      false, false, false,
 848      'Update Issue method.'
 849  );
 850  
 851  ### mc_issue_delete
 852  $l_oServer->register( 'mc_issue_delete',
 853      array(
 854          'username'    =>    'xsd:string',
 855          'password'    =>    'xsd:string',
 856          'issue_id'    =>    'xsd:integer'
 857      ),
 858      array(
 859          'return'    =>    'xsd:boolean'
 860      ),
 861      $t_namespace,
 862      false, false, false,
 863      'Delete the issue with the specified id.'
 864  );
 865  
 866  ### mc_issue_note_add
 867  $l_oServer->register( 'mc_issue_note_add',
 868      array(
 869          'username'    =>    'xsd:string',
 870          'password'    =>    'xsd:string',
 871          'issue_id'    =>    'xsd:integer',
 872          'note'         =>    'tns:IssueNoteData'
 873      ),
 874      array(
 875          'return'    =>    'xsd:integer'
 876      ),
 877      $t_namespace,
 878      false, false, false,
 879      'Submit a new note.'
 880  );
 881  
 882  ### mc_issue_note_delete
 883  $l_oServer->register( 'mc_issue_note_delete',
 884      array(
 885          'username'    =>    'xsd:string',
 886          'password'    =>    'xsd:string',
 887          'issue_note_id'    =>    'xsd:integer'
 888      ),
 889      array(
 890          'return'    =>    'xsd:boolean'
 891      ),
 892      $t_namespace,
 893      false, false, false,
 894      'Delete the note with the specified id.'
 895  );
 896  
 897  ### mc_issue_note_update
 898  $l_oServer->register( 'mc_issue_note_update',
 899      array(
 900          'username'  =>  'xsd:string',
 901          'password'  =>  'xsd:string',
 902          'note'      =>  'tns:IssueNoteData'
 903      ),
 904      array(
 905          'return'    =>  'xsd:boolean'
 906      ),
 907      $t_namespace,
 908      false, false, false,
 909      'Update a specific note of a specific issue.'
 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  ###  PUBLIC METHODS (defined in mc_project_api.php)
 994  ###
 995  
 996  ### mc_project_add
 997  $l_oServer->register( 'mc_project_add',
 998      array(
 999          'username' => 'xsd:string',
1000          'password' => 'xsd:string',
1001          'project' => 'tns:ProjectData'
1002      ),
1003      array(
1004          'return' => 'xsd:integer'
1005      ),
1006      $t_namespace,
1007      false, false, false,
1008      'Add a new project to the tracker (must have admin privileges)'
1009  );
1010  
1011  ### mc_project_delete
1012  $l_oServer->register( 'mc_project_delete',
1013      array(
1014          'username' => 'xsd:string',
1015          'password' => 'xsd:string',
1016          'project_id' => 'xsd:integer'
1017      ),
1018      array(
1019          'return' => 'xsd:boolean'
1020      ),
1021      $t_namespace,
1022      false, false, false,
1023      'Add a new project to the tracker (must have admin privileges)'
1024  );
1025  
1026  ### mc_project_update
1027  $l_oServer->register( 'mc_project_update',
1028          array(
1029                  'username' => 'xsd:string',
1030                  'password' => 'xsd:string',
1031                  'project_id' => 'xsd:integer',
1032                  'project' => 'tns:ProjectData'
1033          ),
1034          array(
1035                  'return' => 'xsd:boolean'
1036          ),
1037          $t_namespace,
1038          false, false, false,
1039          'Update a specific project to the tracker (must have admin privileges)'
1040  );
1041  
1042  ### mc_project_get_id_from_name
1043  $l_oServer->register( 'mc_project_get_id_from_name',
1044      array(
1045          'username' => 'xsd:string',
1046          'password' => 'xsd:string',    
1047          'project_name' => 'xsd:string'        
1048      ),
1049      array(
1050          'return' => 'xsd:integer'
1051      ),
1052      $t_namespace,
1053      false, false, false,
1054      'Get the id of the project with the specified name.'
1055  );
1056  
1057  ### mc_project_get_issues
1058  $l_oServer->register( 'mc_project_get_issues',
1059      array(
1060          'username' => 'xsd:string',
1061          'password' => 'xsd:string',
1062          'project_id' => 'xsd:integer',
1063          'page_number' => 'xsd:integer',
1064          'per_page' => 'xsd:integer'
1065      ),
1066      array(
1067          'return' => 'tns:IssueDataArray'
1068      ),
1069      $t_namespace,
1070      false, false, false,
1071      'Get the issues that match the specified project id and paging details.'
1072  );
1073  
1074  ### mc_project_get_issue_headers
1075  $l_oServer->register( 'mc_project_get_issue_headers',
1076      array(
1077          'username' => 'xsd:string',
1078          'password' => 'xsd:string',
1079          'project_id' => 'xsd:integer',
1080          'page_number' => 'xsd:integer',
1081          'per_page' => 'xsd:integer'
1082      ),
1083      array(
1084          'return' => 'tns:IssueHeaderDataArray'
1085      ),
1086      $t_namespace,
1087      false, false, false,
1088      'Get the issue headers that match the specified project id and paging details.'
1089  );
1090  
1091  ### mc_project_get_users
1092  $l_oServer->register( 'mc_project_get_users',
1093      array(
1094          'username'    =>    'xsd:string',
1095          'password'    =>    'xsd:string',
1096          'project_id'    =>    'xsd:integer',
1097          'access'    =>    'xsd:integer'
1098      ),
1099      array(
1100          'return'    =>    'tns:AccountDataArray'
1101      ),
1102      $t_namespace,
1103      false, false, false,
1104      'Get appropriate users assigned to a project by access level.'
1105  );
1106  
1107  ### mc_projects_get_user_accessible
1108  $l_oServer->register( 'mc_projects_get_user_accessible',
1109      array(
1110          'username'    =>    'xsd:string',
1111          'password'    =>    'xsd:string'
1112      ),
1113      array(
1114          'return'    =>    'tns:ProjectDataArray'
1115      ),
1116      $t_namespace,
1117      false, false, false,
1118      'Get the list of projects that are accessible to the logged in user.'
1119  );
1120  
1121  ### mc_project_get_categories
1122  $l_oServer->register( 'mc_project_get_categories',
1123      array(
1124          'username'        =>    'xsd:string',
1125          'password'        =>    'xsd:string',
1126          'project_id'    =>    'xsd:integer'
1127      ),
1128      array(
1129          'return'    =>    'tns:StringArray'
1130      ),
1131      $t_namespace,
1132      false, false, false,
1133      'Get the categories belonging to the specified project.'
1134  );
1135  
1136  ### mc_project_add_category
1137  $l_oServer->register( 'mc_project_add_category',
1138          array(
1139                  'username'              =>      'xsd:string',
1140                  'password'              =>      'xsd:string',
1141                  'project_id'            =>      'xsd:integer',
1142                  'p_category_name'       =>      'xsd:string',
1143          ),
1144          array(
1145                  'return'                =>      'xsd:integer'
1146          ),
1147          $t_namespace,
1148          false, false, false,
1149          'Add a category of specific project.'
1150  );
1151  
1152  
1153  ### mc_project_delete_category
1154  $l_oServer->register( 'mc_project_delete_category',
1155          array(
1156                  'username'              =>      'xsd:string',
1157                  'password'              =>      'xsd:string',
1158                  'project_id'            =>      'xsd:integer',
1159                  'p_category_name'       =>      'xsd:string',
1160          ),
1161          array(
1162                  'return'                =>      'xsd:integer'
1163          ),
1164          $t_namespace,
1165          false, false, false,
1166          'Delete a category of specific project.'
1167  );
1168  
1169  
1170  ### mc_project_rename_category_by_name
1171  $l_oServer->register( 'mc_project_rename_category_by_name',
1172          array(
1173                  'username'              =>      'xsd:string',
1174                  'password'              =>      'xsd:string',
1175                  'project_id'            =>      'xsd:integer',
1176                  'p_category_name'       =>      'xsd:string',
1177                  'p_category_name_new'   =>      'xsd:string',
1178                  'p_assigned_to'         =>      'xsd:integer',
1179          ),
1180          array(
1181                  'return'                =>      'xsd:integer'
1182          ),
1183          $t_namespace,
1184          false, false, false,
1185          'Rename a category of specific project.'
1186  );
1187  
1188  ### mc_project_get_versions
1189  $l_oServer->register( 'mc_project_get_versions',
1190      array(
1191          'username'        =>    'xsd:string',
1192          'password'        =>    'xsd:string',
1193          'project_id'    =>    'xsd:integer'
1194      ),
1195      array(
1196          'return'    =>    'tns:ProjectVersionDataArray'
1197      ),
1198      $t_namespace,
1199      false, false, false,
1200      'Get the versions belonging to the specified project.'
1201  );
1202  
1203  ### mc_project_version_add
1204  $l_oServer->register( 'mc_project_version_add',
1205      array(
1206          'username'        =>    'xsd:string',
1207          'password'        =>    'xsd:string',
1208          'version'        =>    'tns:ProjectVersionData'
1209      ),
1210      array(
1211          'return'    =>    'xsd:integer'
1212      ),
1213      $t_namespace,
1214      false, false, false,
1215      'Submit the specified version details.'
1216  );
1217  
1218  ### mc_project_version_update
1219  $l_oServer->register( 'mc_project_version_update',
1220      array(
1221          'username'        =>    'xsd:string',
1222          'password'        =>    'xsd:string',
1223          'version_id'    =>    'xsd:integer',
1224          'version'        =>    'tns:ProjectVersionData'
1225      ),
1226      array(
1227          'return'    =>    'xsd:boolean'
1228      ),
1229      $t_namespace,
1230      false, false, false,
1231      'Update version method.'
1232  );
1233  
1234  ### mc_project_version_delete
1235  $l_oServer->register( 'mc_project_version_delete',
1236      array(
1237          'username'        =>    'xsd:string',
1238          'password'        =>    'xsd:string',
1239          'version_id'    =>    'xsd:integer'
1240      ),
1241      array(
1242          'return'    =>    'xsd:boolean'
1243      ),
1244      $t_namespace,
1245      false, false, false,
1246      'Delete the version with the specified id.'
1247  );
1248  
1249  ### mc_project_get_released_versions
1250  $l_oServer->register( 'mc_project_get_released_versions',
1251      array(
1252          'username'        =>    'xsd:string',
1253          'password'        =>    'xsd:string',
1254          'project_id'    =>    'xsd:integer'
1255      ),
1256      array(
1257          'return'    =>    'tns:ProjectVersionDataArray'
1258      ),
1259      $t_namespace,
1260      false, false, false,
1261      'Get the released versions that belong to the specified project.'
1262  );
1263  
1264  ### mc_project_get_unreleased_versions
1265  $l_oServer->register( 'mc_project_get_unreleased_versions',
1266      array(
1267          'username'        =>    'xsd:string',
1268          'password'        =>    'xsd:string',
1269          'project_id'    =>    'xsd:integer'
1270      ),
1271      array(
1272          'return'    =>    'tns:ProjectVersionDataArray'
1273      ),
1274      $t_namespace,
1275      false, false, false,
1276      'Get the unreleased version that belong to the specified project.'
1277  );
1278  
1279  ### mc_project_get_attachments
1280  $l_oServer->register( 'mc_project_get_attachments',
1281      array(
1282          'username'        =>    'xsd:string',
1283          'password'        =>    'xsd:string',
1284          'project_id'    =>    'xsd:integer'
1285      ),
1286      array(
1287          'return'    =>    'tns:ProjectAttachmentDataArray'
1288      ),
1289      $t_namespace,
1290      false, false, false,
1291      'Get the attachments that belong to the specified project.'
1292  );
1293  
1294  ### mc_project_get_custom_fields
1295  $l_oServer->register( 'mc_project_get_custom_fields',
1296      array(
1297          'username'        =>    'xsd:string',
1298          'password'        =>    'xsd:string',
1299          'project_id'    =>    'xsd:integer'
1300      ),
1301      array(
1302          'return'    =>    'tns:CustomFieldDefinitionDataArray'
1303      ),
1304      $t_namespace,
1305      false, false, false,
1306      'Get the custom fields that belong to the specified project.'
1307  );
1308  
1309  ### mc_project_attachment_get
1310  $l_oServer->register( 'mc_project_attachment_get',
1311      array(
1312          'username'        =>    'xsd:string',
1313          'password'        =>    'xsd:string',
1314          'project_attachment_id'            =>    'xsd:integer'
1315      ),
1316      array(
1317          'return'    =>    'xsd:base64Binary'
1318      ),
1319      $t_namespace,
1320      false, false, false,
1321      'Get the data for the specified project attachment.'
1322  );
1323  
1324  ### mc_issue_attachment_add
1325  $l_oServer->register( 'mc_project_attachment_add',
1326      array(
1327          'username'        =>    'xsd:string',
1328          'password'        =>    'xsd:string',
1329          'project_id'    =>    'xsd:integer',
1330          'name'            =>    'xsd:string',
1331          'title'            =>    'xsd:string',
1332          'description'    =>    'xsd:string',
1333          'file_type'        =>    'xsd:string',
1334          'content'        =>    'xsd:base64Binary'
1335      ),
1336      array(
1337          'return'    =>    'xsd:integer'
1338      ),
1339      $t_namespace,
1340      false, false, false,
1341      'Submit a new project attachment.'
1342  );
1343  
1344  ### mc_project_attachment_delete
1345  $l_oServer->register( 'mc_project_attachment_delete',
1346      array(
1347          'username'    =>    'xsd:string',
1348          'password'    =>    'xsd:string',
1349          'project_attachment_id'    =>    'xsd:integer'
1350      ),
1351      array(
1352          'return'    =>    'xsd:boolean'
1353      ),
1354      $t_namespace,
1355      false, false, false,
1356      'Delete the project attachment with the specified id.'
1357  );
1358  
1359  ### mc_project_get_subprojects
1360  $l_oServer->register( 'mc_project_get_all_subprojects',
1361      array(
1362          'username'    =>  'xsd:string',
1363          'password'    =>  'xsd:string',
1364          'project_id'  =>  'xsd:integer'
1365      ),
1366      array(
1367          'return'      =>  'tns:StringArray'
1368      ),
1369      $t_namespace,
1370      false, false, false,
1371      'Get the subprojects ID of a specific project.'
1372  );
1373  
1374  
1375  ###
1376  ###  PUBLIC METHODS (defined in mc_filter_api.php)
1377  ###
1378  
1379  ### mc_filter_get
1380  $l_oServer->register( 'mc_filter_get',
1381      array(
1382          'username'        =>    'xsd:string',
1383          'password'        =>    'xsd:string',
1384          'project_id'    =>    'xsd:integer'
1385      ),
1386      array(
1387          'return'    =>    'tns:FilterDataArray'
1388      ),
1389      $t_namespace,
1390      false, false, false,
1391      'Get the filters defined for the specified project.'
1392  );
1393  
1394  ### mc_filter_get_issues
1395  $l_oServer->register( 'mc_filter_get_issues',
1396      array(
1397          'username'        =>    'xsd:string',
1398          'password'        =>    'xsd:string',
1399          'project_id'    =>    'xsd:integer',
1400          'filter_id'        =>    'xsd:integer',
1401          'page_number'    =>    'xsd:integer',
1402          'per_page'        =>    'xsd:integer'
1403      ),
1404      array(
1405          'return'    =>    'tns:IssueDataArray'
1406      ),
1407      $t_namespace,
1408      false, false, false,
1409      'Get the issues that match the specified filter and paging details.'
1410  );
1411  
1412  ### mc_filter_get_issue_headers
1413  $l_oServer->register( 'mc_filter_get_issue_headers',
1414      array(
1415          'username'        =>    'xsd:string',
1416          'password'        =>    'xsd:string',
1417          'project_id'    =>    'xsd:integer',
1418          'filter_id'        =>    'xsd:integer',
1419          'page_number'    =>    'xsd:integer',
1420          'per_page'        =>    'xsd:integer'
1421      ),
1422      array(
1423          'return' => 'tns:IssueHeaderDataArray'
1424      ),
1425      $t_namespace,
1426      false, false, false,
1427      'Get the issue headers that match the specified filter and paging details.'
1428  );
1429  
1430  ### mc_config_get_string
1431  $l_oServer->register( 'mc_config_get_string',
1432      array(
1433          'username'        =>    'xsd:string',
1434          'password'        =>    'xsd:string',
1435          'config_var'    =>    'xsd:string'
1436      ),
1437      array(
1438          'return'    =>    'xsd:string'
1439      ),
1440      $t_namespace,
1441      false, false, false,
1442      'Get the value for the specified configuration variable.'
1443  );
1444  
1445  ###
1446  ###  PUBLIC METHODS (defined in mc_user_pref_api.php)
1447  ###
1448  
1449  ### mc_user_pref_get_pref
1450  $l_oServer->register( 'mc_user_pref_get_pref',
1451      array(
1452          'username'        =>    'xsd:string',
1453          'password'        =>    'xsd:string',
1454          'project_id'    =>    'xsd:integer',
1455          'pref_name'        =>    'xsd:string'
1456      ),
1457      array(
1458          'return'    =>    'xsd:string'
1459      ),
1460      $t_namespace,
1461      false, false, false,
1462      'Get the value for the specified user preference.'
1463  );
1464  
1465  ###
1466  ###  IMPLEMENTATION
1467  ###
1468  
1469  /**
1470   * Checks if the request for the webservice is a documentation request (eg:
1471   * WSDL) or an actual webservice call.
1472   *
1473   * The implementation of this method is based on soap_server::service().
1474   *
1475   * @param $p_service    The webservice class instance.
1476   * @param $p_data       The input that is based on the post data.
1477   */
1478  function mci_is_webservice_call( $p_service, $p_data )
1479  {
1480      global $QUERY_STRING;
1481      global $_SERVER;
1482  
1483      if ( isset( $_SERVER['QUERY_STRING'] ) ) {
1484          $t_qs = $_SERVER['QUERY_STRING'];
1485      } else if( isset( $GLOBALS['QUERY_STRING'] ) ) {
1486          $t_qs = $GLOBALS['QUERY_STRING'];
1487      } else if( isset( $QUERY_STRING ) && $QUERY_STRING != '' ) {
1488          $t_qs = $QUERY_STRING;
1489      }
1490  
1491      if ( isset( $t_qs ) && preg_match( '/wsdl/', $t_qs ) ){
1492          return false;
1493      } else if ( $p_data == '' && $p_service->wsdl ) {
1494          return false;
1495      } else {
1496          return true;
1497      }
1498  }
1499  
1500  # pass incoming (posted) data
1501  if ( isset( $HTTP_RAW_POST_DATA ) ) {
1502      $t_input = $HTTP_RAW_POST_DATA;
1503  } else {
1504      $t_input = implode( "\r\n", file( 'php://input' ) );
1505  }
1506  
1507  # only include the MantisBT / MantisConnect related files, if the current
1508  # request is a webservice call (rather than webservice documentation request,
1509  # eg: WSDL).
1510  if ( mci_is_webservice_call( $l_oServer, $t_input ) ) {
1511      require_once ( 'mc_core.php' );
1512  } else {
1513      # if we have a documentation request, do some tidy up to prevent lame bot loops e.g. /mantisconnect.php/mc_enum_etas/mc_project_get_versions/
1514      $parts = explode ( 'mantisconnect.php/', strtolower($_SERVER['SCRIPT_NAME'] ), 2 );
1515      if (isset( $parts[1] ) && (strlen ( $parts[1] ) > 0 ) ) {
1516          echo 'This is not a SOAP webservice request, for documentation, see ' .  $parts[0] . 'mantisconnect.php';
1517          exit();
1518      }
1519  }
1520  
1521  # Execute whatever is requested from the webservice.
1522  $l_oServer->service( $t_input );


Generated: Thu Jul 28 15:48:31 2011 Cross-referenced by PHPXref 0.7