1 /*
2 * Copyright 1999-2006 University of Chicago
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18 /*
19 * This file is automatically generated by the Globus WSDLtoC converter
20 */
21
22 #include "xsd_QName.h"
23 #include "globus_soap_message.h"
24 #include "globus_xsd_type_info.h"
25 #include "wsse_KeyIdentifierType.h"
26 #include "globus_xsd_generic_array.h"
27
28 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
29 xsd_QName wsse_KeyIdentifierType_qname =
30 {
31 WSSE_KEYIDENTIFIERTYPE_NS,
32 WSSE_KEYIDENTIFIERTYPE_LOCAL
33 };
34 #endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */
35
36 static
37 globus_result_t
38 wsse_KeyIdentifierType_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 wsse_KeyIdentifierType_serialize(
45 element_qname,
46 (const wsse_KeyIdentifierType *) instance,
47 message_handle, options);
48 }
49
50 static
51 globus_result_t
52 wsse_KeyIdentifierType_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 wsse_KeyIdentifierType_deserialize_pointer(
59 element_qname,
60 (wsse_KeyIdentifierType **) ip,
61 message_handle, options);
62 }
63
64 static
65 globus_result_t
66 wsse_KeyIdentifierType_init_wrapper(void **object)
67 0 {
68 0 return wsse_KeyIdentifierType_init(
69 (wsse_KeyIdentifierType **) object);
70 }
71
72 static
73 void
74 wsse_KeyIdentifierType_destroy_wrapper(
75 void * object)
76 0 {
77 0 wsse_KeyIdentifierType_destroy(
78 (wsse_KeyIdentifierType *) object);
79 0 }
80
81 static
82 globus_result_t
83 wsse_KeyIdentifierType_copy_wrapper(
84 void ** dest_obj,
85 const void * src_obj)
86 0 {
87 0 return wsse_KeyIdentifierType_copy(
88 (wsse_KeyIdentifierType **) dest_obj,
89 (wsse_KeyIdentifierType *) src_obj);
90 }
91
92 static
93 globus_result_t
94 wsse_KeyIdentifierType_init_contents_wrapper(void *object)
95 0 {
96 0 return wsse_KeyIdentifierType_init_contents(
97 (wsse_KeyIdentifierType *) object);
98 }
99
100 static
101 void
102 wsse_KeyIdentifierType_destroy_contents_wrapper(
103 void * object)
104 0 {
105 0 wsse_KeyIdentifierType_destroy_contents(
106 (wsse_KeyIdentifierType *) object);
107 0 }
108
109 static
110 globus_result_t
111 wsse_KeyIdentifierType_copy_contents_wrapper(
112 void * dest_obj,
113 const void * src_obj)
114 0 {
115 0 return wsse_KeyIdentifierType_copy_contents(
116 (wsse_KeyIdentifierType *) dest_obj,
117 (const wsse_KeyIdentifierType *) src_obj);
118 }
119
120 static
121 globus_result_t
122 wsse_KeyIdentifierType_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 wsse_KeyIdentifierType_serialize_contents(
129 element_qname,
130 (wsse_KeyIdentifierType *) instance,
131 message_handle, options);
132 }
133
134 static
135 globus_result_t
136 wsse_KeyIdentifierType_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(wsse_KeyIdentifierType_deserialize_contents_wrapper);
144 0 GlobusSoapMessageDebugEnter();
145
146 0 if(!*instance)
147 {
148 0 result = wsse_KeyIdentifierType_init(
149 (wsse_KeyIdentifierType **)instance);
150 0 if(result != GLOBUS_SUCCESS)
151 {
152 0 goto error;
153 }
154 }
155
156 0 result = wsse_KeyIdentifierType_deserialize_contents(
157 element_qname,
158 *(wsse_KeyIdentifierType **)instance,
159 message_handle, options);
160 0 error:
161 0 GlobusSoapMessageDebugExit();
162 0 return result;
163 }
164
165 static
166 globus_result_t
167 wsse_KeyIdentifierType_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 wsse_KeyIdentifierType_array_serialize(
174 element,
175 (wsse_KeyIdentifierType_array *) instance,
176 message, options);
177 }
178
179 static
180 globus_result_t
181 wsse_KeyIdentifierType_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 = wsse_KeyIdentifierType_array_init(
192 (wsse_KeyIdentifierType_array **)inst);
193 0 if(result != GLOBUS_SUCCESS)
194 {
195 0 return result;
196 }
197 }
198
199 0 return wsse_KeyIdentifierType_array_deserialize(
200 element_qname,
201 *(wsse_KeyIdentifierType_array **) inst,
202 message, options);
203 }
204
205 static
206 globus_result_t
207 wsse_KeyIdentifierType_array_init_wrapper(
208 void ** arr)
209 0 {
210 0 return wsse_KeyIdentifierType_array_init(
211 (wsse_KeyIdentifierType_array **) arr);
212 }
213
214 static
215 void
216 wsse_KeyIdentifierType_array_destroy_wrapper(
217 void * arr)
218 0 {
219 0 wsse_KeyIdentifierType_array_destroy(
220 (wsse_KeyIdentifierType_array *) arr);
221 0 }
222
223 static
224 globus_result_t
225 wsse_KeyIdentifierType_array_copy_wrapper(
226 void ** dest_arr,
227 const void * src_arr)
228 0 {
229 0 return wsse_KeyIdentifierType_array_copy(
230 (wsse_KeyIdentifierType_array **) dest_arr,
231 (const wsse_KeyIdentifierType_array *) src_arr);
232 }
233
234 static
235 globus_result_t
236 wsse_KeyIdentifierType_array_init_contents_wrapper(
237 void * arr)
238 0 {
239 0 return wsse_KeyIdentifierType_array_init_contents(
240 (wsse_KeyIdentifierType_array *) arr);
241 }
242
243 static
244 void
245 wsse_KeyIdentifierType_array_destroy_contents_wrapper(
246 void * arr)
247 0 {
248 0 wsse_KeyIdentifierType_array_destroy_contents(
249 (wsse_KeyIdentifierType_array *) arr);
250 0 }
251
252 static
253 globus_result_t
254 wsse_KeyIdentifierType_array_copy_contents_wrapper(
255 void * dest_arr,
256 const void * src_arr)
257 0 {
258 0 return wsse_KeyIdentifierType_array_copy_contents(
259 (wsse_KeyIdentifierType_array *) dest_arr,
260 (const wsse_KeyIdentifierType_array *) src_arr);
261 }
262
263 static
264 void *
265 wsse_KeyIdentifierType_array_push_wrapper(
266 void * array)
267 0 {
268 0 return (void *) wsse_KeyIdentifierType_array_push((wsse_KeyIdentifierType_array *) array);
269 }
270
271 struct globus_xsd_type_info_s wsse_KeyIdentifierType_contents_info =
272 {
273 &wsse_KeyIdentifierType_qname,
274 wsse_KeyIdentifierType_serialize_contents_wrapper,
275 wsse_KeyIdentifierType_deserialize_contents_wrapper,
276 wsse_KeyIdentifierType_init_wrapper,
277 wsse_KeyIdentifierType_destroy_wrapper,
278 wsse_KeyIdentifierType_copy_wrapper,
279 wsse_KeyIdentifierType_init_contents_wrapper,
280 wsse_KeyIdentifierType_destroy_contents_wrapper,
281 wsse_KeyIdentifierType_copy_contents_wrapper,
282 sizeof(wsse_KeyIdentifierType),
283 NULL,
284 NULL,
285 NULL
286 };
287
288 struct globus_xsd_type_info_s wsse_KeyIdentifierType_array_info =
289 {
290 &wsse_KeyIdentifierType_qname,
291 wsse_KeyIdentifierType_array_serialize_wrapper,
292 wsse_KeyIdentifierType_array_deserialize_wrapper,
293 wsse_KeyIdentifierType_array_init_wrapper,
294 wsse_KeyIdentifierType_array_destroy_wrapper,
295 wsse_KeyIdentifierType_array_copy_wrapper,
296 wsse_KeyIdentifierType_array_init_contents_wrapper,
297 wsse_KeyIdentifierType_array_destroy_contents_wrapper,
298 wsse_KeyIdentifierType_array_copy_contents_wrapper,
299 sizeof(wsse_KeyIdentifierType),
300 wsse_KeyIdentifierType_array_push_wrapper,
301 NULL,
302 NULL
303 };
304
305 struct globus_xsd_type_info_s wsse_KeyIdentifierType_info =
306 {
307 &wsse_KeyIdentifierType_qname,
308 wsse_KeyIdentifierType_serialize_wrapper,
309 wsse_KeyIdentifierType_deserialize_pointer_wrapper,
310 wsse_KeyIdentifierType_init_wrapper,
311 wsse_KeyIdentifierType_destroy_wrapper,
312 wsse_KeyIdentifierType_copy_wrapper,
313 wsse_KeyIdentifierType_init_contents_wrapper,
314 wsse_KeyIdentifierType_destroy_contents_wrapper,
315 wsse_KeyIdentifierType_copy_contents_wrapper,
316 sizeof(wsse_KeyIdentifierType),
317 NULL,
318 &wsse_KeyIdentifierType_contents_info,
319 &wsse_KeyIdentifierType_array_info
320 };
321
322 globus_result_t
323 wsse_KeyIdentifierType_init_contents(
324 wsse_KeyIdentifierType * instance)
325 0 {
326 0 globus_result_t result = GLOBUS_SUCCESS;
327 GlobusFuncName(wsse_KeyIdentifierType_init_contents);
328 0 GlobusSoapMessageDebugEnter();
329
330 0 memset(instance, 0, sizeof(wsse_KeyIdentifierType));
331
332 0 GlobusSoapMessageDebugExit();
333 0 return result;
334 }
335
336 globus_result_t
337 wsse_KeyIdentifierType_init(
338 wsse_KeyIdentifierType ** object)
339 0 {
340 wsse_KeyIdentifierType * instance;
341 0 globus_result_t result = GLOBUS_SUCCESS;
342 GlobusFuncName(wsse_KeyIdentifierType_init);
343 0 GlobusSoapMessageDebugEnter();
344
345 0 instance = globus_malloc(sizeof(wsse_KeyIdentifierType));
346 0 if(!instance)
347 {
348 0 result = GlobusSoapMessageErrorOutOfMemory;
349 0 goto exit;
350 }
351
352 0 memset(instance, 0, sizeof(wsse_KeyIdentifierType));
353
354 0 *object = instance;
355
356 0 exit:
357 0 GlobusSoapMessageDebugExit();
358 0 return result;
359 }
360
361 void
362 wsse_KeyIdentifierType_destroy(
363 wsse_KeyIdentifierType * instance)
364 0 {
365 GlobusFuncName(wsse_KeyIdentifierType_destroy);
366 0 GlobusSoapMessageDebugEnter();
367
368 0 if(!instance)
369 {
370 0 goto exit;
371 }
372
373 0 wsse_KeyIdentifierType_destroy_contents(instance);
374 0 globus_free(instance);
375
376 0 exit:
377
378 0 GlobusSoapMessageDebugExit();
379 0 }
380
381
382 void
383 wsse_KeyIdentifierType_destroy_contents(
384 wsse_KeyIdentifierType * instance)
385 0 {
386 GlobusFuncName(wsse_KeyIdentifierType_destroy_contents);
387 0 GlobusSoapMessageDebugEnter();
388
389 0 if(instance)
390 {
391
392
393 0 xsd_string_destroy_contents(
394 &instance->base_value);
395
396 0 xsd_anyAttributes_destroy(instance->anyAttributes);
397 0 instance->anyAttributes = NULL;
398
399 0 if(instance->_Id)
400 {
401 0 xsd_ID_destroy(
402 instance->_Id);
403 0 instance->_Id = NULL;
404 }
405
406 0 if(instance->_EncodingType)
407 {
408 0 xsd_anyURI_destroy(
409 instance->_EncodingType);
410 0 instance->_EncodingType = NULL;
411 }
412
413 0 if(instance->_ValueType)
414 {
415 0 xsd_anyURI_destroy(
416 instance->_ValueType);
417 0 instance->_ValueType = NULL;
418 }
419
420 }
421
422 0 GlobusSoapMessageDebugExit();
423 0 }
424
425
426 globus_result_t
427 wsse_KeyIdentifierType_copy(
428 wsse_KeyIdentifierType ** dest_obj,
429 const wsse_KeyIdentifierType * src_obj)
430 0 {
431 0 globus_result_t result = GLOBUS_SUCCESS;
432 wsse_KeyIdentifierType * instance;
433 GlobusFuncName(wsse_KeyIdentifierType_copy);
434
435 0 GlobusSoapMessageDebugEnter();
436
437 0 instance = calloc(1, sizeof(wsse_KeyIdentifierType));
438 0 if (instance == NULL)
439 {
440 0 GlobusSoapMessageDebugExit();
441 0 return GlobusSoapMessageErrorOutOfMemory;
442 }
443
444 0 result = wsse_KeyIdentifierType_copy_contents(instance, src_obj);
445 0 if(result != GLOBUS_SUCCESS)
446 {
447 0 globus_free(instance);
448 0 GlobusSoapMessageDebugExit();
449 0 return GlobusSoapMessageErrorOutOfMemory;
450 }
451
452 0 *dest_obj = instance;
453 0 GlobusSoapMessageDebugExit();
454 0 return result;
455 }
456
457 globus_result_t
458 wsse_KeyIdentifierType_copy_contents(
459 wsse_KeyIdentifierType * instance,
460 const wsse_KeyIdentifierType * src_obj)
461 0 {
462 0 globus_result_t result = GLOBUS_SUCCESS;
463 GlobusFuncName(wsse_KeyIdentifierType_copy_contents);
464
465 0 GlobusSoapMessageDebugEnter();
466
467 0 if(src_obj->anyAttributes)
468 {
469 0 result = xsd_anyAttributes_copy(&instance->anyAttributes,
470 src_obj->anyAttributes);
471 0 if(result != GLOBUS_SUCCESS)
472 {
473 0 result = GlobusSoapMessageErrorCopyAnyAttrsFailed(
474 result, NULL);
475 0 goto xsd_anyAttributes_after_destroy;
476 }
477 }
478 else
479 {
480 0 instance->anyAttributes = NULL;
481 }
482
483 0 if(src_obj->_Id)
484 {
485 0 result = xsd_ID_copy(
486 &instance->_Id,
487 src_obj->_Id);
488 0 if(result != GLOBUS_SUCCESS)
489 {
490 0 result = GlobusSoapMessageErrorCopyFailed(
491 result, NULL, &xsd_ID_qname);
492 0 goto _Id_destroy;
493 }
494 }
495 else
496 {
497 0 instance->_Id = NULL;
498 }
499
500 0 if(src_obj->_EncodingType)
501 {
502 0 result = xsd_anyURI_copy(
503 &instance->_EncodingType,
504 src_obj->_EncodingType);
505 0 if(result != GLOBUS_SUCCESS)
506 {
507 0 result = GlobusSoapMessageErrorCopyFailed(
508 result, NULL, &xsd_anyURI_qname);
509 0 goto _EncodingType_destroy;
510 }
511 }
512 else
513 {
514 0 instance->_EncodingType = NULL;
515 }
516
517 0 if(src_obj->_ValueType)
518 {
519 0 result = xsd_anyURI_copy(
520 &instance->_ValueType,
521 src_obj->_ValueType);
522 0 if(result != GLOBUS_SUCCESS)
523 {
524 0 result = GlobusSoapMessageErrorCopyFailed(
525 result, NULL, &xsd_anyURI_qname);
526 0 goto _ValueType_destroy;
527 }
528 }
529 else
530 {
531 0 instance->_ValueType = NULL;
532 }
533
534 0 result = xsd_string_copy_contents(
535 &instance->base_value,
536 &src_obj->base_value);
537 0 if(result != GLOBUS_SUCCESS)
538 {
539 0 result = GlobusSoapMessageErrorCopyFailed(
540 result, NULL, &xsd_string_qname);
541 0 goto base_value_destroy;
542 }
543
544 0 goto exit;
545
546 fail_deserialize:
547
548 xsd_anyAttributes_destroy:
549 xsd_anyAttributes_destroy(instance->anyAttributes);
550 instance->anyAttributes = NULL;
551 0 xsd_anyAttributes_after_destroy:
552 0 xsd_string_destroy_contents(
553 &instance->base_value);
554
555 0 base_value_destroy:
556
557 0 _Id_destroy:
558
559 0 if(instance->_Id)
560 {
561 0 xsd_ID_destroy(
562 instance->_Id);
563 0 instance->_Id = NULL;
564 }
565
566 0 _EncodingType_destroy:
567
568 0 if(instance->_EncodingType)
569 {
570 0 xsd_anyURI_destroy(
571 instance->_EncodingType);
572 0 instance->_EncodingType = NULL;
573 }
574
575 0 _ValueType_destroy:
576
577 0 if(instance->_ValueType)
578 {
579 0 xsd_anyURI_destroy(
580 instance->_ValueType);
581 0 instance->_ValueType = NULL;
582 }
583
584
585 0 exit:
586
587 0 GlobusSoapMessageDebugExit();
588 0 return result;
589 }
590
591
592
593 globus_result_t
594 wsse_KeyIdentifierType_serialize_contents(
595 const xsd_QName * element_qname, /* ignored */
596 const wsse_KeyIdentifierType * inst,
597 globus_soap_message_handle_t message_handle,
598 globus_xsd_element_options_t options)
599 0 {
600 0 globus_result_t result = GLOBUS_SUCCESS;
601 GlobusFuncName(wsse_KeyIdentifierType_serialize_contents);
602 0 GlobusSoapMessageDebugEnter();
603
604 0 result = wsse_KeyIdentifierType_serialize(
605 NULL,
606 inst,
607 message_handle,
608 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
609 0 if(result != GLOBUS_SUCCESS)
610 {
611 0 result = GlobusSoapMessageErrorSerializeFailed(
612 result, NULL, element_qname);
613 0 goto exit;
614 }
615
616 0 exit:
617
618 0 GlobusSoapMessageDebugExit();
619 0 return result;
620 }
621
622
623
624 globus_result_t
625 wsse_KeyIdentifierType_serialize(
626 const xsd_QName * element_qname,
627 const wsse_KeyIdentifierType * instance,
628 globus_soap_message_handle_t message_handle,
629 globus_xsd_element_options_t options)
630 0 {
631 0 globus_result_t result = GLOBUS_SUCCESS;
632 xsd_QName subelement;
633 0 globus_list_t * any_attr_keys = NULL;
634 0 globus_list_t * any_attr_keys_iterator = NULL;
635 0 xsd_QName * type_attr = NULL;
636
637 0 char * prefix = NULL;
638 int prefix_created;
639 0 int define_prefix = 0;
640 0 int save_options = options;
641
642 GlobusFuncName(wsse_KeyIdentifierType_serialize);
643 0 GlobusSoapMessageDebugEnter();
644
645
646 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
647 {
648 /* serialize wsse_KeyIdentifierType element */
649 0 result = globus_soap_message_element_ns_set(
650 message_handle,
651 element_qname,
652 element_qname->Namespace,
653 &options);
654 0 if(result != GLOBUS_SUCCESS)
655 {
656 0 result = GlobusSoapMessageErrorSerializeFailed(
657 result, NULL, element_qname);
658 0 goto exit;
659 }
660
661 0 result = xsd_anyAttributes_namespace_set(
662 message_handle, element_qname, instance->anyAttributes, &options);
663 0 if(result != GLOBUS_SUCCESS)
664 {
665 0 result = GlobusSoapMessageErrorSerializeAnyAttrsFailed(
666 result, "Failed to set namespace");
667 0 goto exit;
668 }
669
670 0 if(instance->_Id)
671 {
672
673 0 result = globus_soap_message_attribute_ns_set(
674 message_handle,
675 element_qname,
676 "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd",
677 &options);
678
679 0 if(result != GLOBUS_SUCCESS)
680 {
681 xsd_QName error_qname;
682 0 error_qname.local = prefix;
683 0 error_qname.Namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
684 0 result = GlobusSoapMessageErrorSerializeFailed(result,
685 NULL,
686 &error_qname);
687 0 goto exit;
688 }
689
690
691 }
692
693 0 if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
694 !globus_soap_message_serialize_is_c14n_subset(message_handle)))
695 {
696 0 result = globus_soap_message_attribute_ns_set(
697 message_handle,
698 element_qname,
699 "http://www.w3.org/2001/XMLSchema-instance",
700 &options);
701 0 if(result != GLOBUS_SUCCESS)
702 {
703 0 result = GlobusSoapMessageErrorSerializeFailed(
704 result, NULL, element_qname);
705 0 goto exit;
706 }
707 }
708
709 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
710 !globus_soap_message_serialize_is_c14n_subset(message_handle))
711 {
712
713 0 result = globus_soap_message_attribute_ns_set(
714 message_handle,
715 element_qname,
716 wsse_KeyIdentifierType_qname.Namespace,
717 &options);
718 0 if(result != GLOBUS_SUCCESS)
719 {
720 0 result = GlobusSoapMessageErrorSerializeFailed(
721 result, NULL, element_qname);
722 0 goto exit;
723 }
724 }
725
726 0 if(instance->_EncodingType)
727 {
728
729 0 if(result != GLOBUS_SUCCESS)
730 {
731 xsd_QName error_qname;
732 0 error_qname.local = prefix;
733 0 error_qname.Namespace = "";
734 0 result = GlobusSoapMessageErrorSerializeFailed(result,
735 NULL,
736 &error_qname);
737 0 goto exit;
738 }
739
740
741 }
742
743 0 if(instance->_ValueType)
744 {
745
746 0 if(result != GLOBUS_SUCCESS)
747 {
748 xsd_QName error_qname;
749 0 error_qname.local = prefix;
750 0 error_qname.Namespace = "";
751 0 result = GlobusSoapMessageErrorSerializeFailed(result,
752 NULL,
753 &error_qname);
754 0 goto exit;
755 }
756
757
758 }
759
760 0 result = globus_soap_message_serialize_element(
761 message_handle,
762 element_qname,
763 options,
764 &wsse_KeyIdentifierType_qname);
765 0 if(result != GLOBUS_SUCCESS)
766 {
767 0 result = GlobusSoapMessageErrorSerializeFailed(
768 result, NULL, element_qname);
769 0 goto exit;
770 }
771
772 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
773 !globus_soap_message_serialize_is_c14n_subset(message_handle))
774 {
775 0 xsd_QName_init(&type_attr);
776
777 0 type_attr->local = globus_libc_strdup("type");
778 0 type_attr->Namespace = globus_libc_strdup(XSI_NS);
779 }
780
781
782 /* serialize namespaces */
783 0 result = globus_soap_message_element_ns_add(
784 message_handle,
785 element_qname,
786 element_qname->Namespace,
787 &options);
788 0 if(result != GLOBUS_SUCCESS)
789 {
790 0 result = GlobusSoapMessageErrorSerializeFailed(
791 result, NULL, element_qname);
792 0 goto exit;
793 }
794
795 0 result = xsd_anyAttributes_namespace_add(
796 message_handle, element_qname, instance->anyAttributes, &options);
797 0 if(result != GLOBUS_SUCCESS)
798 {
799 0 result = GlobusSoapMessageErrorSerializeAnyAttrsFailed(
800 result, "Failed to add namespace");
801 0 goto exit;
802 }
803
804 0 if(instance->_Id)
805 {
806
807 0 result = globus_soap_message_attribute_ns_add(
808 message_handle,
809 element_qname,
810 "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd",
811 &options);
812 0 if(result != GLOBUS_SUCCESS)
813 {
814 xsd_QName error_qname;
815 0 error_qname.local = prefix;
816 0 error_qname.Namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
817 0 result = GlobusSoapMessageErrorSerializeFailed(result,
818 NULL,
819 &error_qname);
820 0 goto exit;
821 }
822
823 }
824
825 0 if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
826 !globus_soap_message_serialize_is_c14n_subset(message_handle)))
827 {
828 0 result = globus_soap_message_attribute_ns_add(
829 message_handle,
830 element_qname,
831 "http://www.w3.org/2001/XMLSchema-instance",
832 &options);
833 0 if(result != GLOBUS_SUCCESS)
834 {
835 0 result = GlobusSoapMessageErrorSerializeFailed(
836 result, NULL, element_qname);
837 0 goto exit;
838 }
839 }
840 0 if ((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
841 !globus_soap_message_serialize_is_c14n_subset(message_handle))
842 {
843
844 0 result = globus_soap_message_attribute_ns_add(
845 message_handle,
846 element_qname,
847 wsse_KeyIdentifierType_qname.Namespace,
848 &options);
849 0 if(result != GLOBUS_SUCCESS)
850 {
851 0 result = GlobusSoapMessageErrorSerializeFailed(
852 result, NULL, element_qname);
853 0 goto exit;
854 }
855 }
856
857 0 if(instance->_EncodingType)
858 {
859
860 }
861
862 0 if(instance->_ValueType)
863 {
864
865 }
866
867 /* serialize attributes */
868
869 0 if(instance->anyAttributes)
870 {
871 0 any_attr_keys = xsd_anyAttributes_lex_sort(
872 instance->anyAttributes);
873 0 any_attr_keys_iterator = any_attr_keys;
874 }
875
876 0 subelement.Namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
877 0 subelement.local = "Id";
878
879 0 if(any_attr_keys_iterator)
880 {
881 0 result = xsd_anyAttributes_serialize_lex_before(
882 message_handle,
883 &any_attr_keys_iterator,
884 instance->anyAttributes,
885 &subelement);
886 0 if(result != GLOBUS_SUCCESS)
887 {
888 0 result = GlobusSoapMessageErrorSerializeFailed(result,
889 NULL,
890 element_qname);
891 0 goto exit;
892 }
893 }
894
895 0 if(instance->_Id)
896 {
897
898 0 result = xsd_ID_serialize_attribute(
899 &subelement,
900 instance->_Id,
901 message_handle,
902 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
903 0 if(result != GLOBUS_SUCCESS)
904 {
905 0 result = GlobusSoapMessageErrorSerializeFailed(result,
906 NULL,
907 element_qname);
908 0 goto exit;
909 }
910
911 }
912
913 0 if(any_attr_keys_iterator)
914 {
915 0 result = xsd_anyAttributes_serialize_lex_before(
916 message_handle,
917 &any_attr_keys_iterator,
918 instance->anyAttributes,
919 type_attr);
920 0 if(result != GLOBUS_SUCCESS)
921 {
922 0 result = GlobusSoapMessageErrorSerializeFailed(result,
923 NULL,
924 element_qname);
925 0 goto exit;
926 }
927 }
928
929 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
930 !globus_soap_message_serialize_is_c14n_subset(message_handle))
931 {
932 0 result = globus_soap_message_serialize_QName_attribute(
933 message_handle,
934 type_attr,
935 &wsse_KeyIdentifierType_qname);
936 0 if(result != GLOBUS_SUCCESS)
937 {
938 0 result = GlobusSoapMessageErrorSerializeFailed(
939 result, NULL, element_qname);
940 0 goto exit;
941 }
942 }
943
944 0 subelement.Namespace = "";
945 0 subelement.local = "EncodingType";
946
947 0 if(instance->_EncodingType)
948 {
949
950 0 result = xsd_anyURI_serialize_attribute(
951 &subelement,
952 instance->_EncodingType,
953 message_handle,
954 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
955 0 if(result != GLOBUS_SUCCESS)
956 {
957 0 result = GlobusSoapMessageErrorSerializeFailed(result,
958 NULL,
959 element_qname);
960 0 goto exit;
961 }
962
963 }
964
965 0 subelement.Namespace = "";
966 0 subelement.local = "ValueType";
967
968 0 if(instance->_ValueType)
969 {
970
971 0 result = xsd_anyURI_serialize_attribute(
972 &subelement,
973 instance->_ValueType,
974 message_handle,
975 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
976 0 if(result != GLOBUS_SUCCESS)
977 {
978 0 result = GlobusSoapMessageErrorSerializeFailed(result,
979 NULL,
980 element_qname);
981 0 goto exit;
982 }
983
984 }
985
986
987 }
988
989 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
990 {
991 0 result = globus_soap_message_serialize_element_begin_close(
992 message_handle, element_qname);
993 0 if(result != GLOBUS_SUCCESS)
994 {
995 0 result = GlobusSoapMessageErrorSerializeFailed(
996 result, NULL, element_qname);
997 0 goto exit;
998 }
999 }
1000 0 options &= ~GLOBUS_XSD_ELEMENT_CONTENTS_ONLY;
1001
1002
1003 /* serialize contents of type */
1004
1005 0 subelement.local = "base_value";
1006 0 subelement.Namespace = NULL;
1007
1008 0 result = xsd_string_serialize(
1009 &subelement,
1010 &instance->base_value,
1011 message_handle,
1012 GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
1013 0 if(result != GLOBUS_SUCCESS)
1014 {
1015 0 result = GlobusSoapMessageErrorSerializeFailed(
1016 result, NULL, &xsd_string_qname);
1017 0 goto exit;
1018 }
1019
1020 0 options = save_options;
1021
1022 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
1023 {
1024 /* add end element */
1025 0 result = globus_soap_message_serialize_element_end(
1026 message_handle,
1027 element_qname,
1028 options,
1029 &wsse_KeyIdentifierType_qname);
1030 0 if(result != GLOBUS_SUCCESS)
1031 {
1032 0 result = GlobusSoapMessageErrorSerializeFailed(
1033 result, NULL, element_qname);
1034 0 goto exit;
1035 }
1036
1037 0 globus_soap_message_element_ns_remove(
1038 message_handle,
1039 element_qname->Namespace,
1040 &options);
1041
1042 /* remove namespace/prefix mappings for these types */
1043
1044 0 result = xsd_anyAttributes_namespace_remove(
1045 message_handle, instance->anyAttributes, &options);
1046 0 if(result != GLOBUS_SUCCESS)
1047 {
1048 0 result = GlobusSoapMessageErrorSerializeAnyAttrsFailed(
1049 result, "Failed to remove namespace");
1050 0 goto exit;
1051 }
1052
1053 0 if(instance->_Id)
1054 {
1055
1056 0 globus_soap_message_attribute_ns_remove(
1057 message_handle,
1058 "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd",
1059 &options);
1060
1061 }
1062
1063 0 if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
1064 !globus_soap_message_serialize_is_c14n_subset(message_handle)))
1065 {
1066 0 globus_soap_message_attribute_ns_remove(
1067 message_handle,
1068 "http://www.w3.org/2001/XMLSchema-instance",
1069 &options);
1070 }
1071 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
1072 !globus_soap_message_serialize_is_c14n_subset(message_handle))
1073 {
1074 0 globus_soap_message_attribute_ns_remove(
1075 message_handle,
1076 wsse_KeyIdentifierType_qname.Namespace,
1077 &options);
1078 }
1079
1080 0 if(instance->_EncodingType)
1081 {
1082
1083 0 globus_soap_message_attribute_ns_remove(
1084 message_handle,
1085 NULL,
1086 &options);
1087
1088 }
1089
1090 0 if(instance->_ValueType)
1091 {
1092
1093 0 globus_soap_message_attribute_ns_remove(
1094 message_handle,
1095 NULL,
1096 &options);
1097
1098 }
1099
1100 }
1101
1102 0 exit:
1103 0 if (type_attr)
1104 {
1105 0 xsd_QName_destroy(type_attr);
1106 }
1107
1108
1109 0 if(any_attr_keys)
1110 {
1111 0 globus_list_free(any_attr_keys);
1112 }
1113
1114 0 GlobusSoapMessageDebugExit();
1115 0 return result;
1116 }
1117
1118
1119
1120 globus_result_t
1121 wsse_KeyIdentifierType_deserialize_contents(
1122 const xsd_QName * element_qname, /* ignored */
1123 wsse_KeyIdentifierType * inst,
1124 globus_soap_message_handle_t message_handle,
1125 globus_xsd_element_options_t options)
1126 0 {
1127 0 globus_result_t result = GLOBUS_SUCCESS;
1128 GlobusFuncName(wsse_KeyIdentifierType_deserialize_contents);
1129 0 GlobusSoapMessageDebugEnter();
1130
1131 0 result = wsse_KeyIdentifierType_deserialize(
1132 NULL,
1133 inst,
1134 message_handle,
1135 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
1136 0 if(result != GLOBUS_SUCCESS)
1137 {
1138 0 result = GlobusSoapMessageErrorDeserializeFailed(
1139 result, element_qname);
1140 0 goto exit;
1141 }
1142
1143 0 exit:
1144
1145 0 GlobusSoapMessageDebugExit();
1146 0 return result;
1147 }
1148
1149
1150
1151 globus_result_t
1152 wsse_KeyIdentifierType_deserialize(
1153 const xsd_QName * element_qname,
1154 wsse_KeyIdentifierType * instance,
1155 globus_soap_message_handle_t message_handle,
1156 globus_xsd_element_options_t options)
1157 0 {
1158 0 globus_result_t result = GLOBUS_SUCCESS;
1159 xsd_QName subelement;
1160 GlobusFuncName(wsse_KeyIdentifierType_deserialize);
1161 0 GlobusSoapMessageDebugEnter();
1162
1163
1164 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
1165 {
1166 0 result = globus_soap_message_deserialize_element(
1167 message_handle, element_qname);
1168 0 if(result != GLOBUS_SUCCESS)
1169 {
1170 0 result = GlobusSoapMessageErrorDeserializeFailed(
1171 result, element_qname);
1172 0 goto exit;
1173 }
1174
1175 0 result = xsd_anyAttributes_init(&instance->anyAttributes);
1176 0 if(result != GLOBUS_SUCCESS)
1177 {
1178 0 result = GlobusSoapMessageErrorDeserializeFailed(
1179 result, element_qname);
1180 0 goto xsd_anyAttributes_after_destroy;
1181 }
1182 0 subelement.Namespace = "##any";
1183 0 subelement.local = "anyAttributes";
1184
1185 0 result = xsd_anyAttributes_deserialize(
1186 message_handle,
1187 instance->anyAttributes,
1188 &subelement);
1189 0 if(result != GLOBUS_SUCCESS)
1190 {
1191 0 result = GlobusSoapMessageErrorDeserializeFailed(
1192 result, element_qname);
1193 0 goto xsd_anyAttributes_destroy;
1194 }
1195
1196 0 subelement.Namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
1197 0 subelement.local = "Id";
1198
1199 0 result = xsd_ID_deserialize_attribute_pointer(
1200 &subelement,
1201 &instance->_Id,
1202 message_handle,
1203 0);
1204 0 if(result != GLOBUS_SUCCESS)
1205 {
1206 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1207 0 goto _Id_destroy;
1208 }
1209
1210
1211 0 subelement.Namespace = "";
1212 0 subelement.local = "EncodingType";
1213
1214 0 result = xsd_anyURI_deserialize_attribute_pointer(
1215 &subelement,
1216 &instance->_EncodingType,
1217 message_handle,
1218 0);
1219 0 if(result != GLOBUS_SUCCESS)
1220 {
1221 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1222 0 goto _EncodingType_destroy;
1223 }
1224
1225
1226 0 subelement.Namespace = "";
1227 0 subelement.local = "ValueType";
1228
1229 0 result = xsd_anyURI_deserialize_attribute_pointer(
1230 &subelement,
1231 &instance->_ValueType,
1232 message_handle,
1233 0);
1234 0 if(result != GLOBUS_SUCCESS)
1235 {
1236 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1237 0 goto _ValueType_destroy;
1238 }
1239
1240
1241
1242 0 result = globus_soap_message_deserialize_element_begin_close(
1243 message_handle);
1244 0 if(result != GLOBUS_SUCCESS)
1245 {
1246 0 result = GlobusSoapMessageErrorDeserializeFailed(
1247 result, element_qname);
1248 0 goto fail_deserialize;
1249 }
1250 }
1251
1252 0 subelement.local = "base_value";
1253 0 subelement.Namespace = NULL;
1254
1255 0 result = xsd_string_deserialize(
1256 &subelement,
1257 &instance->base_value,
1258 message_handle,
1259 GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
1260 0 if(result != GLOBUS_SUCCESS)
1261 {
1262 0 result = GlobusSoapMessageErrorDeserializeFailed(
1263 result,
1264 &xsd_string_qname);
1265 0 goto base_value_destroy;
1266 }
1267
1268 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
1269 {
1270 0 result = globus_soap_message_deserialize_element_end(
1271 message_handle,
1272 element_qname);
1273 0 if(result != GLOBUS_SUCCESS)
1274 {
1275 0 result = GlobusSoapMessageErrorDeserializeFailed(
1276 result, element_qname);
1277 0 goto fail_deserialize;
1278 }
1279 }
1280
1281 0 goto exit;
1282
1283 0 fail_deserialize:
1284
1285 0 xsd_anyAttributes_destroy:
1286 0 xsd_anyAttributes_destroy(instance->anyAttributes);
1287 0 instance->anyAttributes = NULL;
1288 0 xsd_anyAttributes_after_destroy:
1289 0 xsd_string_destroy_contents(
1290 &instance->base_value);
1291
1292 0 base_value_destroy:
1293
1294 0 _Id_destroy:
1295 /* output_fail_destroy_attribute() */
1296
1297 0 if(instance->_Id)
1298 {
1299 0 xsd_ID_destroy(
1300 instance->_Id);
1301 0 instance->_Id = NULL;
1302 }
1303
1304 0 _EncodingType_destroy:
1305 /* output_fail_destroy_attribute() */
1306
1307 0 if(instance->_EncodingType)
1308 {
1309 0 xsd_anyURI_destroy(
1310 instance->_EncodingType);
1311 0 instance->_EncodingType = NULL;
1312 }
1313
1314 0 _ValueType_destroy:
1315 /* output_fail_destroy_attribute() */
1316
1317 0 if(instance->_ValueType)
1318 {
1319 0 xsd_anyURI_destroy(
1320 instance->_ValueType);
1321 0 instance->_ValueType = NULL;
1322 }
1323
1324
1325 0 exit:
1326
1327 0 GlobusSoapMessageDebugExit();
1328 0 return result;
1329 }
1330
1331
1332
1333 globus_result_t
1334 wsse_KeyIdentifierType_deserialize_pointer(
1335 const xsd_QName * element_qname,
1336 wsse_KeyIdentifierType ** ip,
1337 globus_soap_message_handle_t message_handle,
1338 globus_xsd_element_options_t options)
1339 0 {
1340 0 wsse_KeyIdentifierType * instance = NULL;
1341 0 globus_result_t result = GLOBUS_SUCCESS;
1342 xsd_QName subelement;
1343 0 int found_attrs = 0;
1344 0 int empty_element = 0;
1345 GlobusFuncName(wsse_KeyIdentifierType_deserialize_pointer);
1346 0 GlobusSoapMessageDebugEnter();
1347
1348 0 *ip = NULL;
1349
1350 0 result = globus_soap_message_deserialize_element(
1351 message_handle, element_qname);
1352 0 if(result != GLOBUS_SUCCESS &&
1353 (GlobusSoapMessageStatusElementNotFoundCheck(result) ||
1354 GlobusSoapMessageStatusFailedElementCheck(result) ||
1355 GlobusSoapMessageStatusFailedWithTextCheck(result)))
1356 {
1357 0 result = GLOBUS_SUCCESS;
1358 0 goto exit;
1359 }
1360
1361 0 if(result != GLOBUS_SUCCESS)
1362 {
1363 0 result = GlobusSoapMessageErrorDeserializeFailed(
1364 result, element_qname);
1365 0 goto exit;
1366 }
1367
1368 0 if(globus_soap_message_deserialize_element_is_empty(
1369 message_handle))
1370 {
1371 0 empty_element = 1;
1372 }
1373
1374 0 result = wsse_KeyIdentifierType_init(&instance);
1375 0 if(result != GLOBUS_SUCCESS)
1376 {
1377 0 result = GlobusSoapMessageErrorDeserializeFailed(
1378 result, element_qname);
1379 0 goto exit;
1380 }
1381
1382
1383 0 result = xsd_anyAttributes_init(&instance->anyAttributes);
1384 0 if(result != GLOBUS_SUCCESS)
1385 {
1386 0 result = GlobusSoapMessageErrorDeserializeFailed(
1387 result, element_qname);
1388 0 goto xsd_anyAttributes_after_destroy;
1389 }
1390 0 subelement.Namespace = "##any";
1391 0 subelement.local = "anyAttributes";
1392
1393 0 result = xsd_anyAttributes_deserialize(
1394 message_handle,
1395 instance->anyAttributes,
1396 &subelement);
1397 0 if(result != GLOBUS_SUCCESS)
1398 {
1399 0 result = GlobusSoapMessageErrorDeserializeFailed(
1400 result, element_qname);
1401 0 goto xsd_anyAttributes_destroy;
1402 }
1403
1404 0 if(instance->anyAttributes &&
1405 xsd_anyAttributes_size(instance->anyAttributes) > 0)
1406 {
1407 0 found_attrs++;
1408 }
1409
1410 0 subelement.Namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
1411 0 subelement.local = "Id";
1412
1413 0 result = xsd_ID_deserialize_attribute_pointer(
1414 &subelement,
1415 &instance->_Id,
1416 message_handle,
1417 0);
1418 0 if(result != GLOBUS_SUCCESS)
1419 {
1420 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1421 0 goto _Id_destroy;
1422 }
1423
1424
1425 0 if(instance->_Id)
1426 {
1427 0 found_attrs++;
1428 }
1429
1430 0 subelement.Namespace = "";
1431 0 subelement.local = "EncodingType";
1432
1433 0 result = xsd_anyURI_deserialize_attribute_pointer(
1434 &subelement,
1435 &instance->_EncodingType,
1436 message_handle,
1437 0);
1438 0 if(result != GLOBUS_SUCCESS)
1439 {
1440 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1441 0 goto _EncodingType_destroy;
1442 }
1443
1444
1445 0 if(instance->_EncodingType)
1446 {
1447 0 found_attrs++;
1448 }
1449
1450 0 subelement.Namespace = "";
1451 0 subelement.local = "ValueType";
1452
1453 0 result = xsd_anyURI_deserialize_attribute_pointer(
1454 &subelement,
1455 &instance->_ValueType,
1456 message_handle,
1457 0);
1458 0 if(result != GLOBUS_SUCCESS)
1459 {
1460 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1461 0 goto _ValueType_destroy;
1462 }
1463
1464
1465 0 if(instance->_ValueType)
1466 {
1467 0 found_attrs++;
1468 }
1469
1470 0 if(found_attrs == 0 &&
1471 globus_soap_message_deserialize_element_is_nil(message_handle))
1472 {
1473 0 wsse_KeyIdentifierType_destroy(instance);
1474
1475 0 result = globus_soap_message_deserialize_element_end(
1476 message_handle,
1477 element_qname);
1478 0 if(result != GLOBUS_SUCCESS)
1479 {
1480 0 result = GlobusSoapMessageErrorDeserializeFailed(
1481 result, element_qname);
1482 0 goto exit;
1483 }
1484
1485 0 *ip = NULL;
1486 0 globus_object_free(globus_error_get(result));
1487 0 result = GLOBUS_SUCCESS;
1488 0 goto exit;
1489 }
1490
1491 0 if(empty_element)
1492 {
1493 0 result = globus_soap_message_deserialize_element_end(
1494 message_handle,
1495 element_qname);
1496 0 if(result != GLOBUS_SUCCESS)
1497 {
1498 0 result = GlobusSoapMessageErrorDeserializeFailed(
1499 result, element_qname);
1500 0 goto fail_deserialize;
1501 }
1502
1503 0 *ip = instance;
1504 0 goto exit;
1505 }
1506
1507 0 result = globus_soap_message_deserialize_element_begin_close(
1508 message_handle);
1509 0 if(result != GLOBUS_SUCCESS)
1510 {
1511 0 result = GlobusSoapMessageErrorDeserializeFailed(
1512 result, element_qname);
1513 0 goto exit;
1514 }
1515
1516 0 result = wsse_KeyIdentifierType_deserialize(
1517 element_qname,
1518 instance,
1519 message_handle,
1520 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
1521 0 if(result != GLOBUS_SUCCESS)
1522 {
1523 0 result = GlobusSoapMessageErrorDeserializeFailed(
1524 result, element_qname);
1525 0 goto exit;
1526 }
1527
1528 0 result = globus_soap_message_deserialize_element_end(
1529 message_handle,
1530 element_qname);
1531 0 if(result != GLOBUS_SUCCESS)
1532 {
1533 0 result = GlobusSoapMessageErrorDeserializeFailed(
1534 result, element_qname);
1535 0 goto fail_deserialize;
1536 }
1537
1538 0 *ip = instance;
1539
1540 0 goto exit;
1541
1542 0 fail_deserialize:
1543
1544 0 xsd_anyAttributes_destroy:
1545 0 xsd_anyAttributes_destroy(instance->anyAttributes);
1546 0 instance->anyAttributes = NULL;
1547 0 xsd_anyAttributes_after_destroy:
1548 0 xsd_string_destroy_contents(
1549 &instance->base_value);
1550
1551 0 base_value_destroy:
1552
1553 0 _Id_destroy:
1554 /* output_fail_destroy_attribute() */
1555
1556 0 if(instance->_Id)
1557 {
1558 0 xsd_ID_destroy(
1559 instance->_Id);
1560 0 instance->_Id = NULL;
1561 }
1562
1563 0 _EncodingType_destroy:
1564 /* output_fail_destroy_attribute() */
1565
1566 0 if(instance->_EncodingType)
1567 {
1568 0 xsd_anyURI_destroy(
1569 instance->_EncodingType);
1570 0 instance->_EncodingType = NULL;
1571 }
1572
1573 0 _ValueType_destroy:
1574 /* output_fail_destroy_attribute() */
1575
1576 0 if(instance->_ValueType)
1577 {
1578 0 xsd_anyURI_destroy(
1579 instance->_ValueType);
1580 0 instance->_ValueType = NULL;
1581 }
1582
1583 0 exit:
1584
1585 0 GlobusSoapMessageDebugExit();
1586 0 return result;
1587 }
1588
1589
1590 globus_result_t
1591 wsse_KeyIdentifierType_array_init_contents(
1592 wsse_KeyIdentifierType_array * array)
1593 0 {
1594 0 return globus_xsd_generic_array_init_contents(
1595 (globus_xsd_generic_array_t *) array,
1596 &wsse_KeyIdentifierType_info);
1597 }
1598 /* wsse_KeyIdentifierType_array_init_contents() */
1599
1600 globus_result_t
1601 wsse_KeyIdentifierType_array_init(
1602 wsse_KeyIdentifierType_array ** arr)
1603 0 {
1604 0 return globus_xsd_generic_array_init(
1605 (globus_xsd_generic_array_t **) arr,
1606 &wsse_KeyIdentifierType_info);
1607 }
1608 /* wsse_KeyIdentifierType_array_init() */
1609
1610 void
1611 wsse_KeyIdentifierType_array_destroy_contents(
1612 wsse_KeyIdentifierType_array * array)
1613 0 {
1614 0 globus_xsd_generic_array_destroy_contents(
1615 (globus_xsd_generic_array_t *) array);
1616 0 }
1617 /* wsse_KeyIdentifierType_array_destroy_contents() */
1618
1619 void
1620 wsse_KeyIdentifierType_array_destroy(
1621 wsse_KeyIdentifierType_array * array)
1622 0 {
1623 0 globus_xsd_generic_array_destroy(
1624 (globus_xsd_generic_array_t *) array);
1625 0 }
1626 /* wsse_KeyIdentifierType_array_destroy() */
1627
1628 globus_result_t
1629 wsse_KeyIdentifierType_array_copy(
1630 wsse_KeyIdentifierType_array ** dest_arr,
1631 const wsse_KeyIdentifierType_array * src_arr)
1632 0 {
1633 0 return globus_xsd_generic_array_copy(
1634 (globus_xsd_generic_array_t **) dest_arr,
1635 (globus_xsd_generic_array_t *) src_arr);
1636 }
1637 /* wsse_KeyIdentifierType_array_copy() */
1638
1639 globus_result_t
1640 wsse_KeyIdentifierType_array_copy_contents(
1641 wsse_KeyIdentifierType_array * dest_arr,
1642 const wsse_KeyIdentifierType_array * src_arr)
1643 0 {
1644 0 return globus_xsd_generic_array_copy_contents(
1645 (globus_xsd_generic_array_t *) dest_arr,
1646 (globus_xsd_generic_array_t *) src_arr);
1647 }
1648 /* wsse_KeyIdentifierType_array_copy_contents() */
1649
1650 wsse_KeyIdentifierType *
1651 wsse_KeyIdentifierType_array_push(
1652 wsse_KeyIdentifierType_array * array)
1653 0 {
1654 /* Some contents initializers don't initialize subelments but to set their
1655 * values to be NULL
1656 */
1657 0 if (array->type_info == NULL)
1658 {
1659 0 array->type_info = &wsse_KeyIdentifierType_info;
1660 }
1661
1662 0 return globus_xsd_generic_array_push(
1663 (globus_xsd_generic_array_t *) array);
1664 }
1665 /* wsse_KeyIdentifierType_array_push() */
1666
1667 globus_result_t
1668 wsse_KeyIdentifierType_array_serialize(
1669 const xsd_QName * element_qname,
1670 const wsse_KeyIdentifierType_array * array,
1671 globus_soap_message_handle_t message,
1672 globus_xsd_element_options_t options)
1673 0 {
1674 0 return globus_xsd_generic_array_serialize(
1675 element_qname,
1676 (const globus_xsd_generic_array_t *) array,
1677 message,
1678 options);
1679 }
1680 /* wsse_KeyIdentifierType_array_serialize() */
1681
1682 globus_result_t
1683 wsse_KeyIdentifierType_array_deserialize(
1684 const xsd_QName * element_qname,
1685 wsse_KeyIdentifierType_array * array,
1686 globus_soap_message_handle_t message,
1687 globus_xsd_element_options_t options)
1688 0 {
1689 /* Some initializers set the array's contents to NULL */
1690 0 if (array->type_info == NULL)
1691 {
1692 0 array->type_info = &wsse_KeyIdentifierType_info;
1693 }
1694 0 return globus_xsd_generic_array_deserialize(
1695 element_qname,
1696 (globus_xsd_generic_array_t *) array,
1697 message,
1698 options);