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