| 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 from source-type-simple-doclit.tmpl | |
| 20 | */ | |
| 21 | ||
| 22 | #include "xsd_QName.h" | |
| 23 | #include "globus_soap_message.h" | |
| 24 | #include "globus_xsd_type_info.h" | |
| 25 | #include "wst_RequestTypeEnum.h" | |
| 26 | #include "globus_xsd_generic_array.h" | |
| 27 | ||
| 28 | xsd_QName wst_RequestTypeEnum_qname = | |
| 29 | { | |
| 30 | "http://schemas.xmlsoap.org/ws/2004/04/trust", | |
| 31 | "RequestTypeEnum" | |
| 32 | }; | |
| 33 | ||
| 34 | ||
| 35 | xsd_anyURI wst_RequestTypeEnum_Issue = | |
| 36 | "http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue"; | |
| 37 | ||
| 38 | xsd_anyURI wst_RequestTypeEnum_Renew = | |
| 39 | "http://schemas.xmlsoap.org/ws/2004/04/security/trust/Renew"; | |
| 40 | ||
| 41 | xsd_anyURI wst_RequestTypeEnum_Validate = | |
| 42 | "http://schemas.xmlsoap.org/ws/2004/04/security/trust/Validate"; | |
| 43 | ||
| 44 | static | |
| 45 | globus_bool_t | |
| 46 | wst_RequestTypeEnum_l_is_valid_restriction( | |
| 47 | const wst_RequestTypeEnum * instance); | |
| 48 | ||
| 49 | ||
| 50 | static | |
| 51 | globus_result_t | |
| 52 | wst_RequestTypeEnum_serialize_wrapper( | |
| 53 | const xsd_QName * element_qname, | |
| 54 | const void * instance, | |
| 55 | globus_soap_message_handle_t message_handle, | |
| 56 | globus_xsd_element_options_t options) | |
| 57 | 0 | { |
| 58 | 0 | return wst_RequestTypeEnum_serialize( |
| 59 | element_qname, | |
| 60 | (wst_RequestTypeEnum *) instance, | |
| 61 | message_handle, options); | |
| 62 | } | |
| 63 | ||
| 64 | static | |
| 65 | globus_result_t | |
| 66 | wst_RequestTypeEnum_deserialize_pointer_wrapper( | |
| 67 | const xsd_QName * element_qname, | |
| 68 | void ** ip, | |
| 69 | globus_soap_message_handle_t message_handle, | |
| 70 | globus_xsd_element_options_t options) | |
| 71 | 0 | { |
| 72 | 0 | return wst_RequestTypeEnum_deserialize_pointer( |
| 73 | element_qname, | |
| 74 | (wst_RequestTypeEnum **) ip, | |
| 75 | message_handle, options); | |
| 76 | } | |
| 77 | ||
| 78 | globus_result_t | |
| 79 | wst_RequestTypeEnum_init_wrapper(void **object) | |
| 80 | 0 | { |
| 81 | 0 | return wst_RequestTypeEnum_init( |
| 82 | (wst_RequestTypeEnum **) object); | |
| 83 | } | |
| 84 | ||
| 85 | static | |
| 86 | void | |
| 87 | wst_RequestTypeEnum_destroy_wrapper( | |
| 88 | void * object) | |
| 89 | 0 | { |
| 90 | 0 | wst_RequestTypeEnum_destroy( |
| 91 | (wst_RequestTypeEnum *) object); | |
| 92 | 0 | } |
| 93 | ||
| 94 | static | |
| 95 | globus_result_t | |
| 96 | wst_RequestTypeEnum_copy_wrapper( | |
| 97 | void ** dest_obj, | |
| 98 | const void * src_obj) | |
| 99 | 0 | { |
| 100 | 0 | return wst_RequestTypeEnum_copy( |
| 101 | (wst_RequestTypeEnum **) dest_obj, | |
| 102 | (const wst_RequestTypeEnum *) src_obj); | |
| 103 | } | |
| 104 | ||
| 105 | static | |
| 106 | globus_result_t | |
| 107 | wst_RequestTypeEnum_init_contents_wrapper(void *object) | |
| 108 | 0 | { |
| 109 | 0 | return wst_RequestTypeEnum_init_contents( |
| 110 | (wst_RequestTypeEnum *) object); | |
| 111 | } | |
| 112 | ||
| 113 | static | |
| 114 | void | |
| 115 | wst_RequestTypeEnum_destroy_contents_wrapper( | |
| 116 | void * object) | |
| 117 | 0 | { |
| 118 | 0 | wst_RequestTypeEnum_destroy_contents( |
| 119 | (wst_RequestTypeEnum *) object); | |
| 120 | 0 | } |
| 121 | ||
| 122 | static | |
| 123 | globus_result_t | |
| 124 | wst_RequestTypeEnum_copy_contents_wrapper( | |
| 125 | void * dest_obj, | |
| 126 | const void * src_obj) | |
| 127 | 0 | { |
| 128 | 0 | return wst_RequestTypeEnum_copy_contents( |
| 129 | (wst_RequestTypeEnum *) dest_obj, | |
| 130 | (const wst_RequestTypeEnum *) src_obj); | |
| 131 | } | |
| 132 | ||
| 133 | static | |
| 134 | globus_result_t | |
| 135 | wst_RequestTypeEnum_serialize_contents_wrapper( | |
| 136 | const xsd_QName * element_qname, | |
| 137 | const void * instance, | |
| 138 | globus_soap_message_handle_t message_handle, | |
| 139 | globus_xsd_element_options_t options) | |
| 140 | 0 | { |
| 141 | 0 | return wst_RequestTypeEnum_serialize_contents( |
| 142 | element_qname, | |
| 143 | (wst_RequestTypeEnum *) instance, | |
| 144 | message_handle, options); | |
| 145 | } | |
| 146 | ||
| 147 | static | |
| 148 | globus_result_t | |
| 149 | wst_RequestTypeEnum_deserialize_contents_wrapper( | |
| 150 | const xsd_QName * element_qname, | |
| 151 | void ** instance, | |
| 152 | globus_soap_message_handle_t message_handle, | |
| 153 | globus_xsd_element_options_t options) | |
| 154 | 0 | { |
| 155 | globus_result_t result; | |
| 156 | GlobusFuncName(wst_RequestTypeEnum_deserialize_contents_wrapper); | |
| 157 | 0 | GlobusSoapMessageDebugEnter(); |
| 158 | ||
| 159 | 0 | if(!*instance) |
| 160 | { | |
| 161 | 0 | result = wst_RequestTypeEnum_init( |
| 162 | (wst_RequestTypeEnum **)instance); | |
| 163 | 0 | if(result != GLOBUS_SUCCESS) |
| 164 | { | |
| 165 | 0 | goto error; |
| 166 | } | |
| 167 | } | |
| 168 | ||
| 169 | 0 | result = wst_RequestTypeEnum_deserialize_contents( |
| 170 | element_qname, | |
| 171 | *(wst_RequestTypeEnum **)instance, | |
| 172 | message_handle, options); | |
| 173 | 0 | error: |
| 174 | 0 | GlobusSoapMessageDebugExit(); |
| 175 | 0 | return result; |
| 176 | } | |
| 177 | ||
| 178 | static | |
| 179 | globus_result_t | |
| 180 | wst_RequestTypeEnum_array_serialize_wrapper( | |
| 181 | const xsd_QName * element, | |
| 182 | const void * instance, | |
| 183 | globus_soap_message_handle_t message, | |
| 184 | globus_xsd_element_options_t options) | |
| 185 | 0 | { |
| 186 | 0 | return wst_RequestTypeEnum_array_serialize( |
| 187 | element, | |
| 188 | (wst_RequestTypeEnum_array *) instance, | |
| 189 | message, options); | |
| 190 | } | |
| 191 | ||
| 192 | static | |
| 193 | globus_result_t | |
| 194 | wst_RequestTypeEnum_array_deserialize_wrapper( | |
| 195 | const xsd_QName * element_qname, | |
| 196 | void ** inst, | |
| 197 | globus_soap_message_handle_t message, | |
| 198 | globus_xsd_element_options_t options) | |
| 199 | 0 | { |
| 200 | 0 | if(!*inst) |
| 201 | { | |
| 202 | globus_result_t result; | |
| 203 | ||
| 204 | 0 | result = wst_RequestTypeEnum_array_init( |
| 205 | (wst_RequestTypeEnum_array **)inst); | |
| 206 | 0 | if(result != GLOBUS_SUCCESS) |
| 207 | { | |
| 208 | 0 | return result; |
| 209 | } | |
| 210 | } | |
| 211 | ||
| 212 | 0 | return wst_RequestTypeEnum_array_deserialize( |
| 213 | element_qname, | |
| 214 | *(wst_RequestTypeEnum_array **) inst, | |
| 215 | message, options); | |
| 216 | } | |
| 217 | ||
| 218 | static | |
| 219 | globus_result_t | |
| 220 | wst_RequestTypeEnum_array_init_wrapper( | |
| 221 | void ** arr) | |
| 222 | 0 | { |
| 223 | 0 | return wst_RequestTypeEnum_array_init( |
| 224 | (wst_RequestTypeEnum_array **) arr); | |
| 225 | } | |
| 226 | ||
| 227 | static | |
| 228 | void | |
| 229 | wst_RequestTypeEnum_array_destroy_wrapper( | |
| 230 | void * arr) | |
| 231 | 0 | { |
| 232 | 0 | wst_RequestTypeEnum_array_destroy( |
| 233 | (wst_RequestTypeEnum_array *) arr); | |
| 234 | 0 | } |
| 235 | ||
| 236 | static | |
| 237 | globus_result_t | |
| 238 | wst_RequestTypeEnum_array_copy_wrapper( | |
| 239 | void ** dest_arr, | |
| 240 | const void * src_arr) | |
| 241 | 0 | { |
| 242 | 0 | return wst_RequestTypeEnum_array_copy( |
| 243 | (wst_RequestTypeEnum_array **) dest_arr, | |
| 244 | (const wst_RequestTypeEnum_array *) src_arr); | |
| 245 | } | |
| 246 | ||
| 247 | static | |
| 248 | globus_result_t | |
| 249 | wst_RequestTypeEnum_array_init_contents_wrapper( | |
| 250 | void * arr) | |
| 251 | 0 | { |
| 252 | 0 | return wst_RequestTypeEnum_array_init_contents( |
| 253 | (wst_RequestTypeEnum_array *) arr); | |
| 254 | } | |
| 255 | ||
| 256 | static | |
| 257 | void | |
| 258 | wst_RequestTypeEnum_array_destroy_contents_wrapper( | |
| 259 | void * arr) | |
| 260 | 0 | { |
| 261 | 0 | wst_RequestTypeEnum_array_destroy_contents( |
| 262 | (wst_RequestTypeEnum_array *) arr); | |
| 263 | 0 | } |
| 264 | ||
| 265 | static | |
| 266 | globus_result_t | |
| 267 | wst_RequestTypeEnum_array_copy_contents_wrapper( | |
| 268 | void * dest_arr, | |
| 269 | const void * src_arr) | |
| 270 | 0 | { |
| 271 | 0 | return wst_RequestTypeEnum_array_copy_contents( |
| 272 | (wst_RequestTypeEnum_array *) dest_arr, | |
| 273 | (const wst_RequestTypeEnum_array *) src_arr); | |
| 274 | } | |
| 275 | ||
| 276 | static | |
| 277 | void * | |
| 278 | wst_RequestTypeEnum_array_push_wrapper( | |
| 279 | void * array) | |
| 280 | 0 | { |
| 281 | 0 | return (void *) wst_RequestTypeEnum_array_push((wst_RequestTypeEnum_array *) array); |
| 282 | } | |
| 283 | ||
| 284 | struct globus_xsd_type_info_s wst_RequestTypeEnum_array_info = | |
| 285 | { | |
| 286 | &wst_RequestTypeEnum_qname, | |
| 287 | wst_RequestTypeEnum_array_serialize_wrapper, | |
| 288 | wst_RequestTypeEnum_array_deserialize_wrapper, | |
| 289 | wst_RequestTypeEnum_array_init_wrapper, | |
| 290 | wst_RequestTypeEnum_array_destroy_wrapper, | |
| 291 | wst_RequestTypeEnum_array_copy_wrapper, | |
| 292 | wst_RequestTypeEnum_array_init_contents_wrapper, | |
| 293 | wst_RequestTypeEnum_array_destroy_contents_wrapper, | |
| 294 | wst_RequestTypeEnum_array_copy_contents_wrapper, | |
| 295 | sizeof(wst_RequestTypeEnum), | |
| 296 | wst_RequestTypeEnum_array_push_wrapper, | |
| 297 | NULL, | |
| 298 | NULL | |
| 299 | }; | |
| 300 | ||
| 301 | struct globus_xsd_type_info_s wst_RequestTypeEnum_contents_info = | |
| 302 | { | |
| 303 | &wst_RequestTypeEnum_qname, | |
| 304 | wst_RequestTypeEnum_serialize_contents_wrapper, | |
| 305 | wst_RequestTypeEnum_deserialize_contents_wrapper, | |
| 306 | wst_RequestTypeEnum_init_wrapper, | |
| 307 | wst_RequestTypeEnum_destroy_wrapper, | |
| 308 | wst_RequestTypeEnum_copy_wrapper, | |
| 309 | wst_RequestTypeEnum_init_contents_wrapper, | |
| 310 | wst_RequestTypeEnum_destroy_contents_wrapper, | |
| 311 | wst_RequestTypeEnum_copy_contents_wrapper, | |
| 312 | sizeof(wst_RequestTypeEnum), | |
| 313 | NULL, | |
| 314 | NULL, | |
| 315 | NULL | |
| 316 | }; | |
| 317 | ||
| 318 | struct globus_xsd_type_info_s wst_RequestTypeEnum_info = | |
| 319 | { | |
| 320 | &wst_RequestTypeEnum_qname, | |
| 321 | wst_RequestTypeEnum_serialize_wrapper, | |
| 322 | wst_RequestTypeEnum_deserialize_pointer_wrapper, | |
| 323 | wst_RequestTypeEnum_init_wrapper, | |
| 324 | wst_RequestTypeEnum_destroy_wrapper, | |
| 325 | wst_RequestTypeEnum_copy_wrapper, | |
| 326 | wst_RequestTypeEnum_init_contents_wrapper, | |
| 327 | wst_RequestTypeEnum_destroy_contents_wrapper, | |
| 328 | wst_RequestTypeEnum_copy_contents_wrapper, | |
| 329 | sizeof(wst_RequestTypeEnum), | |
| 330 | NULL, | |
| 331 | &wst_RequestTypeEnum_contents_info, | |
| 332 | &wst_RequestTypeEnum_array_info | |
| 333 | }; | |
| 334 | ||
| 335 | globus_result_t | |
| 336 | wst_RequestTypeEnum_init_contents( | |
| 337 | wst_RequestTypeEnum * instance) | |
| 338 | 0 | { |
| 339 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 340 | GlobusFuncName(wst_RequestTypeEnum_init_contents); | |
| 341 | 0 | GlobusSoapMessageDebugEnter(); |
| 342 | ||
| 343 | ||
| 344 | 0 | xsd_anyURI_init_contents(instance); |
| 345 | ||
| 346 | 0 | GlobusSoapMessageDebugExit(); |
| 347 | 0 | return result; |
| 348 | } | |
| 349 | ||
| 350 | globus_result_t | |
| 351 | wst_RequestTypeEnum_init( | |
| 352 | wst_RequestTypeEnum ** object) | |
| 353 | 0 | { |
| 354 | wst_RequestTypeEnum * instance; | |
| 355 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 356 | GlobusFuncName(wst_RequestTypeEnum_init); | |
| 357 | 0 | GlobusSoapMessageDebugEnter(); |
| 358 | ||
| 359 | ||
| 360 | 0 | xsd_anyURI_init(object); |
| 361 | ||
| 362 | 0 | GlobusSoapMessageDebugExit(); |
| 363 | 0 | return result; |
| 364 | } | |
| 365 | ||
| 366 | void | |
| 367 | wst_RequestTypeEnum_destroy( | |
| 368 | wst_RequestTypeEnum * instance) | |
| 369 | 0 | { |
| 370 | GlobusFuncName(wst_RequestTypeEnum_destroy); | |
| 371 | 0 | GlobusSoapMessageDebugEnter(); |
| 372 | ||
| 373 | 0 | if(!instance) |
| 374 | { | |
| 375 | 0 | goto exit; |
| 376 | } | |
| 377 | ||
| 378 | 0 | wst_RequestTypeEnum_destroy_contents(instance); |
| 379 | 0 | globus_free(instance); |
| 380 | ||
| 381 | 0 | exit: |
| 382 | ||
| 383 | 0 | GlobusSoapMessageDebugExit(); |
| 384 | 0 | } |
| 385 | ||
| 386 | void | |
| 387 | wst_RequestTypeEnum_destroy_contents( | |
| 388 | wst_RequestTypeEnum * instance) | |
| 389 | 0 | { |
| 390 | GlobusFuncName(wst_RequestTypeEnum_destroy_contents); | |
| 391 | 0 | GlobusSoapMessageDebugEnter(); |
| 392 | ||
| 393 | 0 | if(instance) |
| 394 | { | |
| 395 | ||
| 396 | ||
| 397 | 0 | xsd_anyURI_destroy_contents(instance); |
| 398 | ||
| 399 | } | |
| 400 | ||
| 401 | 0 | GlobusSoapMessageDebugExit(); |
| 402 | 0 | } |
| 403 | ||
| 404 | globus_result_t | |
| 405 | wst_RequestTypeEnum_copy( | |
| 406 | wst_RequestTypeEnum ** dest_obj, | |
| 407 | const wst_RequestTypeEnum * src_obj) | |
| 408 | 0 | { |
| 409 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 410 | wst_RequestTypeEnum * instance; | |
| 411 | GlobusFuncName(wst_RequestTypeEnum_copy); | |
| 412 | ||
| 413 | 0 | GlobusSoapMessageDebugEnter(); |
| 414 | ||
| 415 | 0 | instance = malloc(sizeof(wst_RequestTypeEnum)); |
| 416 | 0 | if (instance == NULL) |
| 417 | { | |
| 418 | 0 | GlobusSoapMessageDebugExit(); |
| 419 | 0 | return GlobusSoapMessageErrorOutOfMemory; |
| 420 | } | |
| 421 | ||
| 422 | 0 | result = wst_RequestTypeEnum_copy_contents(instance, src_obj); |
| 423 | 0 | if(result != GLOBUS_SUCCESS) |
| 424 | { | |
| 425 | 0 | globus_free(instance); |
| 426 | 0 | GlobusSoapMessageDebugExit(); |
| 427 | 0 | return GlobusSoapMessageErrorOutOfMemory; |
| 428 | } | |
| 429 | ||
| 430 | 0 | *dest_obj = instance; |
| 431 | 0 | GlobusSoapMessageDebugExit(); |
| 432 | 0 | return result; |
| 433 | } | |
| 434 | ||
| 435 | globus_result_t | |
| 436 | wst_RequestTypeEnum_copy_contents( | |
| 437 | wst_RequestTypeEnum * instance, | |
| 438 | const wst_RequestTypeEnum * src_obj) | |
| 439 | 0 | { |
| 440 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 441 | GlobusFuncName(wst_RequestTypeEnum_copy_contents); | |
| 442 | ||
| 443 | 0 | GlobusSoapMessageDebugEnter(); |
| 444 | ||
| 445 | ||
| 446 | 0 | result = xsd_anyURI_copy_contents( |
| 447 | instance, src_obj); | |
| 448 | ||
| 449 | goto exit; | |
| 450 | ||
| 451 | 0 | fail_copy: |
| 452 | ||
| 453 | ||
| 454 | 0 | exit: |
| 455 | ||
| 456 | 0 | GlobusSoapMessageDebugExit(); |
| 457 | 0 | return result; |
| 458 | } | |
| 459 | ||
| 460 | ||
| 461 | ||
| 462 | globus_result_t | |
| 463 | wst_RequestTypeEnum_serialize_contents( | |
| 464 | const xsd_QName * element_qname, /* ignored */ | |
| 465 | const wst_RequestTypeEnum * inst, | |
| 466 | globus_soap_message_handle_t message_handle, | |
| 467 | globus_xsd_element_options_t options) | |
| 468 | 0 | { |
| 469 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 470 | GlobusFuncName(wst_RequestTypeEnum_serialize_contents); | |
| 471 | 0 | GlobusSoapMessageDebugEnter(); |
| 472 | ||
| 473 | 0 | result = wst_RequestTypeEnum_serialize( |
| 474 | NULL, | |
| 475 | inst, | |
| 476 | message_handle, | |
| 477 | options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY); | |
| 478 | 0 | if(result != GLOBUS_SUCCESS) |
| 479 | { | |
| 480 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 481 | result, NULL, element_qname); | |
| 482 | 0 | goto exit; |
| 483 | } | |
| 484 | ||
| 485 | 0 | exit: |
| 486 | ||
| 487 | 0 | GlobusSoapMessageDebugExit(); |
| 488 | 0 | return result; |
| 489 | } | |
| 490 | ||
| 491 | ||
| 492 | ||
| 493 | globus_result_t | |
| 494 | wst_RequestTypeEnum_serialize( | |
| 495 | const xsd_QName * element_qname, | |
| 496 | const wst_RequestTypeEnum * instance, | |
| 497 | globus_soap_message_handle_t message_handle, | |
| 498 | globus_xsd_element_options_t options) | |
| 499 | 0 | { |
| 500 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 501 | xsd_QName subelement; | |
| 502 | 0 | globus_list_t * any_attr_keys = NULL; |
| 503 | 0 | globus_list_t * any_attr_keys_iterator = NULL; |
| 504 | 0 | xsd_QName * type_attr = NULL; |
| 505 | 0 | char * type_value = NULL; |
| 506 | 0 | char * prefix = NULL; |
| 507 | int prefix_created; | |
| 508 | 0 | int define_prefix = 0; |
| 509 | int i; | |
| 510 | 0 | char * type_attr_prefix = NULL; |
| 511 | ||
| 512 | GlobusFuncName(wst_RequestTypeEnum_serialize); | |
| 513 | 0 | GlobusSoapMessageDebugEnter(); |
| 514 | ||
| 515 | ||
| 516 | 0 | if (!wst_RequestTypeEnum_l_is_valid_restriction(instance)) |
| 517 | { | |
| 518 | 0 | result = GlobusSoapMessageErrorSerializeFailed(result, |
| 519 | NULL, | |
| 520 | element_qname); | |
| 521 | ||
| 522 | 0 | goto exit; |
| 523 | ||
| 524 | } | |
| 525 | ||
| 526 | 0 | result = xsd_anyURI_serialize( |
| 527 | element_qname, | |
| 528 | instance, | |
| 529 | message_handle, | |
| 530 | options); | |
| 531 | ||
| 532 | 0 | exit: |
| 533 | ||
| 534 | 0 | if(any_attr_keys) |
| 535 | { | |
| 536 | 0 | globus_list_free(any_attr_keys); |
| 537 | } | |
| 538 | ||
| 539 | 0 | GlobusSoapMessageDebugExit(); |
| 540 | 0 | return result; |
| 541 | } | |
| 542 | ||
| 543 | ||
| 544 | ||
| 545 | globus_result_t | |
| 546 | wst_RequestTypeEnum_deserialize_contents( | |
| 547 | const xsd_QName * element_qname, /* ignored */ | |
| 548 | wst_RequestTypeEnum * inst, | |
| 549 | globus_soap_message_handle_t message_handle, | |
| 550 | globus_xsd_element_options_t options) | |
| 551 | 0 | { |
| 552 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 553 | GlobusFuncName(wst_RequestTypeEnum_deserialize_contents); | |
| 554 | 0 | GlobusSoapMessageDebugEnter(); |
| 555 | ||
| 556 | 0 | result = wst_RequestTypeEnum_deserialize( |
| 557 | NULL, | |
| 558 | inst, | |
| 559 | message_handle, | |
| 560 | options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY); | |
| 561 | 0 | if(result != GLOBUS_SUCCESS) |
| 562 | { | |
| 563 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 564 | result, element_qname); | |
| 565 | 0 | goto exit; |
| 566 | } | |
| 567 | ||
| 568 | 0 | exit: |
| 569 | ||
| 570 | 0 | GlobusSoapMessageDebugExit(); |
| 571 | 0 | return result; |
| 572 | } | |
| 573 | ||
| 574 | ||
| 575 | ||
| 576 | globus_result_t | |
| 577 | wst_RequestTypeEnum_deserialize( | |
| 578 | const xsd_QName * element_qname, | |
| 579 | wst_RequestTypeEnum * instance, | |
| 580 | globus_soap_message_handle_t message_handle, | |
| 581 | globus_xsd_element_options_t options) | |
| 582 | 0 | { |
| 583 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 584 | xsd_QName subelement; | |
| 585 | GlobusFuncName(wst_RequestTypeEnum_deserialize); | |
| 586 | 0 | GlobusSoapMessageDebugEnter(); |
| 587 | ||
| 588 | ||
| 589 | 0 | result = xsd_anyURI_deserialize(element_qname, |
| 590 | instance, message_handle, options); | |
| 591 | ||
| 592 | 0 | if (result != GLOBUS_SUCCESS) |
| 593 | { | |
| 594 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 595 | result, element_qname); | |
| 596 | 0 | goto exit; |
| 597 | } | |
| 598 | ||
| 599 | 0 | if (!wst_RequestTypeEnum_l_is_valid_restriction(instance)) |
| 600 | { | |
| 601 | 0 | result = GlobusSoapMessageErrorDeserializeFailed(result, |
| 602 | element_qname); | |
| 603 | ||
| 604 | } | |
| 605 | ||
| 606 | ||
| 607 | 0 | exit: |
| 608 | ||
| 609 | 0 | GlobusSoapMessageDebugExit(); |
| 610 | 0 | return result; |
| 611 | } | |
| 612 | ||
| 613 | ||
| 614 | ||
| 615 | globus_result_t | |
| 616 | wst_RequestTypeEnum_deserialize_pointer( | |
| 617 | const xsd_QName * element_qname, | |
| 618 | wst_RequestTypeEnum ** ip, | |
| 619 | globus_soap_message_handle_t message_handle, | |
| 620 | globus_xsd_element_options_t options) | |
| 621 | 0 | { |
| 622 | 0 | wst_RequestTypeEnum * instance = NULL; |
| 623 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 624 | xsd_QName subelement; | |
| 625 | GlobusFuncName(wst_RequestTypeEnum_deserialize_pointer); | |
| 626 | 0 | GlobusSoapMessageDebugEnter(); |
| 627 | ||
| 628 | 0 | *ip = NULL; |
| 629 | ||
| 630 | ||
| 631 | 0 | result = xsd_anyURI_deserialize_pointer( |
| 632 | element_qname, | |
| 633 | ip, message_handle, options); | |
| 634 | ||
| 635 | 0 | if (result != GLOBUS_SUCCESS) |
| 636 | { | |
| 637 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 638 | result, element_qname); | |
| 639 | 0 | goto exit; |
| 640 | } | |
| 641 | ||
| 642 | 0 | if (*ip && !wst_RequestTypeEnum_l_is_valid_restriction(*ip)) |
| 643 | { | |
| 644 | 0 | result = GlobusSoapMessageErrorDeserializeFailed(result, |
| 645 | element_qname); | |
| 646 | ||
| 647 | } | |
| 648 | ||
| 649 | ||
| 650 | 0 | exit: |
| 651 | ||
| 652 | 0 | GlobusSoapMessageDebugExit(); |
| 653 | 0 | return result; |
| 654 | } | |
| 655 | ||
| 656 | ||
| 657 | ||
| 658 | globus_result_t | |
| 659 | wst_RequestTypeEnum_array_init_contents( | |
| 660 | wst_RequestTypeEnum_array * array) | |
| 661 | 0 | { |
| 662 | GlobusFuncName(wst_RequestTypeEnum_array_init_contents); | |
| 663 | 0 | GlobusSoapMessageDebugEnter(); |
| 664 | ||
| 665 | 0 | array->elements = NULL; |
| 666 | 0 | array->length = 0; |
| 667 | 0 | array->type_info = &wst_RequestTypeEnum_info; |
| 668 | ||
| 669 | 0 | GlobusSoapMessageDebugExit(); |
| 670 | 0 | return GLOBUS_SUCCESS; |
| 671 | } | |
| 672 | ||
| 673 | globus_result_t | |
| 674 | wst_RequestTypeEnum_array_init( | |
| 675 | wst_RequestTypeEnum_array ** arr) | |
| 676 | 0 | { |
| 677 | 0 | return globus_xsd_generic_array_init( |
| 678 | (globus_xsd_generic_array_t **) arr, | |
| 679 | &wst_RequestTypeEnum_info); | |
| 680 | } | |
| 681 | /* wst_RequestTypeEnum_array_info() */ | |
| 682 | ||
| 683 | void | |
| 684 | wst_RequestTypeEnum_array_destroy_contents( | |
| 685 | wst_RequestTypeEnum_array * array) | |
| 686 | 0 | { |
| 687 | 0 | globus_xsd_generic_array_destroy_contents( |
| 688 | (globus_xsd_generic_array_t *) array); | |
| 689 | 0 | } |
| 690 | ||
| 691 | void | |
| 692 | wst_RequestTypeEnum_array_destroy( | |
| 693 | wst_RequestTypeEnum_array * array) | |
| 694 | 0 | { |
| 695 | ||
| 696 | 0 | globus_xsd_generic_array_destroy( |
| 697 | (globus_xsd_generic_array_t *) array); | |
| 698 | 0 | } |
| 699 | ||
| 700 | globus_result_t | |
| 701 | wst_RequestTypeEnum_array_copy( | |
| 702 | wst_RequestTypeEnum_array ** dest_arr, | |
| 703 | const wst_RequestTypeEnum_array * src_arr) | |
| 704 | 0 | { |
| 705 | 0 | return globus_xsd_generic_array_copy( |
| 706 | (globus_xsd_generic_array_t **) dest_arr, | |
| 707 | (const globus_xsd_generic_array_t *) src_arr); | |
| 708 | } | |
| 709 | ||
| 710 | globus_result_t | |
| 711 | wst_RequestTypeEnum_array_copy_contents( | |
| 712 | wst_RequestTypeEnum_array * dest_arr, | |
| 713 | const wst_RequestTypeEnum_array * src_arr) | |
| 714 | 0 | { |
| 715 | 0 | return globus_xsd_generic_array_copy_contents( |
| 716 | (globus_xsd_generic_array_t *) dest_arr, | |
| 717 | (const globus_xsd_generic_array_t *) src_arr); | |
| 718 | } | |
| 719 | ||
| 720 | wst_RequestTypeEnum * | |
| 721 | wst_RequestTypeEnum_array_push( | |
| 722 | wst_RequestTypeEnum_array * array) | |
| 723 | 0 | { |
| 724 | /* Some contents initializers don't initialize subelments but to set their | |
| 725 | * values to be NULL | |
| 726 | */ | |
| 727 | 0 | if (array->type_info == NULL) |
| 728 | { | |
| 729 | 0 | array->type_info = &wst_RequestTypeEnum_info; |
| 730 | } | |
| 731 | 0 | return globus_xsd_generic_array_push( |
| 732 | (globus_xsd_generic_array_t *) array); | |
| 733 | } | |
| 734 | ||
| 735 | ||
| 736 | globus_result_t | |
| 737 | wst_RequestTypeEnum_array_serialize( | |
| 738 | const xsd_QName * element_qname, | |
| 739 | const wst_RequestTypeEnum_array * array, | |
| 740 | globus_soap_message_handle_t message, | |
| 741 | globus_xsd_element_options_t options) | |
| 742 | 0 | { |
| 743 | 0 | return globus_xsd_generic_array_serialize( |
| 744 | element_qname, | |
| 745 | (const globus_xsd_generic_array_t *) array, | |
| 746 | message, | |
| 747 | options); | |
| 748 | } | |
| 749 | ||
| 750 | globus_result_t | |
| 751 | wst_RequestTypeEnum_array_deserialize( | |
| 752 | const xsd_QName * element_qname, | |
| 753 | wst_RequestTypeEnum_array * array, | |
| 754 | globus_soap_message_handle_t message, | |
| 755 | globus_xsd_element_options_t options) | |
| 756 | 0 | { |
| 757 | /* Some initializers set the array contents to NULL */ | |
| 758 | 0 | if (array->type_info == NULL) |
| 759 | { | |
| 760 | 0 | array->type_info = &wst_RequestTypeEnum_info; |
| 761 | } | |
| 762 | ||
| 763 | 0 | return globus_xsd_generic_array_deserialize( |
| 764 | element_qname, | |
| 765 | (globus_xsd_generic_array_t *) array, | |
| 766 | message, | |
| 767 | options); | |
| 768 | } | |
| 769 | ||
| 770 | ||
| 771 | globus_result_t | |
| 772 | wst_RequestTypeEnum_serialize_attribute( | |
| 773 | const xsd_QName * attr_qname, | |
| 774 | const wst_RequestTypeEnum * val, | |
| 775 | globus_soap_message_handle_t handle, | |
| 776 | globus_xsd_element_options_t options) | |
| 777 | 0 | { |
| 778 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 779 | GlobusFuncName(wst_RequestTypeEnum_serialize_attribute); | |
| 780 | 0 | GlobusSoapMessageDebugEnter(); |
| 781 | ||
| 782 | ||
| 783 | 0 | result = xsd_anyURI_serialize_attribute( |
| 784 | attr_qname, (xsd_anyURI *)val, handle, options); | |
| 785 | 0 | if(result != GLOBUS_SUCCESS) |
| 786 | { | |
| 787 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 788 | result, NULL, attr_qname); | |
| 789 | 0 | goto exit; |
| 790 | } | |
| 791 | ||
| 792 | 0 | exit: |
| 793 | ||
| 794 | 0 | GlobusSoapMessageDebugExit(); |
| 795 | 0 | return result; |
| 796 | } | |
| 797 | ||
| 798 | globus_result_t | |
| 799 | wst_RequestTypeEnum_deserialize_attribute( | |
| 800 | const xsd_QName * attr_qname, | |
| 801 | wst_RequestTypeEnum * instance, | |
| 802 | globus_soap_message_handle_t message, | |
| 803 | globus_xsd_element_options_t options) | |
| 804 | 0 | { |
| 805 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 806 | GlobusFuncName(wst_RequestTypeEnum_deserialize_attribute); | |
| 807 | 0 | GlobusSoapMessageDebugEnter(); |
| 808 | ||
| 809 | ||
| 810 | 0 | result = xsd_anyURI_deserialize_attribute( |
| 811 | attr_qname, (xsd_anyURI *)instance, message, options); | |
| 812 | ||
| 813 | 0 | if(result != GLOBUS_SUCCESS) |
| 814 | { | |
| 815 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 816 | result, attr_qname); | |
| 817 | 0 | goto exit; |
| 818 | } | |
| 819 | ||
| 820 | 0 | exit: |
| 821 | ||
| 822 | 0 | GlobusSoapMessageDebugExit(); |
| 823 | 0 | return result; |
| 824 | } | |
| 825 | ||
| 826 | globus_result_t | |
| 827 | wst_RequestTypeEnum_deserialize_attribute_pointer( | |
| 828 | const xsd_QName * attr_qname, | |
| 829 | wst_RequestTypeEnum ** instance, | |
| 830 | globus_soap_message_handle_t message, | |
| 831 | globus_xsd_element_options_t options) | |
| 832 | 0 | { |
| 833 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 834 | GlobusFuncName(wst_RequestTypeEnum_deserialize_attribute_pointer); | |
| 835 | 0 | GlobusSoapMessageDebugEnter(); |
| 836 | ||
| 837 | ||
| 838 | 0 | result = xsd_anyURI_deserialize_attribute_pointer( |
| 839 | attr_qname, (xsd_anyURI **)instance, message, options); | |
| 840 | ||
| 841 | 0 | if(GlobusSoapMessageStatusAttributeNotFoundCheck(result)) |
| 842 | { | |
| 843 | 0 | result = GLOBUS_SUCCESS; |
| 844 | 0 | wst_RequestTypeEnum_destroy(*instance); |
| 845 | 0 | *instance = NULL; |
| 846 | goto exit; | |
| 847 | } | |
| 848 | ||
| 849 | 0 | exit: |
| 850 | ||
| 851 | 0 | GlobusSoapMessageDebugExit(); |
| 852 | 0 | return result; |
| 853 | } | |
| 854 | ||
| 855 | ||
| 856 | static | |
| 857 | xsd_anyURI * wst_RequestTypeEnum_l_restrictions[] = | |
| 858 | { | |
| 859 | &wst_RequestTypeEnum_Issue, | |
| 860 | ||
| 861 | ||
| 862 | &wst_RequestTypeEnum_Renew, | |
| 863 | ||
| 864 | ||
| 865 | &wst_RequestTypeEnum_Validate, | |
| 866 | ||
| 867 | ||
| 868 | ||
| 869 | NULL | |
| 870 | }; | |
| 871 | ||
| 872 | globus_bool_t | |
| 873 | wst_RequestTypeEnum_l_is_valid_restriction( | |
| 874 | const wst_RequestTypeEnum * instance) | |
| 875 | 0 | { |
| 876 | int i; | |
| 877 | 0 | globus_bool_t valid = GLOBUS_FALSE; |
| 878 | GlobusFuncName(wst_RequestTypeEnum_l_validate_restriction); | |
| 879 | 0 | GlobusSoapMessageDebugEnter(); |
| 880 | ||
| 881 | ||
| 882 | ||
| 883 | 0 | for (i = 0; wst_RequestTypeEnum_l_restrictions[i] != NULL; i++) |
| 884 | { | |
| 885 | ||
| 886 | 0 | if (strcmp(*wst_RequestTypeEnum_l_restrictions[i], *instance) == 0) |
| 887 | { | |
| 888 | 0 | valid = GLOBUS_TRUE; |
| 889 | ||
| 890 | 0 | break; |
| 891 | } | |
| 892 | ||
| 893 | } | |
| 894 | ||
| 895 | 0 | GlobusSoapMessageDebugExit(); |
| 896 | ||
| 897 | 0 | return valid; |