| 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 "wst_ClaimsType.h" | |
| 26 | #include "globus_xsd_generic_array.h" | |
| 27 | ||
| 28 | #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL | |
| 29 | xsd_QName wst_ClaimsType_qname = | |
| 30 | { | |
| 31 | WST_CLAIMSTYPE_NS, | |
| 32 | WST_CLAIMSTYPE_LOCAL | |
| 33 | }; | |
| 34 | #endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */ | |
| 35 | ||
| 36 | static | |
| 37 | globus_result_t | |
| 38 | wst_ClaimsType_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 | 0 | { |
| 44 | 0 | return wst_ClaimsType_serialize( |
| 45 | element_qname, | |
| 46 | (const wst_ClaimsType *) instance, | |
| 47 | message_handle, options); | |
| 48 | } | |
| 49 | ||
| 50 | static | |
| 51 | globus_result_t | |
| 52 | wst_ClaimsType_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 | 0 | { |
| 58 | 0 | return wst_ClaimsType_deserialize_pointer( |
| 59 | element_qname, | |
| 60 | (wst_ClaimsType **) ip, | |
| 61 | message_handle, options); | |
| 62 | } | |
| 63 | ||
| 64 | static | |
| 65 | globus_result_t | |
| 66 | wst_ClaimsType_init_wrapper(void **object) | |
| 67 | 0 | { |
| 68 | 0 | return wst_ClaimsType_init( |
| 69 | (wst_ClaimsType **) object); | |
| 70 | } | |
| 71 | ||
| 72 | static | |
| 73 | void | |
| 74 | wst_ClaimsType_destroy_wrapper( | |
| 75 | void * object) | |
| 76 | 0 | { |
| 77 | 0 | wst_ClaimsType_destroy( |
| 78 | (wst_ClaimsType *) object); | |
| 79 | 0 | } |
| 80 | ||
| 81 | static | |
| 82 | globus_result_t | |
| 83 | wst_ClaimsType_copy_wrapper( | |
| 84 | void ** dest_obj, | |
| 85 | const void * src_obj) | |
| 86 | 0 | { |
| 87 | 0 | return wst_ClaimsType_copy( |
| 88 | (wst_ClaimsType **) dest_obj, | |
| 89 | (wst_ClaimsType *) src_obj); | |
| 90 | } | |
| 91 | ||
| 92 | static | |
| 93 | globus_result_t | |
| 94 | wst_ClaimsType_init_contents_wrapper(void *object) | |
| 95 | 0 | { |
| 96 | 0 | return wst_ClaimsType_init_contents( |
| 97 | (wst_ClaimsType *) object); | |
| 98 | } | |
| 99 | ||
| 100 | static | |
| 101 | void | |
| 102 | wst_ClaimsType_destroy_contents_wrapper( | |
| 103 | void * object) | |
| 104 | 0 | { |
| 105 | 0 | wst_ClaimsType_destroy_contents( |
| 106 | (wst_ClaimsType *) object); | |
| 107 | 0 | } |
| 108 | ||
| 109 | static | |
| 110 | globus_result_t | |
| 111 | wst_ClaimsType_copy_contents_wrapper( | |
| 112 | void * dest_obj, | |
| 113 | const void * src_obj) | |
| 114 | 0 | { |
| 115 | 0 | return wst_ClaimsType_copy_contents( |
| 116 | (wst_ClaimsType *) dest_obj, | |
| 117 | (const wst_ClaimsType *) src_obj); | |
| 118 | } | |
| 119 | ||
| 120 | static | |
| 121 | globus_result_t | |
| 122 | wst_ClaimsType_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 wst_ClaimsType_serialize_contents( |
| 129 | element_qname, | |
| 130 | (wst_ClaimsType *) instance, | |
| 131 | message_handle, options); | |
| 132 | } | |
| 133 | ||
| 134 | static | |
| 135 | globus_result_t | |
| 136 | wst_ClaimsType_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(wst_ClaimsType_deserialize_contents_wrapper); | |
| 144 | 0 | GlobusSoapMessageDebugEnter(); |
| 145 | ||
| 146 | 0 | if(!*instance) |
| 147 | { | |
| 148 | 0 | result = wst_ClaimsType_init( |
| 149 | (wst_ClaimsType **)instance); | |
| 150 | 0 | if(result != GLOBUS_SUCCESS) |
| 151 | { | |
| 152 | 0 | goto error; |
| 153 | } | |
| 154 | } | |
| 155 | ||
| 156 | 0 | result = wst_ClaimsType_deserialize_contents( |
| 157 | element_qname, | |
| 158 | *(wst_ClaimsType **)instance, | |
| 159 | message_handle, options); | |
| 160 | 0 | error: |
| 161 | 0 | GlobusSoapMessageDebugExit(); |
| 162 | 0 | return result; |
| 163 | } | |
| 164 | ||
| 165 | static | |
| 166 | globus_result_t | |
| 167 | wst_ClaimsType_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 wst_ClaimsType_array_serialize( |
| 174 | element, | |
| 175 | (wst_ClaimsType_array *) instance, | |
| 176 | message, options); | |
| 177 | } | |
| 178 | ||
| 179 | static | |
| 180 | globus_result_t | |
| 181 | wst_ClaimsType_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 = wst_ClaimsType_array_init( |
| 192 | (wst_ClaimsType_array **)inst); | |
| 193 | 0 | if(result != GLOBUS_SUCCESS) |
| 194 | { | |
| 195 | 0 | return result; |
| 196 | } | |
| 197 | } | |
| 198 | ||
| 199 | 0 | return wst_ClaimsType_array_deserialize( |
| 200 | element_qname, | |
| 201 | *(wst_ClaimsType_array **) inst, | |
| 202 | message, options); | |
| 203 | } | |
| 204 | ||
| 205 | static | |
| 206 | globus_result_t | |
| 207 | wst_ClaimsType_array_init_wrapper( | |
| 208 | void ** arr) | |
| 209 | 0 | { |
| 210 | 0 | return wst_ClaimsType_array_init( |
| 211 | (wst_ClaimsType_array **) arr); | |
| 212 | } | |
| 213 | ||
| 214 | static | |
| 215 | void | |
| 216 | wst_ClaimsType_array_destroy_wrapper( | |
| 217 | void * arr) | |
| 218 | 0 | { |
| 219 | 0 | wst_ClaimsType_array_destroy( |
| 220 | (wst_ClaimsType_array *) arr); | |
| 221 | 0 | } |
| 222 | ||
| 223 | static | |
| 224 | globus_result_t | |
| 225 | wst_ClaimsType_array_copy_wrapper( | |
| 226 | void ** dest_arr, | |
| 227 | const void * src_arr) | |
| 228 | 0 | { |
| 229 | 0 | return wst_ClaimsType_array_copy( |
| 230 | (wst_ClaimsType_array **) dest_arr, | |
| 231 | (const wst_ClaimsType_array *) src_arr); | |
| 232 | } | |
| 233 | ||
| 234 | static | |
| 235 | globus_result_t | |
| 236 | wst_ClaimsType_array_init_contents_wrapper( | |
| 237 | void * arr) | |
| 238 | 0 | { |
| 239 | 0 | return wst_ClaimsType_array_init_contents( |
| 240 | (wst_ClaimsType_array *) arr); | |
| 241 | } | |
| 242 | ||
| 243 | static | |
| 244 | void | |
| 245 | wst_ClaimsType_array_destroy_contents_wrapper( | |
| 246 | void * arr) | |
| 247 | 0 | { |
| 248 | 0 | wst_ClaimsType_array_destroy_contents( |
| 249 | (wst_ClaimsType_array *) arr); | |
| 250 | 0 | } |
| 251 | ||
| 252 | static | |
| 253 | globus_result_t | |
| 254 | wst_ClaimsType_array_copy_contents_wrapper( | |
| 255 | void * dest_arr, | |
| 256 | const void * src_arr) | |
| 257 | 0 | { |
| 258 | 0 | return wst_ClaimsType_array_copy_contents( |
| 259 | (wst_ClaimsType_array *) dest_arr, | |
| 260 | (const wst_ClaimsType_array *) src_arr); | |
| 261 | } | |
| 262 | ||
| 263 | static | |
| 264 | void * | |
| 265 | wst_ClaimsType_array_push_wrapper( | |
| 266 | void * array) | |
| 267 | 0 | { |
| 268 | 0 | return (void *) wst_ClaimsType_array_push((wst_ClaimsType_array *) array); |
| 269 | } | |
| 270 | ||
| 271 | struct globus_xsd_type_info_s wst_ClaimsType_contents_info = | |
| 272 | { | |
| 273 | &wst_ClaimsType_qname, | |
| 274 | wst_ClaimsType_serialize_contents_wrapper, | |
| 275 | wst_ClaimsType_deserialize_contents_wrapper, | |
| 276 | wst_ClaimsType_init_wrapper, | |
| 277 | wst_ClaimsType_destroy_wrapper, | |
| 278 | wst_ClaimsType_copy_wrapper, | |
| 279 | wst_ClaimsType_init_contents_wrapper, | |
| 280 | wst_ClaimsType_destroy_contents_wrapper, | |
| 281 | wst_ClaimsType_copy_contents_wrapper, | |
| 282 | sizeof(wst_ClaimsType), | |
| 283 | NULL, | |
| 284 | NULL, | |
| 285 | NULL | |
| 286 | }; | |
| 287 | ||
| 288 | struct globus_xsd_type_info_s wst_ClaimsType_array_info = | |
| 289 | { | |
| 290 | &wst_ClaimsType_qname, | |
| 291 | wst_ClaimsType_array_serialize_wrapper, | |
| 292 | wst_ClaimsType_array_deserialize_wrapper, | |
| 293 | wst_ClaimsType_array_init_wrapper, | |
| 294 | wst_ClaimsType_array_destroy_wrapper, | |
| 295 | wst_ClaimsType_array_copy_wrapper, | |
| 296 | wst_ClaimsType_array_init_contents_wrapper, | |
| 297 | wst_ClaimsType_array_destroy_contents_wrapper, | |
| 298 | wst_ClaimsType_array_copy_contents_wrapper, | |
| 299 | sizeof(wst_ClaimsType), | |
| 300 | wst_ClaimsType_array_push_wrapper, | |
| 301 | NULL, | |
| 302 | NULL | |
| 303 | }; | |
| 304 | ||
| 305 | struct globus_xsd_type_info_s wst_ClaimsType_info = | |
| 306 | { | |
| 307 | &wst_ClaimsType_qname, | |
| 308 | wst_ClaimsType_serialize_wrapper, | |
| 309 | wst_ClaimsType_deserialize_pointer_wrapper, | |
| 310 | wst_ClaimsType_init_wrapper, | |
| 311 | wst_ClaimsType_destroy_wrapper, | |
| 312 | wst_ClaimsType_copy_wrapper, | |
| 313 | wst_ClaimsType_init_contents_wrapper, | |
| 314 | wst_ClaimsType_destroy_contents_wrapper, | |
| 315 | wst_ClaimsType_copy_contents_wrapper, | |
| 316 | sizeof(wst_ClaimsType), | |
| 317 | NULL, | |
| 318 | &wst_ClaimsType_contents_info, | |
| 319 | &wst_ClaimsType_array_info | |
| 320 | }; | |
| 321 | ||
| 322 | globus_result_t | |
| 323 | wst_ClaimsType_init_contents( | |
| 324 | wst_ClaimsType * instance) | |
| 325 | 0 | { |
| 326 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 327 | GlobusFuncName(wst_ClaimsType_init_contents); | |
| 328 | 0 | GlobusSoapMessageDebugEnter(); |
| 329 | ||
| 330 | 0 | memset(instance, 0, sizeof(wst_ClaimsType)); |
| 331 | ||
| 332 | 0 | GlobusSoapMessageDebugExit(); |
| 333 | 0 | return result; |
| 334 | } | |
| 335 | ||
| 336 | globus_result_t | |
| 337 | wst_ClaimsType_init( | |
| 338 | wst_ClaimsType ** object) | |
| 339 | 0 | { |
| 340 | wst_ClaimsType * instance; | |
| 341 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 342 | GlobusFuncName(wst_ClaimsType_init); | |
| 343 | 0 | GlobusSoapMessageDebugEnter(); |
| 344 | ||
| 345 | 0 | instance = globus_malloc(sizeof(wst_ClaimsType)); |
| 346 | 0 | if(!instance) |
| 347 | { | |
| 348 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 349 | 0 | goto exit; |
| 350 | } | |
| 351 | ||
| 352 | 0 | memset(instance, 0, sizeof(wst_ClaimsType)); |
| 353 | ||
| 354 | 0 | *object = instance; |
| 355 | ||
| 356 | 0 | exit: |
| 357 | 0 | GlobusSoapMessageDebugExit(); |
| 358 | 0 | return result; |
| 359 | } | |
| 360 | ||
| 361 | void | |
| 362 | wst_ClaimsType_destroy( | |
| 363 | wst_ClaimsType * instance) | |
| 364 | 0 | { |
| 365 | GlobusFuncName(wst_ClaimsType_destroy); | |
| 366 | 0 | GlobusSoapMessageDebugEnter(); |
| 367 | ||
| 368 | 0 | if(!instance) |
| 369 | { | |
| 370 | 0 | goto exit; |
| 371 | } | |
| 372 | ||
| 373 | 0 | wst_ClaimsType_destroy_contents(instance); |
| 374 | 0 | globus_free(instance); |
| 375 | ||
| 376 | 0 | exit: |
| 377 | ||
| 378 | 0 | GlobusSoapMessageDebugExit(); |
| 379 | 0 | } |
| 380 | ||
| 381 | ||
| 382 | void | |
| 383 | wst_ClaimsType_destroy_contents( | |
| 384 | wst_ClaimsType * instance) | |
| 385 | 0 | { |
| 386 | GlobusFuncName(wst_ClaimsType_destroy_contents); | |
| 387 | 0 | GlobusSoapMessageDebugEnter(); |
| 388 | ||
| 389 | 0 | if(instance) |
| 390 | { | |
| 391 | ||
| 392 | ||
| 393 | 0 | xsd_any_array_destroy_contents(&instance->any); |
| 394 | ||
| 395 | 0 | xsd_anyAttributes_destroy(instance->anyAttributes); |
| 396 | 0 | instance->anyAttributes = NULL; |
| 397 | ||
| 398 | 0 | if(instance->_Dialect) |
| 399 | { | |
| 400 | 0 | xsd_anyURI_destroy( |
| 401 | instance->_Dialect); | |
| 402 | 0 | instance->_Dialect = NULL; |
| 403 | } | |
| 404 | ||
| 405 | } | |
| 406 | ||
| 407 | 0 | GlobusSoapMessageDebugExit(); |
| 408 | 0 | } |
| 409 | ||
| 410 | ||
| 411 | globus_result_t | |
| 412 | wst_ClaimsType_copy( | |
| 413 | wst_ClaimsType ** dest_obj, | |
| 414 | const wst_ClaimsType * src_obj) | |
| 415 | 0 | { |
| 416 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 417 | wst_ClaimsType * instance; | |
| 418 | GlobusFuncName(wst_ClaimsType_copy); | |
| 419 | ||
| 420 | 0 | GlobusSoapMessageDebugEnter(); |
| 421 | ||
| 422 | 0 | instance = calloc(1, sizeof(wst_ClaimsType)); |
| 423 | 0 | if (instance == NULL) |
| 424 | { | |
| 425 | 0 | GlobusSoapMessageDebugExit(); |
| 426 | 0 | return GlobusSoapMessageErrorOutOfMemory; |
| 427 | } | |
| 428 | ||
| 429 | 0 | result = wst_ClaimsType_copy_contents(instance, src_obj); |
| 430 | 0 | if(result != GLOBUS_SUCCESS) |
| 431 | { | |
| 432 | 0 | globus_free(instance); |
| 433 | 0 | GlobusSoapMessageDebugExit(); |
| 434 | 0 | return GlobusSoapMessageErrorOutOfMemory; |
| 435 | } | |
| 436 | ||
| 437 | 0 | *dest_obj = instance; |
| 438 | 0 | GlobusSoapMessageDebugExit(); |
| 439 | 0 | return result; |
| 440 | } | |
| 441 | ||
| 442 | globus_result_t | |
| 443 | wst_ClaimsType_copy_contents( | |
| 444 | wst_ClaimsType * instance, | |
| 445 | const wst_ClaimsType * src_obj) | |
| 446 | 0 | { |
| 447 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 448 | GlobusFuncName(wst_ClaimsType_copy_contents); | |
| 449 | ||
| 450 | 0 | GlobusSoapMessageDebugEnter(); |
| 451 | ||
| 452 | 0 | if(src_obj->anyAttributes) |
| 453 | { | |
| 454 | 0 | result = xsd_anyAttributes_copy(&instance->anyAttributes, |
| 455 | src_obj->anyAttributes); | |
| 456 | 0 | if(result != GLOBUS_SUCCESS) |
| 457 | { | |
| 458 | 0 | result = GlobusSoapMessageErrorCopyAnyAttrsFailed( |
| 459 | result, NULL); | |
| 460 | 0 | goto xsd_anyAttributes_after_destroy; |
| 461 | } | |
| 462 | } | |
| 463 | else | |
| 464 | { | |
| 465 | 0 | instance->anyAttributes = NULL; |
| 466 | } | |
| 467 | ||
| 468 | 0 | if(src_obj->_Dialect) |
| 469 | { | |
| 470 | 0 | result = xsd_anyURI_copy( |
| 471 | &instance->_Dialect, | |
| 472 | src_obj->_Dialect); | |
| 473 | 0 | if(result != GLOBUS_SUCCESS) |
| 474 | { | |
| 475 | 0 | result = GlobusSoapMessageErrorCopyFailed( |
| 476 | result, NULL, &xsd_anyURI_qname); | |
| 477 | 0 | goto _Dialect_destroy; |
| 478 | } | |
| 479 | } | |
| 480 | else | |
| 481 | { | |
| 482 | 0 | instance->_Dialect = NULL; |
| 483 | } | |
| 484 | ||
| 485 | 0 | result = xsd_any_array_copy_contents( |
| 486 | &instance->any, | |
| 487 | &src_obj->any); | |
| 488 | 0 | if(result != GLOBUS_SUCCESS) |
| 489 | { | |
| 490 | 0 | result = GlobusSoapMessageErrorCopyFailed( |
| 491 | result, NULL, &xsd_any_qname); | |
| 492 | 0 | goto any_destroy_array; |
| 493 | } | |
| 494 | ||
| 495 | 0 | goto exit; |
| 496 | ||
| 497 | fail_deserialize: | |
| 498 | ||
| 499 | xsd_anyAttributes_destroy: | |
| 500 | xsd_anyAttributes_destroy(instance->anyAttributes); | |
| 501 | instance->anyAttributes = NULL; | |
| 502 | 0 | xsd_anyAttributes_after_destroy: |
| 503 | ||
| 504 | 0 | _Dialect_destroy: |
| 505 | ||
| 506 | 0 | if(instance->_Dialect) |
| 507 | { | |
| 508 | 0 | xsd_anyURI_destroy( |
| 509 | instance->_Dialect); | |
| 510 | 0 | instance->_Dialect = NULL; |
| 511 | } | |
| 512 | 0 | xsd_any_array_destroy_contents( |
| 513 | &instance->any); | |
| 514 | ||
| 515 | 0 | any_destroy_array: |
| 516 | ||
| 517 | ||
| 518 | 0 | exit: |
| 519 | ||
| 520 | 0 | GlobusSoapMessageDebugExit(); |
| 521 | 0 | return result; |
| 522 | } | |
| 523 | ||
| 524 | ||
| 525 | ||
| 526 | globus_result_t | |
| 527 | wst_ClaimsType_serialize_contents( | |
| 528 | const xsd_QName * element_qname, /* ignored */ | |
| 529 | const wst_ClaimsType * inst, | |
| 530 | globus_soap_message_handle_t message_handle, | |
| 531 | globus_xsd_element_options_t options) | |
| 532 | 0 | { |
| 533 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 534 | GlobusFuncName(wst_ClaimsType_serialize_contents); | |
| 535 | 0 | GlobusSoapMessageDebugEnter(); |
| 536 | ||
| 537 | 0 | result = wst_ClaimsType_serialize( |
| 538 | NULL, | |
| 539 | inst, | |
| 540 | message_handle, | |
| 541 | options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY); | |
| 542 | 0 | if(result != GLOBUS_SUCCESS) |
| 543 | { | |
| 544 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 545 | result, NULL, element_qname); | |
| 546 | 0 | goto exit; |
| 547 | } | |
| 548 | ||
| 549 | 0 | exit: |
| 550 | ||
| 551 | 0 | GlobusSoapMessageDebugExit(); |
| 552 | 0 | return result; |
| 553 | } | |
| 554 | ||
| 555 | ||
| 556 | ||
| 557 | globus_result_t | |
| 558 | wst_ClaimsType_serialize( | |
| 559 | const xsd_QName * element_qname, | |
| 560 | const wst_ClaimsType * instance, | |
| 561 | globus_soap_message_handle_t message_handle, | |
| 562 | globus_xsd_element_options_t options) | |
| 563 | 0 | { |
| 564 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 565 | xsd_QName subelement; | |
| 566 | 0 | globus_list_t * any_attr_keys = NULL; |
| 567 | 0 | globus_list_t * any_attr_keys_iterator = NULL; |
| 568 | 0 | xsd_QName * type_attr = NULL; |
| 569 | ||
| 570 | 0 | char * prefix = NULL; |
| 571 | int prefix_created; | |
| 572 | 0 | int define_prefix = 0; |
| 573 | 0 | int save_options = options; |
| 574 | ||
| 575 | GlobusFuncName(wst_ClaimsType_serialize); | |
| 576 | 0 | GlobusSoapMessageDebugEnter(); |
| 577 | ||
| 578 | ||
| 579 | 0 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 580 | { | |
| 581 | /* serialize wst_ClaimsType element */ | |
| 582 | 0 | result = globus_soap_message_element_ns_set( |
| 583 | message_handle, | |
| 584 | element_qname, | |
| 585 | element_qname->Namespace, | |
| 586 | &options); | |
| 587 | 0 | if(result != GLOBUS_SUCCESS) |
| 588 | { | |
| 589 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 590 | result, NULL, element_qname); | |
| 591 | 0 | goto exit; |
| 592 | } | |
| 593 | ||
| 594 | 0 | if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 595 | !globus_soap_message_serialize_is_c14n_subset(message_handle))) | |
| 596 | { | |
| 597 | 0 | result = globus_soap_message_attribute_ns_set( |
| 598 | message_handle, | |
| 599 | element_qname, | |
| 600 | "http://www.w3.org/2001/XMLSchema-instance", | |
| 601 | &options); | |
| 602 | 0 | if(result != GLOBUS_SUCCESS) |
| 603 | { | |
| 604 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 605 | result, NULL, element_qname); | |
| 606 | 0 | goto exit; |
| 607 | } | |
| 608 | } | |
| 609 | ||
| 610 | 0 | if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 611 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 612 | { | |
| 613 | ||
| 614 | 0 | result = globus_soap_message_attribute_ns_set( |
| 615 | message_handle, | |
| 616 | element_qname, | |
| 617 | wst_ClaimsType_qname.Namespace, | |
| 618 | &options); | |
| 619 | 0 | if(result != GLOBUS_SUCCESS) |
| 620 | { | |
| 621 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 622 | result, NULL, element_qname); | |
| 623 | 0 | goto exit; |
| 624 | } | |
| 625 | } | |
| 626 | ||
| 627 | 0 | result = xsd_anyAttributes_namespace_set( |
| 628 | message_handle, element_qname, instance->anyAttributes, &options); | |
| 629 | 0 | if(result != GLOBUS_SUCCESS) |
| 630 | { | |
| 631 | 0 | result = GlobusSoapMessageErrorSerializeAnyAttrsFailed( |
| 632 | result, "Failed to set namespace"); | |
| 633 | 0 | goto exit; |
| 634 | } | |
| 635 | ||
| 636 | 0 | if(instance->_Dialect) |
| 637 | { | |
| 638 | ||
| 639 | 0 | if(result != GLOBUS_SUCCESS) |
| 640 | { | |
| 641 | xsd_QName error_qname; | |
| 642 | 0 | error_qname.local = prefix; |
| 643 | 0 | error_qname.Namespace = ""; |
| 644 | 0 | result = GlobusSoapMessageErrorSerializeFailed(result, |
| 645 | NULL, | |
| 646 | &error_qname); | |
| 647 | 0 | goto exit; |
| 648 | } | |
| 649 | ||
| 650 | ||
| 651 | } | |
| 652 | ||
| 653 | 0 | result = globus_soap_message_serialize_element( |
| 654 | message_handle, | |
| 655 | element_qname, | |
| 656 | options, | |
| 657 | &wst_ClaimsType_qname); | |
| 658 | 0 | if(result != GLOBUS_SUCCESS) |
| 659 | { | |
| 660 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 661 | result, NULL, element_qname); | |
| 662 | 0 | goto exit; |
| 663 | } | |
| 664 | ||
| 665 | 0 | if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 666 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 667 | { | |
| 668 | 0 | xsd_QName_init(&type_attr); |
| 669 | ||
| 670 | 0 | type_attr->local = globus_libc_strdup("type"); |
| 671 | 0 | type_attr->Namespace = globus_libc_strdup(XSI_NS); |
| 672 | } | |
| 673 | ||
| 674 | ||
| 675 | /* serialize namespaces */ | |
| 676 | 0 | result = globus_soap_message_element_ns_add( |
| 677 | message_handle, | |
| 678 | element_qname, | |
| 679 | element_qname->Namespace, | |
| 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 | 0 | if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 689 | !globus_soap_message_serialize_is_c14n_subset(message_handle))) | |
| 690 | { | |
| 691 | 0 | result = globus_soap_message_attribute_ns_add( |
| 692 | message_handle, | |
| 693 | element_qname, | |
| 694 | "http://www.w3.org/2001/XMLSchema-instance", | |
| 695 | &options); | |
| 696 | 0 | if(result != GLOBUS_SUCCESS) |
| 697 | { | |
| 698 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 699 | result, NULL, element_qname); | |
| 700 | 0 | goto exit; |
| 701 | } | |
| 702 | } | |
| 703 | 0 | if ((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 704 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 705 | { | |
| 706 | ||
| 707 | 0 | result = globus_soap_message_attribute_ns_add( |
| 708 | message_handle, | |
| 709 | element_qname, | |
| 710 | wst_ClaimsType_qname.Namespace, | |
| 711 | &options); | |
| 712 | 0 | if(result != GLOBUS_SUCCESS) |
| 713 | { | |
| 714 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 715 | result, NULL, element_qname); | |
| 716 | 0 | goto exit; |
| 717 | } | |
| 718 | } | |
| 719 | ||
| 720 | 0 | result = xsd_anyAttributes_namespace_add( |
| 721 | message_handle, element_qname, instance->anyAttributes, &options); | |
| 722 | 0 | if(result != GLOBUS_SUCCESS) |
| 723 | { | |
| 724 | 0 | result = GlobusSoapMessageErrorSerializeAnyAttrsFailed( |
| 725 | result, "Failed to add namespace"); | |
| 726 | 0 | goto exit; |
| 727 | } | |
| 728 | ||
| 729 | 0 | if(instance->_Dialect) |
| 730 | { | |
| 731 | ||
| 732 | } | |
| 733 | ||
| 734 | /* serialize attributes */ | |
| 735 | ||
| 736 | 0 | if(instance->anyAttributes) |
| 737 | { | |
| 738 | 0 | any_attr_keys = xsd_anyAttributes_lex_sort( |
| 739 | instance->anyAttributes); | |
| 740 | 0 | any_attr_keys_iterator = any_attr_keys; |
| 741 | } | |
| 742 | ||
| 743 | 0 | subelement.Namespace = ""; |
| 744 | 0 | subelement.local = "Dialect"; |
| 745 | ||
| 746 | 0 | if(any_attr_keys_iterator) |
| 747 | { | |
| 748 | 0 | result = xsd_anyAttributes_serialize_lex_before( |
| 749 | message_handle, | |
| 750 | &any_attr_keys_iterator, | |
| 751 | instance->anyAttributes, | |
| 752 | &subelement); | |
| 753 | 0 | if(result != GLOBUS_SUCCESS) |
| 754 | { | |
| 755 | 0 | result = GlobusSoapMessageErrorSerializeFailed(result, |
| 756 | NULL, | |
| 757 | element_qname); | |
| 758 | 0 | goto exit; |
| 759 | } | |
| 760 | } | |
| 761 | ||
| 762 | 0 | if(instance->_Dialect) |
| 763 | { | |
| 764 | ||
| 765 | 0 | result = xsd_anyURI_serialize_attribute( |
| 766 | &subelement, | |
| 767 | instance->_Dialect, | |
| 768 | message_handle, | |
| 769 | options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS)); | |
| 770 | 0 | if(result != GLOBUS_SUCCESS) |
| 771 | { | |
| 772 | 0 | result = GlobusSoapMessageErrorSerializeFailed(result, |
| 773 | NULL, | |
| 774 | element_qname); | |
| 775 | 0 | goto exit; |
| 776 | } | |
| 777 | ||
| 778 | } | |
| 779 | ||
| 780 | 0 | if(any_attr_keys_iterator) |
| 781 | { | |
| 782 | 0 | result = xsd_anyAttributes_serialize_lex_before( |
| 783 | message_handle, | |
| 784 | &any_attr_keys_iterator, | |
| 785 | instance->anyAttributes, | |
| 786 | type_attr); | |
| 787 | 0 | if(result != GLOBUS_SUCCESS) |
| 788 | { | |
| 789 | 0 | result = GlobusSoapMessageErrorSerializeFailed(result, |
| 790 | NULL, | |
| 791 | element_qname); | |
| 792 | 0 | goto exit; |
| 793 | } | |
| 794 | } | |
| 795 | ||
| 796 | 0 | if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 797 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 798 | { | |
| 799 | 0 | result = globus_soap_message_serialize_QName_attribute( |
| 800 | message_handle, | |
| 801 | type_attr, | |
| 802 | &wst_ClaimsType_qname); | |
| 803 | 0 | if(result != GLOBUS_SUCCESS) |
| 804 | { | |
| 805 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 806 | result, NULL, element_qname); | |
| 807 | 0 | goto exit; |
| 808 | } | |
| 809 | } | |
| 810 | ||
| 811 | ||
| 812 | } | |
| 813 | ||
| 814 | 0 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 815 | { | |
| 816 | 0 | result = globus_soap_message_serialize_element_begin_close( |
| 817 | message_handle, element_qname); | |
| 818 | 0 | if(result != GLOBUS_SUCCESS) |
| 819 | { | |
| 820 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 821 | result, NULL, element_qname); | |
| 822 | 0 | goto exit; |
| 823 | } | |
| 824 | } | |
| 825 | 0 | options &= ~GLOBUS_XSD_ELEMENT_CONTENTS_ONLY; |
| 826 | ||
| 827 | ||
| 828 | /* serialize contents of type */ | |
| 829 | ||
| 830 | 0 | subelement.local = "any"; |
| 831 | 0 | subelement.Namespace = "http://www.w3.org/2001/XMLSchema"; |
| 832 | ||
| 833 | 0 | result = xsd_any_array_serialize( |
| 834 | &subelement, | |
| 835 | &instance->any, | |
| 836 | message_handle, | |
| 837 | options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS)); | |
| 838 | 0 | if(result != GLOBUS_SUCCESS) |
| 839 | { | |
| 840 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 841 | result, NULL, &xsd_any_qname); | |
| 842 | 0 | goto exit; |
| 843 | } | |
| 844 | ||
| 845 | 0 | options = save_options; |
| 846 | ||
| 847 | 0 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 848 | { | |
| 849 | /* add end element */ | |
| 850 | 0 | result = globus_soap_message_serialize_element_end( |
| 851 | message_handle, | |
| 852 | element_qname, | |
| 853 | options, | |
| 854 | &wst_ClaimsType_qname); | |
| 855 | 0 | if(result != GLOBUS_SUCCESS) |
| 856 | { | |
| 857 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 858 | result, NULL, element_qname); | |
| 859 | 0 | goto exit; |
| 860 | } | |
| 861 | ||
| 862 | 0 | globus_soap_message_element_ns_remove( |
| 863 | message_handle, | |
| 864 | element_qname->Namespace, | |
| 865 | &options); | |
| 866 | ||
| 867 | /* remove namespace/prefix mappings for these types */ | |
| 868 | ||
| 869 | 0 | if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 870 | !globus_soap_message_serialize_is_c14n_subset(message_handle))) | |
| 871 | { | |
| 872 | 0 | globus_soap_message_attribute_ns_remove( |
| 873 | message_handle, | |
| 874 | "http://www.w3.org/2001/XMLSchema-instance", | |
| 875 | &options); | |
| 876 | } | |
| 877 | 0 | if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 878 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 879 | { | |
| 880 | 0 | globus_soap_message_attribute_ns_remove( |
| 881 | message_handle, | |
| 882 | wst_ClaimsType_qname.Namespace, | |
| 883 | &options); | |
| 884 | } | |
| 885 | ||
| 886 | 0 | result = xsd_anyAttributes_namespace_remove( |
| 887 | message_handle, instance->anyAttributes, &options); | |
| 888 | 0 | if(result != GLOBUS_SUCCESS) |
| 889 | { | |
| 890 | 0 | result = GlobusSoapMessageErrorSerializeAnyAttrsFailed( |
| 891 | result, "Failed to remove namespace"); | |
| 892 | 0 | goto exit; |
| 893 | } | |
| 894 | ||
| 895 | 0 | if(instance->_Dialect) |
| 896 | { | |
| 897 | ||
| 898 | 0 | globus_soap_message_attribute_ns_remove( |
| 899 | message_handle, | |
| 900 | NULL, | |
| 901 | &options); | |
| 902 | ||
| 903 | } | |
| 904 | ||
| 905 | } | |
| 906 | ||
| 907 | 0 | exit: |
| 908 | 0 | if (type_attr) |
| 909 | { | |
| 910 | 0 | xsd_QName_destroy(type_attr); |
| 911 | } | |
| 912 | ||
| 913 | ||
| 914 | 0 | if(any_attr_keys) |
| 915 | { | |
| 916 | 0 | globus_list_free(any_attr_keys); |
| 917 | } | |
| 918 | ||
| 919 | 0 | GlobusSoapMessageDebugExit(); |
| 920 | 0 | return result; |
| 921 | } | |
| 922 | ||
| 923 | ||
| 924 | ||
| 925 | globus_result_t | |
| 926 | wst_ClaimsType_deserialize_contents( | |
| 927 | const xsd_QName * element_qname, /* ignored */ | |
| 928 | wst_ClaimsType * inst, | |
| 929 | globus_soap_message_handle_t message_handle, | |
| 930 | globus_xsd_element_options_t options) | |
| 931 | 0 | { |
| 932 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 933 | GlobusFuncName(wst_ClaimsType_deserialize_contents); | |
| 934 | 0 | GlobusSoapMessageDebugEnter(); |
| 935 | ||
| 936 | 0 | result = wst_ClaimsType_deserialize( |
| 937 | NULL, | |
| 938 | inst, | |
| 939 | message_handle, | |
| 940 | options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY); | |
| 941 | 0 | if(result != GLOBUS_SUCCESS) |
| 942 | { | |
| 943 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 944 | result, element_qname); | |
| 945 | 0 | goto exit; |
| 946 | } | |
| 947 | ||
| 948 | 0 | exit: |
| 949 | ||
| 950 | 0 | GlobusSoapMessageDebugExit(); |
| 951 | 0 | return result; |
| 952 | } | |
| 953 | ||
| 954 | ||
| 955 | ||
| 956 | globus_result_t | |
| 957 | wst_ClaimsType_deserialize( | |
| 958 | const xsd_QName * element_qname, | |
| 959 | wst_ClaimsType * instance, | |
| 960 | globus_soap_message_handle_t message_handle, | |
| 961 | globus_xsd_element_options_t options) | |
| 962 | 0 | { |
| 963 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 964 | xsd_QName subelement; | |
| 965 | GlobusFuncName(wst_ClaimsType_deserialize); | |
| 966 | 0 | GlobusSoapMessageDebugEnter(); |
| 967 | ||
| 968 | ||
| 969 | 0 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 970 | { | |
| 971 | 0 | result = globus_soap_message_deserialize_element( |
| 972 | message_handle, element_qname); | |
| 973 | 0 | if(result != GLOBUS_SUCCESS) |
| 974 | { | |
| 975 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 976 | result, element_qname); | |
| 977 | 0 | goto exit; |
| 978 | } | |
| 979 | ||
| 980 | 0 | result = xsd_anyAttributes_init(&instance->anyAttributes); |
| 981 | 0 | if(result != GLOBUS_SUCCESS) |
| 982 | { | |
| 983 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 984 | result, element_qname); | |
| 985 | 0 | goto xsd_anyAttributes_after_destroy; |
| 986 | } | |
| 987 | 0 | subelement.Namespace = "##any"; |
| 988 | 0 | subelement.local = "anyAttributes"; |
| 989 | ||
| 990 | 0 | result = xsd_anyAttributes_deserialize( |
| 991 | message_handle, | |
| 992 | instance->anyAttributes, | |
| 993 | &subelement); | |
| 994 | 0 | if(result != GLOBUS_SUCCESS) |
| 995 | { | |
| 996 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 997 | result, element_qname); | |
| 998 | 0 | goto xsd_anyAttributes_destroy; |
| 999 | } | |
| 1000 | ||
| 1001 | 0 | subelement.Namespace = ""; |
| 1002 | 0 | subelement.local = "Dialect"; |
| 1003 | ||
| 1004 | 0 | result = xsd_anyURI_deserialize_attribute_pointer( |
| 1005 | &subelement, | |
| 1006 | &instance->_Dialect, | |
| 1007 | message_handle, | |
| 1008 | 0); | |
| 1009 | 0 | if(result != GLOBUS_SUCCESS) |
| 1010 | { | |
| 1011 | 0 | result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement); |
| 1012 | 0 | goto _Dialect_destroy; |
| 1013 | } | |
| 1014 | ||
| 1015 | ||
| 1016 | ||
| 1017 | 0 | result = globus_soap_message_deserialize_element_begin_close( |
| 1018 | message_handle); | |
| 1019 | 0 | if(result != GLOBUS_SUCCESS) |
| 1020 | { | |
| 1021 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1022 | result, element_qname); | |
| 1023 | 0 | goto fail_deserialize; |
| 1024 | } | |
| 1025 | } | |
| 1026 | ||
| 1027 | 0 | subelement.local = "any"; |
| 1028 | ||
| 1029 | 0 | subelement.Namespace = "##any"; |
| 1030 | ||
| 1031 | 0 | result = xsd_any_array_deserialize( |
| 1032 | &subelement, | |
| 1033 | &instance->any, | |
| 1034 | message_handle, | |
| 1035 | 0); | |
| 1036 | 0 | if(result != GLOBUS_SUCCESS) |
| 1037 | { | |
| 1038 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1039 | result, | |
| 1040 | (&subelement)); | |
| 1041 | 0 | goto any_destroy_array; |
| 1042 | } | |
| 1043 | ||
| 1044 | 0 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 1045 | { | |
| 1046 | 0 | result = globus_soap_message_deserialize_element_end( |
| 1047 | message_handle, | |
| 1048 | element_qname); | |
| 1049 | 0 | if(result != GLOBUS_SUCCESS) |
| 1050 | { | |
| 1051 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1052 | result, element_qname); | |
| 1053 | 0 | goto fail_deserialize; |
| 1054 | } | |
| 1055 | } | |
| 1056 | ||
| 1057 | 0 | goto exit; |
| 1058 | ||
| 1059 | 0 | fail_deserialize: |
| 1060 | ||
| 1061 | 0 | xsd_anyAttributes_destroy: |
| 1062 | 0 | xsd_anyAttributes_destroy(instance->anyAttributes); |
| 1063 | 0 | instance->anyAttributes = NULL; |
| 1064 | 0 | xsd_anyAttributes_after_destroy: |
| 1065 | ||
| 1066 | 0 | _Dialect_destroy: |
| 1067 | /* output_fail_destroy_attribute() */ | |
| 1068 | ||
| 1069 | 0 | if(instance->_Dialect) |
| 1070 | { | |
| 1071 | 0 | xsd_anyURI_destroy( |
| 1072 | instance->_Dialect); | |
| 1073 | 0 | instance->_Dialect = NULL; |
| 1074 | } | |
| 1075 | 0 | xsd_any_array_destroy_contents( |
| 1076 | &instance->any); | |
| 1077 | ||
| 1078 | 0 | any_destroy_array: |
| 1079 | ||
| 1080 | ||
| 1081 | 0 | exit: |
| 1082 | ||
| 1083 | 0 | GlobusSoapMessageDebugExit(); |
| 1084 | 0 | return result; |
| 1085 | } | |
| 1086 | ||
| 1087 | ||
| 1088 | ||
| 1089 | globus_result_t | |
| 1090 | wst_ClaimsType_deserialize_pointer( | |
| 1091 | const xsd_QName * element_qname, | |
| 1092 | wst_ClaimsType ** ip, | |
| 1093 | globus_soap_message_handle_t message_handle, | |
| 1094 | globus_xsd_element_options_t options) | |
| 1095 | 0 | { |
| 1096 | 0 | wst_ClaimsType * instance = NULL; |
| 1097 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 1098 | xsd_QName subelement; | |
| 1099 | 0 | int found_attrs = 0; |
| 1100 | 0 | int empty_element = 0; |
| 1101 | GlobusFuncName(wst_ClaimsType_deserialize_pointer); | |
| 1102 | 0 | GlobusSoapMessageDebugEnter(); |
| 1103 | ||
| 1104 | 0 | *ip = NULL; |
| 1105 | ||
| 1106 | 0 | result = globus_soap_message_deserialize_element( |
| 1107 | message_handle, element_qname); | |
| 1108 | 0 | if(result != GLOBUS_SUCCESS && |
| 1109 | (GlobusSoapMessageStatusElementNotFoundCheck(result) || | |
| 1110 | GlobusSoapMessageStatusFailedElementCheck(result) || | |
| 1111 | GlobusSoapMessageStatusFailedWithTextCheck(result))) | |
| 1112 | { | |
| 1113 | 0 | result = GLOBUS_SUCCESS; |
| 1114 | 0 | goto exit; |
| 1115 | } | |
| 1116 | ||
| 1117 | 0 | if(result != GLOBUS_SUCCESS) |
| 1118 | { | |
| 1119 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1120 | result, element_qname); | |
| 1121 | 0 | goto exit; |
| 1122 | } | |
| 1123 | ||
| 1124 | 0 | if(globus_soap_message_deserialize_element_is_empty( |
| 1125 | message_handle)) | |
| 1126 | { | |
| 1127 | 0 | empty_element = 1; |
| 1128 | } | |
| 1129 | ||
| 1130 | 0 | result = wst_ClaimsType_init(&instance); |
| 1131 | 0 | if(result != GLOBUS_SUCCESS) |
| 1132 | { | |
| 1133 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1134 | result, element_qname); | |
| 1135 | 0 | goto exit; |
| 1136 | } | |
| 1137 | ||
| 1138 | ||
| 1139 | 0 | result = xsd_anyAttributes_init(&instance->anyAttributes); |
| 1140 | 0 | if(result != GLOBUS_SUCCESS) |
| 1141 | { | |
| 1142 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1143 | result, element_qname); | |
| 1144 | 0 | goto xsd_anyAttributes_after_destroy; |
| 1145 | } | |
| 1146 | 0 | subelement.Namespace = "##any"; |
| 1147 | 0 | subelement.local = "anyAttributes"; |
| 1148 | ||
| 1149 | 0 | result = xsd_anyAttributes_deserialize( |
| 1150 | message_handle, | |
| 1151 | instance->anyAttributes, | |
| 1152 | &subelement); | |
| 1153 | 0 | if(result != GLOBUS_SUCCESS) |
| 1154 | { | |
| 1155 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1156 | result, element_qname); | |
| 1157 | 0 | goto xsd_anyAttributes_destroy; |
| 1158 | } | |
| 1159 | ||
| 1160 | 0 | if(instance->anyAttributes && |
| 1161 | xsd_anyAttributes_size(instance->anyAttributes) > 0) | |
| 1162 | { | |
| 1163 | 0 | found_attrs++; |
| 1164 | } | |
| 1165 | ||
| 1166 | 0 | subelement.Namespace = ""; |
| 1167 | 0 | subelement.local = "Dialect"; |
| 1168 | ||
| 1169 | 0 | result = xsd_anyURI_deserialize_attribute_pointer( |
| 1170 | &subelement, | |
| 1171 | &instance->_Dialect, | |
| 1172 | message_handle, | |
| 1173 | 0); | |
| 1174 | 0 | if(result != GLOBUS_SUCCESS) |
| 1175 | { | |
| 1176 | 0 | result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement); |
| 1177 | 0 | goto _Dialect_destroy; |
| 1178 | } | |
| 1179 | ||
| 1180 | ||
| 1181 | 0 | if(instance->_Dialect) |
| 1182 | { | |
| 1183 | 0 | found_attrs++; |
| 1184 | } | |
| 1185 | ||
| 1186 | 0 | if(found_attrs == 0 && |
| 1187 | globus_soap_message_deserialize_element_is_nil(message_handle)) | |
| 1188 | { | |
| 1189 | 0 | wst_ClaimsType_destroy(instance); |
| 1190 | ||
| 1191 | 0 | result = globus_soap_message_deserialize_element_end( |
| 1192 | message_handle, | |
| 1193 | element_qname); | |
| 1194 | 0 | if(result != GLOBUS_SUCCESS) |
| 1195 | { | |
| 1196 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1197 | result, element_qname); | |
| 1198 | 0 | goto exit; |
| 1199 | } | |
| 1200 | ||
| 1201 | 0 | *ip = NULL; |
| 1202 | 0 | globus_object_free(globus_error_get(result)); |
| 1203 | 0 | result = GLOBUS_SUCCESS; |
| 1204 | 0 | goto exit; |
| 1205 | } | |
| 1206 | ||
| 1207 | 0 | if(empty_element) |
| 1208 | { | |
| 1209 | 0 | result = globus_soap_message_deserialize_element_end( |
| 1210 | message_handle, | |
| 1211 | element_qname); | |
| 1212 | 0 | if(result != GLOBUS_SUCCESS) |
| 1213 | { | |
| 1214 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1215 | result, element_qname); | |
| 1216 | 0 | goto fail_deserialize; |
| 1217 | } | |
| 1218 | ||
| 1219 | 0 | *ip = instance; |
| 1220 | 0 | goto exit; |
| 1221 | } | |
| 1222 | ||
| 1223 | 0 | result = globus_soap_message_deserialize_element_begin_close( |
| 1224 | message_handle); | |
| 1225 | 0 | if(result != GLOBUS_SUCCESS) |
| 1226 | { | |
| 1227 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1228 | result, element_qname); | |
| 1229 | 0 | goto exit; |
| 1230 | } | |
| 1231 | ||
| 1232 | 0 | result = wst_ClaimsType_deserialize( |
| 1233 | element_qname, | |
| 1234 | instance, | |
| 1235 | message_handle, | |
| 1236 | options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY); | |
| 1237 | 0 | if(result != GLOBUS_SUCCESS) |
| 1238 | { | |
| 1239 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1240 | result, element_qname); | |
| 1241 | 0 | goto exit; |
| 1242 | } | |
| 1243 | ||
| 1244 | 0 | result = globus_soap_message_deserialize_element_end( |
| 1245 | message_handle, | |
| 1246 | element_qname); | |
| 1247 | 0 | if(result != GLOBUS_SUCCESS) |
| 1248 | { | |
| 1249 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1250 | result, element_qname); | |
| 1251 | 0 | goto fail_deserialize; |
| 1252 | } | |
| 1253 | ||
| 1254 | 0 | *ip = instance; |
| 1255 | ||
| 1256 | 0 | goto exit; |
| 1257 | ||
| 1258 | 0 | fail_deserialize: |
| 1259 | ||
| 1260 | 0 | xsd_anyAttributes_destroy: |
| 1261 | 0 | xsd_anyAttributes_destroy(instance->anyAttributes); |
| 1262 | 0 | instance->anyAttributes = NULL; |
| 1263 | 0 | xsd_anyAttributes_after_destroy: |
| 1264 | ||
| 1265 | 0 | _Dialect_destroy: |
| 1266 | /* output_fail_destroy_attribute() */ | |
| 1267 | ||
| 1268 | 0 | if(instance->_Dialect) |
| 1269 | { | |
| 1270 | 0 | xsd_anyURI_destroy( |
| 1271 | instance->_Dialect); | |
| 1272 | 0 | instance->_Dialect = NULL; |
| 1273 | } | |
| 1274 | 0 | xsd_any_array_destroy_contents( |
| 1275 | &instance->any); | |
| 1276 | ||
| 1277 | 0 | any_destroy_array: |
| 1278 | ||
| 1279 | 0 | exit: |
| 1280 | ||
| 1281 | 0 | GlobusSoapMessageDebugExit(); |
| 1282 | 0 | return result; |
| 1283 | } | |
| 1284 | ||
| 1285 | ||
| 1286 | globus_result_t | |
| 1287 | wst_ClaimsType_array_init_contents( | |
| 1288 | wst_ClaimsType_array * array) | |
| 1289 | 0 | { |
| 1290 | 0 | return globus_xsd_generic_array_init_contents( |
| 1291 | (globus_xsd_generic_array_t *) array, | |
| 1292 | &wst_ClaimsType_info); | |
| 1293 | } | |
| 1294 | /* wst_ClaimsType_array_init_contents() */ | |
| 1295 | ||
| 1296 | globus_result_t | |
| 1297 | wst_ClaimsType_array_init( | |
| 1298 | wst_ClaimsType_array ** arr) | |
| 1299 | 0 | { |
| 1300 | 0 | return globus_xsd_generic_array_init( |
| 1301 | (globus_xsd_generic_array_t **) arr, | |
| 1302 | &wst_ClaimsType_info); | |
| 1303 | } | |
| 1304 | /* wst_ClaimsType_array_init() */ | |
| 1305 | ||
| 1306 | void | |
| 1307 | wst_ClaimsType_array_destroy_contents( | |
| 1308 | wst_ClaimsType_array * array) | |
| 1309 | 0 | { |
| 1310 | 0 | globus_xsd_generic_array_destroy_contents( |
| 1311 | (globus_xsd_generic_array_t *) array); | |
| 1312 | 0 | } |
| 1313 | /* wst_ClaimsType_array_destroy_contents() */ | |
| 1314 | ||
| 1315 | void | |
| 1316 | wst_ClaimsType_array_destroy( | |
| 1317 | wst_ClaimsType_array * array) | |
| 1318 | 0 | { |
| 1319 | 0 | globus_xsd_generic_array_destroy( |
| 1320 | (globus_xsd_generic_array_t *) array); | |
| 1321 | 0 | } |
| 1322 | /* wst_ClaimsType_array_destroy() */ | |
| 1323 | ||
| 1324 | globus_result_t | |
| 1325 | wst_ClaimsType_array_copy( | |
| 1326 | wst_ClaimsType_array ** dest_arr, | |
| 1327 | const wst_ClaimsType_array * src_arr) | |
| 1328 | 0 | { |
| 1329 | 0 | return globus_xsd_generic_array_copy( |
| 1330 | (globus_xsd_generic_array_t **) dest_arr, | |
| 1331 | (globus_xsd_generic_array_t *) src_arr); | |
| 1332 | } | |
| 1333 | /* wst_ClaimsType_array_copy() */ | |
| 1334 | ||
| 1335 | globus_result_t | |
| 1336 | wst_ClaimsType_array_copy_contents( | |
| 1337 | wst_ClaimsType_array * dest_arr, | |
| 1338 | const wst_ClaimsType_array * src_arr) | |
| 1339 | 0 | { |
| 1340 | 0 | return globus_xsd_generic_array_copy_contents( |
| 1341 | (globus_xsd_generic_array_t *) dest_arr, | |
| 1342 | (globus_xsd_generic_array_t *) src_arr); | |
| 1343 | } | |
| 1344 | /* wst_ClaimsType_array_copy_contents() */ | |
| 1345 | ||
| 1346 | wst_ClaimsType * | |
| 1347 | wst_ClaimsType_array_push( | |
| 1348 | wst_ClaimsType_array * array) | |
| 1349 | 0 | { |
| 1350 | /* Some contents initializers don't initialize subelments but to set their | |
| 1351 | * values to be NULL | |
| 1352 | */ | |
| 1353 | 0 | if (array->type_info == NULL) |
| 1354 | { | |
| 1355 | 0 | array->type_info = &wst_ClaimsType_info; |
| 1356 | } | |
| 1357 | ||
| 1358 | 0 | return globus_xsd_generic_array_push( |
| 1359 | (globus_xsd_generic_array_t *) array); | |
| 1360 | } | |
| 1361 | /* wst_ClaimsType_array_push() */ | |
| 1362 | ||
| 1363 | globus_result_t | |
| 1364 | wst_ClaimsType_array_serialize( | |
| 1365 | const xsd_QName * element_qname, | |
| 1366 | const wst_ClaimsType_array * array, | |
| 1367 | globus_soap_message_handle_t message, | |
| 1368 | globus_xsd_element_options_t options) | |
| 1369 | 0 | { |
| 1370 | 0 | return globus_xsd_generic_array_serialize( |
| 1371 | element_qname, | |
| 1372 | (const globus_xsd_generic_array_t *) array, | |
| 1373 | message, | |
| 1374 | options); | |
| 1375 | } | |
| 1376 | /* wst_ClaimsType_array_serialize() */ | |
| 1377 | ||
| 1378 | globus_result_t | |
| 1379 | wst_ClaimsType_array_deserialize( | |
| 1380 | const xsd_QName * element_qname, | |
| 1381 | wst_ClaimsType_array * array, | |
| 1382 | globus_soap_message_handle_t message, | |
| 1383 | globus_xsd_element_options_t options) | |
| 1384 | 0 | { |
| 1385 | /* Some initializers set the array's contents to NULL */ | |
| 1386 | 0 | if (array->type_info == NULL) |
| 1387 | { | |
| 1388 | 0 | array->type_info = &wst_ClaimsType_info; |
| 1389 | } | |
| 1390 | 0 | return globus_xsd_generic_array_deserialize( |
| 1391 | element_qname, | |
| 1392 | (globus_xsd_generic_array_t *) array, | |
| 1393 | message, | |
| 1394 | options); |