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