itopsoaptypes.class.inc.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <?php
  2. // Note: the attributes must have the same names (case sensitive) as in the WSDL specification
  3. //
  4. class SOAPSearchCondition
  5. {
  6. public $attcode; // string
  7. public $value; // mixed
  8. public function __construct($sAttCode, $value)
  9. {
  10. $this->attcode = $sAttCode;
  11. $this->value = $value;
  12. }
  13. }
  14. class SOAPExternalKeySearch
  15. {
  16. public $conditions; // array of SOAPSearchCondition
  17. public function __construct($aConditions)
  18. {
  19. $this->conditions = $aConditions;
  20. }
  21. }
  22. class SOAPAttributeValue
  23. {
  24. public $attcode; // string
  25. public $value; // mixed
  26. public function __construct($sAttCode, $value)
  27. {
  28. $this->attcode = $sAttCode;
  29. $this->value = $value;
  30. }
  31. }
  32. class SOAPLinkCreationSpec
  33. {
  34. public $class;
  35. public $conditions; // array of SOAPSearchCondition
  36. public $attributes; // array of SOAPAttributeValue
  37. public function __construct($sClass, $aConditions, $aAttributes)
  38. {
  39. $this->class = $sClass;
  40. $this->conditions = $aConditions;
  41. $this->attributes = $aAttributes;
  42. }
  43. }
  44. class SOAPLogMessage
  45. {
  46. public $text; // string
  47. public function __construct($sText)
  48. {
  49. $this->text = $sText;
  50. }
  51. }
  52. class SOAPResultLog
  53. {
  54. public $messages; // array of SOAPLogMessage
  55. public function __construct($aMessages)
  56. {
  57. $this->messages = $aMessages;
  58. }
  59. }
  60. class SOAPResultData
  61. {
  62. public $key; // string
  63. public $value; // string
  64. public function __construct($sKey, $sValue)
  65. {
  66. $this->key = $sKey;
  67. $this->value = $sValue;
  68. }
  69. }
  70. class SOAPResultMessage
  71. {
  72. public $label; // string
  73. public $values; // array of SOAPResultData
  74. public function __construct($sLabel, $aValues)
  75. {
  76. $this->label = $sLabel;
  77. $this->values = $aValues;
  78. }
  79. }
  80. class SOAPResult
  81. {
  82. public $status; // boolean
  83. public $result; // array of SOAPResultMessage
  84. public $errors; // array of SOAPResultLog
  85. public $warnings; // array of SOAPResultLog
  86. public $infos; // array of SOAPResultLog
  87. public function __construct($bStatus, $aResult, $aErrors, $aWarnings, $aInfos)
  88. {
  89. $this->status = $bStatus;
  90. $this->result = $aResult;
  91. $this->errors = $aErrors;
  92. $this->warnings = $aWarnings;
  93. $this->infos = $aInfos;
  94. }
  95. }
  96. $aSOAPMapping = array(
  97. 'SearchCondition' => 'SOAPSearchCondition',
  98. 'ExternalKeySearch' => 'SOAPExternalKeySearch',
  99. 'AttributeValue' => 'SOAPAttributeValue',
  100. 'LinkCreationSpec' => 'SOAPLinkCreationSpec',
  101. 'LogMessage' => 'SOAPLogMessage',
  102. 'ResultLog' => 'SOAPResultLog',
  103. 'ResultData' => 'SOAPResultData',
  104. 'ResultMessage' => 'SOAPResultMessage',
  105. 'Result' => 'SOAPResult',
  106. );
  107. ?>