| 1 | /* | |
| 2 | * Copyright 1999-2006 University of Chicago | |
| 3 | * | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | * See the License for the specific language governing permissions and | |
| 14 | * limitations under the License. | |
| 15 | */ | |
| 16 | ||
| 17 | ||
| 18 | /* | |
| 19 | * This file is automatically generated by the Globus WSDLtoC converter | |
| 20 | */ | |
| 21 | ||
| 22 | #include "xsd_QName.h" | |
| 23 | #include "globus_soap_message.h" | |
| 24 | #include "globus_xsd_type_info.h" | |
| 25 | #include "rptest_ResourcePropertyDefinitionType.h" | |
| 26 | #include "globus_xsd_generic_array.h" | |
| 27 | ||
| 28 | #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL | |
| 29 | xsd_QName rptest_ResourcePropertyDefinitionType_qname = | |
| 30 | { | |
| 31 | RPTEST_RESOURCEPROPERTYDEFINITIONTYPE_NS, | |
| 32 | RPTEST_RESOURCEPROPERTYDEFINITIONTYPE_LOCAL | |
| 33 | }; | |
| 34 | #endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */ | |
| 35 | ||
| 36 | static | |
| 37 | globus_result_t | |
| 38 | rptest_ResourcePropertyDefinitionType_serialize_wrapper( | |
| 39 | const xsd_QName * element_qname, | |
| 40 | const void * instance, | |
| 41 | globus_soap_message_handle_t message_handle, | |
| 42 | globus_xsd_element_options_t options) | |
| 43 | 198 | { |
| 44 | 198 | return rptest_ResourcePropertyDefinitionType_serialize( |
| 45 | element_qname, | |
| 46 | (const rptest_ResourcePropertyDefinitionType *) instance, | |
| 47 | message_handle, options); | |
| 48 | } | |
| 49 | ||
| 50 | static | |
| 51 | globus_result_t | |
| 52 | rptest_ResourcePropertyDefinitionType_deserialize_pointer_wrapper( | |
| 53 | const xsd_QName * element_qname, | |
| 54 | void ** ip, | |
| 55 | globus_soap_message_handle_t message_handle, | |
| 56 | globus_xsd_element_options_t options) | |
| 57 | 576 | { |
| 58 | 576 | return rptest_ResourcePropertyDefinitionType_deserialize_pointer( |
| 59 | element_qname, | |
| 60 | (rptest_ResourcePropertyDefinitionType **) ip, | |
| 61 | message_handle, options); | |
| 62 | } | |
| 63 | ||
| 64 | static | |
| 65 | globus_result_t | |
| 66 | rptest_ResourcePropertyDefinitionType_init_wrapper(void **object) | |
| 67 | 0 | { |
| 68 | 0 | return rptest_ResourcePropertyDefinitionType_init( |
| 69 | (rptest_ResourcePropertyDefinitionType **) object); | |
| 70 | } | |
| 71 | ||
| 72 | static | |
| 73 | void | |
| 74 | rptest_ResourcePropertyDefinitionType_destroy_wrapper( | |
| 75 | void * object) | |
| 76 | 396 | { |
| 77 | 396 | rptest_ResourcePropertyDefinitionType_destroy( |
| 78 | (rptest_ResourcePropertyDefinitionType *) object); | |
| 79 | 396 | } |
| 80 | ||
| 81 | static | |
| 82 | globus_result_t | |
| 83 | rptest_ResourcePropertyDefinitionType_copy_wrapper( | |
| 84 | void ** dest_obj, | |
| 85 | const void * src_obj) | |
| 86 | 0 | { |
| 87 | 0 | return rptest_ResourcePropertyDefinitionType_copy( |
| 88 | (rptest_ResourcePropertyDefinitionType **) dest_obj, | |
| 89 | (rptest_ResourcePropertyDefinitionType *) src_obj); | |
| 90 | } | |
| 91 | ||
| 92 | static | |
| 93 | globus_result_t | |
| 94 | rptest_ResourcePropertyDefinitionType_init_contents_wrapper(void *object) | |
| 95 | 0 | { |
| 96 | 0 | return rptest_ResourcePropertyDefinitionType_init_contents( |
| 97 | (rptest_ResourcePropertyDefinitionType *) object); | |
| 98 | } | |
| 99 | ||
| 100 | static | |
| 101 | void | |
| 102 | rptest_ResourcePropertyDefinitionType_destroy_contents_wrapper( | |
| 103 | void * object) | |
| 104 | 792 | { |
| 105 | 792 | rptest_ResourcePropertyDefinitionType_destroy_contents( |
| 106 | (rptest_ResourcePropertyDefinitionType *) object); | |
| 107 | 792 | } |
| 108 | ||
| 109 | static | |
| 110 | globus_result_t | |
| 111 | rptest_ResourcePropertyDefinitionType_copy_contents_wrapper( | |
| 112 | void * dest_obj, | |
| 113 | const void * src_obj) | |
| 114 | 792 | { |
| 115 | 792 | return rptest_ResourcePropertyDefinitionType_copy_contents( |
| 116 | (rptest_ResourcePropertyDefinitionType *) dest_obj, | |
| 117 | (const rptest_ResourcePropertyDefinitionType *) src_obj); | |
| 118 | } | |
| 119 | ||
| 120 | static | |
| 121 | globus_result_t | |
| 122 | rptest_ResourcePropertyDefinitionType_serialize_contents_wrapper( | |
| 123 | const xsd_QName * element_qname, | |
| 124 | const void * instance, | |
| 125 | globus_soap_message_handle_t message_handle, | |
| 126 | globus_xsd_element_options_t options) | |
| 127 | 0 | { |
| 128 | 0 | return rptest_ResourcePropertyDefinitionType_serialize_contents( |
| 129 | element_qname, | |
| 130 | (rptest_ResourcePropertyDefinitionType *) instance, | |
| 131 | message_handle, options); | |
| 132 | } | |
| 133 | ||
| 134 | static | |
| 135 | globus_result_t | |
| 136 | rptest_ResourcePropertyDefinitionType_deserialize_contents_wrapper( | |
| 137 | const xsd_QName * element_qname, | |
| 138 | void ** instance, | |
| 139 | globus_soap_message_handle_t message_handle, | |
| 140 | globus_xsd_element_options_t options) | |
| 141 | 0 | { |
| 142 | globus_result_t result; | |
| 143 | GlobusFuncName(rptest_ResourcePropertyDefinitionType_deserialize_contents_wrapper); | |
| 144 | 0 | GlobusSoapMessageDebugEnter(); |
| 145 | ||
| 146 | 0 | if(!*instance) |
| 147 | { | |
| 148 | 0 | result = rptest_ResourcePropertyDefinitionType_init( |
| 149 | (rptest_ResourcePropertyDefinitionType **)instance); | |
| 150 | 0 | if(result != GLOBUS_SUCCESS) |
| 151 | { | |
| 152 | 0 | goto error; |
| 153 | } | |
| 154 | } | |
| 155 | ||
| 156 | 0 | result = rptest_ResourcePropertyDefinitionType_deserialize_contents( |
| 157 | element_qname, | |
| 158 | *(rptest_ResourcePropertyDefinitionType **)instance, | |
| 159 | message_handle, options); | |
| 160 | 0 | error: |
| 161 | 0 | GlobusSoapMessageDebugExit(); |
| 162 | 0 | return result; |
| 163 | } | |
| 164 | ||
| 165 | static | |
| 166 | globus_result_t | |
| 167 | rptest_ResourcePropertyDefinitionType_array_serialize_wrapper( | |
| 168 | const xsd_QName * element, | |
| 169 | const void * instance, | |
| 170 | globus_soap_message_handle_t message, | |
| 171 | globus_xsd_element_options_t options) | |
| 172 | 0 | { |
| 173 | 0 | return rptest_ResourcePropertyDefinitionType_array_serialize( |
| 174 | element, | |
| 175 | (rptest_ResourcePropertyDefinitionType_array *) instance, | |
| 176 | message, options); | |
| 177 | } | |
| 178 | ||
| 179 | static | |
| 180 | globus_result_t | |
| 181 | rptest_ResourcePropertyDefinitionType_array_deserialize_wrapper( | |
| 182 | const xsd_QName * element_qname, | |
| 183 | void ** inst, | |
| 184 | globus_soap_message_handle_t message, | |
| 185 | globus_xsd_element_options_t options) | |
| 186 | 0 | { |
| 187 | 0 | if(!*inst) |
| 188 | { | |
| 189 | globus_result_t result; | |
| 190 | ||
| 191 | 0 | result = rptest_ResourcePropertyDefinitionType_array_init( |
| 192 | (rptest_ResourcePropertyDefinitionType_array **)inst); | |
| 193 | 0 | if(result != GLOBUS_SUCCESS) |
| 194 | { | |
| 195 | 0 | return result; |
| 196 | } | |
| 197 | } | |
| 198 | ||
| 199 | 0 | return rptest_ResourcePropertyDefinitionType_array_deserialize( |
| 200 | element_qname, | |
| 201 | *(rptest_ResourcePropertyDefinitionType_array **) inst, | |
| 202 | message, options); | |
| 203 | } | |
| 204 | ||
| 205 | static | |
| 206 | globus_result_t | |
| 207 | rptest_ResourcePropertyDefinitionType_array_init_wrapper( | |
| 208 | void ** arr) | |
| 209 | 0 | { |
| 210 | 0 | return rptest_ResourcePropertyDefinitionType_array_init( |
| 211 | (rptest_ResourcePropertyDefinitionType_array **) arr); | |
| 212 | } | |
| 213 | ||
| 214 | static | |
| 215 | void | |
| 216 | rptest_ResourcePropertyDefinitionType_array_destroy_wrapper( | |
| 217 | void * arr) | |
| 218 | 0 | { |
| 219 | 0 | rptest_ResourcePropertyDefinitionType_array_destroy( |
| 220 | (rptest_ResourcePropertyDefinitionType_array *) arr); | |
| 221 | 0 | } |
| 222 | ||
| 223 | static | |
| 224 | globus_result_t | |
| 225 | rptest_ResourcePropertyDefinitionType_array_copy_wrapper( | |
| 226 | void ** dest_arr, | |
| 227 | const void * src_arr) | |
| 228 | 0 | { |
| 229 | 0 | return rptest_ResourcePropertyDefinitionType_array_copy( |
| 230 | (rptest_ResourcePropertyDefinitionType_array **) dest_arr, | |
| 231 | (const rptest_ResourcePropertyDefinitionType_array *) src_arr); | |
| 232 | } | |
| 233 | ||
| 234 | static | |
| 235 | globus_result_t | |
| 236 | rptest_ResourcePropertyDefinitionType_array_init_contents_wrapper( | |
| 237 | void * arr) | |
| 238 | 0 | { |
| 239 | 0 | return rptest_ResourcePropertyDefinitionType_array_init_contents( |
| 240 | (rptest_ResourcePropertyDefinitionType_array *) arr); | |
| 241 | } | |
| 242 | ||
| 243 | static | |
| 244 | void | |
| 245 | rptest_ResourcePropertyDefinitionType_array_destroy_contents_wrapper( | |
| 246 | void * arr) | |
| 247 | 0 | { |
| 248 | 0 | rptest_ResourcePropertyDefinitionType_array_destroy_contents( |
| 249 | (rptest_ResourcePropertyDefinitionType_array *) arr); | |
| 250 | 0 | } |
| 251 | ||
| 252 | static | |
| 253 | globus_result_t | |
| 254 | rptest_ResourcePropertyDefinitionType_array_copy_contents_wrapper( | |
| 255 | void * dest_arr, | |
| 256 | const void * src_arr) | |
| 257 | 0 | { |
| 258 | 0 | return rptest_ResourcePropertyDefinitionType_array_copy_contents( |
| 259 | (rptest_ResourcePropertyDefinitionType_array *) dest_arr, | |
| 260 | (const rptest_ResourcePropertyDefinitionType_array *) src_arr); | |
| 261 | } | |
| 262 | ||
| 263 | static | |
| 264 | void * | |
| 265 | rptest_ResourcePropertyDefinitionType_array_push_wrapper( | |
| 266 | void * array) | |
| 267 | 396 | { |
| 268 | 396 | return (void *) rptest_ResourcePropertyDefinitionType_array_push((rptest_ResourcePropertyDefinitionType_array *) array); |
| 269 | } | |
| 270 | ||
| 271 | struct globus_xsd_type_info_s rptest_ResourcePropertyDefinitionType_contents_info = | |
| 272 | { | |
| 273 | &rptest_ResourcePropertyDefinitionType_qname, | |
| 274 | rptest_ResourcePropertyDefinitionType_serialize_contents_wrapper, | |
| 275 | rptest_ResourcePropertyDefinitionType_deserialize_contents_wrapper, | |
| 276 | rptest_ResourcePropertyDefinitionType_init_wrapper, | |
| 277 | rptest_ResourcePropertyDefinitionType_destroy_wrapper, | |
| 278 | rptest_ResourcePropertyDefinitionType_copy_wrapper, | |
| 279 | rptest_ResourcePropertyDefinitionType_init_contents_wrapper, | |
| 280 | rptest_ResourcePropertyDefinitionType_destroy_contents_wrapper, | |
| 281 | rptest_ResourcePropertyDefinitionType_copy_contents_wrapper, | |
| 282 | sizeof(rptest_ResourcePropertyDefinitionType), | |
| 283 | NULL, | |
| 284 | NULL, | |
| 285 | NULL | |
| 286 | }; | |
| 287 | ||
| 288 | struct globus_xsd_type_info_s rptest_ResourcePropertyDefinitionType_array_info = | |
| 289 | { | |
| 290 | &rptest_ResourcePropertyDefinitionType_qname, | |
| 291 | rptest_ResourcePropertyDefinitionType_array_serialize_wrapper, | |
| 292 | rptest_ResourcePropertyDefinitionType_array_deserialize_wrapper, | |
| 293 | rptest_ResourcePropertyDefinitionType_array_init_wrapper, | |
| 294 | rptest_ResourcePropertyDefinitionType_array_destroy_wrapper, | |
| 295 | rptest_ResourcePropertyDefinitionType_array_copy_wrapper, | |
| 296 | rptest_ResourcePropertyDefinitionType_array_init_contents_wrapper, | |
| 297 | rptest_ResourcePropertyDefinitionType_array_destroy_contents_wrapper, | |
| 298 | rptest_ResourcePropertyDefinitionType_array_copy_contents_wrapper, | |
| 299 | sizeof(rptest_ResourcePropertyDefinitionType), | |
| 300 | rptest_ResourcePropertyDefinitionType_array_push_wrapper, | |
| 301 | NULL, | |
| 302 | NULL | |
| 303 | }; | |
| 304 | ||
| 305 | struct globus_xsd_type_info_s rptest_ResourcePropertyDefinitionType_info = | |
| 306 | { | |
| 307 | &rptest_ResourcePropertyDefinitionType_qname, | |
| 308 | rptest_ResourcePropertyDefinitionType_serialize_wrapper, | |
| 309 | rptest_ResourcePropertyDefinitionType_deserialize_pointer_wrapper, | |
| 310 | rptest_ResourcePropertyDefinitionType_init_wrapper, | |
| 311 | rptest_ResourcePropertyDefinitionType_destroy_wrapper, | |
| 312 | rptest_ResourcePropertyDefinitionType_copy_wrapper, | |
| 313 | rptest_ResourcePropertyDefinitionType_init_contents_wrapper, | |
| 314 | rptest_ResourcePropertyDefinitionType_destroy_contents_wrapper, | |
| 315 | rptest_ResourcePropertyDefinitionType_copy_contents_wrapper, | |
| 316 | sizeof(rptest_ResourcePropertyDefinitionType), | |
| 317 | NULL, | |
| 318 | &rptest_ResourcePropertyDefinitionType_contents_info, | |
| 319 | &rptest_ResourcePropertyDefinitionType_array_info | |
| 320 | }; | |
| 321 | ||
| 322 | globus_result_t | |
| 323 | rptest_ResourcePropertyDefinitionType_init_contents( | |
| 324 | rptest_ResourcePropertyDefinitionType * instance) | |
| 325 | 0 | { |
| 326 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 327 | GlobusFuncName(rptest_ResourcePropertyDefinitionType_init_contents); | |
| 328 | 0 | GlobusSoapMessageDebugEnter(); |
| 329 | ||
| 330 | 0 | memset(instance, 0, sizeof(rptest_ResourcePropertyDefinitionType)); |
| 331 | ||
| 332 | 0 | GlobusSoapMessageDebugExit(); |
| 333 | 0 | return result; |
| 334 | } | |
| 335 | ||
| 336 | globus_result_t | |
| 337 | rptest_ResourcePropertyDefinitionType_init( | |
| 338 | rptest_ResourcePropertyDefinitionType ** object) | |
| 339 | 396 | { |
| 340 | rptest_ResourcePropertyDefinitionType * instance; | |
| 341 | 396 | globus_result_t result = GLOBUS_SUCCESS; |
| 342 | GlobusFuncName(rptest_ResourcePropertyDefinitionType_init); | |
| 343 | 396 | GlobusSoapMessageDebugEnter(); |
| 344 | ||
| 345 | 396 | instance = globus_malloc(sizeof(rptest_ResourcePropertyDefinitionType)); |
| 346 | 396 | if(!instance) |
| 347 | { | |
| 348 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 349 | 0 | goto exit; |
| 350 | } | |
| 351 | ||
| 352 | 396 | memset(instance, 0, sizeof(rptest_ResourcePropertyDefinitionType)); |
| 353 | ||
| 354 | 396 | *object = instance; |
| 355 | ||
| 356 | 396 | exit: |
| 357 | 396 | GlobusSoapMessageDebugExit(); |
| 358 | 396 | return result; |
| 359 | } | |
| 360 | ||
| 361 | void | |
| 362 | rptest_ResourcePropertyDefinitionType_destroy( | |
| 363 | rptest_ResourcePropertyDefinitionType * instance) | |
| 364 | 396 | { |
| 365 | GlobusFuncName(rptest_ResourcePropertyDefinitionType_destroy); | |
| 366 | 396 | GlobusSoapMessageDebugEnter(); |
| 367 | ||
| 368 | 396 | if(!instance) |
| 369 | { | |
| 370 | 0 | goto exit; |
| 371 | } | |
| 372 | ||
| 373 | 396 | rptest_ResourcePropertyDefinitionType_destroy_contents(instance); |
| 374 | 396 | globus_free(instance); |
| 375 | ||
| 376 | 396 | exit: |
| 377 | ||
| 378 | 396 | GlobusSoapMessageDebugExit(); |
| 379 | 396 | } |
| 380 | ||
| 381 | ||
| 382 | void | |
| 383 | rptest_ResourcePropertyDefinitionType_destroy_contents( | |
| 384 | rptest_ResourcePropertyDefinitionType * instance) | |
| 385 | 1188 | { |
| 386 | GlobusFuncName(rptest_ResourcePropertyDefinitionType_destroy_contents); | |
| 387 | 1188 | GlobusSoapMessageDebugEnter(); |
| 388 | ||
| 389 | 1188 | if(instance) |
| 390 | { | |
| 391 | ||
| 392 | ||
| 393 | 1188 | xsd_QName_destroy_contents( |
| 394 | &instance->QName); | |
| 395 | ||
| 396 | 1188 | xsd_QName_destroy_contents( |
| 397 | &instance->TypeQName); | |
| 398 | ||
| 399 | 1188 | if(instance->_array) |
| 400 | { | |
| 401 | 972 | xsd_boolean_destroy( |
| 402 | instance->_array); | |
| 403 | 972 | instance->_array = NULL; |
| 404 | } | |
| 405 | ||
| 406 | } | |
| 407 | ||
| 408 | 1188 | GlobusSoapMessageDebugExit(); |
| 409 | 1188 | } |
| 410 | ||
| 411 | ||
| 412 | globus_result_t | |
| 413 | rptest_ResourcePropertyDefinitionType_copy( | |
| 414 | rptest_ResourcePropertyDefinitionType ** dest_obj, | |
| 415 | const rptest_ResourcePropertyDefinitionType * src_obj) | |
| 416 | 0 | { |
| 417 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 418 | rptest_ResourcePropertyDefinitionType * instance; | |
| 419 | GlobusFuncName(rptest_ResourcePropertyDefinitionType_copy); | |
| 420 | ||
| 421 | 0 | GlobusSoapMessageDebugEnter(); |
| 422 | ||
| 423 | 0 | instance = calloc(1, sizeof(rptest_ResourcePropertyDefinitionType)); |
| 424 | 0 | if (instance == NULL) |
| 425 | { | |
| 426 | 0 | GlobusSoapMessageDebugExit(); |
| 427 | 0 | return GlobusSoapMessageErrorOutOfMemory; |
| 428 | } | |
| 429 | ||
| 430 | 0 | result = rptest_ResourcePropertyDefinitionType_copy_contents(instance, src_obj); |
| 431 | 0 | if(result != GLOBUS_SUCCESS) |
| 432 | { | |
| 433 | 0 | globus_free(instance); |
| 434 | 0 | GlobusSoapMessageDebugExit(); |
| 435 | 0 | return GlobusSoapMessageErrorOutOfMemory; |
| 436 | } | |
| 437 | ||
| 438 | 0 | *dest_obj = instance; |
| 439 | 0 | GlobusSoapMessageDebugExit(); |
| 440 | 0 | return result; |
| 441 | } | |
| 442 | ||
| 443 | globus_result_t | |
| 444 | rptest_ResourcePropertyDefinitionType_copy_contents( | |
| 445 | rptest_ResourcePropertyDefinitionType * instance, | |
| 446 | const rptest_ResourcePropertyDefinitionType * src_obj) | |
| 447 | 792 | { |
| 448 | 792 | globus_result_t result = GLOBUS_SUCCESS; |
| 449 | GlobusFuncName(rptest_ResourcePropertyDefinitionType_copy_contents); | |
| 450 | ||
| 451 | 792 | GlobusSoapMessageDebugEnter(); |
| 452 | ||
| 453 | 792 | if(src_obj->_array) |
| 454 | { | |
| 455 | 648 | result = xsd_boolean_copy( |
| 456 | &instance->_array, | |
| 457 | src_obj->_array); | |
| 458 | 648 | if(result != GLOBUS_SUCCESS) |
| 459 | { | |
| 460 | 0 | result = GlobusSoapMessageErrorCopyFailed( |
| 461 | result, NULL, &xsd_boolean_qname); | |
| 462 | 0 | goto _array_destroy; |
| 463 | } | |
| 464 | } | |
| 465 | else | |
| 466 | { | |
| 467 | 144 | instance->_array = NULL; |
| 468 | } | |
| 469 | ||
| 470 | 792 | result = xsd_QName_copy_contents( |
| 471 | &instance->QName, | |
| 472 | &src_obj->QName); | |
| 473 | 792 | if(result != GLOBUS_SUCCESS) |
| 474 | { | |
| 475 | 0 | result = GlobusSoapMessageErrorCopyFailed( |
| 476 | result, NULL, &xsd_QName_qname); | |
| 477 | 0 | goto QName_destroy; |
| 478 | } | |
| 479 | ||
| 480 | 792 | result = xsd_QName_copy_contents( |
| 481 | &instance->TypeQName, | |
| 482 | &src_obj->TypeQName); | |
| 483 | 792 | if(result != GLOBUS_SUCCESS) |
| 484 | { | |
| 485 | 0 | result = GlobusSoapMessageErrorCopyFailed( |
| 486 | result, NULL, &xsd_QName_qname); | |
| 487 | 0 | goto TypeQName_destroy; |
| 488 | } | |
| 489 | ||
| 490 | 792 | goto exit; |
| 491 | ||
| 492 | 0 | fail_deserialize: |
| 493 | ||
| 494 | 0 | _array_destroy: |
| 495 | ||
| 496 | 0 | if(instance->_array) |
| 497 | { | |
| 498 | 0 | xsd_boolean_destroy( |
| 499 | instance->_array); | |
| 500 | 0 | instance->_array = NULL; |
| 501 | } | |
| 502 | 0 | xsd_QName_destroy_contents( |
| 503 | &instance->TypeQName); | |
| 504 | ||
| 505 | 0 | TypeQName_destroy: |
| 506 | 0 | xsd_QName_destroy_contents( |
| 507 | &instance->QName); | |
| 508 | ||
| 509 | 792 | QName_destroy: |
| 510 | ||
| 511 | ||
| 512 | 792 | exit: |
| 513 | ||
| 514 | 792 | GlobusSoapMessageDebugExit(); |
| 515 | 792 | return result; |
| 516 | } | |
| 517 | ||
| 518 | ||
| 519 | ||
| 520 | globus_result_t | |
| 521 | rptest_ResourcePropertyDefinitionType_serialize_contents( | |
| 522 | const xsd_QName * element_qname, /* ignored */ | |
| 523 | const rptest_ResourcePropertyDefinitionType * inst, | |
| 524 | globus_soap_message_handle_t message_handle, | |
| 525 | globus_xsd_element_options_t options) | |
| 526 | 0 | { |
| 527 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 528 | GlobusFuncName(rptest_ResourcePropertyDefinitionType_serialize_contents); | |
| 529 | 0 | GlobusSoapMessageDebugEnter(); |
| 530 | ||
| 531 | 0 | result = rptest_ResourcePropertyDefinitionType_serialize( |
| 532 | NULL, | |
| 533 | inst, | |
| 534 | message_handle, | |
| 535 | options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY); | |
| 536 | 0 | if(result != GLOBUS_SUCCESS) |
| 537 | { | |
| 538 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 539 | result, NULL, element_qname); | |
| 540 | 0 | goto exit; |
| 541 | } | |
| 542 | ||
| 543 | 0 | exit: |
| 544 | ||
| 545 | 0 | GlobusSoapMessageDebugExit(); |
| 546 | 0 | return result; |
| 547 | } | |
| 548 | ||
| 549 | ||
| 550 | ||
| 551 | globus_result_t | |
| 552 | rptest_ResourcePropertyDefinitionType_serialize( | |
| 553 | const xsd_QName * element_qname, | |
| 554 | const rptest_ResourcePropertyDefinitionType * instance, | |
| 555 | globus_soap_message_handle_t message_handle, | |
| 556 | globus_xsd_element_options_t options) | |
| 557 | 198 | { |
| 558 | 198 | globus_result_t result = GLOBUS_SUCCESS; |
| 559 | xsd_QName subelement; | |
| 560 | 198 | globus_list_t * any_attr_keys = NULL; |
| 561 | 198 | globus_list_t * any_attr_keys_iterator = NULL; |
| 562 | 198 | xsd_QName * type_attr = NULL; |
| 563 | ||
| 564 | 198 | char * prefix = NULL; |
| 565 | int prefix_created; | |
| 566 | 198 | int define_prefix = 0; |
| 567 | 198 | int save_options = options; |
| 568 | ||
| 569 | GlobusFuncName(rptest_ResourcePropertyDefinitionType_serialize); | |
| 570 | 198 | GlobusSoapMessageDebugEnter(); |
| 571 | ||
| 572 | ||
| 573 | 198 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 574 | { | |
| 575 | /* serialize rptest_ResourcePropertyDefinitionType element */ | |
| 576 | 198 | result = globus_soap_message_element_ns_set( |
| 577 | message_handle, | |
| 578 | element_qname, | |
| 579 | element_qname->Namespace, | |
| 580 | &options); | |
| 581 | 198 | if(result != GLOBUS_SUCCESS) |
| 582 | { | |
| 583 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 584 | result, NULL, element_qname); | |
| 585 | 0 | goto exit; |
| 586 | } | |
| 587 | ||
| 588 | 198 | if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 589 | !globus_soap_message_serialize_is_c14n_subset(message_handle))) | |
| 590 | { | |
| 591 | 0 | result = globus_soap_message_attribute_ns_set( |
| 592 | message_handle, | |
| 593 | element_qname, | |
| 594 | "http://www.w3.org/2001/XMLSchema-instance", | |
| 595 | &options); | |
| 596 | 0 | if(result != GLOBUS_SUCCESS) |
| 597 | { | |
| 598 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 599 | result, NULL, element_qname); | |
| 600 | 0 | goto exit; |
| 601 | } | |
| 602 | } | |
| 603 | ||
| 604 | 198 | if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 605 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 606 | { | |
| 607 | ||
| 608 | 0 | result = globus_soap_message_attribute_ns_set( |
| 609 | message_handle, | |
| 610 | element_qname, | |
| 611 | rptest_ResourcePropertyDefinitionType_qname.Namespace, | |
| 612 | &options); | |
| 613 | 0 | if(result != GLOBUS_SUCCESS) |
| 614 | { | |
| 615 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 616 | result, NULL, element_qname); | |
| 617 | 0 | goto exit; |
| 618 | } | |
| 619 | } | |
| 620 | ||
| 621 | 198 | if(instance->_array) |
| 622 | { | |
| 623 | ||
| 624 | 162 | if(result != GLOBUS_SUCCESS) |
| 625 | { | |
| 626 | xsd_QName error_qname; | |
| 627 | 0 | error_qname.local = prefix; |
| 628 | 0 | error_qname.Namespace = ""; |
| 629 | 0 | result = GlobusSoapMessageErrorSerializeFailed(result, |
| 630 | NULL, | |
| 631 | &error_qname); | |
| 632 | 0 | goto exit; |
| 633 | } | |
| 634 | ||
| 635 | ||
| 636 | } | |
| 637 | ||
| 638 | 198 | result = globus_soap_message_serialize_element( |
| 639 | message_handle, | |
| 640 | element_qname, | |
| 641 | options, | |
| 642 | &rptest_ResourcePropertyDefinitionType_qname); | |
| 643 | 198 | if(result != GLOBUS_SUCCESS) |
| 644 | { | |
| 645 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 646 | result, NULL, element_qname); | |
| 647 | 0 | goto exit; |
| 648 | } | |
| 649 | ||
| 650 | 198 | if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 651 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 652 | { | |
| 653 | 0 | xsd_QName_init(&type_attr); |
| 654 | ||
| 655 | 0 | type_attr->local = globus_libc_strdup("type"); |
| 656 | 0 | type_attr->Namespace = globus_libc_strdup(XSI_NS); |
| 657 | } | |
| 658 | ||
| 659 | ||
| 660 | /* serialize namespaces */ | |
| 661 | 198 | result = globus_soap_message_element_ns_add( |
| 662 | message_handle, | |
| 663 | element_qname, | |
| 664 | element_qname->Namespace, | |
| 665 | &options); | |
| 666 | 198 | if(result != GLOBUS_SUCCESS) |
| 667 | { | |
| 668 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 669 | result, NULL, element_qname); | |
| 670 | 0 | goto exit; |
| 671 | } | |
| 672 | ||
| 673 | 198 | if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 674 | !globus_soap_message_serialize_is_c14n_subset(message_handle))) | |
| 675 | { | |
| 676 | 0 | result = globus_soap_message_attribute_ns_add( |
| 677 | message_handle, | |
| 678 | element_qname, | |
| 679 | "http://www.w3.org/2001/XMLSchema-instance", | |
| 680 | &options); | |
| 681 | 0 | if(result != GLOBUS_SUCCESS) |
| 682 | { | |
| 683 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 684 | result, NULL, element_qname); | |
| 685 | 0 | goto exit; |
| 686 | } | |
| 687 | } | |
| 688 | 198 | if ((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 689 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 690 | { | |
| 691 | ||
| 692 | 0 | result = globus_soap_message_attribute_ns_add( |
| 693 | message_handle, | |
| 694 | element_qname, | |
| 695 | rptest_ResourcePropertyDefinitionType_qname.Namespace, | |
| 696 | &options); | |
| 697 | 0 | if(result != GLOBUS_SUCCESS) |
| 698 | { | |
| 699 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 700 | result, NULL, element_qname); | |
| 701 | 0 | goto exit; |
| 702 | } | |
| 703 | } | |
| 704 | ||
| 705 | 198 | if(instance->_array) |
| 706 | { | |
| 707 | ||
| 708 | } | |
| 709 | ||
| 710 | /* serialize attributes */ | |
| 711 | ||
| 712 | 198 | subelement.Namespace = ""; |
| 713 | 198 | subelement.local = "array"; |
| 714 | ||
| 715 | 198 | if(instance->_array) |
| 716 | { | |
| 717 | ||
| 718 | 162 | result = xsd_boolean_serialize_attribute( |
| 719 | &subelement, | |
| 720 | instance->_array, | |
| 721 | message_handle, | |
| 722 | options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS)); | |
| 723 | 162 | if(result != GLOBUS_SUCCESS) |
| 724 | { | |
| 725 | 0 | result = GlobusSoapMessageErrorSerializeFailed(result, |
| 726 | NULL, | |
| 727 | element_qname); | |
| 728 | 0 | goto exit; |
| 729 | } | |
| 730 | ||
| 731 | } | |
| 732 | ||
| 733 | 198 | if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 734 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 735 | { | |
| 736 | 0 | result = globus_soap_message_serialize_QName_attribute( |
| 737 | message_handle, | |
| 738 | type_attr, | |
| 739 | &rptest_ResourcePropertyDefinitionType_qname); | |
| 740 | 0 | if(result != GLOBUS_SUCCESS) |
| 741 | { | |
| 742 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 743 | result, NULL, element_qname); | |
| 744 | 0 | goto exit; |
| 745 | } | |
| 746 | } | |
| 747 | ||
| 748 | ||
| 749 | } | |
| 750 | ||
| 751 | 198 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 752 | { | |
| 753 | 198 | result = globus_soap_message_serialize_element_begin_close( |
| 754 | message_handle, element_qname); | |
| 755 | 198 | if(result != GLOBUS_SUCCESS) |
| 756 | { | |
| 757 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 758 | result, NULL, element_qname); | |
| 759 | 0 | goto exit; |
| 760 | } | |
| 761 | } | |
| 762 | 198 | options &= ~GLOBUS_XSD_ELEMENT_CONTENTS_ONLY; |
| 763 | ||
| 764 | ||
| 765 | /* serialize contents of type */ | |
| 766 | ||
| 767 | 198 | subelement.local = "QName"; |
| 768 | 198 | subelement.Namespace = "http://www.globus.org/namespaces/2007/06/ResourcePropertiesTest"; |
| 769 | ||
| 770 | 198 | result = xsd_QName_serialize( |
| 771 | &subelement, | |
| 772 | &instance->QName, | |
| 773 | message_handle, | |
| 774 | options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS)); | |
| 775 | 198 | if(result != GLOBUS_SUCCESS) |
| 776 | { | |
| 777 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 778 | result, NULL, &xsd_QName_qname); | |
| 779 | 0 | goto exit; |
| 780 | } | |
| 781 | ||
| 782 | 198 | subelement.local = "TypeQName"; |
| 783 | 198 | subelement.Namespace = "http://www.globus.org/namespaces/2007/06/ResourcePropertiesTest"; |
| 784 | ||
| 785 | 198 | result = xsd_QName_serialize( |
| 786 | &subelement, | |
| 787 | &instance->TypeQName, | |
| 788 | message_handle, | |
| 789 | options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS)); | |
| 790 | 198 | if(result != GLOBUS_SUCCESS) |
| 791 | { | |
| 792 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 793 | result, NULL, &xsd_QName_qname); | |
| 794 | 0 | goto exit; |
| 795 | } | |
| 796 | ||
| 797 | 198 | options = save_options; |
| 798 | ||
| 799 | 198 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 800 | { | |
| 801 | /* add end element */ | |
| 802 | 198 | result = globus_soap_message_serialize_element_end( |
| 803 | message_handle, | |
| 804 | element_qname, | |
| 805 | options, | |
| 806 | &rptest_ResourcePropertyDefinitionType_qname); | |
| 807 | 198 | if(result != GLOBUS_SUCCESS) |
| 808 | { | |
| 809 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 810 | result, NULL, element_qname); | |
| 811 | 0 | goto exit; |
| 812 | } | |
| 813 | ||
| 814 | 198 | globus_soap_message_element_ns_remove( |
| 815 | message_handle, | |
| 816 | element_qname->Namespace, | |
| 817 | &options); | |
| 818 | ||
| 819 | /* remove namespace/prefix mappings for these types */ | |
| 820 | ||
| 821 | 198 | if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 822 | !globus_soap_message_serialize_is_c14n_subset(message_handle))) | |
| 823 | { | |
| 824 | 0 | globus_soap_message_attribute_ns_remove( |
| 825 | message_handle, | |
| 826 | "http://www.w3.org/2001/XMLSchema-instance", | |
| 827 | &options); | |
| 828 | } | |
| 829 | 198 | if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 830 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 831 | { | |
| 832 | 0 | globus_soap_message_attribute_ns_remove( |
| 833 | message_handle, | |
| 834 | rptest_ResourcePropertyDefinitionType_qname.Namespace, | |
| 835 | &options); | |
| 836 | } | |
| 837 | ||
| 838 | 198 | if(instance->_array) |
| 839 | { | |
| 840 | ||
| 841 | 162 | globus_soap_message_attribute_ns_remove( |
| 842 | message_handle, | |
| 843 | NULL, | |
| 844 | &options); | |
| 845 | ||
| 846 | } | |
| 847 | ||
| 848 | } | |
| 849 | ||
| 850 | 198 | exit: |
| 851 | 198 | if (type_attr) |
| 852 | { | |
| 853 | 0 | xsd_QName_destroy(type_attr); |
| 854 | } | |
| 855 | ||
| 856 | ||
| 857 | 198 | if(any_attr_keys) |
| 858 | { | |
| 859 | 0 | globus_list_free(any_attr_keys); |
| 860 | } | |
| 861 | ||
| 862 | 198 | GlobusSoapMessageDebugExit(); |
| 863 | 198 | return result; |
| 864 | } | |
| 865 | ||
| 866 | ||
| 867 | ||
| 868 | globus_result_t | |
| 869 | rptest_ResourcePropertyDefinitionType_deserialize_contents( | |
| 870 | const xsd_QName * element_qname, /* ignored */ | |
| 871 | rptest_ResourcePropertyDefinitionType * inst, | |
| 872 | globus_soap_message_handle_t message_handle, | |
| 873 | globus_xsd_element_options_t options) | |
| 874 | 0 | { |
| 875 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 876 | GlobusFuncName(rptest_ResourcePropertyDefinitionType_deserialize_contents); | |
| 877 | 0 | GlobusSoapMessageDebugEnter(); |
| 878 | ||
| 879 | 0 | result = rptest_ResourcePropertyDefinitionType_deserialize( |
| 880 | NULL, | |
| 881 | inst, | |
| 882 | message_handle, | |
| 883 | options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY); | |
| 884 | 0 | if(result != GLOBUS_SUCCESS) |
| 885 | { | |
| 886 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 887 | result, element_qname); | |
| 888 | 0 | goto exit; |
| 889 | } | |
| 890 | ||
| 891 | 0 | exit: |
| 892 | ||
| 893 | 0 | GlobusSoapMessageDebugExit(); |
| 894 | 0 | return result; |
| 895 | } | |
| 896 | ||
| 897 | ||
| 898 | ||
| 899 | globus_result_t | |
| 900 | rptest_ResourcePropertyDefinitionType_deserialize( | |
| 901 | const xsd_QName * element_qname, | |
| 902 | rptest_ResourcePropertyDefinitionType * instance, | |
| 903 | globus_soap_message_handle_t message_handle, | |
| 904 | globus_xsd_element_options_t options) | |
| 905 | 396 | { |
| 906 | 396 | globus_result_t result = GLOBUS_SUCCESS; |
| 907 | xsd_QName subelement; | |
| 908 | GlobusFuncName(rptest_ResourcePropertyDefinitionType_deserialize); | |
| 909 | 396 | GlobusSoapMessageDebugEnter(); |
| 910 | ||
| 911 | ||
| 912 | 396 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 913 | { | |
| 914 | 0 | result = globus_soap_message_deserialize_element( |
| 915 | message_handle, element_qname); | |
| 916 | 0 | if(result != GLOBUS_SUCCESS) |
| 917 | { | |
| 918 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 919 | result, element_qname); | |
| 920 | 0 | goto exit; |
| 921 | } | |
| 922 | ||
| 923 | 0 | subelement.Namespace = ""; |
| 924 | 0 | subelement.local = "array"; |
| 925 | ||
| 926 | 0 | result = xsd_boolean_deserialize_attribute_pointer( |
| 927 | &subelement, | |
| 928 | &instance->_array, | |
| 929 | message_handle, | |
| 930 | 0); | |
| 931 | 0 | if(result != GLOBUS_SUCCESS) |
| 932 | { | |
| 933 | 0 | result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement); |
| 934 | 0 | goto _array_destroy; |
| 935 | } | |
| 936 | ||
| 937 | ||
| 938 | ||
| 939 | 0 | result = globus_soap_message_deserialize_element_begin_close( |
| 940 | message_handle); | |
| 941 | 0 | if(result != GLOBUS_SUCCESS) |
| 942 | { | |
| 943 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 944 | result, element_qname); | |
| 945 | 0 | goto fail_deserialize; |
| 946 | } | |
| 947 | } | |
| 948 | ||
| 949 | 396 | subelement.local = "QName"; |
| 950 | 396 | subelement.Namespace = "http://www.globus.org/namespaces/2007/06/ResourcePropertiesTest"; |
| 951 | ||
| 952 | 396 | result = xsd_QName_deserialize( |
| 953 | &subelement, | |
| 954 | &instance->QName, | |
| 955 | message_handle, | |
| 956 | 0); | |
| 957 | 396 | if(result != GLOBUS_SUCCESS) |
| 958 | { | |
| 959 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 960 | result, | |
| 961 | &xsd_QName_qname); | |
| 962 | 0 | goto QName_destroy; |
| 963 | } | |
| 964 | ||
| 965 | 396 | subelement.local = "TypeQName"; |
| 966 | 396 | subelement.Namespace = "http://www.globus.org/namespaces/2007/06/ResourcePropertiesTest"; |
| 967 | ||
| 968 | 396 | result = xsd_QName_deserialize( |
| 969 | &subelement, | |
| 970 | &instance->TypeQName, | |
| 971 | message_handle, | |
| 972 | 0); | |
| 973 | 396 | if(result != GLOBUS_SUCCESS) |
| 974 | { | |
| 975 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 976 | result, | |
| 977 | &xsd_QName_qname); | |
| 978 | 0 | goto TypeQName_destroy; |
| 979 | } | |
| 980 | ||
| 981 | 396 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 982 | { | |
| 983 | 0 | result = globus_soap_message_deserialize_element_end( |
| 984 | message_handle, | |
| 985 | element_qname); | |
| 986 | 0 | if(result != GLOBUS_SUCCESS) |
| 987 | { | |
| 988 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 989 | result, element_qname); | |
| 990 | 0 | goto fail_deserialize; |
| 991 | } | |
| 992 | } | |
| 993 | ||
| 994 | 396 | goto exit; |
| 995 | ||
| 996 | 0 | fail_deserialize: |
| 997 | ||
| 998 | 0 | _array_destroy: |
| 999 | /* output_fail_destroy_attribute() */ | |
| 1000 | ||
| 1001 | 0 | if(instance->_array) |
| 1002 | { | |
| 1003 | 0 | xsd_boolean_destroy( |
| 1004 | instance->_array); | |
| 1005 | 0 | instance->_array = NULL; |
| 1006 | } | |
| 1007 | 0 | xsd_QName_destroy_contents( |
| 1008 | &instance->TypeQName); | |
| 1009 | ||
| 1010 | 0 | TypeQName_destroy: |
| 1011 | 0 | xsd_QName_destroy_contents( |
| 1012 | &instance->QName); | |
| 1013 | ||
| 1014 | 396 | QName_destroy: |
| 1015 | ||
| 1016 | ||
| 1017 | 396 | exit: |
| 1018 | ||
| 1019 | 396 | GlobusSoapMessageDebugExit(); |
| 1020 | 396 | return result; |
| 1021 | } | |
| 1022 | ||
| 1023 | ||
| 1024 | ||
| 1025 | globus_result_t | |
| 1026 | rptest_ResourcePropertyDefinitionType_deserialize_pointer( | |
| 1027 | const xsd_QName * element_qname, | |
| 1028 | rptest_ResourcePropertyDefinitionType ** ip, | |
| 1029 | globus_soap_message_handle_t message_handle, | |
| 1030 | globus_xsd_element_options_t options) | |
| 1031 | 576 | { |
| 1032 | 576 | rptest_ResourcePropertyDefinitionType * instance = NULL; |
| 1033 | 576 | globus_result_t result = GLOBUS_SUCCESS; |
| 1034 | xsd_QName subelement; | |
| 1035 | 576 | int found_attrs = 0; |
| 1036 | 576 | int empty_element = 0; |
| 1037 | GlobusFuncName(rptest_ResourcePropertyDefinitionType_deserialize_pointer); | |
| 1038 | 576 | GlobusSoapMessageDebugEnter(); |
| 1039 | ||
| 1040 | 576 | *ip = NULL; |
| 1041 | ||
| 1042 | 576 | result = globus_soap_message_deserialize_element( |
| 1043 | message_handle, element_qname); | |
| 1044 | 576 | if(result != GLOBUS_SUCCESS && |
| 1045 | (GlobusSoapMessageStatusElementNotFoundCheck(result) || | |
| 1046 | GlobusSoapMessageStatusFailedElementCheck(result) || | |
| 1047 | GlobusSoapMessageStatusFailedWithTextCheck(result))) | |
| 1048 | { | |
| 1049 | 180 | result = GLOBUS_SUCCESS; |
| 1050 | 180 | goto exit; |
| 1051 | } | |
| 1052 | ||
| 1053 | 396 | if(result != GLOBUS_SUCCESS) |
| 1054 | { | |
| 1055 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1056 | result, element_qname); | |
| 1057 | 0 | goto exit; |
| 1058 | } | |
| 1059 | ||
| 1060 | 396 | if(globus_soap_message_deserialize_element_is_empty( |
| 1061 | message_handle)) | |
| 1062 | { | |
| 1063 | 0 | empty_element = 1; |
| 1064 | } | |
| 1065 | ||
| 1066 | 396 | result = rptest_ResourcePropertyDefinitionType_init(&instance); |
| 1067 | 396 | if(result != GLOBUS_SUCCESS) |
| 1068 | { | |
| 1069 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1070 | result, element_qname); | |
| 1071 | 0 | goto exit; |
| 1072 | } | |
| 1073 | ||
| 1074 | ||
| 1075 | 396 | subelement.Namespace = ""; |
| 1076 | 396 | subelement.local = "array"; |
| 1077 | ||
| 1078 | 396 | result = xsd_boolean_deserialize_attribute_pointer( |
| 1079 | &subelement, | |
| 1080 | &instance->_array, | |
| 1081 | message_handle, | |
| 1082 | 0); | |
| 1083 | 396 | if(result != GLOBUS_SUCCESS) |
| 1084 | { | |
| 1085 | 0 | result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement); |
| 1086 | 0 | goto _array_destroy; |
| 1087 | } | |
| 1088 | ||
| 1089 | ||
| 1090 | 396 | if(instance->_array) |
| 1091 | { | |
| 1092 | 324 | found_attrs++; |
| 1093 | } | |
| 1094 | ||
| 1095 | 396 | if(found_attrs == 0 && |
| 1096 | globus_soap_message_deserialize_element_is_nil(message_handle)) | |
| 1097 | { | |
| 1098 | 0 | rptest_ResourcePropertyDefinitionType_destroy(instance); |
| 1099 | ||
| 1100 | 0 | result = globus_soap_message_deserialize_element_end( |
| 1101 | message_handle, | |
| 1102 | element_qname); | |
| 1103 | 0 | if(result != GLOBUS_SUCCESS) |
| 1104 | { | |
| 1105 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1106 | result, element_qname); | |
| 1107 | 0 | goto exit; |
| 1108 | } | |
| 1109 | ||
| 1110 | 0 | *ip = NULL; |
| 1111 | 0 | globus_object_free(globus_error_get(result)); |
| 1112 | 0 | result = GLOBUS_SUCCESS; |
| 1113 | 0 | goto exit; |
| 1114 | } | |
| 1115 | ||
| 1116 | 396 | if(empty_element) |
| 1117 | { | |
| 1118 | 0 | result = globus_soap_message_deserialize_element_end( |
| 1119 | message_handle, | |
| 1120 | element_qname); | |
| 1121 | 0 | if(result != GLOBUS_SUCCESS) |
| 1122 | { | |
| 1123 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1124 | result, element_qname); | |
| 1125 | 0 | goto fail_deserialize; |
| 1126 | } | |
| 1127 | ||
| 1128 | 0 | *ip = instance; |
| 1129 | 0 | goto exit; |
| 1130 | } | |
| 1131 | ||
| 1132 | 396 | result = globus_soap_message_deserialize_element_begin_close( |
| 1133 | message_handle); | |
| 1134 | 396 | if(result != GLOBUS_SUCCESS) |
| 1135 | { | |
| 1136 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1137 | result, element_qname); | |
| 1138 | 0 | goto exit; |
| 1139 | } | |
| 1140 | ||
| 1141 | 396 | result = rptest_ResourcePropertyDefinitionType_deserialize( |
| 1142 | element_qname, | |
| 1143 | instance, | |
| 1144 | message_handle, | |
| 1145 | options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY); | |
| 1146 | 396 | if(result != GLOBUS_SUCCESS) |
| 1147 | { | |
| 1148 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1149 | result, element_qname); | |
| 1150 | 0 | goto exit; |
| 1151 | } | |
| 1152 | ||
| 1153 | 396 | result = globus_soap_message_deserialize_element_end( |
| 1154 | message_handle, | |
| 1155 | element_qname); | |
| 1156 | 396 | if(result != GLOBUS_SUCCESS) |
| 1157 | { | |
| 1158 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1159 | result, element_qname); | |
| 1160 | 0 | goto fail_deserialize; |
| 1161 | } | |
| 1162 | ||
| 1163 | 396 | *ip = instance; |
| 1164 | ||
| 1165 | 396 | goto exit; |
| 1166 | ||
| 1167 | 0 | fail_deserialize: |
| 1168 | ||
| 1169 | 0 | _array_destroy: |
| 1170 | /* output_fail_destroy_attribute() */ | |
| 1171 | ||
| 1172 | 0 | if(instance->_array) |
| 1173 | { | |
| 1174 | 0 | xsd_boolean_destroy( |
| 1175 | instance->_array); | |
| 1176 | 0 | instance->_array = NULL; |
| 1177 | } | |
| 1178 | 0 | xsd_QName_destroy_contents( |
| 1179 | &instance->TypeQName); | |
| 1180 | ||
| 1181 | 0 | TypeQName_destroy: |
| 1182 | 0 | xsd_QName_destroy_contents( |
| 1183 | &instance->QName); | |
| 1184 | ||
| 1185 | 576 | QName_destroy: |
| 1186 | ||
| 1187 | 576 | exit: |
| 1188 | ||
| 1189 | 576 | GlobusSoapMessageDebugExit(); |
| 1190 | 576 | return result; |
| 1191 | } | |
| 1192 | ||
| 1193 | ||
| 1194 | globus_result_t | |
| 1195 | rptest_ResourcePropertyDefinitionType_array_init_contents( | |
| 1196 | rptest_ResourcePropertyDefinitionType_array * array) | |
| 1197 | 0 | { |
| 1198 | 0 | return globus_xsd_generic_array_init_contents( |
| 1199 | (globus_xsd_generic_array_t *) array, | |
| 1200 | &rptest_ResourcePropertyDefinitionType_info); | |
| 1201 | } | |
| 1202 | /* rptest_ResourcePropertyDefinitionType_array_init_contents() */ | |
| 1203 | ||
| 1204 | globus_result_t | |
| 1205 | rptest_ResourcePropertyDefinitionType_array_init( | |
| 1206 | rptest_ResourcePropertyDefinitionType_array ** arr) | |
| 1207 | 0 | { |
| 1208 | 0 | return globus_xsd_generic_array_init( |
| 1209 | (globus_xsd_generic_array_t **) arr, | |
| 1210 | &rptest_ResourcePropertyDefinitionType_info); | |
| 1211 | } | |
| 1212 | /* rptest_ResourcePropertyDefinitionType_array_init() */ | |
| 1213 | ||
| 1214 | void | |
| 1215 | rptest_ResourcePropertyDefinitionType_array_destroy_contents( | |
| 1216 | rptest_ResourcePropertyDefinitionType_array * array) | |
| 1217 | 720 | { |
| 1218 | 720 | globus_xsd_generic_array_destroy_contents( |
| 1219 | (globus_xsd_generic_array_t *) array); | |
| 1220 | 720 | } |
| 1221 | /* rptest_ResourcePropertyDefinitionType_array_destroy_contents() */ | |
| 1222 | ||
| 1223 | void | |
| 1224 | rptest_ResourcePropertyDefinitionType_array_destroy( | |
| 1225 | rptest_ResourcePropertyDefinitionType_array * array) | |
| 1226 | 0 | { |
| 1227 | 0 | globus_xsd_generic_array_destroy( |
| 1228 | (globus_xsd_generic_array_t *) array); | |
| 1229 | 0 | } |
| 1230 | /* rptest_ResourcePropertyDefinitionType_array_destroy() */ | |
| 1231 | ||
| 1232 | globus_result_t | |
| 1233 | rptest_ResourcePropertyDefinitionType_array_copy( | |
| 1234 | rptest_ResourcePropertyDefinitionType_array ** dest_arr, | |
| 1235 | const rptest_ResourcePropertyDefinitionType_array * src_arr) | |
| 1236 | 0 | { |
| 1237 | 0 | return globus_xsd_generic_array_copy( |
| 1238 | (globus_xsd_generic_array_t **) dest_arr, | |
| 1239 | (globus_xsd_generic_array_t *) src_arr); | |
| 1240 | } | |
| 1241 | /* rptest_ResourcePropertyDefinitionType_array_copy() */ | |
| 1242 | ||
| 1243 | globus_result_t | |
| 1244 | rptest_ResourcePropertyDefinitionType_array_copy_contents( | |
| 1245 | rptest_ResourcePropertyDefinitionType_array * dest_arr, | |
| 1246 | const rptest_ResourcePropertyDefinitionType_array * src_arr) | |
| 1247 | 360 | { |
| 1248 | 360 | return globus_xsd_generic_array_copy_contents( |
| 1249 | (globus_xsd_generic_array_t *) dest_arr, | |
| 1250 | (globus_xsd_generic_array_t *) src_arr); | |
| 1251 | } | |
| 1252 | /* rptest_ResourcePropertyDefinitionType_array_copy_contents() */ | |
| 1253 | ||
| 1254 | rptest_ResourcePropertyDefinitionType * | |
| 1255 | rptest_ResourcePropertyDefinitionType_array_push( | |
| 1256 | rptest_ResourcePropertyDefinitionType_array * array) | |
| 1257 | 396 | { |
| 1258 | /* Some contents initializers don't initialize subelments but to set their | |
| 1259 | * values to be NULL | |
| 1260 | */ | |
| 1261 | 396 | if (array->type_info == NULL) |
| 1262 | { | |
| 1263 | 0 | array->type_info = &rptest_ResourcePropertyDefinitionType_info; |
| 1264 | } | |
| 1265 | ||
| 1266 | 396 | return globus_xsd_generic_array_push( |
| 1267 | (globus_xsd_generic_array_t *) array); | |
| 1268 | } | |
| 1269 | /* rptest_ResourcePropertyDefinitionType_array_push() */ | |
| 1270 | ||
| 1271 | globus_result_t | |
| 1272 | rptest_ResourcePropertyDefinitionType_array_serialize( | |
| 1273 | const xsd_QName * element_qname, | |
| 1274 | const rptest_ResourcePropertyDefinitionType_array * array, | |
| 1275 | globus_soap_message_handle_t message, | |
| 1276 | globus_xsd_element_options_t options) | |
| 1277 | 180 | { |
| 1278 | 180 | return globus_xsd_generic_array_serialize( |
| 1279 | element_qname, | |
| 1280 | (const globus_xsd_generic_array_t *) array, | |
| 1281 | message, | |
| 1282 | options); | |
| 1283 | } | |
| 1284 | /* rptest_ResourcePropertyDefinitionType_array_serialize() */ | |
| 1285 | ||
| 1286 | globus_result_t | |
| 1287 | rptest_ResourcePropertyDefinitionType_array_deserialize( | |
| 1288 | const xsd_QName * element_qname, | |
| 1289 | rptest_ResourcePropertyDefinitionType_array * array, | |
| 1290 | globus_soap_message_handle_t message, | |
| 1291 | globus_xsd_element_options_t options) | |
| 1292 | 360 | { |
| 1293 | /* Some initializers set the array's contents to NULL */ | |
| 1294 | 360 | if (array->type_info == NULL) |
| 1295 | { | |
| 1296 | 360 | array->type_info = &rptest_ResourcePropertyDefinitionType_info; |
| 1297 | } | |
| 1298 | 360 | return globus_xsd_generic_array_deserialize( |
| 1299 | element_qname, | |
| 1300 | (globus_xsd_generic_array_t *) array, | |
| 1301 | message, | |
| 1302 | options); |