| 1 | /* | |
| 2 | * Copyright 1999-2006 University of Chicago | |
| 3 | * | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | * See the License for the specific language governing permissions and | |
| 14 | * limitations under the License. | |
| 15 | */ | |
| 16 | ||
| 17 | ||
| 18 | /* | |
| 19 | * This file is automatically generated by the Globus WSDLtoC converter | |
| 20 | */ | |
| 21 | ||
| 22 | #include "xsd_QName.h" | |
| 23 | #include "globus_soap_message.h" | |
| 24 | #include "globus_xsd_type_info.h" | |
| 25 | #include "ds_TransformsType.h" | |
| 26 | ||
| 27 | #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL | |
| 28 | xsd_QName ds_TransformsType_qname = | |
| 29 | { | |
| 30 | DS_TRANSFORMSTYPE_NS, | |
| 31 | DS_TRANSFORMSTYPE_LOCAL | |
| 32 | }; | |
| 33 | #endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */ | |
| 34 | ||
| 35 | globus_result_t | |
| 36 | ds_TransformsType_serialize_wrapper( | |
| 37 | const xsd_QName * element_qname, | |
| 38 | const void * instance, | |
| 39 | globus_soap_message_handle_t message_handle, | |
| 40 | globus_xsd_element_options_t options) | |
| 41 | 0 | { |
| 42 | 0 | return ds_TransformsType_serialize( |
| 43 | element_qname, | |
| 44 | (const ds_TransformsType *) instance, | |
| 45 | message_handle, options); | |
| 46 | } | |
| 47 | ||
| 48 | globus_result_t | |
| 49 | ds_TransformsType_deserialize_pointer_wrapper( | |
| 50 | const xsd_QName * element_qname, | |
| 51 | void ** ip, | |
| 52 | globus_soap_message_handle_t message_handle, | |
| 53 | globus_xsd_element_options_t options) | |
| 54 | 0 | { |
| 55 | 0 | return ds_TransformsType_deserialize_pointer( |
| 56 | element_qname, | |
| 57 | (ds_TransformsType **) ip, | |
| 58 | message_handle, options); | |
| 59 | } | |
| 60 | ||
| 61 | globus_result_t | |
| 62 | ds_TransformsType_init_wrapper(void **object) | |
| 63 | 0 | { |
| 64 | 0 | return ds_TransformsType_init( |
| 65 | (ds_TransformsType **) object); | |
| 66 | } | |
| 67 | ||
| 68 | void | |
| 69 | ds_TransformsType_destroy_wrapper( | |
| 70 | void * object) | |
| 71 | 0 | { |
| 72 | 0 | ds_TransformsType_destroy( |
| 73 | (ds_TransformsType *) object); | |
| 74 | } | |
| 75 | ||
| 76 | globus_result_t | |
| 77 | ds_TransformsType_copy_wrapper( | |
| 78 | void ** dest_obj, | |
| 79 | const void * src_obj) | |
| 80 | 0 | { |
| 81 | 0 | return ds_TransformsType_copy( |
| 82 | (ds_TransformsType **) dest_obj, | |
| 83 | (ds_TransformsType *) src_obj); | |
| 84 | } | |
| 85 | ||
| 86 | globus_result_t | |
| 87 | ds_TransformsType_init_contents_wrapper(void *object) | |
| 88 | 0 | { |
| 89 | 0 | return ds_TransformsType_init_contents( |
| 90 | (ds_TransformsType *) object); | |
| 91 | } | |
| 92 | ||
| 93 | void | |
| 94 | ds_TransformsType_destroy_contents_wrapper( | |
| 95 | void * object) | |
| 96 | 0 | { |
| 97 | 0 | ds_TransformsType_destroy_contents( |
| 98 | (ds_TransformsType *) object); | |
| 99 | } | |
| 100 | ||
| 101 | globus_result_t | |
| 102 | ds_TransformsType_copy_contents_wrapper( | |
| 103 | void * dest_obj, | |
| 104 | const void * src_obj) | |
| 105 | 0 | { |
| 106 | 0 | return ds_TransformsType_copy_contents( |
| 107 | (ds_TransformsType *) dest_obj, | |
| 108 | (const ds_TransformsType *) src_obj); | |
| 109 | } | |
| 110 | ||
| 111 | globus_result_t | |
| 112 | ds_TransformsType_serialize_contents_wrapper( | |
| 113 | const xsd_QName * element_qname, | |
| 114 | const void * instance, | |
| 115 | globus_soap_message_handle_t message_handle, | |
| 116 | globus_xsd_element_options_t options) | |
| 117 | 0 | { |
| 118 | 0 | return ds_TransformsType_serialize_contents( |
| 119 | element_qname, | |
| 120 | (ds_TransformsType *) instance, | |
| 121 | message_handle, options); | |
| 122 | } | |
| 123 | ||
| 124 | globus_result_t | |
| 125 | ds_TransformsType_deserialize_contents_wrapper( | |
| 126 | const xsd_QName * element_qname, | |
| 127 | void ** instance, | |
| 128 | globus_soap_message_handle_t message_handle, | |
| 129 | globus_xsd_element_options_t options) | |
| 130 | 0 | { |
| 131 | 0 | globus_result_t result; |
| 132 | 0 | GlobusFuncName(ds_TransformsType_deserialize_contents_wrapper); |
| 133 | 0 | GlobusSoapMessageDebugEnter(); |
| 134 | ||
| 135 | 0 | if(!*instance) |
| 136 | { | |
| 137 | 0 | result = ds_TransformsType_init( |
| 138 | (ds_TransformsType **)instance); | |
| 139 | 0 | if(result != GLOBUS_SUCCESS) |
| 140 | { | |
| 141 | 0 | goto error; |
| 142 | } | |
| 143 | } | |
| 144 | ||
| 145 | 0 | result = ds_TransformsType_deserialize_contents( |
| 146 | element_qname, | |
| 147 | *(ds_TransformsType **)instance, | |
| 148 | message_handle, options); | |
| 149 | error: | |
| 150 | 0 | GlobusSoapMessageDebugExit(); |
| 151 | 0 | return result; |
| 152 | } | |
| 153 | ||
| 154 | globus_result_t | |
| 155 | ds_TransformsType_array_serialize_wrapper( | |
| 156 | const xsd_QName * element, | |
| 157 | const void * instance, | |
| 158 | globus_soap_message_handle_t message, | |
| 159 | globus_xsd_element_options_t options) | |
| 160 | 0 | { |
| 161 | 0 | return ds_TransformsType_array_serialize( |
| 162 | element, | |
| 163 | (ds_TransformsType_array *) instance, | |
| 164 | message, options); | |
| 165 | } | |
| 166 | ||
| 167 | globus_result_t | |
| 168 | ds_TransformsType_array_deserialize_wrapper( | |
| 169 | const xsd_QName * element_qname, | |
| 170 | void ** inst, | |
| 171 | globus_soap_message_handle_t message, | |
| 172 | globus_xsd_element_options_t options) | |
| 173 | 0 | { |
| 174 | 0 | if(!*inst) |
| 175 | { | |
| 176 | 0 | globus_result_t result; |
| 177 | ||
| 178 | 0 | result = ds_TransformsType_array_init( |
| 179 | (ds_TransformsType_array **)inst); | |
| 180 | 0 | if(result != GLOBUS_SUCCESS) |
| 181 | { | |
| 182 | 0 | return result; |
| 183 | } | |
| 184 | } | |
| 185 | ||
| 186 | 0 | return ds_TransformsType_array_deserialize( |
| 187 | element_qname, | |
| 188 | *(ds_TransformsType_array **) inst, | |
| 189 | message, options); | |
| 190 | } | |
| 191 | ||
| 192 | globus_result_t | |
| 193 | ds_TransformsType_array_init_wrapper( | |
| 194 | void ** arr) | |
| 195 | 0 | { |
| 196 | 0 | return ds_TransformsType_array_init( |
| 197 | (ds_TransformsType_array **) arr); | |
| 198 | } | |
| 199 | ||
| 200 | void | |
| 201 | ds_TransformsType_array_destroy_wrapper( | |
| 202 | void * arr) | |
| 203 | 0 | { |
| 204 | 0 | ds_TransformsType_array_destroy( |
| 205 | (ds_TransformsType_array *) arr); | |
| 206 | } | |
| 207 | ||
| 208 | globus_result_t | |
| 209 | ds_TransformsType_array_copy_wrapper( | |
| 210 | void ** dest_arr, | |
| 211 | const void * src_arr) | |
| 212 | 0 | { |
| 213 | 0 | return ds_TransformsType_array_copy( |
| 214 | (ds_TransformsType_array **) dest_arr, | |
| 215 | (const ds_TransformsType_array *) src_arr); | |
| 216 | } | |
| 217 | ||
| 218 | globus_result_t | |
| 219 | ds_TransformsType_array_init_contents_wrapper( | |
| 220 | void * arr) | |
| 221 | 0 | { |
| 222 | 0 | return ds_TransformsType_array_init_contents( |
| 223 | (ds_TransformsType_array *) arr); | |
| 224 | } | |
| 225 | ||
| 226 | void | |
| 227 | ds_TransformsType_array_destroy_contents_wrapper( | |
| 228 | void * arr) | |
| 229 | 0 | { |
| 230 | 0 | ds_TransformsType_array_destroy_contents( |
| 231 | (ds_TransformsType_array *) arr); | |
| 232 | } | |
| 233 | ||
| 234 | globus_result_t | |
| 235 | ds_TransformsType_array_copy_contents_wrapper( | |
| 236 | void * dest_arr, | |
| 237 | const void * src_arr) | |
| 238 | 0 | { |
| 239 | 0 | return ds_TransformsType_array_copy_contents( |
| 240 | (ds_TransformsType_array *) dest_arr, | |
| 241 | (const ds_TransformsType_array *) src_arr); | |
| 242 | } | |
| 243 | ||
| 244 | struct globus_xsd_type_info_s ds_TransformsType_contents_info = | |
| 245 | { | |
| 246 | &ds_TransformsType_qname, | |
| 247 | ds_TransformsType_serialize_contents_wrapper, | |
| 248 | ds_TransformsType_deserialize_contents_wrapper, | |
| 249 | ds_TransformsType_init_wrapper, | |
| 250 | ds_TransformsType_destroy_wrapper, | |
| 251 | ds_TransformsType_copy_wrapper, | |
| 252 | ds_TransformsType_init_contents_wrapper, | |
| 253 | ds_TransformsType_destroy_contents_wrapper, | |
| 254 | ds_TransformsType_copy_contents_wrapper, | |
| 255 | sizeof(ds_TransformsType), | |
| 256 | NULL, | |
| 257 | NULL, | |
| 258 | NULL | |
| 259 | }; | |
| 260 | ||
| 261 | struct globus_xsd_type_info_s ds_TransformsType_array_info = | |
| 262 | { | |
| 263 | &ds_TransformsType_qname, | |
| 264 | ds_TransformsType_array_serialize_wrapper, | |
| 265 | ds_TransformsType_array_deserialize_wrapper, | |
| 266 | ds_TransformsType_array_init_wrapper, | |
| 267 | ds_TransformsType_array_destroy_wrapper, | |
| 268 | ds_TransformsType_array_copy_wrapper, | |
| 269 | ds_TransformsType_array_init_contents_wrapper, | |
| 270 | ds_TransformsType_array_destroy_contents_wrapper, | |
| 271 | ds_TransformsType_array_copy_contents_wrapper, | |
| 272 | sizeof(ds_TransformsType), | |
| 273 | ds_TransformsType_array_push_wrapper, | |
| 274 | NULL, | |
| 275 | NULL | |
| 276 | }; | |
| 277 | ||
| 278 | struct globus_xsd_type_info_s ds_TransformsType_info = | |
| 279 | { | |
| 280 | &ds_TransformsType_qname, | |
| 281 | ds_TransformsType_serialize_wrapper, | |
| 282 | ds_TransformsType_deserialize_pointer_wrapper, | |
| 283 | ds_TransformsType_init_wrapper, | |
| 284 | ds_TransformsType_destroy_wrapper, | |
| 285 | ds_TransformsType_copy_wrapper, | |
| 286 | ds_TransformsType_init_contents_wrapper, | |
| 287 | ds_TransformsType_destroy_contents_wrapper, | |
| 288 | ds_TransformsType_copy_contents_wrapper, | |
| 289 | sizeof(ds_TransformsType), | |
| 290 | NULL, | |
| 291 | &ds_TransformsType_contents_info, | |
| 292 | &ds_TransformsType_array_info | |
| 293 | }; | |
| 294 | ||
| 295 | globus_result_t | |
| 296 | ds_TransformsType_init_contents( | |
| 297 | ds_TransformsType * instance) | |
| 298 | 0 | { |
| 299 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 300 | 0 | GlobusFuncName(ds_TransformsType_init_contents); |
| 301 | 0 | GlobusSoapMessageDebugEnter(); |
| 302 | ||
| 303 | 0 | memset(instance, 0, sizeof(ds_TransformsType)); |
| 304 | ||
| 305 | 0 | GlobusSoapMessageDebugExit(); |
| 306 | 0 | return result; |
| 307 | } | |
| 308 | ||
| 309 | globus_result_t | |
| 310 | ds_TransformsType_init( | |
| 311 | ds_TransformsType ** object) | |
| 312 | 0 | { |
| 313 | 0 | ds_TransformsType * instance; |
| 314 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 315 | 0 | GlobusFuncName(ds_TransformsType_init); |
| 316 | 0 | GlobusSoapMessageDebugEnter(); |
| 317 | ||
| 318 | 0 | instance = globus_malloc(sizeof(ds_TransformsType)); |
| 319 | 0 | if(!instance) |
| 320 | { | |
| 321 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 322 | 0 | goto exit; |
| 323 | } | |
| 324 | ||
| 325 | 0 | memset(instance, 0, sizeof(ds_TransformsType)); |
| 326 | ||
| 327 | 0 | *object = instance; |
| 328 | ||
| 329 | exit: | |
| 330 | 0 | GlobusSoapMessageDebugExit(); |
| 331 | 0 | return result; |
| 332 | } | |
| 333 | ||
| 334 | void | |
| 335 | ds_TransformsType_destroy( | |
| 336 | ds_TransformsType * instance) | |
| 337 | 0 | { |
| 338 | 0 | GlobusFuncName(ds_TransformsType_destroy); |
| 339 | 0 | GlobusSoapMessageDebugEnter(); |
| 340 | ||
| 341 | 0 | if(!instance) |
| 342 | { | |
| 343 | 0 | goto exit; |
| 344 | } | |
| 345 | ||
| 346 | 0 | ds_TransformsType_destroy_contents(instance); |
| 347 | 0 | globus_free(instance); |
| 348 | ||
| 349 | exit: | |
| 350 | ||
| 351 | 0 | GlobusSoapMessageDebugExit(); |
| 352 | } | |
| 353 | ||
| 354 | ||
| 355 | void | |
| 356 | ds_TransformsType_destroy_contents( | |
| 357 | ds_TransformsType * instance) | |
| 358 | 0 | { |
| 359 | 0 | GlobusFuncName(ds_TransformsType_destroy_contents); |
| 360 | 0 | GlobusSoapMessageDebugEnter(); |
| 361 | ||
| 362 | 0 | if(instance) |
| 363 | { | |
| 364 | ||
| 365 | ||
| 366 | 0 | ds_TransformType_array_destroy_contents(&instance->Transform); |
| 367 | ||
| 368 | } | |
| 369 | ||
| 370 | 0 | GlobusSoapMessageDebugExit(); |
| 371 | } | |
| 372 | ||
| 373 | ||
| 374 | globus_result_t | |
| 375 | ds_TransformsType_copy( | |
| 376 | ds_TransformsType ** dest_obj, | |
| 377 | const ds_TransformsType * src_obj) | |
| 378 | 0 | { |
| 379 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 380 | 0 | ds_TransformsType * instance; |
| 381 | 0 | GlobusFuncName(ds_TransformsType_copy); |
| 382 | ||
| 383 | 0 | GlobusSoapMessageDebugEnter(); |
| 384 | ||
| 385 | 0 | instance = calloc(1, sizeof(ds_TransformsType)); |
| 386 | 0 | if (instance == NULL) |
| 387 | { | |
| 388 | 0 | GlobusSoapMessageDebugExit(); |
| 389 | 0 | return GlobusSoapMessageErrorOutOfMemory; |
| 390 | } | |
| 391 | ||
| 392 | 0 | result = ds_TransformsType_copy_contents(instance, src_obj); |
| 393 | 0 | if(result != GLOBUS_SUCCESS) |
| 394 | { | |
| 395 | 0 | globus_free(instance); |
| 396 | 0 | GlobusSoapMessageDebugExit(); |
| 397 | 0 | return GlobusSoapMessageErrorOutOfMemory; |
| 398 | } | |
| 399 | ||
| 400 | 0 | *dest_obj = instance; |
| 401 | 0 | GlobusSoapMessageDebugExit(); |
| 402 | 0 | return result; |
| 403 | } | |
| 404 | ||
| 405 | globus_result_t | |
| 406 | ds_TransformsType_copy_contents( | |
| 407 | ds_TransformsType * instance, | |
| 408 | const ds_TransformsType * src_obj) | |
| 409 | 0 | { |
| 410 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 411 | 0 | GlobusFuncName(ds_TransformsType_copy_contents); |
| 412 | ||
| 413 | 0 | GlobusSoapMessageDebugEnter(); |
| 414 | ||
| 415 | 0 | result = ds_TransformType_array_copy_contents( |
| 416 | &instance->Transform, | |
| 417 | &src_obj->Transform); | |
| 418 | 0 | if(result != GLOBUS_SUCCESS) |
| 419 | { | |
| 420 | 0 | result = GlobusSoapMessageErrorCopyFailed( |
| 421 | result, NULL, &ds_TransformType_qname); | |
| 422 | goto Transform_destroy_array; | |
| 423 | } | |
| 424 | ||
| 425 | 0 | goto exit; |
| 426 | ||
| 427 | fail_deserialize: | |
| 428 | 0 | ds_TransformType_array_destroy_contents( |
| 429 | &instance->Transform); | |
| 430 | ||
| 431 | Transform_destroy_array: | |
| 432 | ||
| 433 | ||
| 434 | exit: | |
| 435 | ||
| 436 | 0 | GlobusSoapMessageDebugExit(); |
| 437 | 0 | return result; |
| 438 | } | |
| 439 | ||
| 440 | ||
| 441 | ||
| 442 | globus_result_t | |
| 443 | ds_TransformsType_serialize_contents( | |
| 444 | const xsd_QName * element_qname, /* ignored */ | |
| 445 | const ds_TransformsType * inst, | |
| 446 | globus_soap_message_handle_t message_handle, | |
| 447 | globus_xsd_element_options_t options) | |
| 448 | 0 | { |
| 449 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 450 | 0 | GlobusFuncName(ds_TransformsType_serialize_contents); |
| 451 | 0 | GlobusSoapMessageDebugEnter(); |
| 452 | ||
| 453 | 0 | result = ds_TransformsType_serialize( |
| 454 | NULL, | |
| 455 | inst, | |
| 456 | message_handle, | |
| 457 | options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY); | |
| 458 | 0 | if(result != GLOBUS_SUCCESS) |
| 459 | { | |
| 460 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 461 | result, NULL, element_qname); | |
| 462 | goto exit; | |
| 463 | } | |
| 464 | ||
| 465 | exit: | |
| 466 | ||
| 467 | 0 | GlobusSoapMessageDebugExit(); |
| 468 | 0 | return result; |
| 469 | } | |
| 470 | ||
| 471 | ||
| 472 | ||
| 473 | globus_result_t | |
| 474 | ds_TransformsType_serialize( | |
| 475 | const xsd_QName * element_qname, | |
| 476 | const ds_TransformsType * instance, | |
| 477 | globus_soap_message_handle_t message_handle, | |
| 478 | globus_xsd_element_options_t options) | |
| 479 | 0 | { |
| 480 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 481 | 0 | xsd_QName subelement; |
| 482 | 0 | globus_list_t * any_attr_keys = NULL; |
| 483 | 0 | globus_list_t * any_attr_keys_iterator = NULL; |
| 484 | 0 | xsd_QName * type_attr = NULL; |
| 485 | ||
| 486 | 0 | char * prefix = NULL; |
| 487 | 0 | int prefix_created; |
| 488 | 0 | int define_prefix = 0; |
| 489 | 0 | int save_options = options; |
| 490 | ||
| 491 | 0 | GlobusFuncName(ds_TransformsType_serialize); |
| 492 | 0 | GlobusSoapMessageDebugEnter(); |
| 493 | ||
| 494 | ||
| 495 | 0 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 496 | { | |
| 497 | /* serialize ds_TransformsType element */ | |
| 498 | 0 | result = globus_soap_message_element_ns_set( |
| 499 | message_handle, | |
| 500 | element_qname, | |
| 501 | element_qname->Namespace, | |
| 502 | &options); | |
| 503 | 0 | if(result != GLOBUS_SUCCESS) |
| 504 | { | |
| 505 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 506 | result, NULL, element_qname); | |
| 507 | 0 | goto exit; |
| 508 | } | |
| 509 | ||
| 510 | 0 | if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 511 | !globus_soap_message_serialize_is_c14n_subset(message_handle))) | |
| 512 | { | |
| 513 | 0 | result = globus_soap_message_attribute_ns_set( |
| 514 | message_handle, | |
| 515 | element_qname, | |
| 516 | "http://www.w3.org/2001/XMLSchema-instance", | |
| 517 | &options); | |
| 518 | 0 | if(result != GLOBUS_SUCCESS) |
| 519 | { | |
| 520 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 521 | result, NULL, element_qname); | |
| 522 | 0 | goto exit; |
| 523 | } | |
| 524 | } | |
| 525 | ||
| 526 | 0 | if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 527 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 528 | { | |
| 529 | ||
| 530 | 0 | result = globus_soap_message_attribute_ns_set( |
| 531 | message_handle, | |
| 532 | element_qname, | |
| 533 | ds_TransformsType_qname.Namespace, | |
| 534 | &options); | |
| 535 | 0 | if(result != GLOBUS_SUCCESS) |
| 536 | { | |
| 537 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 538 | result, NULL, element_qname); | |
| 539 | 0 | goto exit; |
| 540 | } | |
| 541 | } | |
| 542 | ||
| 543 | 0 | result = globus_soap_message_serialize_element( |
| 544 | message_handle, | |
| 545 | element_qname, | |
| 546 | options, | |
| 547 | &ds_TransformsType_qname); | |
| 548 | 0 | if(result != GLOBUS_SUCCESS) |
| 549 | { | |
| 550 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 551 | result, NULL, element_qname); | |
| 552 | 0 | goto exit; |
| 553 | } | |
| 554 | ||
| 555 | 0 | if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 556 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 557 | { | |
| 558 | 0 | xsd_QName_init(&type_attr); |
| 559 | ||
| 560 | 0 | type_attr->local = globus_libc_strdup("type"); |
| 561 | 0 | type_attr->Namespace = globus_libc_strdup(XSI_NS); |
| 562 | } | |
| 563 | ||
| 564 | ||
| 565 | /* serialize namespaces */ | |
| 566 | 0 | result = globus_soap_message_element_ns_add( |
| 567 | message_handle, | |
| 568 | element_qname, | |
| 569 | element_qname->Namespace, | |
| 570 | &options); | |
| 571 | 0 | if(result != GLOBUS_SUCCESS) |
| 572 | { | |
| 573 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 574 | result, NULL, element_qname); | |
| 575 | 0 | goto exit; |
| 576 | } | |
| 577 | ||
| 578 | 0 | if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 579 | !globus_soap_message_serialize_is_c14n_subset(message_handle))) | |
| 580 | { | |
| 581 | 0 | result = globus_soap_message_attribute_ns_add( |
| 582 | message_handle, | |
| 583 | element_qname, | |
| 584 | "http://www.w3.org/2001/XMLSchema-instance", | |
| 585 | &options); | |
| 586 | 0 | if(result != GLOBUS_SUCCESS) |
| 587 | { | |
| 588 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 589 | result, NULL, element_qname); | |
| 590 | 0 | goto exit; |
| 591 | } | |
| 592 | } | |
| 593 | 0 | if ((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 594 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 595 | { | |
| 596 | ||
| 597 | 0 | result = globus_soap_message_attribute_ns_add( |
| 598 | message_handle, | |
| 599 | element_qname, | |
| 600 | ds_TransformsType_qname.Namespace, | |
| 601 | &options); | |
| 602 | 0 | if(result != GLOBUS_SUCCESS) |
| 603 | { | |
| 604 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 605 | result, NULL, element_qname); | |
| 606 | 0 | goto exit; |
| 607 | } | |
| 608 | } | |
| 609 | ||
| 610 | /* serialize attributes */ | |
| 611 | ||
| 612 | 0 | if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 613 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 614 | { | |
| 615 | 0 | result = globus_soap_message_serialize_QName_attribute( |
| 616 | message_handle, | |
| 617 | type_attr, | |
| 618 | &ds_TransformsType_qname); | |
| 619 | 0 | if(result != GLOBUS_SUCCESS) |
| 620 | { | |
| 621 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 622 | result, NULL, element_qname); | |
| 623 | 0 | goto exit; |
| 624 | } | |
| 625 | } | |
| 626 | ||
| 627 | ||
| 628 | } | |
| 629 | ||
| 630 | 0 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 631 | { | |
| 632 | 0 | result = globus_soap_message_serialize_element_begin_close( |
| 633 | message_handle, element_qname); | |
| 634 | 0 | if(result != GLOBUS_SUCCESS) |
| 635 | { | |
| 636 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 637 | result, NULL, element_qname); | |
| 638 | 0 | goto exit; |
| 639 | } | |
| 640 | } | |
| 641 | 0 | options &= ~GLOBUS_XSD_ELEMENT_CONTENTS_ONLY; |
| 642 | ||
| 643 | ||
| 644 | /* serialize contents of type */ | |
| 645 | ||
| 646 | 0 | subelement.local = "Transform"; |
| 647 | 0 | subelement.Namespace = "http://www.w3.org/2000/09/xmldsig#"; |
| 648 | ||
| 649 | 0 | result = GlobusXSDArrayCheckLowerBounds( |
| 650 | 1, | |
| 651 | instance->Transform.length, | |
| 652 | "Transform"); | |
| 653 | 0 | if(result != GLOBUS_SUCCESS) |
| 654 | { | |
| 655 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 656 | result, NULL, &ds_TransformType_qname); | |
| 657 | 0 | goto exit; |
| 658 | } | |
| 659 | ||
| 660 | 0 | result = ds_TransformType_array_serialize( |
| 661 | &subelement, | |
| 662 | &instance->Transform, | |
| 663 | message_handle, | |
| 664 | options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS)); | |
| 665 | 0 | if(result != GLOBUS_SUCCESS) |
| 666 | { | |
| 667 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 668 | result, NULL, &ds_TransformType_qname); | |
| 669 | 0 | goto exit; |
| 670 | } | |
| 671 | ||
| 672 | 0 | options = save_options; |
| 673 | ||
| 674 | 0 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 675 | { | |
| 676 | /* add end element */ | |
| 677 | 0 | result = globus_soap_message_serialize_element_end( |
| 678 | message_handle, | |
| 679 | element_qname, | |
| 680 | options, | |
| 681 | &ds_TransformsType_qname); | |
| 682 | 0 | if(result != GLOBUS_SUCCESS) |
| 683 | { | |
| 684 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 685 | result, NULL, element_qname); | |
| 686 | 0 | goto exit; |
| 687 | } | |
| 688 | ||
| 689 | 0 | globus_soap_message_element_ns_remove( |
| 690 | message_handle, | |
| 691 | element_qname->Namespace, | |
| 692 | &options); | |
| 693 | ||
| 694 | /* remove namespace/prefix mappings for these types */ | |
| 695 | ||
| 696 | 0 | if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 697 | !globus_soap_message_serialize_is_c14n_subset(message_handle))) | |
| 698 | { | |
| 699 | 0 | globus_soap_message_attribute_ns_remove( |
| 700 | message_handle, | |
| 701 | "http://www.w3.org/2001/XMLSchema-instance", | |
| 702 | &options); | |
| 703 | } | |
| 704 | 0 | if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 705 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 706 | { | |
| 707 | 0 | globus_soap_message_attribute_ns_remove( |
| 708 | message_handle, | |
| 709 | ds_TransformsType_qname.Namespace, | |
| 710 | &options); | |
| 711 | } | |
| 712 | ||
| 713 | } | |
| 714 | ||
| 715 | exit: | |
| 716 | 0 | if (type_attr) |
| 717 | { | |
| 718 | 0 | xsd_QName_destroy(type_attr); |
| 719 | } | |
| 720 | ||
| 721 | ||
| 722 | 0 | if(any_attr_keys) |
| 723 | { | |
| 724 | 0 | globus_list_free(any_attr_keys); |
| 725 | } | |
| 726 | ||
| 727 | 0 | GlobusSoapMessageDebugExit(); |
| 728 | 0 | return result; |
| 729 | } | |
| 730 | ||
| 731 | ||
| 732 | ||
| 733 | globus_result_t | |
| 734 | ds_TransformsType_deserialize_contents( | |
| 735 | const xsd_QName * element_qname, /* ignored */ | |
| 736 | ds_TransformsType * inst, | |
| 737 | globus_soap_message_handle_t message_handle, | |
| 738 | globus_xsd_element_options_t options) | |
| 739 | 0 | { |
| 740 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 741 | 0 | GlobusFuncName(ds_TransformsType_deserialize_contents); |
| 742 | 0 | GlobusSoapMessageDebugEnter(); |
| 743 | ||
| 744 | 0 | result = ds_TransformsType_deserialize( |
| 745 | NULL, | |
| 746 | inst, | |
| 747 | message_handle, | |
| 748 | options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY); | |
| 749 | 0 | if(result != GLOBUS_SUCCESS) |
| 750 | { | |
| 751 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 752 | result, element_qname); | |
| 753 | goto exit; | |
| 754 | } | |
| 755 | ||
| 756 | exit: | |
| 757 | ||
| 758 | 0 | GlobusSoapMessageDebugExit(); |
| 759 | 0 | return result; |
| 760 | } | |
| 761 | ||
| 762 | ||
| 763 | ||
| 764 | globus_result_t | |
| 765 | ds_TransformsType_deserialize( | |
| 766 | const xsd_QName * element_qname, | |
| 767 | ds_TransformsType * instance, | |
| 768 | globus_soap_message_handle_t message_handle, | |
| 769 | globus_xsd_element_options_t options) | |
| 770 | 0 | { |
| 771 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 772 | 0 | xsd_QName subelement; |
| 773 | 0 | GlobusFuncName(ds_TransformsType_deserialize); |
| 774 | 0 | GlobusSoapMessageDebugEnter(); |
| 775 | ||
| 776 | ||
| 777 | 0 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 778 | { | |
| 779 | 0 | result = globus_soap_message_deserialize_element( |
| 780 | message_handle, element_qname); | |
| 781 | 0 | if(result != GLOBUS_SUCCESS) |
| 782 | { | |
| 783 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 784 | result, element_qname); | |
| 785 | 0 | goto exit; |
| 786 | } | |
| 787 | ||
| 788 | ||
| 789 | 0 | result = globus_soap_message_deserialize_element_begin_close( |
| 790 | message_handle); | |
| 791 | 0 | if(result != GLOBUS_SUCCESS) |
| 792 | { | |
| 793 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 794 | result, element_qname); | |
| 795 | 0 | goto fail_deserialize; |
| 796 | } | |
| 797 | } | |
| 798 | ||
| 799 | 0 | subelement.local = "Transform"; |
| 800 | 0 | subelement.Namespace = "http://www.w3.org/2000/09/xmldsig#"; |
| 801 | ||
| 802 | 0 | result = ds_TransformType_array_deserialize( |
| 803 | &subelement, | |
| 804 | &instance->Transform, | |
| 805 | message_handle, | |
| 806 | 0); | |
| 807 | 0 | if(result != GLOBUS_SUCCESS) |
| 808 | { | |
| 809 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 810 | result, | |
| 811 | (&subelement)); | |
| 812 | 0 | goto Transform_destroy_array; |
| 813 | } | |
| 814 | ||
| 815 | 0 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 816 | { | |
| 817 | 0 | result = globus_soap_message_deserialize_element_end( |
| 818 | message_handle, | |
| 819 | element_qname); | |
| 820 | 0 | if(result != GLOBUS_SUCCESS) |
| 821 | { | |
| 822 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 823 | result, element_qname); | |
| 824 | goto fail_deserialize; | |
| 825 | } | |
| 826 | } | |
| 827 | ||
| 828 | 0 | goto exit; |
| 829 | ||
| 830 | fail_deserialize: | |
| 831 | 0 | ds_TransformType_array_destroy_contents( |
| 832 | &instance->Transform); | |
| 833 | ||
| 834 | Transform_destroy_array: | |
| 835 | ||
| 836 | ||
| 837 | exit: | |
| 838 | ||
| 839 | 0 | GlobusSoapMessageDebugExit(); |
| 840 | 0 | return result; |
| 841 | } | |
| 842 | ||
| 843 | ||
| 844 | ||
| 845 | globus_result_t | |
| 846 | ds_TransformsType_deserialize_pointer( | |
| 847 | const xsd_QName * element_qname, | |
| 848 | ds_TransformsType ** ip, | |
| 849 | globus_soap_message_handle_t message_handle, | |
| 850 | globus_xsd_element_options_t options) | |
| 851 | 0 | { |
| 852 | 0 | ds_TransformsType * instance = NULL; |
| 853 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 854 | 0 | xsd_QName subelement; |
| 855 | 0 | int found_attrs = 0; |
| 856 | 0 | int empty_element = 0; |
| 857 | 0 | GlobusFuncName(ds_TransformsType_deserialize_pointer); |
| 858 | 0 | GlobusSoapMessageDebugEnter(); |
| 859 | ||
| 860 | 0 | *ip = NULL; |
| 861 | ||
| 862 | 0 | result = globus_soap_message_deserialize_element( |
| 863 | message_handle, element_qname); | |
| 864 | 0 | if(result != GLOBUS_SUCCESS && |
| 865 | (GlobusSoapMessageStatusElementNotFoundCheck(result) || | |
| 866 | GlobusSoapMessageStatusFailedElementCheck(result) || | |
| 867 | GlobusSoapMessageStatusFailedWithTextCheck(result))) | |
| 868 | { | |
| 869 | 0 | result = GLOBUS_SUCCESS; |
| 870 | 0 | goto exit; |
| 871 | } | |
| 872 | ||
| 873 | 0 | if(result != GLOBUS_SUCCESS) |
| 874 | { | |
| 875 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 876 | result, element_qname); | |
| 877 | 0 | goto exit; |
| 878 | } | |
| 879 | ||
| 880 | 0 | if(globus_soap_message_deserialize_element_is_empty( |
| 881 | message_handle)) | |
| 882 | { | |
| 883 | 0 | empty_element = 1; |
| 884 | } | |
| 885 | ||
| 886 | 0 | result = ds_TransformsType_init(&instance); |
| 887 | 0 | if(result != GLOBUS_SUCCESS) |
| 888 | { | |
| 889 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 890 | result, element_qname); | |
| 891 | 0 | goto exit; |
| 892 | } | |
| 893 | ||
| 894 | ||
| 895 | 0 | if(found_attrs == 0 && |
| 896 | globus_soap_message_deserialize_element_is_nil(message_handle)) | |
| 897 | { | |
| 898 | 0 | ds_TransformsType_destroy(instance); |
| 899 | ||
| 900 | 0 | result = globus_soap_message_deserialize_element_end( |
| 901 | message_handle, | |
| 902 | element_qname); | |
| 903 | 0 | if(result != GLOBUS_SUCCESS) |
| 904 | { | |
| 905 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 906 | result, element_qname); | |
| 907 | 0 | goto exit; |
| 908 | } | |
| 909 | ||
| 910 | 0 | *ip = NULL; |
| 911 | 0 | globus_object_free(globus_error_get(result)); |
| 912 | 0 | result = GLOBUS_SUCCESS; |
| 913 | 0 | goto exit; |
| 914 | } | |
| 915 | ||
| 916 | ||
| 917 | 0 | if(empty_element) |
| 918 | { | |
| 919 | 0 | result = globus_soap_message_deserialize_element_end( |
| 920 | message_handle, | |
| 921 | element_qname); | |
| 922 | 0 | if(result != GLOBUS_SUCCESS) |
| 923 | { | |
| 924 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 925 | result, element_qname); | |
| 926 | 0 | goto fail_deserialize; |
| 927 | } | |
| 928 | ||
| 929 | 0 | *ip = instance; |
| 930 | 0 | goto exit; |
| 931 | } | |
| 932 | ||
| 933 | 0 | result = globus_soap_message_deserialize_element_begin_close( |
| 934 | message_handle); | |
| 935 | 0 | if(result != GLOBUS_SUCCESS) |
| 936 | { | |
| 937 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 938 | result, element_qname); | |
| 939 | 0 | goto exit; |
| 940 | } | |
| 941 | ||
| 942 | 0 | result = ds_TransformsType_deserialize( |
| 943 | element_qname, | |
| 944 | instance, | |
| 945 | message_handle, | |
| 946 | options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY); | |
| 947 | ||
| 948 | 0 | result = globus_soap_message_deserialize_element_end( |
| 949 | message_handle, | |
| 950 | element_qname); | |
| 951 | 0 | if(result != GLOBUS_SUCCESS) |
| 952 | { | |
| 953 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 954 | result, element_qname); | |
| 955 | 0 | goto fail_deserialize; |
| 956 | } | |
| 957 | ||
| 958 | 0 | *ip = instance; |
| 959 | ||
| 960 | 0 | goto exit; |
| 961 | ||
| 962 | fail_deserialize: | |
| 963 | 0 | ds_TransformType_array_destroy_contents( |
| 964 | &instance->Transform); | |
| 965 | ||
| 966 | Transform_destroy_array: | |
| 967 | ||
| 968 | exit: | |
| 969 | ||
| 970 | 0 | GlobusSoapMessageDebugExit(); |
| 971 | 0 | return result; |
| 972 | } | |
| 973 | ||
| 974 | ||
| 975 | globus_result_t | |
| 976 | ds_TransformsType_array_init_contents( | |
| 977 | ds_TransformsType_array * array) | |
| 978 | 0 | { |
| 979 | 0 | return globus_xsd_generic_array_init_contents( |
| 980 | (globus_xsd_generic_array_t *) array, | |
| 981 | &ds_TransformsType_info); | |
| 982 | } | |
| 983 | /* ds_TransformsType_array_init_contents() */ | |
| 984 | ||
| 985 | globus_result_t | |
| 986 | ds_TransformsType_array_init( | |
| 987 | ds_TransformsType_array ** arr) | |
| 988 | 0 | { |
| 989 | 0 | return globus_xsd_generic_array_init( |
| 990 | (globus_xsd_generic_array_t **) arr, | |
| 991 | &ds_TransformsType_info); | |
| 992 | } | |
| 993 | /* ds_TransformsType_array_init() */ | |
| 994 | ||
| 995 | void | |
| 996 | ds_TransformsType_array_destroy_contents( | |
| 997 | ds_TransformsType_array * array) | |
| 998 | 0 | { |
| 999 | 0 | globus_xsd_generic_array_destroy_contents( |
| 1000 | (globus_xsd_generic_array_t *) array); | |
| 1001 | } | |
| 1002 | /* ds_TransformsType_array_destroy_contents() */ | |
| 1003 | ||
| 1004 | void | |
| 1005 | ds_TransformsType_array_destroy( | |
| 1006 | ds_TransformsType_array * array) | |
| 1007 | 0 | { |
| 1008 | 0 | globus_xsd_generic_array_destroy( |
| 1009 | (globus_xsd_generic_array_t *) array); | |
| 1010 | } | |
| 1011 | /* ds_TransformsType_array_destroy() */ | |
| 1012 | ||
| 1013 | globus_result_t | |
| 1014 | ds_TransformsType_array_copy( | |
| 1015 | ds_TransformsType_array ** dest_arr, | |
| 1016 | const ds_TransformsType_array * src_arr) | |
| 1017 | 0 | { |
| 1018 | 0 | return globus_xsd_generic_array_copy( |
| 1019 | (globus_xsd_generic_array_t **) dest_arr, | |
| 1020 | (globus_xsd_generic_array_t *) src_arr); | |
| 1021 | } | |
| 1022 | /* ds_TransformsType_array_copy() */ | |
| 1023 | ||
| 1024 | globus_result_t | |
| 1025 | ds_TransformsType_array_copy_contents( | |
| 1026 | ds_TransformsType_array * dest_arr, | |
| 1027 | const ds_TransformsType_array * src_arr) | |
| 1028 | 0 | { |
| 1029 | 0 | return globus_xsd_generic_array_copy_contents( |
| 1030 | (globus_xsd_generic_array_t *) dest_arr, | |
| 1031 | (globus_xsd_generic_array_t *) src_arr); | |
| 1032 | } | |
| 1033 | /* ds_TransformsType_array_copy_contents() */ | |
| 1034 | ||
| 1035 | ds_TransformsType * | |
| 1036 | ds_TransformsType_array_push( | |
| 1037 | ds_TransformsType_array * array) | |
| 1038 | 0 | { |
| 1039 | /* Some contents initializers don't initialize subelments but to set their | |
| 1040 | * values to be NULL | |
| 1041 | */ | |
| 1042 | 0 | if (array->type_info == NULL) |
| 1043 | { | |
| 1044 | 0 | array->type_info = &ds_TransformsType_info; |
| 1045 | } | |
| 1046 | ||
| 1047 | 0 | return globus_xsd_generic_array_push( |
| 1048 | (globus_xsd_generic_array_t *) array); | |
| 1049 | } | |
| 1050 | /* ds_TransformsType_array_push() */ | |
| 1051 | ||
| 1052 | void * | |
| 1053 | ds_TransformsType_array_push_wrapper( | |
| 1054 | void * array) | |
| 1055 | 0 | { |
| 1056 | 0 | return (void *) ds_TransformsType_array_push((ds_TransformsType_array *) array); |
| 1057 | } | |
| 1058 | ||
| 1059 | globus_result_t | |
| 1060 | ds_TransformsType_array_serialize( | |
| 1061 | const xsd_QName * element_qname, | |
| 1062 | const ds_TransformsType_array * array, | |
| 1063 | globus_soap_message_handle_t message, | |
| 1064 | globus_xsd_element_options_t options) | |
| 1065 | 0 | { |
| 1066 | 0 | return globus_xsd_generic_array_serialize( |
| 1067 | element_qname, | |
| 1068 | (const globus_xsd_generic_array_t *) array, | |
| 1069 | message, | |
| 1070 | options); | |
| 1071 | } | |
| 1072 | /* ds_TransformsType_array_serialize() */ | |
| 1073 | ||
| 1074 | globus_result_t | |
| 1075 | ds_TransformsType_array_deserialize( | |
| 1076 | const xsd_QName * element_qname, | |
| 1077 | ds_TransformsType_array * array, | |
| 1078 | globus_soap_message_handle_t message, | |
| 1079 | globus_xsd_element_options_t options) | |
| 1080 | 0 | { |
| 1081 | /* Some initializers set the array's contents to NULL */ | |
| 1082 | 0 | if (array->type_info == NULL) |
| 1083 | { | |
| 1084 | 0 | array->type_info = &ds_TransformsType_info; |
| 1085 | } | |
| 1086 | 0 | return globus_xsd_generic_array_deserialize( |
| 1087 | element_qname, | |
| 1088 | (globus_xsd_generic_array_t *) array, | |
| 1089 | message, | |
| 1090 | options); |