| 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 | xsd_QName wsp_PolicyAssertions_group_choice_qname = | |
| 23 | { | |
| 24 | "http://schemas.xmlsoap.org/ws/2002/12/policy", | |
| 25 | "PolicyAssertions_group_choice" | |
| 26 | }; | |
| 27 | ||
| 28 | globus_result_t | |
| 29 | wsp_PolicyAssertions_group_choice_serialize_wrapper( | |
| 30 | xsd_QName * element_qname, | |
| 31 | void * instance, | |
| 32 | globus_soap_message_handle_t message_handle, | |
| 33 | globus_xsd_element_options_t options) | |
| 34 | 0 | { |
| 35 | 0 | return wsp_PolicyAssertions_group_choice_serialize( |
| 36 | element_qname, | |
| 37 | (wsp_PolicyAssertions_group_choice *) instance, | |
| 38 | message_handle, options); | |
| 39 | } | |
| 40 | ||
| 41 | globus_result_t | |
| 42 | wsp_PolicyAssertions_group_choice_deserialize_pointer_wrapper( | |
| 43 | xsd_QName * element_qname, | |
| 44 | void ** ip, | |
| 45 | globus_soap_message_handle_t message_handle, | |
| 46 | globus_xsd_element_options_t options) | |
| 47 | 0 | { |
| 48 | 0 | return wsp_PolicyAssertions_group_choice_deserialize_pointer( |
| 49 | element_qname, | |
| 50 | (wsp_PolicyAssertions_group_choice **) ip, | |
| 51 | message_handle, options); | |
| 52 | } | |
| 53 | ||
| 54 | globus_result_t | |
| 55 | wsp_PolicyAssertions_group_choice_init_wrapper(void **object) | |
| 56 | 0 | { |
| 57 | 0 | return wsp_PolicyAssertions_group_choice_init( |
| 58 | (wsp_PolicyAssertions_group_choice **) object); | |
| 59 | } | |
| 60 | ||
| 61 | void | |
| 62 | wsp_PolicyAssertions_group_choice_destroy_wrapper( | |
| 63 | void * object) | |
| 64 | 0 | { |
| 65 | 0 | wsp_PolicyAssertions_group_choice_destroy( |
| 66 | (wsp_PolicyAssertions_group_choice *) object); | |
| 67 | } | |
| 68 | ||
| 69 | globus_result_t | |
| 70 | wsp_PolicyAssertions_group_choice_copy_wrapper( | |
| 71 | void ** dest_obj, | |
| 72 | void * src_obj) | |
| 73 | 0 | { |
| 74 | 0 | return wsp_PolicyAssertions_group_choice_copy( |
| 75 | (wsp_PolicyAssertions_group_choice **) dest_obj, | |
| 76 | (wsp_PolicyAssertions_group_choice *) src_obj); | |
| 77 | } | |
| 78 | ||
| 79 | globus_result_t | |
| 80 | wsp_PolicyAssertions_group_choice_init_contents_wrapper(void *object) | |
| 81 | 0 | { |
| 82 | 0 | return wsp_PolicyAssertions_group_choice_init_contents( |
| 83 | (wsp_PolicyAssertions_group_choice *) object); | |
| 84 | } | |
| 85 | ||
| 86 | void | |
| 87 | wsp_PolicyAssertions_group_choice_destroy_contents_wrapper( | |
| 88 | void * object) | |
| 89 | 0 | { |
| 90 | 0 | wsp_PolicyAssertions_group_choice_destroy_contents( |
| 91 | (wsp_PolicyAssertions_group_choice *) object); | |
| 92 | } | |
| 93 | ||
| 94 | globus_result_t | |
| 95 | wsp_PolicyAssertions_group_choice_copy_contents_wrapper( | |
| 96 | void * dest_obj, | |
| 97 | void * src_obj) | |
| 98 | 0 | { |
| 99 | 0 | return wsp_PolicyAssertions_group_choice_copy_contents( |
| 100 | (wsp_PolicyAssertions_group_choice *) dest_obj, | |
| 101 | (wsp_PolicyAssertions_group_choice *) src_obj); | |
| 102 | } | |
| 103 | ||
| 104 | globus_result_t | |
| 105 | wsp_PolicyAssertions_group_choice_serialize_contents_wrapper( | |
| 106 | xsd_QName * element_qname, | |
| 107 | void * instance, | |
| 108 | globus_soap_message_handle_t message_handle, | |
| 109 | globus_xsd_element_options_t options) | |
| 110 | 0 | { |
| 111 | 0 | return wsp_PolicyAssertions_group_choice_serialize_contents( |
| 112 | element_qname, | |
| 113 | (wsp_PolicyAssertions_group_choice *) instance, | |
| 114 | message_handle, options); | |
| 115 | } | |
| 116 | ||
| 117 | globus_result_t | |
| 118 | wsp_PolicyAssertions_group_choice_deserialize_contents_wrapper( | |
| 119 | xsd_QName * element_qname, | |
| 120 | void ** instance, | |
| 121 | globus_soap_message_handle_t message_handle, | |
| 122 | globus_xsd_element_options_t options) | |
| 123 | 0 | { |
| 124 | 0 | globus_result_t result; |
| 125 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_deserialize_contents_wrapper); |
| 126 | 0 | GlobusSoapMessageDebugEnter(); |
| 127 | ||
| 128 | 0 | if(!*instance) |
| 129 | { | |
| 130 | 0 | result = wsp_PolicyAssertions_group_choice_init( |
| 131 | (wsp_PolicyAssertions_group_choice **)instance); | |
| 132 | 0 | if(result != GLOBUS_SUCCESS) |
| 133 | { | |
| 134 | 0 | goto error; |
| 135 | } | |
| 136 | } | |
| 137 | ||
| 138 | 0 | result = wsp_PolicyAssertions_group_choice_deserialize_contents( |
| 139 | element_qname, | |
| 140 | *(wsp_PolicyAssertions_group_choice **)instance, | |
| 141 | message_handle, options); | |
| 142 | error: | |
| 143 | 0 | GlobusSoapMessageDebugExit(); |
| 144 | 0 | return result; |
| 145 | } | |
| 146 | ||
| 147 | globus_result_t | |
| 148 | wsp_PolicyAssertions_group_choice_array_serialize_wrapper( | |
| 149 | xsd_QName * element, | |
| 150 | void * instance, | |
| 151 | globus_soap_message_handle_t message, | |
| 152 | globus_xsd_element_options_t options) | |
| 153 | 0 | { |
| 154 | 0 | return wsp_PolicyAssertions_group_choice_array_serialize( |
| 155 | element, | |
| 156 | (wsp_PolicyAssertions_group_choice_array *) instance, | |
| 157 | message, options); | |
| 158 | } | |
| 159 | ||
| 160 | globus_result_t | |
| 161 | wsp_PolicyAssertions_group_choice_array_deserialize_wrapper( | |
| 162 | xsd_QName * element_qname, | |
| 163 | void ** inst, | |
| 164 | globus_soap_message_handle_t message, | |
| 165 | globus_xsd_element_options_t options) | |
| 166 | 0 | { |
| 167 | 0 | if(!*inst) |
| 168 | { | |
| 169 | 0 | globus_result_t result; |
| 170 | ||
| 171 | 0 | result = wsp_PolicyAssertions_group_choice_array_init( |
| 172 | (wsp_PolicyAssertions_group_choice_array **)inst); | |
| 173 | 0 | if(result != GLOBUS_SUCCESS) |
| 174 | { | |
| 175 | 0 | return result; |
| 176 | } | |
| 177 | } | |
| 178 | ||
| 179 | 0 | return wsp_PolicyAssertions_group_choice_array_deserialize( |
| 180 | element_qname, | |
| 181 | *(wsp_PolicyAssertions_group_choice_array **) inst, | |
| 182 | message, options); | |
| 183 | } | |
| 184 | ||
| 185 | globus_result_t | |
| 186 | wsp_PolicyAssertions_group_choice_array_init_wrapper( | |
| 187 | void ** arr) | |
| 188 | 0 | { |
| 189 | 0 | return wsp_PolicyAssertions_group_choice_array_init( |
| 190 | (wsp_PolicyAssertions_group_choice_array **) arr); | |
| 191 | } | |
| 192 | ||
| 193 | void | |
| 194 | wsp_PolicyAssertions_group_choice_array_destroy_wrapper( | |
| 195 | void * arr) | |
| 196 | 0 | { |
| 197 | 0 | wsp_PolicyAssertions_group_choice_array_destroy( |
| 198 | (wsp_PolicyAssertions_group_choice_array *) arr); | |
| 199 | } | |
| 200 | ||
| 201 | globus_result_t | |
| 202 | wsp_PolicyAssertions_group_choice_array_copy_wrapper( | |
| 203 | void ** dest_arr, | |
| 204 | void * src_arr) | |
| 205 | 0 | { |
| 206 | 0 | return wsp_PolicyAssertions_group_choice_array_copy( |
| 207 | (wsp_PolicyAssertions_group_choice_array **) dest_arr, | |
| 208 | (wsp_PolicyAssertions_group_choice_array *) src_arr); | |
| 209 | } | |
| 210 | ||
| 211 | globus_result_t | |
| 212 | wsp_PolicyAssertions_group_choice_array_init_contents_wrapper( | |
| 213 | void * arr) | |
| 214 | 0 | { |
| 215 | 0 | return wsp_PolicyAssertions_group_choice_array_init_contents( |
| 216 | (wsp_PolicyAssertions_group_choice_array *) arr); | |
| 217 | } | |
| 218 | ||
| 219 | void | |
| 220 | wsp_PolicyAssertions_group_choice_array_destroy_contents_wrapper( | |
| 221 | void * arr) | |
| 222 | 0 | { |
| 223 | 0 | wsp_PolicyAssertions_group_choice_array_destroy_contents( |
| 224 | (wsp_PolicyAssertions_group_choice_array *) arr); | |
| 225 | } | |
| 226 | ||
| 227 | globus_result_t | |
| 228 | wsp_PolicyAssertions_group_choice_array_copy_contents_wrapper( | |
| 229 | void * dest_arr, | |
| 230 | void * src_arr) | |
| 231 | 0 | { |
| 232 | 0 | return wsp_PolicyAssertions_group_choice_array_copy_contents( |
| 233 | (wsp_PolicyAssertions_group_choice_array *) dest_arr, | |
| 234 | (wsp_PolicyAssertions_group_choice_array *) src_arr); | |
| 235 | } | |
| 236 | ||
| 237 | struct globus_xsd_type_info_s wsp_PolicyAssertions_group_choice_array_info = | |
| 238 | { | |
| 239 | &wsp_PolicyAssertions_group_choice_qname, | |
| 240 | wsp_PolicyAssertions_group_choice_array_serialize_wrapper, | |
| 241 | wsp_PolicyAssertions_group_choice_array_deserialize_wrapper, | |
| 242 | wsp_PolicyAssertions_group_choice_array_init_wrapper, | |
| 243 | wsp_PolicyAssertions_group_choice_array_destroy_wrapper, | |
| 244 | wsp_PolicyAssertions_group_choice_array_copy_wrapper, | |
| 245 | wsp_PolicyAssertions_group_choice_array_init_contents_wrapper, | |
| 246 | wsp_PolicyAssertions_group_choice_array_destroy_contents_wrapper, | |
| 247 | wsp_PolicyAssertions_group_choice_array_copy_contents_wrapper, | |
| 248 | sizeof(wsp_PolicyAssertions_group_choice), | |
| 249 | wsp_PolicyAssertions_group_choice_array_push_wrapper, | |
| 250 | NULL, | |
| 251 | NULL | |
| 252 | }; | |
| 253 | ||
| 254 | struct globus_xsd_type_info_s wsp_PolicyAssertions_group_choice_contents_info = | |
| 255 | { | |
| 256 | &wsp_PolicyAssertions_group_choice_qname, | |
| 257 | wsp_PolicyAssertions_group_choice_serialize_contents_wrapper, | |
| 258 | wsp_PolicyAssertions_group_choice_deserialize_contents_wrapper, | |
| 259 | wsp_PolicyAssertions_group_choice_init_wrapper, | |
| 260 | wsp_PolicyAssertions_group_choice_destroy_wrapper, | |
| 261 | wsp_PolicyAssertions_group_choice_copy_wrapper, | |
| 262 | wsp_PolicyAssertions_group_choice_init_contents_wrapper, | |
| 263 | wsp_PolicyAssertions_group_choice_destroy_contents_wrapper, | |
| 264 | wsp_PolicyAssertions_group_choice_copy_contents_wrapper, | |
| 265 | sizeof(wsp_PolicyAssertions_group_choice), | |
| 266 | NULL, | |
| 267 | NULL, | |
| 268 | NULL | |
| 269 | }; | |
| 270 | ||
| 271 | struct globus_xsd_type_info_s wsp_PolicyAssertions_group_choice_info = | |
| 272 | { | |
| 273 | &wsp_PolicyAssertions_group_choice_qname, | |
| 274 | wsp_PolicyAssertions_group_choice_serialize_wrapper, | |
| 275 | wsp_PolicyAssertions_group_choice_deserialize_pointer_wrapper, | |
| 276 | wsp_PolicyAssertions_group_choice_init_wrapper, | |
| 277 | wsp_PolicyAssertions_group_choice_destroy_wrapper, | |
| 278 | wsp_PolicyAssertions_group_choice_copy_wrapper, | |
| 279 | wsp_PolicyAssertions_group_choice_init_contents_wrapper, | |
| 280 | wsp_PolicyAssertions_group_choice_destroy_contents_wrapper, | |
| 281 | wsp_PolicyAssertions_group_choice_copy_contents_wrapper, | |
| 282 | sizeof(wsp_PolicyAssertions_group), | |
| 283 | NULL, | |
| 284 | &wsp_PolicyAssertions_group_choice_contents_info, | |
| 285 | &wsp_PolicyAssertions_group_choice_array_info | |
| 286 | }; | |
| 287 | ||
| 288 | globus_result_t | |
| 289 | wsp_PolicyAssertions_group_choice_init_contents( | |
| 290 | wsp_PolicyAssertions_group_choice * instance) | |
| 291 | 0 | { |
| 292 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 293 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_init_contents); |
| 294 | 0 | GlobusSoapMessageDebugEnter(); |
| 295 | ||
| 296 | 0 | memset(instance, 0, sizeof(wsp_PolicyAssertions_group)); |
| 297 | ||
| 298 | 0 | GlobusSoapMessageDebugExit(); |
| 299 | 0 | return result; |
| 300 | } | |
| 301 | ||
| 302 | globus_result_t | |
| 303 | wsp_PolicyAssertions_group_choice_init( | |
| 304 | wsp_PolicyAssertions_group_choice ** object) | |
| 305 | 0 | { |
| 306 | 0 | wsp_PolicyAssertions_group_choice * instance; |
| 307 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 308 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_init); |
| 309 | 0 | GlobusSoapMessageDebugEnter(); |
| 310 | ||
| 311 | 0 | instance = globus_malloc(sizeof(wsp_PolicyAssertions_group_choice)); |
| 312 | 0 | if(!instance) |
| 313 | { | |
| 314 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 315 | 0 | goto exit; |
| 316 | } | |
| 317 | ||
| 318 | 0 | memset(instance, 0, sizeof(wsp_PolicyAssertions_group_choice)); |
| 319 | ||
| 320 | 0 | *object = instance; |
| 321 | ||
| 322 | exit: | |
| 323 | 0 | GlobusSoapMessageDebugExit(); |
| 324 | 0 | return result; |
| 325 | } | |
| 326 | ||
| 327 | void | |
| 328 | wsp_PolicyAssertions_group_choice_destroy( | |
| 329 | wsp_PolicyAssertions_group_choice * instance) | |
| 330 | 0 | { |
| 331 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_destroy); |
| 332 | 0 | GlobusSoapMessageDebugEnter(); |
| 333 | ||
| 334 | 0 | if(!instance) |
| 335 | { | |
| 336 | 0 | goto exit; |
| 337 | } | |
| 338 | ||
| 339 | 0 | wsp_PolicyAssertions_group_choice_destroy_contents(instance); |
| 340 | 0 | free(instance); |
| 341 | ||
| 342 | exit: | |
| 343 | ||
| 344 | 0 | GlobusSoapMessageDebugExit(); |
| 345 | } | |
| 346 | ||
| 347 | ||
| 348 | ||
| 349 | void | |
| 350 | wsp_PolicyAssertions_group_choice_destroy_contents( | |
| 351 | wsp_PolicyAssertions_group_choice * instance) | |
| 352 | 0 | { |
| 353 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_destroy_contents); |
| 354 | 0 | GlobusSoapMessageDebugEnter(); |
| 355 | ||
| 356 | 0 | switch(instance->type) |
| 357 | { | |
| 358 | ||
| 359 | case wsp_PolicyAssertions_group_TextEncoding: | |
| 360 | ||
| 361 | 0 | wsp_TextEncodingAssertion_destroy_contents( |
| 362 | &instance->value.TextEncoding); | |
| 363 | 0 | break; |
| 364 | ||
| 365 | case wsp_PolicyAssertions_group_Language: | |
| 366 | ||
| 367 | 0 | wsp_LanguageAssertion_destroy_contents( |
| 368 | &instance->value.Language); | |
| 369 | 0 | break; |
| 370 | ||
| 371 | case wsp_PolicyAssertions_group_SpecVersion: | |
| 372 | ||
| 373 | 0 | wsp_SpecVersionAssertion_destroy_contents( |
| 374 | &instance->value.SpecVersion); | |
| 375 | 0 | break; |
| 376 | ||
| 377 | case wsp_PolicyAssertions_group_MessagePredicate: | |
| 378 | ||
| 379 | 0 | wsp_MessagePredicateAssertion_destroy_contents( |
| 380 | &instance->value.MessagePredicate); | |
| 381 | break; | |
| 382 | ||
| 383 | default: | |
| 384 | 0 | break; |
| 385 | } | |
| 386 | ||
| 387 | 0 | instance->type = wsp_PolicyAssertions_group_undefined; |
| 388 | ||
| 389 | 0 | GlobusSoapMessageDebugExit(); |
| 390 | } | |
| 391 | ||
| 392 | globus_result_t | |
| 393 | wsp_PolicyAssertions_group_choice_copy( | |
| 394 | wsp_PolicyAssertions_group_choice ** dest_obj, | |
| 395 | const wsp_PolicyAssertions_group_choice * src_obj) | |
| 396 | 0 | { |
| 397 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 398 | 0 | wsp_PolicyAssertions_group_choice * instance; |
| 399 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_copy); |
| 400 | ||
| 401 | 0 | GlobusSoapMessageDebugEnter(); |
| 402 | ||
| 403 | 0 | instance = malloc(sizeof(wsp_PolicyAssertions_group_choice)); |
| 404 | 0 | if (instance == NULL) |
| 405 | { | |
| 406 | 0 | GlobusSoapMessageDebugExit(); |
| 407 | 0 | return GlobusSoapMessageErrorOutOfMemory; |
| 408 | } | |
| 409 | ||
| 410 | 0 | result = wsp_PolicyAssertions_group_choice_copy_contents(instance, src_obj); |
| 411 | 0 | if(result != GLOBUS_SUCCESS) |
| 412 | { | |
| 413 | 0 | globus_free(instance); |
| 414 | 0 | GlobusSoapMessageDebugExit(); |
| 415 | 0 | return GlobusSoapMessageErrorOutOfMemory; |
| 416 | } | |
| 417 | ||
| 418 | 0 | *dest_obj = instance; |
| 419 | 0 | GlobusSoapMessageDebugExit(); |
| 420 | 0 | return result; |
| 421 | } | |
| 422 | ||
| 423 | ||
| 424 | ||
| 425 | globus_result_t | |
| 426 | wsp_PolicyAssertions_group_choice_copy_contents( | |
| 427 | wsp_PolicyAssertions_group_choice * instance, | |
| 428 | const wsp_PolicyAssertions_group_choice * src_obj) | |
| 429 | 0 | { |
| 430 | 0 | xsd_QName subelement; |
| 431 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 432 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_copy_contents); |
| 433 | ||
| 434 | 0 | GlobusSoapMessageDebugEnter(); |
| 435 | ||
| 436 | 0 | switch(src_obj->type) |
| 437 | { | |
| 438 | ||
| 439 | case wsp_PolicyAssertions_group_TextEncoding: | |
| 440 | 0 | instance->type = wsp_PolicyAssertions_group_TextEncoding; |
| 441 | 0 | result = wsp_TextEncodingAssertion_copy_contents( |
| 442 | &instance->value.TextEncoding, | |
| 443 | &src_obj->value.TextEncoding); | |
| 444 | 0 | if(result != GLOBUS_SUCCESS) |
| 445 | { | |
| 446 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 447 | result, NULL, &wsp_PolicyAssertions_group_choice_qname); | |
| 448 | 0 | goto exit; |
| 449 | } | |
| 450 | ||
| 451 | 0 | break; |
| 452 | ||
| 453 | case wsp_PolicyAssertions_group_Language: | |
| 454 | 0 | instance->type = wsp_PolicyAssertions_group_Language; |
| 455 | 0 | result = wsp_LanguageAssertion_copy_contents( |
| 456 | &instance->value.Language, | |
| 457 | &src_obj->value.Language); | |
| 458 | 0 | if(result != GLOBUS_SUCCESS) |
| 459 | { | |
| 460 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 461 | result, NULL, &wsp_PolicyAssertions_group_choice_qname); | |
| 462 | 0 | goto exit; |
| 463 | } | |
| 464 | ||
| 465 | 0 | break; |
| 466 | ||
| 467 | case wsp_PolicyAssertions_group_SpecVersion: | |
| 468 | 0 | instance->type = wsp_PolicyAssertions_group_SpecVersion; |
| 469 | 0 | result = wsp_SpecVersionAssertion_copy_contents( |
| 470 | &instance->value.SpecVersion, | |
| 471 | &src_obj->value.SpecVersion); | |
| 472 | 0 | if(result != GLOBUS_SUCCESS) |
| 473 | { | |
| 474 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 475 | result, NULL, &wsp_PolicyAssertions_group_choice_qname); | |
| 476 | 0 | goto exit; |
| 477 | } | |
| 478 | ||
| 479 | 0 | break; |
| 480 | ||
| 481 | case wsp_PolicyAssertions_group_MessagePredicate: | |
| 482 | 0 | instance->type = wsp_PolicyAssertions_group_MessagePredicate; |
| 483 | 0 | result = wsp_MessagePredicateAssertion_copy_contents( |
| 484 | &instance->value.MessagePredicate, | |
| 485 | &src_obj->value.MessagePredicate); | |
| 486 | 0 | if(result != GLOBUS_SUCCESS) |
| 487 | { | |
| 488 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 489 | result, NULL, &wsp_PolicyAssertions_group_choice_qname); | |
| 490 | goto exit; | |
| 491 | } | |
| 492 | ||
| 493 | 0 | break; |
| 494 | ||
| 495 | default: | |
| 496 | 0 | break; |
| 497 | } | |
| 498 | ||
| 499 | exit: | |
| 500 | ||
| 501 | 0 | GlobusSoapMessageDebugExit(); |
| 502 | 0 | return result; |
| 503 | } | |
| 504 | ||
| 505 | ||
| 506 | ||
| 507 | ||
| 508 | ||
| 509 | globus_result_t | |
| 510 | wsp_PolicyAssertions_group_choice_serialize_contents( | |
| 511 | xsd_QName * element_qname, /* ignored */ | |
| 512 | wsp_PolicyAssertions_group_choice * instance, | |
| 513 | globus_soap_message_handle_t message_handle, | |
| 514 | globus_xsd_element_options_t options) | |
| 515 | 0 | { |
| 516 | 0 | xsd_QName subelement; |
| 517 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 518 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_serialize_contents); |
| 519 | 0 | GlobusSoapMessageDebugEnter(); |
| 520 | ||
| 521 | 0 | switch(instance->type) |
| 522 | { | |
| 523 | ||
| 524 | case wsp_PolicyAssertions_group_TextEncoding: | |
| 525 | ||
| 526 | 0 | subelement.local = "TextEncoding"; |
| 527 | 0 | subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/12/policy"; |
| 528 | 0 | result = wsp_TextEncodingAssertion_serialize( |
| 529 | &subelement, | |
| 530 | &instance->value.TextEncoding, | |
| 531 | message_handle, | |
| 532 | options); | |
| 533 | 0 | if(result != GLOBUS_SUCCESS) |
| 534 | { | |
| 535 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 536 | result, NULL, &wsp_PolicyAssertions_group_choice_qname); | |
| 537 | 0 | goto exit; |
| 538 | } | |
| 539 | ||
| 540 | 0 | break; |
| 541 | ||
| 542 | case wsp_PolicyAssertions_group_Language: | |
| 543 | ||
| 544 | 0 | subelement.local = "Language"; |
| 545 | 0 | subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/12/policy"; |
| 546 | 0 | result = wsp_LanguageAssertion_serialize( |
| 547 | &subelement, | |
| 548 | &instance->value.Language, | |
| 549 | message_handle, | |
| 550 | options); | |
| 551 | 0 | if(result != GLOBUS_SUCCESS) |
| 552 | { | |
| 553 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 554 | result, NULL, &wsp_PolicyAssertions_group_choice_qname); | |
| 555 | 0 | goto exit; |
| 556 | } | |
| 557 | ||
| 558 | 0 | break; |
| 559 | ||
| 560 | case wsp_PolicyAssertions_group_SpecVersion: | |
| 561 | ||
| 562 | 0 | subelement.local = "SpecVersion"; |
| 563 | 0 | subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/12/policy"; |
| 564 | 0 | result = wsp_SpecVersionAssertion_serialize( |
| 565 | &subelement, | |
| 566 | &instance->value.SpecVersion, | |
| 567 | message_handle, | |
| 568 | options); | |
| 569 | 0 | if(result != GLOBUS_SUCCESS) |
| 570 | { | |
| 571 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 572 | result, NULL, &wsp_PolicyAssertions_group_choice_qname); | |
| 573 | 0 | goto exit; |
| 574 | } | |
| 575 | ||
| 576 | 0 | break; |
| 577 | ||
| 578 | case wsp_PolicyAssertions_group_MessagePredicate: | |
| 579 | ||
| 580 | 0 | subelement.local = "MessagePredicate"; |
| 581 | 0 | subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/12/policy"; |
| 582 | 0 | result = wsp_MessagePredicateAssertion_serialize( |
| 583 | &subelement, | |
| 584 | &instance->value.MessagePredicate, | |
| 585 | message_handle, | |
| 586 | options); | |
| 587 | 0 | if(result != GLOBUS_SUCCESS) |
| 588 | { | |
| 589 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 590 | result, NULL, &wsp_PolicyAssertions_group_choice_qname); | |
| 591 | goto exit; | |
| 592 | } | |
| 593 | ||
| 594 | 0 | break; |
| 595 | ||
| 596 | default: | |
| 597 | 0 | break; |
| 598 | } | |
| 599 | ||
| 600 | exit: | |
| 601 | ||
| 602 | 0 | GlobusSoapMessageDebugExit(); |
| 603 | 0 | return result; |
| 604 | } | |
| 605 | ||
| 606 | ||
| 607 | ||
| 608 | globus_result_t | |
| 609 | wsp_PolicyAssertions_group_choice_serialize( | |
| 610 | xsd_QName * element_qname, | |
| 611 | wsp_PolicyAssertions_group_choice * instance, | |
| 612 | globus_soap_message_handle_t message_handle, | |
| 613 | globus_xsd_element_options_t options) | |
| 614 | 0 | { |
| 615 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 616 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_serialize); |
| 617 | 0 | GlobusSoapMessageDebugEnter(); |
| 618 | ||
| 619 | 0 | result = wsp_PolicyAssertions_group_choice_serialize_contents( |
| 620 | element_qname, | |
| 621 | instance, | |
| 622 | message_handle, | |
| 623 | options); | |
| 624 | 0 | if(result != GLOBUS_SUCCESS) |
| 625 | { | |
| 626 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 627 | result, NULL, &wsp_PolicyAssertions_group_choice_qname); | |
| 628 | goto exit; | |
| 629 | } | |
| 630 | ||
| 631 | exit: | |
| 632 | 0 | GlobusSoapMessageDebugExit(); |
| 633 | 0 | return result; |
| 634 | } | |
| 635 | ||
| 636 | ||
| 637 | ||
| 638 | ||
| 639 | ||
| 640 | globus_result_t | |
| 641 | wsp_PolicyAssertions_group_choice_deserialize_contents( | |
| 642 | xsd_QName * element_qname, /* ignored */ | |
| 643 | wsp_PolicyAssertions_group_choice * instance, | |
| 644 | globus_soap_message_handle_t message_handle, | |
| 645 | globus_xsd_element_options_t options) | |
| 646 | 0 | { |
| 647 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 648 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_deserialize_contents); |
| 649 | 0 | GlobusSoapMessageDebugEnter(); |
| 650 | ||
| 651 | 0 | result = wsp_PolicyAssertions_group_choice_deserialize( |
| 652 | NULL, | |
| 653 | instance, | |
| 654 | message_handle, | |
| 655 | options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY); | |
| 656 | 0 | if(result != GLOBUS_SUCCESS) |
| 657 | { | |
| 658 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 659 | result, element_qname); | |
| 660 | goto exit; | |
| 661 | } | |
| 662 | ||
| 663 | exit: | |
| 664 | ||
| 665 | 0 | GlobusSoapMessageDebugExit(); |
| 666 | 0 | return result; |
| 667 | } | |
| 668 | ||
| 669 | ||
| 670 | ||
| 671 | globus_result_t | |
| 672 | wsp_PolicyAssertions_group_choice_deserialize( | |
| 673 | xsd_QName * element_qname, | |
| 674 | wsp_PolicyAssertions_group_choice * instance, | |
| 675 | globus_soap_message_handle_t message_handle, | |
| 676 | globus_xsd_element_options_t options) | |
| 677 | 0 | { |
| 678 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 679 | 0 | xsd_QName subelement; |
| 680 | 0 | xsd_QName deselem_qname = { NULL, NULL } ; |
| 681 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_deserialize); |
| 682 | 0 | GlobusSoapMessageDebugEnter(); |
| 683 | ||
| 684 | 0 | xsd_QName_init_contents(&deselem_qname); |
| 685 | ||
| 686 | 0 | do |
| 687 | { | |
| 688 | 0 | result = globus_soap_message_deserialize_element_unknown( |
| 689 | message_handle, &deselem_qname); | |
| 690 | 0 | if(result != GLOBUS_SUCCESS) |
| 691 | { | |
| 692 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 693 | result, &wsp_PolicyAssertions_group_choice_qname); | |
| 694 | 0 | goto exit; |
| 695 | } | |
| 696 | ||
| 697 | 0 | if(globus_soap_message_deserialize_element_is_nil(message_handle)) |
| 698 | { | |
| 699 | 0 | xsd_QName_destroy_contents(&deselem_qname); |
| 700 | 0 | result = globus_soap_message_deserialize_element_end( |
| 701 | message_handle, | |
| 702 | element_qname); | |
| 703 | 0 | if(result != GLOBUS_SUCCESS) |
| 704 | { | |
| 705 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 706 | result, &wsp_PolicyAssertions_group_choice_qname); | |
| 707 | 0 | goto exit; |
| 708 | } | |
| 709 | } | |
| 710 | else | |
| 711 | { | |
| 712 | 0 | break; |
| 713 | } | |
| 714 | 0 | } while(1); |
| 715 | ||
| 716 | 0 | globus_soap_message_deserialize_push_element(message_handle); |
| 717 | ||
| 718 | 0 | subelement.local = "TextEncoding"; |
| 719 | 0 | subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/12/policy"; |
| 720 | 0 | if(xsd_QName_keyeq((void *)&subelement, (void *)&deselem_qname)) |
| 721 | { | |
| 722 | 0 | instance->type=wsp_PolicyAssertions_group_TextEncoding; |
| 723 | 0 | result = wsp_TextEncodingAssertion_deserialize( |
| 724 | &subelement, | |
| 725 | &instance->value.TextEncoding, | |
| 726 | message_handle, | |
| 727 | options); | |
| 728 | 0 | if(result != GLOBUS_SUCCESS) |
| 729 | { | |
| 730 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 731 | result, &wsp_PolicyAssertions_group_choice_qname); | |
| 732 | 0 | goto TextEncoding_destroy; |
| 733 | } | |
| 734 | ||
| 735 | 0 | goto exit; |
| 736 | } | |
| 737 | ||
| 738 | 0 | subelement.local = "Language"; |
| 739 | 0 | subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/12/policy"; |
| 740 | 0 | if(xsd_QName_keyeq((void *)&subelement, (void *)&deselem_qname)) |
| 741 | { | |
| 742 | 0 | instance->type=wsp_PolicyAssertions_group_Language; |
| 743 | 0 | result = wsp_LanguageAssertion_deserialize( |
| 744 | &subelement, | |
| 745 | &instance->value.Language, | |
| 746 | message_handle, | |
| 747 | options); | |
| 748 | 0 | if(result != GLOBUS_SUCCESS) |
| 749 | { | |
| 750 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 751 | result, &wsp_PolicyAssertions_group_choice_qname); | |
| 752 | 0 | goto Language_destroy; |
| 753 | } | |
| 754 | ||
| 755 | 0 | goto exit; |
| 756 | } | |
| 757 | ||
| 758 | 0 | subelement.local = "SpecVersion"; |
| 759 | 0 | subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/12/policy"; |
| 760 | 0 | if(xsd_QName_keyeq((void *)&subelement, (void *)&deselem_qname)) |
| 761 | { | |
| 762 | 0 | instance->type=wsp_PolicyAssertions_group_SpecVersion; |
| 763 | 0 | result = wsp_SpecVersionAssertion_deserialize( |
| 764 | &subelement, | |
| 765 | &instance->value.SpecVersion, | |
| 766 | message_handle, | |
| 767 | options); | |
| 768 | 0 | if(result != GLOBUS_SUCCESS) |
| 769 | { | |
| 770 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 771 | result, &wsp_PolicyAssertions_group_choice_qname); | |
| 772 | 0 | goto SpecVersion_destroy; |
| 773 | } | |
| 774 | ||
| 775 | 0 | goto exit; |
| 776 | } | |
| 777 | ||
| 778 | 0 | subelement.local = "MessagePredicate"; |
| 779 | 0 | subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/12/policy"; |
| 780 | 0 | if(xsd_QName_keyeq((void *)&subelement, (void *)&deselem_qname)) |
| 781 | { | |
| 782 | 0 | instance->type=wsp_PolicyAssertions_group_MessagePredicate; |
| 783 | 0 | result = wsp_MessagePredicateAssertion_deserialize( |
| 784 | &subelement, | |
| 785 | &instance->value.MessagePredicate, | |
| 786 | message_handle, | |
| 787 | options); | |
| 788 | 0 | if(result != GLOBUS_SUCCESS) |
| 789 | { | |
| 790 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 791 | result, &wsp_PolicyAssertions_group_choice_qname); | |
| 792 | 0 | goto MessagePredicate_destroy; |
| 793 | } | |
| 794 | ||
| 795 | 0 | goto exit; |
| 796 | } | |
| 797 | ||
| 798 | 0 | instance->type = wsp_PolicyAssertions_group_undefined; |
| 799 | ||
| 800 | goto exit; | |
| 801 | ||
| 802 | deserialize_failed: | |
| 803 | ||
| 804 | MessagePredicate_destroy: | |
| 805 | ||
| 806 | SpecVersion_destroy: | |
| 807 | ||
| 808 | Language_destroy: | |
| 809 | ||
| 810 | TextEncoding_destroy: | |
| 811 | ||
| 812 | exit: | |
| 813 | ||
| 814 | 0 | xsd_QName_destroy_contents(&deselem_qname); |
| 815 | ||
| 816 | 0 | if(result == GLOBUS_SUCCESS) |
| 817 | { | |
| 818 | 0 | do |
| 819 | { | |
| 820 | 0 | result = globus_soap_message_deserialize_element( |
| 821 | message_handle, NULL); | |
| 822 | 0 | if(result != GLOBUS_SUCCESS && |
| 823 | (GlobusSoapMessageStatusElementNotFoundCheck(result) || | |
| 824 | GlobusSoapMessageStatusFailedElementCheck(result) || | |
| 825 | GlobusSoapMessageStatusFailedWithTextCheck(result))) | |
| 826 | { | |
| 827 | 0 | result = GLOBUS_SUCCESS; |
| 828 | 0 | break; |
| 829 | } | |
| 830 | ||
| 831 | 0 | if(globus_soap_message_deserialize_element_is_nil( |
| 832 | message_handle)) | |
| 833 | { | |
| 834 | 0 | result = globus_soap_message_deserialize_element_end( |
| 835 | message_handle, | |
| 836 | element_qname); | |
| 837 | 0 | if(result != GLOBUS_SUCCESS) |
| 838 | { | |
| 839 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 840 | result, &wsp_PolicyAssertions_group_choice_qname); | |
| 841 | break; | |
| 842 | } | |
| 843 | } | |
| 844 | else | |
| 845 | { | |
| 846 | 0 | break; |
| 847 | } | |
| 848 | ||
| 849 | 0 | } while(1); |
| 850 | } | |
| 851 | ||
| 852 | 0 | xsd_QName_destroy_contents(&deselem_qname); |
| 853 | ||
| 854 | 0 | GlobusSoapMessageDebugExit(); |
| 855 | 0 | return result; |
| 856 | } | |
| 857 | ||
| 858 | ||
| 859 | ||
| 860 | globus_result_t | |
| 861 | wsp_PolicyAssertions_group_choice_deserialize_pointer( | |
| 862 | xsd_QName * element_qname, | |
| 863 | wsp_PolicyAssertions_group_choice ** ip, | |
| 864 | globus_soap_message_handle_t message_handle, | |
| 865 | globus_xsd_element_options_t options) | |
| 866 | 0 | { |
| 867 | 0 | wsp_PolicyAssertions_group_choice * instance = NULL; |
| 868 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 869 | 0 | xsd_QName subelement; |
| 870 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_deserialize_pointer); |
| 871 | 0 | GlobusSoapMessageDebugEnter(); |
| 872 | ||
| 873 | 0 | *ip = NULL; |
| 874 | ||
| 875 | 0 | result = wsp_PolicyAssertions_group_choice_init(&instance); |
| 876 | 0 | if(result != GLOBUS_SUCCESS) |
| 877 | { | |
| 878 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 879 | result, element_qname); | |
| 880 | 0 | goto exit; |
| 881 | } | |
| 882 | ||
| 883 | 0 | result = wsp_PolicyAssertions_group_choice_deserialize_contents( |
| 884 | element_qname, | |
| 885 | instance, | |
| 886 | message_handle, | |
| 887 | options); | |
| 888 | 0 | if(result != GLOBUS_SUCCESS) |
| 889 | { | |
| 890 | 0 | goto exit; |
| 891 | } | |
| 892 | ||
| 893 | 0 | *ip = instance; |
| 894 | ||
| 895 | exit: | |
| 896 | ||
| 897 | 0 | GlobusSoapMessageDebugExit(); |
| 898 | 0 | return result; |
| 899 | } | |
| 900 | ||
| 901 | ||
| 902 | ||
| 903 | globus_result_t | |
| 904 | wsp_PolicyAssertions_group_choice_array_init_contents( | |
| 905 | wsp_PolicyAssertions_group_choice_array * array) | |
| 906 | 0 | { |
| 907 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_array_init_contents); |
| 908 | 0 | GlobusSoapMessageDebugEnter(); |
| 909 | ||
| 910 | 0 | memset(array, 0, sizeof(wsp_PolicyAssertions_group_choice_array)); |
| 911 | ||
| 912 | 0 | GlobusSoapMessageDebugExit(); |
| 913 | 0 | return GLOBUS_SUCCESS; |
| 914 | } | |
| 915 | ||
| 916 | globus_result_t | |
| 917 | wsp_PolicyAssertions_group_choice_array_init( | |
| 918 | wsp_PolicyAssertions_group_choice_array ** arr) | |
| 919 | 0 | { |
| 920 | 0 | wsp_PolicyAssertions_group_choice_array * array; |
| 921 | 0 | globus_result_t result; |
| 922 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_array_init); |
| 923 | 0 | GlobusSoapMessageDebugEnter(); |
| 924 | ||
| 925 | 0 | array = (wsp_PolicyAssertions_group_choice_array *) |
| 926 | globus_malloc(sizeof(wsp_PolicyAssertions_group_choice_array)); | |
| 927 | 0 | if(!array) |
| 928 | { | |
| 929 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 930 | 0 | goto exit; |
| 931 | } | |
| 932 | ||
| 933 | 0 | result = wsp_PolicyAssertions_group_choice_array_init_contents(array); |
| 934 | 0 | if(result != GLOBUS_SUCCESS) |
| 935 | { | |
| 936 | 0 | globus_free(array); |
| 937 | 0 | array = NULL; |
| 938 | } | |
| 939 | ||
| 940 | 0 | *arr = array; |
| 941 | ||
| 942 | exit: | |
| 943 | 0 | GlobusSoapMessageDebugExit(); |
| 944 | 0 | return result; |
| 945 | } | |
| 946 | ||
| 947 | void | |
| 948 | wsp_PolicyAssertions_group_choice_array_destroy_contents( | |
| 949 | wsp_PolicyAssertions_group_choice_array * array) | |
| 950 | 0 | { |
| 951 | 0 | int i = 0; |
| 952 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_array_destroy_contents); |
| 953 | 0 | GlobusSoapMessageDebugEnter(); |
| 954 | ||
| 955 | 0 | for(; i < array->length; ++i) |
| 956 | { | |
| 957 | 0 | wsp_PolicyAssertions_group_choice_destroy_contents(&array->elements[i]); |
| 958 | } | |
| 959 | ||
| 960 | 0 | if(array->elements) |
| 961 | { | |
| 962 | 0 | globus_free(array->elements); |
| 963 | 0 | array->elements = NULL; |
| 964 | } | |
| 965 | 0 | array->length = 0; |
| 966 | ||
| 967 | 0 | GlobusSoapMessageDebugExit(); |
| 968 | } | |
| 969 | ||
| 970 | void | |
| 971 | wsp_PolicyAssertions_group_choice_array_destroy( | |
| 972 | wsp_PolicyAssertions_group_choice_array * array) | |
| 973 | 0 | { |
| 974 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_array_destroy); |
| 975 | 0 | GlobusSoapMessageDebugEnter(); |
| 976 | ||
| 977 | 0 | wsp_PolicyAssertions_group_choice_array_destroy_contents(array); |
| 978 | 0 | globus_free(array); |
| 979 | ||
| 980 | 0 | GlobusSoapMessageDebugExit(); |
| 981 | } | |
| 982 | ||
| 983 | globus_result_t | |
| 984 | wsp_PolicyAssertions_group_choice_array_copy( | |
| 985 | wsp_PolicyAssertions_group_choice_array ** dest_arr, | |
| 986 | const wsp_PolicyAssertions_group_choice_array * src_arr) | |
| 987 | 0 | { |
| 988 | 0 | wsp_PolicyAssertions_group_choice_array * array; |
| 989 | 0 | globus_result_t result; |
| 990 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_array_copy); |
| 991 | 0 | GlobusSoapMessageDebugEnter(); |
| 992 | ||
| 993 | 0 | array = (wsp_PolicyAssertions_group_choice_array *) malloc( |
| 994 | sizeof(wsp_PolicyAssertions_group_choice_array)); | |
| 995 | 0 | if(!array) |
| 996 | { | |
| 997 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 998 | 0 | GlobusSoapMessageDebugExit(); |
| 999 | 0 | return result; |
| 1000 | } | |
| 1001 | ||
| 1002 | 0 | result = wsp_PolicyAssertions_group_choice_array_copy_contents(array, src_arr); |
| 1003 | 0 | if(result != GLOBUS_SUCCESS) |
| 1004 | { | |
| 1005 | 0 | globus_free(array); |
| 1006 | 0 | GlobusSoapMessageDebugExit(); |
| 1007 | 0 | return result; |
| 1008 | } | |
| 1009 | ||
| 1010 | 0 | *dest_arr = array; |
| 1011 | ||
| 1012 | 0 | GlobusSoapMessageDebugExit(); |
| 1013 | 0 | return GLOBUS_SUCCESS; |
| 1014 | } | |
| 1015 | ||
| 1016 | globus_result_t | |
| 1017 | wsp_PolicyAssertions_group_choice_array_copy_contents( | |
| 1018 | wsp_PolicyAssertions_group_choice_array * dest_arr, | |
| 1019 | const wsp_PolicyAssertions_group_choice_array * src_arr) | |
| 1020 | 0 | { |
| 1021 | 0 | int i; |
| 1022 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 1023 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_array_copy_contents); |
| 1024 | 0 | GlobusSoapMessageDebugEnter(); |
| 1025 | ||
| 1026 | 0 | dest_arr->length = src_arr->length; |
| 1027 | 0 | if(dest_arr->length > 0) |
| 1028 | { | |
| 1029 | 0 | dest_arr->elements = (wsp_PolicyAssertions_group_choice *) malloc( |
| 1030 | sizeof(wsp_PolicyAssertions_group_choice) * dest_arr->length); | |
| 1031 | 0 | if(!dest_arr->elements) |
| 1032 | { | |
| 1033 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 1034 | 0 | goto exit; |
| 1035 | } | |
| 1036 | } | |
| 1037 | else | |
| 1038 | { | |
| 1039 | 0 | dest_arr->elements = NULL; |
| 1040 | } | |
| 1041 | ||
| 1042 | 0 | for(i = 0; i < dest_arr->length; i++) |
| 1043 | { | |
| 1044 | 0 | result = wsp_PolicyAssertions_group_choice_copy_contents( |
| 1045 | &dest_arr->elements[i], &src_arr->elements[i]); | |
| 1046 | 0 | if(result != GLOBUS_SUCCESS) |
| 1047 | { | |
| 1048 | 0 | while(i--) |
| 1049 | { | |
| 1050 | 0 | wsp_PolicyAssertions_group_choice_destroy_contents(&dest_arr->elements[i]); |
| 1051 | } | |
| 1052 | ||
| 1053 | 0 | globus_free(dest_arr->elements); |
| 1054 | 0 | dest_arr->elements = NULL; |
| 1055 | 0 | dest_arr->length = 0; |
| 1056 | 0 | break; |
| 1057 | } | |
| 1058 | } | |
| 1059 | ||
| 1060 | exit: | |
| 1061 | 0 | GlobusSoapMessageDebugExit(); |
| 1062 | 0 | return result; |
| 1063 | } | |
| 1064 | ||
| 1065 | wsp_PolicyAssertions_group_choice * | |
| 1066 | wsp_PolicyAssertions_group_choice_array_push( | |
| 1067 | wsp_PolicyAssertions_group_choice_array * array) | |
| 1068 | 0 | { |
| 1069 | 0 | wsp_PolicyAssertions_group_choice * tmp; |
| 1070 | ||
| 1071 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_array_push); |
| 1072 | 0 | GlobusSoapMessageDebugEnter(); |
| 1073 | ||
| 1074 | 0 | tmp = realloc(array->elements, |
| 1075 | sizeof(wsp_PolicyAssertions_group_choice) * | |
| 1076 | (array->length + 1)); | |
| 1077 | 0 | if (tmp == NULL) |
| 1078 | { | |
| 1079 | 0 | goto error; |
| 1080 | } | |
| 1081 | 0 | array->elements = tmp; |
| 1082 | ||
| 1083 | 0 | memset(&array->elements[array->length], 0, sizeof(wsp_PolicyAssertions_group_choice)); |
| 1084 | 0 | array->length++; |
| 1085 | ||
| 1086 | 0 | GlobusSoapMessageDebugExit(); |
| 1087 | 0 | return (&array->elements[array->length - 1]); |
| 1088 | error: | |
| 1089 | 0 | GlobusSoapMessageDebugExit(); |
| 1090 | 0 | return NULL; |
| 1091 | } | |
| 1092 | ||
| 1093 | void * | |
| 1094 | wsp_PolicyAssertions_group_choice_array_push_wrapper( | |
| 1095 | void * array) | |
| 1096 | 0 | { |
| 1097 | 0 | return (void *) wsp_PolicyAssertions_group_choice_array_push( |
| 1098 | (wsp_PolicyAssertions_group_choice_array *) array); | |
| 1099 | } | |
| 1100 | ||
| 1101 | globus_result_t | |
| 1102 | wsp_PolicyAssertions_group_choice_array_serialize( | |
| 1103 | xsd_QName * element_qname, | |
| 1104 | wsp_PolicyAssertions_group_choice_array * array, | |
| 1105 | globus_soap_message_handle_t message, | |
| 1106 | globus_xsd_element_options_t options) | |
| 1107 | 0 | { |
| 1108 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 1109 | 0 | int i = 0; |
| 1110 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_array_serialize); |
| 1111 | 0 | GlobusSoapMessageDebugEnter(); |
| 1112 | ||
| 1113 | 0 | for(; i < array->length; ++i) |
| 1114 | { | |
| 1115 | 0 | result = wsp_PolicyAssertions_group_choice_serialize( |
| 1116 | element_qname, | |
| 1117 | &array->elements[i], | |
| 1118 | message, | |
| 1119 | options); | |
| 1120 | 0 | if(result != GLOBUS_SUCCESS) |
| 1121 | { | |
| 1122 | 0 | goto exit; |
| 1123 | } | |
| 1124 | } | |
| 1125 | ||
| 1126 | exit: | |
| 1127 | ||
| 1128 | 0 | GlobusSoapMessageDebugExit(); |
| 1129 | 0 | return result; |
| 1130 | } | |
| 1131 | ||
| 1132 | globus_result_t | |
| 1133 | wsp_PolicyAssertions_group_choice_array_deserialize( | |
| 1134 | xsd_QName * element_qname, | |
| 1135 | wsp_PolicyAssertions_group_choice_array * array, | |
| 1136 | globus_soap_message_handle_t message, | |
| 1137 | globus_xsd_element_options_t options) | |
| 1138 | 0 | { |
| 1139 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 1140 | 0 | int i = 0; |
| 1141 | 0 | int pre_length; |
| 1142 | 0 | GlobusFuncName(wsp_PolicyAssertions_group_choice_array_deserialize); |
| 1143 | 0 | GlobusSoapMessageDebugEnter(); |
| 1144 | ||
| 1145 | 0 | pre_length = array->length; |
| 1146 | ||
| 1147 | 0 | for(i = 0; i < pre_length; ++i) |
| 1148 | { | |
| 1149 | 0 | result = wsp_PolicyAssertions_group_choice_deserialize( |
| 1150 | element_qname, | |
| 1151 | &array->elements[i], | |
| 1152 | message, | |
| 1153 | options); | |
| 1154 | 0 | if(result != GLOBUS_SUCCESS) |
| 1155 | { | |
| 1156 | 0 | if(GlobusSoapMessageStatusFailedElementCheck(result) || |
| 1157 | GlobusSoapMessageStatusElementNotFoundCheck(result) || | |
| 1158 | GlobusSoapMessageStatusFailedWithTextCheck(result)) | |
| 1159 | { | |
| 1160 | 0 | result = GLOBUS_SUCCESS; |
| 1161 | 0 | break; |
| 1162 | } | |
| 1163 | ||
| 1164 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1165 | result, element_qname); | |
| 1166 | 0 | goto exit; |
| 1167 | } | |
| 1168 | } | |
| 1169 | ||
| 1170 | 0 | while(result == GLOBUS_SUCCESS) |
| 1171 | { | |
| 1172 | 0 | wsp_PolicyAssertions_group_choice next; |
| 1173 | 0 | memset(&next, 0, sizeof(wsp_PolicyAssertions_group_choice)); |
| 1174 | ||
| 1175 | 0 | result = wsp_PolicyAssertions_group_choice_deserialize( |
| 1176 | element_qname, | |
| 1177 | &next, | |
| 1178 | message, | |
| 1179 | options); | |
| 1180 | 0 | if(result != GLOBUS_SUCCESS) |
| 1181 | { | |
| 1182 | 0 | if(GlobusSoapMessageStatusFailedElementCheck(result) || |
| 1183 | GlobusSoapMessageStatusElementNotFoundCheck(result) || | |
| 1184 | GlobusSoapMessageStatusFailedWithTextCheck(result)) | |
| 1185 | { | |
| 1186 | 0 | result = GLOBUS_SUCCESS; |
| 1187 | 0 | break; |
| 1188 | } | |
| 1189 | ||
| 1190 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1191 | result, element_qname); | |
| 1192 | 0 | goto exit; |
| 1193 | } | |
| 1194 | ||
| 1195 | 0 | array->elements = realloc( |
| 1196 | array->elements, | |
| 1197 | (array->length + 1) * sizeof(wsp_PolicyAssertions_group_choice)); | |
| 1198 | 0 | if(!array->elements) |
| 1199 | { | |
| 1200 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 1201 | 0 | goto exit; |
| 1202 | } | |
| 1203 | 0 | array->elements[array->length] = next; |
| 1204 | 0 | array->length++; |
| 1205 | 0 | ++i; |
| 1206 | } | |
| 1207 | ||
| 1208 | exit: | |
| 1209 | ||
| 1210 | 0 | if(result != GLOBUS_SUCCESS) |
| 1211 | { | |
| 1212 | 0 | int di = 0; |
| 1213 | 0 | for(; di < i; ++di) |
| 1214 | { | |
| 1215 | 0 | wsp_PolicyAssertions_group_choice_destroy_contents( |
| 1216 | &array->elements[di]); | |
| 1217 | 0 | memset(&array->elements[di], 0, sizeof(wsp_PolicyAssertions_group_choice)); |
| 1218 | } | |
| 1219 | } | |
| 1220 | ||
| 1221 | 0 | GlobusSoapMessageDebugExit(); |
| 1222 | 0 | return result; |