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