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