| 1 | /* | |
| 2 | * Portions of this file Copyright 1999-2005 University of Chicago | |
| 3 | * Portions of this file Copyright 1999-2005 The University of Southern California. | |
| 4 | * | |
| 5 | * This file or a portion of this file is licensed under the | |
| 6 | * terms of the Globus Toolkit Public License, found at | |
| 7 | * http://www.globus.org/toolkit/download/license.html. | |
| 8 | * If you redistribute this file, with or without | |
| 9 | * modifications, you must include this notice in the file. | |
| 10 | */ | |
| 11 | ||
| 12 | ||
| 13 | /* | |
| 14 | * This file is automatically generated by the Globus WSDLtoC converter | |
| 15 | */ | |
| 16 | ||
| 17 | #include "xsd_QName.h" | |
| 18 | #include "globus_soap_message.h" | |
| 19 | #include "globus_xsd_type_info.h" | |
| 20 | #include "wsp_PolicyAssertions_group.h" | |
| 21 | ||
| 22 | #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL | |
| 23 | xsd_QName wsp_PolicyAssertions_group_qname = | |
| 24 | { | |
| 25 | WSP_POLICYASSERTIONS_GROUP_NS, | |
| 26 | WSP_POLICYASSERTIONS_GROUP_LOCAL | |
| 27 | }; | |
| 28 | #endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */ | |
| 29 | ||
| 30 | globus_result_t | |
| 31 | wsp_PolicyAssertions_group_serialize_wrapper( | |
| 32 | xsd_QName * element_qname, | |
| 33 | void * instance, | |
| 34 | globus_soap_message_handle_t message_handle, | |
| 35 | globus_xsd_element_options_t options) | |
| 36 | 0 | { |
| 37 | 0 | return wsp_PolicyAssertions_group_serialize( |
| 38 | element_qname, | |
| 39 | (wsp_PolicyAssertions_group *) instance, | |
| 40 | message_handle, options); | |
| 41 | } | |
| 42 | ||
| 43 | globus_result_t | |
| 44 | wsp_PolicyAssertions_group_deserialize_pointer_wrapper( | |
| 45 | xsd_QName * element_qname, | |
| 46 | void ** ip, | |
| 47 | globus_soap_message_handle_t message_handle, | |
| 48 | globus_xsd_element_options_t options) | |
| 49 | 0 | { |
| 50 | 0 | return wsp_PolicyAssertions_group_deserialize_pointer( |
| 51 | element_qname, | |
| 52 | (wsp_PolicyAssertions_group **) ip, | |
| 53 | message_handle, options); | |
| 54 | } | |
| 55 | ||
| 56 | globus_result_t | |
| 57 | wsp_PolicyAssertions_group_init_wrapper(void **object) | |
| 58 | 0 | { |
| 59 | 0 | return wsp_PolicyAssertions_group_init( |
| 60 | (wsp_PolicyAssertions_group **) object); | |
| 61 | } | |
| 62 | ||
| 63 | void | |
| 64 | wsp_PolicyAssertions_group_destroy_wrapper( | |
| 65 | void * object) | |
| 66 | 0 | { |
| 67 | 0 | wsp_PolicyAssertions_group_destroy( |
| 68 | (wsp_PolicyAssertions_group *) object); | |
| 69 | } | |
| 70 | ||
| 71 | globus_result_t | |
| 72 | wsp_PolicyAssertions_group_copy_wrapper( | |
| 73 | void ** dest_obj, | |
| 74 | void * src_obj) | |
| 75 | 0 | { |
| 76 | 0 | return wsp_PolicyAssertions_group_copy( |
| 77 | (wsp_PolicyAssertions_group **) dest_obj, | |
| 78 | (wsp_PolicyAssertions_group *) src_obj); | |
| 79 | } | |
| 80 | ||
| 81 | globus_result_t | |
| 82 | wsp_PolicyAssertions_group_init_contents_wrapper(void *object) | |
| 83 | 0 | { |
| 84 | 0 | return wsp_PolicyAssertions_group_init_contents( |
| 85 | (wsp_PolicyAssertions_group *) object); | |
| 86 | } | |
| 87 | ||
| 88 | void | |
| 89 | wsp_PolicyAssertions_group_destroy_contents_wrapper( | |
| 90 | void * object) | |
| 91 | 0 | { |
| 92 | 0 | wsp_PolicyAssertions_group_destroy_contents( |
| 93 | (wsp_PolicyAssertions_group *) object); | |
| 94 | } | |
| 95 | ||
| 96 | globus_result_t | |
| 97 | wsp_PolicyAssertions_group_copy_contents_wrapper( | |
| 98 | void * dest_obj, | |
| 99 | void * src_obj) | |
| 100 | 0 | { |
| 101 | 0 | return wsp_PolicyAssertions_group_copy_contents( |
| 102 | (wsp_PolicyAssertions_group *) dest_obj, | |
| 103 | (wsp_PolicyAssertions_group *) src_obj); | |
| 104 | } | |
| 105 | ||
| 106 | globus_result_t | |
| 107 | wsp_PolicyAssertions_group_serialize_contents_wrapper( | |
| 108 | xsd_QName * element_qname, | |
| 109 | void * instance, | |
| 110 | globus_soap_message_handle_t message_handle, | |
| 111 | globus_xsd_element_options_t options) | |
| 112 | 0 | { |
| 113 | 0 | return wsp_PolicyAssertions_group_serialize_contents( |
| 114 | element_qname, | |
| 115 | (wsp_PolicyAssertions_group *) instance, | |
| 116 | message_handle, options); | |
| 117 | } | |
| 118 | ||
| 119 | globus_result_t | |
| 120 | wsp_PolicyAssertions_group_deserialize_contents_wrapper( | |
| 121 | xsd_QName * element_qname, | |
| 122 | void ** instance, | |
| 123 | globus_soap_message_handle_t message_handle, | |
| 124 | globus_xsd_element_options_t options) | |
| 125 | 0 | { |
| 126 | 0 | globus_result_t result; |
| 127 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_deserialize_contents_wrapper); |
| 128 | 0 | GlobusSoapMessageDebugEnter(); |
| 129 | ||
| 130 | 0 | if(!*instance) |
| 131 | { | |
| 132 | 0 | result = wsp_PolicyAssertions_group_init( |
| 133 | (wsp_PolicyAssertions_group **)instance); | |
| 134 | 0 | if(result != GLOBUS_SUCCESS) |
| 135 | { | |
| 136 | 0 | goto error; |
| 137 | } | |
| 138 | } | |
| 139 | ||
| 140 | 0 | result = wsp_PolicyAssertions_group_deserialize_contents( |
| 141 | element_qname, | |
| 142 | *(wsp_PolicyAssertions_group **)instance, | |
| 143 | message_handle, options); | |
| 144 | error: | |
| 145 | 0 | GlobusSoapMessageDebugExit(); |
| 146 | 0 | return result; |
| 147 | } | |
| 148 | ||
| 149 | globus_result_t | |
| 150 | wsp_PolicyAssertions_group_array_serialize_wrapper( | |
| 151 | xsd_QName * element, | |
| 152 | void * instance, | |
| 153 | globus_soap_message_handle_t message, | |
| 154 | globus_xsd_element_options_t options) | |
| 155 | 0 | { |
| 156 | 0 | return wsp_PolicyAssertions_group_array_serialize( |
| 157 | element, | |
| 158 | (wsp_PolicyAssertions_group_array *) instance, | |
| 159 | message, options); | |
| 160 | } | |
| 161 | ||
| 162 | globus_result_t | |
| 163 | wsp_PolicyAssertions_group_array_deserialize_wrapper( | |
| 164 | xsd_QName * element_qname, | |
| 165 | void ** inst, | |
| 166 | globus_soap_message_handle_t message, | |
| 167 | globus_xsd_element_options_t options) | |
| 168 | 0 | { |
| 169 | 0 | if(!*inst) |
| 170 | { | |
| 171 | 0 | globus_result_t result; |
| 172 | ||
| 173 | 0 | result = wsp_PolicyAssertions_group_array_init( |
| 174 | (wsp_PolicyAssertions_group_array **)inst); | |
| 175 | 0 | if(result != GLOBUS_SUCCESS) |
| 176 | { | |
| 177 | 0 | return result; |
| 178 | } | |
| 179 | } | |
| 180 | ||
| 181 | 0 | return wsp_PolicyAssertions_group_array_deserialize( |
| 182 | element_qname, | |
| 183 | *(wsp_PolicyAssertions_group_array **) inst, | |
| 184 | message, options); | |
| 185 | } | |
| 186 | ||
| 187 | globus_result_t | |
| 188 | wsp_PolicyAssertions_group_array_init_wrapper( | |
| 189 | void ** arr) | |
| 190 | 0 | { |
| 191 | 0 | return wsp_PolicyAssertions_group_array_init( |
| 192 | (wsp_PolicyAssertions_group_array **) arr); | |
| 193 | } | |
| 194 | ||
| 195 | void | |
| 196 | wsp_PolicyAssertions_group_array_destroy_wrapper( | |
| 197 | void * arr) | |
| 198 | 0 | { |
| 199 | 0 | wsp_PolicyAssertions_group_array_destroy( |
| 200 | (wsp_PolicyAssertions_group_array *) arr); | |
| 201 | } | |
| 202 | ||
| 203 | globus_result_t | |
| 204 | wsp_PolicyAssertions_group_array_copy_wrapper( | |
| 205 | void ** dest_arr, | |
| 206 | void * src_arr) | |
| 207 | 0 | { |
| 208 | 0 | return wsp_PolicyAssertions_group_array_copy( |
| 209 | (wsp_PolicyAssertions_group_array **) dest_arr, | |
| 210 | (wsp_PolicyAssertions_group_array *) src_arr); | |
| 211 | } | |
| 212 | ||
| 213 | globus_result_t | |
| 214 | wsp_PolicyAssertions_group_array_init_contents_wrapper( | |
| 215 | void * arr) | |
| 216 | 0 | { |
| 217 | 0 | return wsp_PolicyAssertions_group_array_init_contents( |
| 218 | (wsp_PolicyAssertions_group_array *) arr); | |
| 219 | } | |
| 220 | ||
| 221 | void | |
| 222 | wsp_PolicyAssertions_group_array_destroy_contents_wrapper( | |
| 223 | void * arr) | |
| 224 | 0 | { |
| 225 | 0 | wsp_PolicyAssertions_group_array_destroy_contents( |
| 226 | (wsp_PolicyAssertions_group_array *) arr); | |
| 227 | } | |
| 228 | ||
| 229 | globus_result_t | |
| 230 | wsp_PolicyAssertions_group_array_copy_contents_wrapper( | |
| 231 | void * dest_arr, | |
| 232 | void * src_arr) | |
| 233 | 0 | { |
| 234 | 0 | return wsp_PolicyAssertions_group_array_copy_contents( |
| 235 | (wsp_PolicyAssertions_group_array *) dest_arr, | |
| 236 | (wsp_PolicyAssertions_group_array *) src_arr); | |
| 237 | } | |
| 238 | ||
| 239 | struct globus_xsd_type_info_s wsp_PolicyAssertions_group_contents_info = | |
| 240 | { | |
| 241 | &wsp_PolicyAssertions_group_qname, | |
| 242 | wsp_PolicyAssertions_group_serialize_contents_wrapper, | |
| 243 | wsp_PolicyAssertions_group_deserialize_contents_wrapper, | |
| 244 | wsp_PolicyAssertions_group_init_wrapper, | |
| 245 | wsp_PolicyAssertions_group_destroy_wrapper, | |
| 246 | wsp_PolicyAssertions_group_copy_wrapper, | |
| 247 | wsp_PolicyAssertions_group_init_contents_wrapper, | |
| 248 | wsp_PolicyAssertions_group_destroy_contents_wrapper, | |
| 249 | wsp_PolicyAssertions_group_copy_contents_wrapper, | |
| 250 | sizeof(wsp_PolicyAssertions_group), | |
| 251 | NULL, | |
| 252 | NULL, | |
| 253 | NULL | |
| 254 | }; | |
| 255 | ||
| 256 | struct globus_xsd_type_info_s wsp_PolicyAssertions_group_array_info = | |
| 257 | { | |
| 258 | &wsp_PolicyAssertions_group_qname, | |
| 259 | wsp_PolicyAssertions_group_array_serialize_wrapper, | |
| 260 | wsp_PolicyAssertions_group_array_deserialize_wrapper, | |
| 261 | wsp_PolicyAssertions_group_array_init_wrapper, | |
| 262 | wsp_PolicyAssertions_group_array_destroy_wrapper, | |
| 263 | wsp_PolicyAssertions_group_array_copy_wrapper, | |
| 264 | wsp_PolicyAssertions_group_array_init_contents_wrapper, | |
| 265 | wsp_PolicyAssertions_group_array_destroy_contents_wrapper, | |
| 266 | wsp_PolicyAssertions_group_array_copy_contents_wrapper, | |
| 267 | sizeof(wsp_PolicyAssertions_group), | |
| 268 | wsp_PolicyAssertions_group_array_push_wrapper, | |
| 269 | NULL, | |
| 270 | NULL | |
| 271 | }; | |
| 272 | ||
| 273 | struct globus_xsd_type_info_s wsp_PolicyAssertions_group_info = | |
| 274 | { | |
| 275 | &wsp_PolicyAssertions_group_qname, | |
| 276 | wsp_PolicyAssertions_group_serialize_wrapper, | |
| 277 | wsp_PolicyAssertions_group_deserialize_pointer_wrapper, | |
| 278 | wsp_PolicyAssertions_group_init_wrapper, | |
| 279 | wsp_PolicyAssertions_group_destroy_wrapper, | |
| 280 | wsp_PolicyAssertions_group_copy_wrapper, | |
| 281 | wsp_PolicyAssertions_group_init_contents_wrapper, | |
| 282 | wsp_PolicyAssertions_group_destroy_contents_wrapper, | |
| 283 | wsp_PolicyAssertions_group_copy_contents_wrapper, | |
| 284 | sizeof(wsp_PolicyAssertions_group), | |
| 285 | NULL, | |
| 286 | &wsp_PolicyAssertions_group_contents_info, | |
| 287 | &wsp_PolicyAssertions_group_array_info | |
| 288 | }; | |
| 289 | ||
| 290 | globus_result_t | |
| 291 | wsp_PolicyAssertions_group_init_contents( | |
| 292 | wsp_PolicyAssertions_group * instance) | |
| 293 | 0 | { |
| 294 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 295 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_init_contents); |
| 296 | 0 | GlobusSoapMessageDebugEnter(); |
| 297 | ||
| 298 | 0 | memset(instance, 0, sizeof(wsp_PolicyAssertions_group)); |
| 299 | ||
| 300 | 0 | GlobusSoapMessageDebugExit(); |
| 301 | 0 | return result; |
| 302 | } | |
| 303 | ||
| 304 | globus_result_t | |
| 305 | wsp_PolicyAssertions_group_init( | |
| 306 | wsp_PolicyAssertions_group ** object) | |
| 307 | 0 | { |
| 308 | 0 | wsp_PolicyAssertions_group * instance; |
| 309 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 310 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_init); |
| 311 | 0 | GlobusSoapMessageDebugEnter(); |
| 312 | ||
| 313 | 0 | instance = globus_malloc(sizeof(wsp_PolicyAssertions_group)); |
| 314 | 0 | if(!instance) |
| 315 | { | |
| 316 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 317 | 0 | goto exit; |
| 318 | } | |
| 319 | ||
| 320 | 0 | memset(instance, 0, sizeof(wsp_PolicyAssertions_group)); |
| 321 | ||
| 322 | 0 | *object = instance; |
| 323 | ||
| 324 | exit: | |
| 325 | 0 | GlobusSoapMessageDebugExit(); |
| 326 | 0 | return result; |
| 327 | } | |
| 328 | ||
| 329 | void | |
| 330 | wsp_PolicyAssertions_group_destroy( | |
| 331 | wsp_PolicyAssertions_group * instance) | |
| 332 | 0 | { |
| 333 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_destroy); |
| 334 | 0 | GlobusSoapMessageDebugEnter(); |
| 335 | ||
| 336 | 0 | if(!instance) |
| 337 | { | |
| 338 | 0 | goto exit; |
| 339 | } | |
| 340 | ||
| 341 | 0 | wsp_PolicyAssertions_group_destroy_contents(instance); |
| 342 | 0 | globus_free(instance); |
| 343 | ||
| 344 | exit: | |
| 345 | ||
| 346 | 0 | GlobusSoapMessageDebugExit(); |
| 347 | } | |
| 348 | ||
| 349 | void | |
| 350 | wsp_PolicyAssertions_group_destroy_contents( | |
| 351 | wsp_PolicyAssertions_group * instance) | |
| 352 | 0 | { |
| 353 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_destroy_contents); |
| 354 | 0 | GlobusSoapMessageDebugEnter(); |
| 355 | ||
| 356 | 0 | if(instance) |
| 357 | { | |
| 358 | ||
| 359 | ||
| 360 | 0 | wsp_PolicyAssertions_group_choice_destroy_contents( |
| 361 | &instance->choice_value); | |
| 362 | ||
| 363 | } | |
| 364 | ||
| 365 | 0 | GlobusSoapMessageDebugExit(); |
| 366 | } | |
| 367 | ||
| 368 | globus_result_t | |
| 369 | wsp_PolicyAssertions_group_copy( | |
| 370 | wsp_PolicyAssertions_group ** dest_obj, | |
| 371 | const wsp_PolicyAssertions_group * src_obj) | |
| 372 | 0 | { |
| 373 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 374 | 0 | wsp_PolicyAssertions_group * instance; |
| 375 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_copy); |
| 376 | ||
| 377 | 0 | GlobusSoapMessageDebugEnter(); |
| 378 | ||
| 379 | 0 | instance = malloc(sizeof(wsp_PolicyAssertions_group)); |
| 380 | 0 | if (instance == NULL) |
| 381 | { | |
| 382 | 0 | GlobusSoapMessageDebugExit(); |
| 383 | 0 | return GlobusSoapMessageErrorOutOfMemory; |
| 384 | } | |
| 385 | ||
| 386 | 0 | result = wsp_PolicyAssertions_group_copy_contents(instance, src_obj); |
| 387 | 0 | if(result != GLOBUS_SUCCESS) |
| 388 | { | |
| 389 | 0 | globus_free(instance); |
| 390 | 0 | GlobusSoapMessageDebugExit(); |
| 391 | 0 | return GlobusSoapMessageErrorOutOfMemory; |
| 392 | } | |
| 393 | ||
| 394 | 0 | *dest_obj = instance; |
| 395 | 0 | GlobusSoapMessageDebugExit(); |
| 396 | 0 | return result; |
| 397 | } | |
| 398 | ||
| 399 | globus_result_t | |
| 400 | wsp_PolicyAssertions_group_copy_contents( | |
| 401 | wsp_PolicyAssertions_group * instance, | |
| 402 | const wsp_PolicyAssertions_group * src_obj) | |
| 403 | 0 | { |
| 404 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 405 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_copy_contents); |
| 406 | ||
| 407 | 0 | GlobusSoapMessageDebugEnter(); |
| 408 | ||
| 409 | ||
| 410 | 0 | result = wsp_PolicyAssertions_group_choice_copy_contents( |
| 411 | &instance->choice_value, | |
| 412 | &src_obj->choice_value); | |
| 413 | 0 | if(result != GLOBUS_SUCCESS) |
| 414 | { | |
| 415 | 0 | result = GlobusSoapMessageErrorCopyFailed( |
| 416 | result, NULL, &wsp_PolicyAssertions_group_choice_qname); | |
| 417 | goto choice_value_destroy; | |
| 418 | } | |
| 419 | ||
| 420 | 0 | goto exit; |
| 421 | ||
| 422 | fail_deserialize: | |
| 423 | 0 | wsp_PolicyAssertions_group_choice_destroy_contents( |
| 424 | &instance->choice_value); | |
| 425 | ||
| 426 | choice_value_destroy: | |
| 427 | ||
| 428 | ||
| 429 | exit: | |
| 430 | ||
| 431 | 0 | GlobusSoapMessageDebugExit(); |
| 432 | 0 | return result; |
| 433 | } | |
| 434 | ||
| 435 | ||
| 436 | ||
| 437 | globus_result_t | |
| 438 | wsp_PolicyAssertions_group_serialize_contents( | |
| 439 | xsd_QName * element_qname, /* ignored */ | |
| 440 | wsp_PolicyAssertions_group * inst, | |
| 441 | globus_soap_message_handle_t message_handle, | |
| 442 | globus_xsd_element_options_t options) | |
| 443 | 0 | { |
| 444 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 445 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_serialize_contents); |
| 446 | 0 | GlobusSoapMessageDebugEnter(); |
| 447 | ||
| 448 | 0 | result = wsp_PolicyAssertions_group_serialize( |
| 449 | NULL, | |
| 450 | inst, | |
| 451 | message_handle, | |
| 452 | options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY); | |
| 453 | 0 | if(result != GLOBUS_SUCCESS) |
| 454 | { | |
| 455 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 456 | result, NULL, element_qname); | |
| 457 | goto exit; | |
| 458 | } | |
| 459 | ||
| 460 | exit: | |
| 461 | ||
| 462 | 0 | GlobusSoapMessageDebugExit(); |
| 463 | 0 | return result; |
| 464 | } | |
| 465 | ||
| 466 | ||
| 467 | ||
| 468 | globus_result_t | |
| 469 | wsp_PolicyAssertions_group_serialize( | |
| 470 | xsd_QName * element_qname, | |
| 471 | wsp_PolicyAssertions_group * instance, | |
| 472 | globus_soap_message_handle_t message_handle, | |
| 473 | globus_xsd_element_options_t options) | |
| 474 | 0 | { |
| 475 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 476 | 0 | xsd_QName subelement; |
| 477 | 0 | globus_list_t * any_attr_keys = NULL; |
| 478 | 0 | globus_list_t * any_attr_keys_iterator = NULL; |
| 479 | 0 | xsd_QName * type_attr = NULL; |
| 480 | 0 | char * prefix = NULL; |
| 481 | 0 | int prefix_created; |
| 482 | 0 | int define_prefix = 0; |
| 483 | 0 | int save_options = options; |
| 484 | ||
| 485 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_serialize); |
| 486 | 0 | GlobusSoapMessageDebugEnter(); |
| 487 | ||
| 488 | ||
| 489 | /* serialize contents of type */ | |
| 490 | ||
| 491 | 0 | subelement.local = "choice_value"; |
| 492 | 0 | subelement.Namespace = NULL; |
| 493 | ||
| 494 | 0 | result = wsp_PolicyAssertions_group_choice_serialize( |
| 495 | &subelement, | |
| 496 | &instance->choice_value, | |
| 497 | message_handle, | |
| 498 | options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS)); | |
| 499 | 0 | if(result != GLOBUS_SUCCESS) |
| 500 | { | |
| 501 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 502 | result, NULL, &wsp_PolicyAssertions_group_choice_qname); | |
| 503 | goto exit; | |
| 504 | } | |
| 505 | ||
| 506 | exit: | |
| 507 | 0 | if (type_attr) |
| 508 | { | |
| 509 | 0 | xsd_QName_destroy(type_attr); |
| 510 | } | |
| 511 | ||
| 512 | 0 | if(any_attr_keys) |
| 513 | { | |
| 514 | 0 | globus_list_free(any_attr_keys); |
| 515 | } | |
| 516 | ||
| 517 | 0 | GlobusSoapMessageDebugExit(); |
| 518 | 0 | return result; |
| 519 | } | |
| 520 | ||
| 521 | ||
| 522 | ||
| 523 | globus_result_t | |
| 524 | wsp_PolicyAssertions_group_deserialize_contents( | |
| 525 | xsd_QName * element_qname, /* ignored */ | |
| 526 | wsp_PolicyAssertions_group * inst, | |
| 527 | globus_soap_message_handle_t message_handle, | |
| 528 | globus_xsd_element_options_t options) | |
| 529 | 0 | { |
| 530 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 531 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_deserialize_contents); |
| 532 | 0 | GlobusSoapMessageDebugEnter(); |
| 533 | ||
| 534 | 0 | result = wsp_PolicyAssertions_group_deserialize( |
| 535 | NULL, | |
| 536 | inst, | |
| 537 | message_handle, | |
| 538 | options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY); | |
| 539 | 0 | if(result != GLOBUS_SUCCESS) |
| 540 | { | |
| 541 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 542 | result, element_qname); | |
| 543 | goto exit; | |
| 544 | } | |
| 545 | ||
| 546 | exit: | |
| 547 | ||
| 548 | 0 | GlobusSoapMessageDebugExit(); |
| 549 | 0 | return result; |
| 550 | } | |
| 551 | ||
| 552 | ||
| 553 | ||
| 554 | globus_result_t | |
| 555 | wsp_PolicyAssertions_group_deserialize( | |
| 556 | xsd_QName * element_qname, | |
| 557 | wsp_PolicyAssertions_group * instance, | |
| 558 | globus_soap_message_handle_t message_handle, | |
| 559 | globus_xsd_element_options_t options) | |
| 560 | 0 | { |
| 561 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 562 | 0 | xsd_QName subelement; |
| 563 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_deserialize); |
| 564 | 0 | GlobusSoapMessageDebugEnter(); |
| 565 | ||
| 566 | ||
| 567 | 0 | subelement.local = "choice_value"; |
| 568 | 0 | subelement.Namespace = NULL; |
| 569 | ||
| 570 | 0 | result = wsp_PolicyAssertions_group_choice_deserialize( |
| 571 | &subelement, | |
| 572 | &instance->choice_value, | |
| 573 | message_handle, | |
| 574 | 0); | |
| 575 | 0 | if(result != GLOBUS_SUCCESS) |
| 576 | { | |
| 577 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 578 | result, | |
| 579 | &wsp_PolicyAssertions_group_choice_qname); | |
| 580 | goto choice_value_destroy; | |
| 581 | } | |
| 582 | ||
| 583 | 0 | goto exit; |
| 584 | ||
| 585 | fail_deserialize: | |
| 586 | 0 | wsp_PolicyAssertions_group_choice_destroy_contents( |
| 587 | &instance->choice_value); | |
| 588 | ||
| 589 | choice_value_destroy: | |
| 590 | ||
| 591 | ||
| 592 | exit: | |
| 593 | ||
| 594 | 0 | GlobusSoapMessageDebugExit(); |
| 595 | 0 | return result; |
| 596 | } | |
| 597 | ||
| 598 | ||
| 599 | ||
| 600 | globus_result_t | |
| 601 | wsp_PolicyAssertions_group_deserialize_pointer( | |
| 602 | xsd_QName * element_qname, | |
| 603 | wsp_PolicyAssertions_group ** ip, | |
| 604 | globus_soap_message_handle_t message_handle, | |
| 605 | globus_xsd_element_options_t options) | |
| 606 | 0 | { |
| 607 | 0 | wsp_PolicyAssertions_group * instance = NULL; |
| 608 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 609 | 0 | xsd_QName subelement; |
| 610 | 0 | int found_attrs = 0; |
| 611 | 0 | int empty_element = 0; |
| 612 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_deserialize_pointer); |
| 613 | 0 | GlobusSoapMessageDebugEnter(); |
| 614 | ||
| 615 | 0 | *ip = NULL; |
| 616 | ||
| 617 | 0 | result = globus_soap_message_deserialize_element( |
| 618 | message_handle, element_qname); | |
| 619 | 0 | if(result != GLOBUS_SUCCESS && |
| 620 | (GlobusSoapMessageStatusElementNotFoundCheck(result) || | |
| 621 | GlobusSoapMessageStatusFailedElementCheck(result) || | |
| 622 | GlobusSoapMessageStatusFailedWithTextCheck(result))) | |
| 623 | { | |
| 624 | 0 | *ip = NULL; |
| 625 | 0 | result = GLOBUS_SUCCESS; |
| 626 | 0 | goto exit; |
| 627 | } | |
| 628 | ||
| 629 | 0 | if(result != GLOBUS_SUCCESS) |
| 630 | { | |
| 631 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 632 | result, element_qname); | |
| 633 | 0 | goto exit; |
| 634 | } | |
| 635 | ||
| 636 | 0 | if(globus_soap_message_deserialize_element_is_empty( |
| 637 | message_handle)) | |
| 638 | { | |
| 639 | 0 | empty_element = 1; |
| 640 | } | |
| 641 | ||
| 642 | ||
| 643 | ||
| 644 | 0 | result = wsp_PolicyAssertions_group_init(&instance); |
| 645 | 0 | if(result != GLOBUS_SUCCESS) |
| 646 | { | |
| 647 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 648 | result, element_qname); | |
| 649 | 0 | goto exit; |
| 650 | } | |
| 651 | ||
| 652 | ||
| 653 | 0 | if(found_attrs == 0 && |
| 654 | globus_soap_message_deserialize_element_is_nil(message_handle)) | |
| 655 | { | |
| 656 | 0 | wsp_PolicyAssertions_group_destroy(instance); |
| 657 | ||
| 658 | 0 | result = globus_soap_message_deserialize_element_end( |
| 659 | message_handle, | |
| 660 | element_qname); | |
| 661 | 0 | if(result != GLOBUS_SUCCESS) |
| 662 | { | |
| 663 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 664 | result, element_qname); | |
| 665 | 0 | goto exit; |
| 666 | } | |
| 667 | ||
| 668 | 0 | *ip = NULL; |
| 669 | 0 | globus_object_free(globus_error_get(result)); |
| 670 | 0 | result = GLOBUS_SUCCESS; |
| 671 | 0 | goto exit; |
| 672 | } | |
| 673 | ||
| 674 | ||
| 675 | 0 | if(empty_element) |
| 676 | { | |
| 677 | 0 | result = globus_soap_message_deserialize_element_end( |
| 678 | message_handle, | |
| 679 | element_qname); | |
| 680 | 0 | if(result != GLOBUS_SUCCESS) |
| 681 | { | |
| 682 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 683 | result, element_qname); | |
| 684 | 0 | goto fail_deserialize; |
| 685 | } | |
| 686 | ||
| 687 | 0 | *ip = instance; |
| 688 | 0 | goto exit; |
| 689 | } | |
| 690 | ||
| 691 | 0 | result = globus_soap_message_deserialize_element_begin_close( |
| 692 | message_handle); | |
| 693 | 0 | if(result != GLOBUS_SUCCESS) |
| 694 | { | |
| 695 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 696 | result, element_qname); | |
| 697 | 0 | goto exit; |
| 698 | } | |
| 699 | ||
| 700 | ||
| 701 | 0 | subelement.local = "choice_value"; |
| 702 | 0 | subelement.Namespace = NULL; |
| 703 | ||
| 704 | 0 | result = wsp_PolicyAssertions_group_choice_deserialize( |
| 705 | &subelement, | |
| 706 | &instance->choice_value, | |
| 707 | message_handle, | |
| 708 | 0); | |
| 709 | 0 | if(result != GLOBUS_SUCCESS) |
| 710 | { | |
| 711 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 712 | result, | |
| 713 | &wsp_PolicyAssertions_group_choice_qname); | |
| 714 | 0 | goto choice_value_destroy; |
| 715 | } | |
| 716 | ||
| 717 | ||
| 718 | 0 | result = globus_soap_message_deserialize_element_end( |
| 719 | message_handle, | |
| 720 | element_qname); | |
| 721 | 0 | if(result != GLOBUS_SUCCESS) |
| 722 | { | |
| 723 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 724 | result, element_qname); | |
| 725 | 0 | goto fail_deserialize; |
| 726 | } | |
| 727 | ||
| 728 | 0 | *ip = instance; |
| 729 | ||
| 730 | 0 | goto exit; |
| 731 | ||
| 732 | fail_deserialize: | |
| 733 | 0 | wsp_PolicyAssertions_group_choice_destroy_contents( |
| 734 | &instance->choice_value); | |
| 735 | ||
| 736 | choice_value_destroy: | |
| 737 | ||
| 738 | exit: | |
| 739 | ||
| 740 | 0 | GlobusSoapMessageDebugExit(); |
| 741 | 0 | return result; |
| 742 | } | |
| 743 | ||
| 744 | ||
| 745 | globus_result_t | |
| 746 | wsp_PolicyAssertions_group_array_init_contents( | |
| 747 | wsp_PolicyAssertions_group_array * array) | |
| 748 | 0 | { |
| 749 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_array_init_contents); |
| 750 | 0 | GlobusSoapMessageDebugEnter(); |
| 751 | ||
| 752 | 0 | memset(array, 0, sizeof(wsp_PolicyAssertions_group_array)); |
| 753 | ||
| 754 | 0 | GlobusSoapMessageDebugExit(); |
| 755 | 0 | return GLOBUS_SUCCESS; |
| 756 | } | |
| 757 | ||
| 758 | globus_result_t | |
| 759 | wsp_PolicyAssertions_group_array_init( | |
| 760 | wsp_PolicyAssertions_group_array ** arr) | |
| 761 | 0 | { |
| 762 | 0 | wsp_PolicyAssertions_group_array * array; |
| 763 | 0 | globus_result_t result; |
| 764 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_array_init); |
| 765 | 0 | GlobusSoapMessageDebugEnter(); |
| 766 | ||
| 767 | 0 | array = (wsp_PolicyAssertions_group_array *) |
| 768 | globus_malloc(sizeof(wsp_PolicyAssertions_group_array)); | |
| 769 | 0 | if(!array) |
| 770 | { | |
| 771 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 772 | 0 | goto exit; |
| 773 | } | |
| 774 | ||
| 775 | 0 | result = wsp_PolicyAssertions_group_array_init_contents(array); |
| 776 | 0 | if(result != GLOBUS_SUCCESS) |
| 777 | { | |
| 778 | 0 | globus_free(array); |
| 779 | 0 | array = NULL; |
| 780 | ||
| 781 | } | |
| 782 | ||
| 783 | 0 | *arr = array; |
| 784 | ||
| 785 | exit: | |
| 786 | 0 | GlobusSoapMessageDebugExit(); |
| 787 | 0 | return result; |
| 788 | } | |
| 789 | ||
| 790 | void | |
| 791 | wsp_PolicyAssertions_group_array_destroy_contents( | |
| 792 | wsp_PolicyAssertions_group_array * array) | |
| 793 | 0 | { |
| 794 | 0 | int i = 0; |
| 795 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_array_destroy_contents); |
| 796 | 0 | GlobusSoapMessageDebugEnter(); |
| 797 | ||
| 798 | 0 | for(; i < array->length; ++i) |
| 799 | { | |
| 800 | 0 | wsp_PolicyAssertions_group_destroy_contents(&array->elements[i]); |
| 801 | } | |
| 802 | ||
| 803 | 0 | if(array->elements) |
| 804 | { | |
| 805 | 0 | globus_free(array->elements); |
| 806 | 0 | array->elements = NULL; |
| 807 | } | |
| 808 | 0 | array->length = 0; |
| 809 | ||
| 810 | 0 | GlobusSoapMessageDebugExit(); |
| 811 | } | |
| 812 | ||
| 813 | void | |
| 814 | wsp_PolicyAssertions_group_array_destroy( | |
| 815 | wsp_PolicyAssertions_group_array * array) | |
| 816 | 0 | { |
| 817 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_array_destroy); |
| 818 | 0 | GlobusSoapMessageDebugEnter(); |
| 819 | ||
| 820 | 0 | wsp_PolicyAssertions_group_array_destroy_contents(array); |
| 821 | 0 | globus_free(array); |
| 822 | ||
| 823 | 0 | GlobusSoapMessageDebugExit(); |
| 824 | } | |
| 825 | ||
| 826 | globus_result_t | |
| 827 | wsp_PolicyAssertions_group_array_copy( | |
| 828 | wsp_PolicyAssertions_group_array ** dest_arr, | |
| 829 | const wsp_PolicyAssertions_group_array * src_arr) | |
| 830 | 0 | { |
| 831 | 0 | wsp_PolicyAssertions_group_array * array; |
| 832 | 0 | globus_result_t result; |
| 833 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_array_copy); |
| 834 | 0 | GlobusSoapMessageDebugEnter(); |
| 835 | ||
| 836 | 0 | array = (wsp_PolicyAssertions_group_array *) globus_malloc( |
| 837 | sizeof(wsp_PolicyAssertions_group_array)); | |
| 838 | 0 | if(!array) |
| 839 | { | |
| 840 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 841 | 0 | GlobusSoapMessageDebugExit(); |
| 842 | 0 | return result; |
| 843 | } | |
| 844 | ||
| 845 | 0 | result = wsp_PolicyAssertions_group_array_copy_contents(array, src_arr); |
| 846 | 0 | if(result != GLOBUS_SUCCESS) |
| 847 | { | |
| 848 | 0 | globus_free(array); |
| 849 | 0 | GlobusSoapMessageDebugExit(); |
| 850 | 0 | return result; |
| 851 | } | |
| 852 | ||
| 853 | 0 | *dest_arr = array; |
| 854 | ||
| 855 | 0 | GlobusSoapMessageDebugExit(); |
| 856 | 0 | return GLOBUS_SUCCESS; |
| 857 | } | |
| 858 | ||
| 859 | globus_result_t | |
| 860 | wsp_PolicyAssertions_group_array_copy_contents( | |
| 861 | wsp_PolicyAssertions_group_array * dest_arr, | |
| 862 | const wsp_PolicyAssertions_group_array * src_arr) | |
| 863 | 0 | { |
| 864 | 0 | int i; |
| 865 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 866 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_array_copy_contents); |
| 867 | 0 | GlobusSoapMessageDebugEnter(); |
| 868 | ||
| 869 | 0 | dest_arr->length = src_arr->length; |
| 870 | 0 | if(dest_arr->length > 0) |
| 871 | { | |
| 872 | 0 | dest_arr->elements = (wsp_PolicyAssertions_group *) malloc( |
| 873 | sizeof(wsp_PolicyAssertions_group) * dest_arr->length); | |
| 874 | 0 | if(!dest_arr->elements) |
| 875 | { | |
| 876 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 877 | 0 | GlobusSoapMessageDebugExit(); |
| 878 | 0 | return result; |
| 879 | } | |
| 880 | } | |
| 881 | else | |
| 882 | { | |
| 883 | 0 | dest_arr->elements = NULL; |
| 884 | } | |
| 885 | ||
| 886 | 0 | for(i = 0; i < dest_arr->length; i++) |
| 887 | { | |
| 888 | 0 | result = wsp_PolicyAssertions_group_copy_contents( |
| 889 | &dest_arr->elements[i], &src_arr->elements[i]); | |
| 890 | 0 | if(result != GLOBUS_SUCCESS) |
| 891 | { | |
| 892 | 0 | while(i--) |
| 893 | { | |
| 894 | 0 | wsp_PolicyAssertions_group_destroy_contents(&dest_arr->elements[i]); |
| 895 | } | |
| 896 | ||
| 897 | 0 | globus_free(dest_arr->elements); |
| 898 | 0 | dest_arr->elements = NULL; |
| 899 | 0 | dest_arr->length = 0; |
| 900 | 0 | break; |
| 901 | } | |
| 902 | } | |
| 903 | ||
| 904 | 0 | GlobusSoapMessageDebugExit(); |
| 905 | 0 | return result; |
| 906 | } | |
| 907 | ||
| 908 | wsp_PolicyAssertions_group * | |
| 909 | wsp_PolicyAssertions_group_array_push( | |
| 910 | wsp_PolicyAssertions_group_array * array) | |
| 911 | 0 | { |
| 912 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_array_push); |
| 913 | 0 | GlobusSoapMessageDebugEnter(); |
| 914 | ||
| 915 | 0 | array->elements = realloc(array->elements, |
| 916 | sizeof(wsp_PolicyAssertions_group) * | |
| 917 | (array->length + 1)); | |
| 918 | 0 | memset(&array->elements[array->length], 0, sizeof(wsp_PolicyAssertions_group)); |
| 919 | 0 | array->length++; |
| 920 | ||
| 921 | 0 | GlobusSoapMessageDebugExit(); |
| 922 | 0 | return (&array->elements[array->length - 1]); |
| 923 | } | |
| 924 | ||
| 925 | void * | |
| 926 | wsp_PolicyAssertions_group_array_push_wrapper( | |
| 927 | void * array) | |
| 928 | 0 | { |
| 929 | 0 | return (void *) wsp_PolicyAssertions_group_array_push((wsp_PolicyAssertions_group_array *) array); |
| 930 | } | |
| 931 | ||
| 932 | globus_result_t | |
| 933 | wsp_PolicyAssertions_group_array_serialize( | |
| 934 | xsd_QName * element_qname, | |
| 935 | wsp_PolicyAssertions_group_array * array, | |
| 936 | globus_soap_message_handle_t message, | |
| 937 | globus_xsd_element_options_t options) | |
| 938 | 0 | { |
| 939 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 940 | 0 | int i = 0; |
| 941 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_array_serialize); |
| 942 | 0 | GlobusSoapMessageDebugEnter(); |
| 943 | ||
| 944 | 0 | for(; i < array->length; ++i) |
| 945 | { | |
| 946 | 0 | result = wsp_PolicyAssertions_group_serialize( |
| 947 | element_qname, | |
| 948 | &array->elements[i], | |
| 949 | message, | |
| 950 | options); | |
| 951 | 0 | if(result != GLOBUS_SUCCESS) |
| 952 | { | |
| 953 | 0 | goto exit; |
| 954 | } | |
| 955 | } | |
| 956 | ||
| 957 | exit: | |
| 958 | ||
| 959 | 0 | GlobusSoapMessageDebugExit(); |
| 960 | 0 | return result; |
| 961 | } | |
| 962 | ||
| 963 | globus_result_t | |
| 964 | wsp_PolicyAssertions_group_array_deserialize( | |
| 965 | xsd_QName * element_qname, | |
| 966 | wsp_PolicyAssertions_group_array * array, | |
| 967 | globus_soap_message_handle_t message, | |
| 968 | globus_xsd_element_options_t options) | |
| 969 | 0 | { |
| 970 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 971 | 0 | int i = 0; |
| 972 | 0 | int pre_length; |
| 973 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_array_deserialize); |
| 974 | 0 | GlobusSoapMessageDebugEnter(); |
| 975 | ||
| 976 | 0 | pre_length = array->length; |
| 977 | ||
| 978 | 0 | for(i = 0; i < pre_length; ++i) |
| 979 | { | |
| 980 | 0 | result = wsp_PolicyAssertions_group_deserialize( |
| 981 | element_qname, | |
| 982 | &array->elements[i], | |
| 983 | message, | |
| 984 | options); | |
| 985 | 0 | if(result != GLOBUS_SUCCESS) |
| 986 | { | |
| 987 | 0 | if(GlobusSoapMessageStatusFailedElementCheck(result) || |
| 988 | GlobusSoapMessageStatusElementNotFoundCheck(result) || | |
| 989 | GlobusSoapMessageStatusFailedWithTextCheck(result)) | |
| 990 | { | |
| 991 | 0 | result = GLOBUS_SUCCESS; |
| 992 | 0 | break; |
| 993 | } | |
| 994 | ||
| 995 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 996 | result, element_qname); | |
| 997 | 0 | goto exit; |
| 998 | } | |
| 999 | } | |
| 1000 | ||
| 1001 | 0 | while(result == GLOBUS_SUCCESS) |
| 1002 | { | |
| 1003 | 0 | wsp_PolicyAssertions_group next; |
| 1004 | 0 | memset(&next, 0, sizeof(wsp_PolicyAssertions_group)); |
| 1005 | ||
| 1006 | 0 | result = wsp_PolicyAssertions_group_deserialize( |
| 1007 | element_qname, | |
| 1008 | &next, | |
| 1009 | message, | |
| 1010 | options); | |
| 1011 | 0 | if(result != GLOBUS_SUCCESS) |
| 1012 | { | |
| 1013 | 0 | if(GlobusSoapMessageStatusFailedElementCheck(result) || |
| 1014 | GlobusSoapMessageStatusElementNotFoundCheck(result) || | |
| 1015 | GlobusSoapMessageStatusFailedWithTextCheck(result)) | |
| 1016 | { | |
| 1017 | 0 | result = GLOBUS_SUCCESS; |
| 1018 | 0 | break; |
| 1019 | } | |
| 1020 | ||
| 1021 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1022 | result, element_qname); | |
| 1023 | 0 | goto exit; |
| 1024 | } | |
| 1025 | ||
| 1026 | 0 | array->elements = realloc( |
| 1027 | array->elements, | |
| 1028 | (array->length + 1) * sizeof(wsp_PolicyAssertions_group)); | |
| 1029 | 0 | if(!array->elements) |
| 1030 | { | |
| 1031 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 1032 | 0 | goto exit; |
| 1033 | } | |
| 1034 | 0 | array->elements[array->length] = next; |
| 1035 | 0 | array->length++; |
| 1036 | 0 | ++i; |
| 1037 | } | |
| 1038 | ||
| 1039 | exit: | |
| 1040 | ||
| 1041 | 0 | if(result != GLOBUS_SUCCESS) |
| 1042 | { | |
| 1043 | 0 | int di = 0; |
| 1044 | 0 | for(; di < i; ++di) |
| 1045 | { | |
| 1046 | 0 | wsp_PolicyAssertions_group_destroy_contents( |
| 1047 | &array->elements[di]); | |
| 1048 | 0 | memset(&array->elements[di], 0, sizeof(wsp_PolicyAssertions_group)); |
| 1049 | } | |
| 1050 | } | |
| 1051 | ||
| 1052 | 0 | GlobusSoapMessageDebugExit(); |
| 1053 | 0 | return result; |