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_SignaturePropertyType.h"
26
27 xsd_QName ds_SignaturePropertyType_choice_qname =
28 {
29     "http://www.w3.org/2000/09/xmldsig#",
30     "SignaturePropertyType_choice"
31 };
32
33 globus_result_t
34 ds_SignaturePropertyType_choice_serialize_wrapper(
35     const xsd_QName *                   element_qname,
36     const void *                        instance,
37     globus_soap_message_handle_t        message_handle,
38     globus_xsd_element_options_t        options)
39 0 {
40 0     return ds_SignaturePropertyType_choice_serialize(
41         element_qname,
42         (ds_SignaturePropertyType_choice *) instance,
43         message_handle, options);
44 }
45
46 globus_result_t
47 ds_SignaturePropertyType_choice_deserialize_pointer_wrapper(
48     const xsd_QName *                   element_qname,
49     void **                             ip,
50     globus_soap_message_handle_t        message_handle,
51     globus_xsd_element_options_t        options)
52 0 {
53 0     return ds_SignaturePropertyType_choice_deserialize_pointer(
54         element_qname,
55         (ds_SignaturePropertyType_choice **) ip,
56         message_handle, options);
57 }
58
59 globus_result_t
60 ds_SignaturePropertyType_choice_init_wrapper(void **object)
61 0 {
62 0     return ds_SignaturePropertyType_choice_init(
63         (ds_SignaturePropertyType_choice **) object);
64 }
65
66 void
67 ds_SignaturePropertyType_choice_destroy_wrapper(
68     void *                          object)
69 0 {
70 0     ds_SignaturePropertyType_choice_destroy(
71         (ds_SignaturePropertyType_choice *) object);
72 }
73
74 globus_result_t
75 ds_SignaturePropertyType_choice_copy_wrapper(
76     void **                         dest_obj,
77     const void *                    src_obj)
78 0 {
79 0     return ds_SignaturePropertyType_choice_copy(
80         (ds_SignaturePropertyType_choice **) dest_obj,
81         (ds_SignaturePropertyType_choice *) src_obj);
82 }
83
84 globus_result_t
85 ds_SignaturePropertyType_choice_init_contents_wrapper(void *object)
86 0 {
87 0     return ds_SignaturePropertyType_choice_init_contents(
88         (ds_SignaturePropertyType_choice *) object);
89 }
90
91 void
92 ds_SignaturePropertyType_choice_destroy_contents_wrapper(
93     void *                          object)
94 0 {
95 0     ds_SignaturePropertyType_choice_destroy_contents(
96         (ds_SignaturePropertyType_choice *) object);
97 }
98
99 globus_result_t
100 ds_SignaturePropertyType_choice_copy_contents_wrapper(
101     void *                          dest_obj,
102     const void *                    src_obj)
103 0 {
104 0     return ds_SignaturePropertyType_choice_copy_contents(
105         (ds_SignaturePropertyType_choice *) dest_obj,
106         (ds_SignaturePropertyType_choice *) src_obj);
107 }
108
109 globus_result_t
110 ds_SignaturePropertyType_choice_serialize_contents_wrapper(
111     const xsd_QName *                   element_qname,
112     const void *                        instance,
113     globus_soap_message_handle_t        message_handle,
114     globus_xsd_element_options_t        options)
115 0 {
116 0     return ds_SignaturePropertyType_choice_serialize_contents(
117         element_qname,
118         (const ds_SignaturePropertyType_choice *) instance,
119         message_handle, options);
120 }
121
122 globus_result_t
123 ds_SignaturePropertyType_choice_deserialize_contents_wrapper(
124     const xsd_QName *                   element_qname,
125     void **                             instance,
126     globus_soap_message_handle_t        message_handle,
127     globus_xsd_element_options_t        options)
128 0 {
129 0     globus_result_t                     result;
130 0     GlobusFuncName(ds_SignaturePropertyType_choice_deserialize_contents_wrapper);
131 0     GlobusSoapMessageDebugEnter();
132
133 0     if(!*instance)
134     {
135 0         result = ds_SignaturePropertyType_choice_init(
136             (ds_SignaturePropertyType_choice **)instance);
137 0         if(result != GLOBUS_SUCCESS)
138         {
139 0             goto error;
140         }
141     }
142
143 0     result = ds_SignaturePropertyType_choice_deserialize_contents(
144         element_qname,
145         *(ds_SignaturePropertyType_choice **)instance,
146         message_handle, options);
147 error:
148 0     GlobusSoapMessageDebugExit();
149 0     return result;
150 }
151
152 globus_result_t
153 ds_SignaturePropertyType_choice_array_serialize_wrapper(
154     const xsd_QName *               element,
155     const void *                    instance,
156     globus_soap_message_handle_t    message,
157     globus_xsd_element_options_t    options)
158 0 {
159 0     return ds_SignaturePropertyType_choice_array_serialize(
160         element,
161         (ds_SignaturePropertyType_choice_array *) instance,
162         message, options);
163 }
164
165 globus_result_t
166 ds_SignaturePropertyType_choice_array_deserialize_wrapper(
167     const xsd_QName *                   element_qname,
168     void **                             inst,
169     globus_soap_message_handle_t        message,
170     globus_xsd_element_options_t        options)
171 0 {
172 0     if(!*inst)
173     {
174 0         globus_result_t                 result;
175
176 0         result = ds_SignaturePropertyType_choice_array_init(
177             (ds_SignaturePropertyType_choice_array **)inst);
178 0         if(result != GLOBUS_SUCCESS)
179         {
180 0             return result;
181         }
182     }
183
184 0     return ds_SignaturePropertyType_choice_array_deserialize(
185         element_qname,
186         *(ds_SignaturePropertyType_choice_array **) inst,
187         message, options);
188 }
189
190 globus_result_t
191 ds_SignaturePropertyType_choice_array_init_wrapper(
192     void **                             arr)
193 0 {
194 0     return ds_SignaturePropertyType_choice_array_init(
195         (ds_SignaturePropertyType_choice_array **) arr);
196 }
197
198 void
199 ds_SignaturePropertyType_choice_array_destroy_wrapper(
200     void *                              arr)
201 0 {
202 0     ds_SignaturePropertyType_choice_array_destroy(
203         (ds_SignaturePropertyType_choice_array *) arr);
204 }
205
206 globus_result_t
207 ds_SignaturePropertyType_choice_array_copy_wrapper(
208     void **                             dest_arr,
209     const void *                        src_arr)
210 0 {
211 0     return ds_SignaturePropertyType_choice_array_copy(
212         (ds_SignaturePropertyType_choice_array **) dest_arr,
213         (const ds_SignaturePropertyType_choice_array *) src_arr);
214 }
215
216 globus_result_t
217 ds_SignaturePropertyType_choice_array_init_contents_wrapper(
218     void *                              arr)
219 0 {
220 0     return ds_SignaturePropertyType_choice_array_init_contents(
221         (ds_SignaturePropertyType_choice_array *) arr);
222 }
223
224 void
225 ds_SignaturePropertyType_choice_array_destroy_contents_wrapper(
226     void *                              arr)
227 0 {
228 0     ds_SignaturePropertyType_choice_array_destroy_contents(
229         (ds_SignaturePropertyType_choice_array *) arr);
230 }
231
232 globus_result_t
233 ds_SignaturePropertyType_choice_array_copy_contents_wrapper(
234     void *                              dest_arr,
235     const void *                        src_arr)
236 0 {
237 0     return ds_SignaturePropertyType_choice_array_copy_contents(
238         (ds_SignaturePropertyType_choice_array *) dest_arr,
239         (const ds_SignaturePropertyType_choice_array *) src_arr);
240 }
241
242 struct globus_xsd_type_info_s ds_SignaturePropertyType_choice_array_info =
243 {
244     &ds_SignaturePropertyType_choice_qname,
245     ds_SignaturePropertyType_choice_array_serialize_wrapper,
246     ds_SignaturePropertyType_choice_array_deserialize_wrapper,
247     ds_SignaturePropertyType_choice_array_init_wrapper,
248     ds_SignaturePropertyType_choice_array_destroy_wrapper,
249     ds_SignaturePropertyType_choice_array_copy_wrapper,
250     ds_SignaturePropertyType_choice_array_init_contents_wrapper,
251     ds_SignaturePropertyType_choice_array_destroy_contents_wrapper,
252     ds_SignaturePropertyType_choice_array_copy_contents_wrapper,
253     sizeof(ds_SignaturePropertyType_choice),
254     ds_SignaturePropertyType_choice_array_push_wrapper,
255     NULL,
256     NULL
257 };
258
259 struct globus_xsd_type_info_s ds_SignaturePropertyType_choice_contents_info =
260 {
261     &ds_SignaturePropertyType_choice_qname,
262     ds_SignaturePropertyType_choice_serialize_contents_wrapper,
263     ds_SignaturePropertyType_choice_deserialize_contents_wrapper,
264     ds_SignaturePropertyType_choice_init_wrapper,
265     ds_SignaturePropertyType_choice_destroy_wrapper,
266     ds_SignaturePropertyType_choice_copy_wrapper,
267     ds_SignaturePropertyType_choice_init_contents_wrapper,
268     ds_SignaturePropertyType_choice_destroy_contents_wrapper,
269     ds_SignaturePropertyType_choice_copy_contents_wrapper,
270     sizeof(ds_SignaturePropertyType_choice),
271     NULL,
272     NULL,
273     NULL
274 };
275
276 struct globus_xsd_type_info_s ds_SignaturePropertyType_choice_info =
277 {
278     &ds_SignaturePropertyType_choice_qname,
279     ds_SignaturePropertyType_choice_serialize_wrapper,
280     ds_SignaturePropertyType_choice_deserialize_pointer_wrapper,
281     ds_SignaturePropertyType_choice_init_wrapper,
282     ds_SignaturePropertyType_choice_destroy_wrapper,
283     ds_SignaturePropertyType_choice_copy_wrapper,
284     ds_SignaturePropertyType_choice_init_contents_wrapper,
285     ds_SignaturePropertyType_choice_destroy_contents_wrapper,
286     ds_SignaturePropertyType_choice_copy_contents_wrapper,
287     sizeof(ds_SignaturePropertyType_choice),
288     NULL,
289     &ds_SignaturePropertyType_choice_contents_info,
290     &ds_SignaturePropertyType_choice_array_info
291 };
292
293 globus_result_t
294 ds_SignaturePropertyType_choice_init_contents(
295     ds_SignaturePropertyType_choice *                    instance)
296 0 {
297 0     globus_result_t                     result = GLOBUS_SUCCESS;
298 0     GlobusFuncName(ds_SignaturePropertyType_choice_init_contents);
299 0     GlobusSoapMessageDebugEnter();
300
301 0     memset(instance, 0, sizeof(ds_SignaturePropertyType));
302
303 0     GlobusSoapMessageDebugExit();
304 0     return result;
305 }
306
307 globus_result_t
308 ds_SignaturePropertyType_choice_init(
309     ds_SignaturePropertyType_choice ** object)
310 0 {
311 0     ds_SignaturePropertyType_choice * instance;
312 0     globus_result_t                     result = GLOBUS_SUCCESS;
313 0     GlobusFuncName(ds_SignaturePropertyType_choice_init);
314 0     GlobusSoapMessageDebugEnter();
315
316 0     instance = globus_malloc(sizeof(ds_SignaturePropertyType_choice));
317 0     if(!instance)
318     {
319 0         result = GlobusSoapMessageErrorOutOfMemory;
320 0         goto exit;
321     }
322
323 0     memset(instance, 0, sizeof(ds_SignaturePropertyType_choice));
324
325 0     *object = instance;
326
327  exit:
328 0     GlobusSoapMessageDebugExit();
329 0     return result;
330 }
331
332 void
333 ds_SignaturePropertyType_choice_destroy(
334     ds_SignaturePropertyType_choice * instance)
335 0 {
336 0     GlobusFuncName(ds_SignaturePropertyType_choice_destroy);
337 0     GlobusSoapMessageDebugEnter();
338
339 0     if(!instance)
340     {
341 0         goto exit;
342     }
343
344 0     ds_SignaturePropertyType_choice_destroy_contents(instance);
345 0     free(instance);
346
347  exit:
348
349 0     GlobusSoapMessageDebugExit();
350 }
351
352
353
354 void
355 ds_SignaturePropertyType_choice_destroy_contents(
356     ds_SignaturePropertyType_choice * instance)
357 0 {
358 0     GlobusFuncName(ds_SignaturePropertyType_choice_destroy_contents);
359 0     GlobusSoapMessageDebugEnter();
360
361 0     switch(instance->type)
362     {
363
364     case ds_SignaturePropertyType_any:
365
366 0         xsd_any_destroy_contents(
367              &instance->value.any);
368         break;
369
370         default:
371 0             break;
372     }
373
374 0     instance->type = ds_SignaturePropertyType_undefined;
375
376 0     GlobusSoapMessageDebugExit();
377 }
378
379 globus_result_t
380 ds_SignaturePropertyType_choice_copy(
381     ds_SignaturePropertyType_choice ** dest_obj,
382     const ds_SignaturePropertyType_choice * src_obj)
383 0 {
384 0     globus_result_t                     result = GLOBUS_SUCCESS;
385 0     ds_SignaturePropertyType_choice * instance;
386 0     GlobusFuncName(ds_SignaturePropertyType_choice_copy);
387
388 0     GlobusSoapMessageDebugEnter();
389
390 0     instance = malloc(sizeof(ds_SignaturePropertyType_choice));
391 0     if (instance == NULL)
392     {
393 0         GlobusSoapMessageDebugExit();
394 0         return GlobusSoapMessageErrorOutOfMemory;
395     }
396
397 0     result = ds_SignaturePropertyType_choice_copy_contents(instance, src_obj);
398 0     if(result != GLOBUS_SUCCESS)
399     {
400 0         globus_free(instance);
401 0         GlobusSoapMessageDebugExit();
402 0         return GlobusSoapMessageErrorOutOfMemory;
403     }
404
405 0     *dest_obj = instance;
406 0     GlobusSoapMessageDebugExit();
407 0     return result;
408 }
409
410
411
412 globus_result_t
413 ds_SignaturePropertyType_choice_copy_contents(
414     ds_SignaturePropertyType_choice * instance,
415     const ds_SignaturePropertyType_choice * src_obj)
416 0 {
417 0     xsd_QName                           subelement;
418 0     globus_result_t                     result = GLOBUS_SUCCESS;
419 0     GlobusFuncName(ds_SignaturePropertyType_choice_copy_contents);
420
421 0     GlobusSoapMessageDebugEnter();
422
423 0     switch(src_obj->type)
424     {
425
426     case ds_SignaturePropertyType_any:
427 0         instance->type = ds_SignaturePropertyType_any;
428 0         result = xsd_any_copy_contents(
429             &instance->value.any,
430             &src_obj->value.any);
431 0         if(result != GLOBUS_SUCCESS)
432         {
433 0             result = GlobusSoapMessageErrorSerializeFailed(
434                 result, NULL, &ds_SignaturePropertyType_choice_qname);
435             goto exit;
436         }
437
438 0         break;
439
440     default:
441 0         break;
442     }
443
444  exit:
445
446 0     GlobusSoapMessageDebugExit();
447 0     return result;
448 }
449
450
451
452
453
454 globus_result_t
455 ds_SignaturePropertyType_choice_serialize_contents(
456     const xsd_QName *                   element_qname, /* ignored */
457     const ds_SignaturePropertyType_choice *       instance,
458     globus_soap_message_handle_t        message_handle,
459     globus_xsd_element_options_t        options)
460 0 {
461 0     xsd_QName                           subelement;
462 0     globus_result_t                     result = GLOBUS_SUCCESS;
463 0     GlobusFuncName(ds_SignaturePropertyType_choice_serialize_contents);
464 0     GlobusSoapMessageDebugEnter();
465
466 0     switch(instance->type)
467     {
468
469     case ds_SignaturePropertyType_any:
470
471 0         subelement.local = "any";
472 0         subelement.Namespace = "http://www.w3.org/2001/XMLSchema";
473 0         result = xsd_any_serialize(
474             &subelement,
475             &instance->value.any,
476             message_handle,
477             options);
478 0         if(result != GLOBUS_SUCCESS)
479         {
480 0             result = GlobusSoapMessageErrorSerializeFailed(
481                 result, NULL, &ds_SignaturePropertyType_choice_qname);
482             goto exit;
483         }
484
485 0         break;
486
487         default:
488 0             break;
489     }
490
491  exit:
492
493 0     GlobusSoapMessageDebugExit();
494 0     return result;
495 }
496
497
498
499 globus_result_t
500 ds_SignaturePropertyType_choice_serialize(
501     const xsd_QName *                   element_qname,
502     const ds_SignaturePropertyType_choice *       instance,
503     globus_soap_message_handle_t        message_handle,
504     globus_xsd_element_options_t        options)
505 0 {
506 0     globus_result_t                     result = GLOBUS_SUCCESS;
507 0     GlobusFuncName(ds_SignaturePropertyType_choice_serialize);
508 0     GlobusSoapMessageDebugEnter();
509
510 0     result = ds_SignaturePropertyType_choice_serialize_contents(
511         element_qname,
512         instance,
513         message_handle,
514         options);
515 0     if(result != GLOBUS_SUCCESS)
516     {
517 0         result = GlobusSoapMessageErrorSerializeFailed(
518             result, NULL, &ds_SignaturePropertyType_choice_qname);
519         goto exit;
520     }
521
522  exit:
523 0     GlobusSoapMessageDebugExit();
524 0     return result;
525 }
526
527
528
529
530
531 globus_result_t
532 ds_SignaturePropertyType_choice_deserialize_contents(
533     const xsd_QName *                   element_qname, /* ignored */
534     ds_SignaturePropertyType_choice *             instance,
535     globus_soap_message_handle_t        message_handle,
536     globus_xsd_element_options_t        options)
537 0 {
538 0     globus_result_t                     result = GLOBUS_SUCCESS;
539 0     GlobusFuncName(ds_SignaturePropertyType_choice_deserialize_contents);
540 0     GlobusSoapMessageDebugEnter();
541
542 0     result = ds_SignaturePropertyType_choice_deserialize(
543         NULL,
544         instance,
545         message_handle,
546         options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
547 0     if(result != GLOBUS_SUCCESS)
548     {
549 0         result = GlobusSoapMessageErrorDeserializeFailed(
550             result, element_qname);
551         goto exit;
552     }
553
554  exit:
555
556 0     GlobusSoapMessageDebugExit();
557 0     return result;
558 }
559
560
561
562 globus_result_t
563 ds_SignaturePropertyType_choice_deserialize(
564     const xsd_QName *                   element_qname,
565     ds_SignaturePropertyType_choice *             instance,
566     globus_soap_message_handle_t        message_handle,
567     globus_xsd_element_options_t        options)
568 0 {
569 0     globus_result_t                     result = GLOBUS_SUCCESS;
570 0     xsd_QName                           subelement;
571 0     xsd_QName                           deselem_qname = { NULL, NULL } ;
572 0     GlobusFuncName(ds_SignaturePropertyType_choice_deserialize);
573 0     GlobusSoapMessageDebugEnter();
574
575 0     xsd_QName_init_contents(&deselem_qname);
576
577 0     do
578     {
579 0         result = globus_soap_message_deserialize_element_unknown(
580             message_handle, &deselem_qname);
581 0         if(result != GLOBUS_SUCCESS)
582         {
583 0             result = GlobusSoapMessageErrorDeserializeFailed(
584                 result, &ds_SignaturePropertyType_choice_qname);
585 0             goto exit;
586         }
587
588 0         if(globus_soap_message_deserialize_element_is_nil(message_handle))
589         {
590 0             xsd_QName_destroy_contents(&deselem_qname);
591 0             result = globus_soap_message_deserialize_element_end(
592                 message_handle,
593                 element_qname);
594 0             if(result != GLOBUS_SUCCESS)
595             {
596 0                 result = GlobusSoapMessageErrorDeserializeFailed(
597                     result, &ds_SignaturePropertyType_choice_qname);
598 0                 goto exit;
599             }
600         }
601         else
602         {
603 0             break;
604         }
605 0     } while(1);
606
607 0     globus_soap_message_deserialize_push_element(message_handle);
608
609     /* try to parse as any element */
610 0     result = xsd_any_deserialize(
611         &subelement,
612         &instance->value.any,
613         message_handle,
614         options);
615 0     if(result != GLOBUS_SUCCESS)
616     {
617 0         result = GlobusSoapMessageErrorDeserializeFailed(
618             result, &ds_SignaturePropertyType_choice_qname);
619 0         goto any_destroy;
620     }
621     else
622     {
623 0         instance->type=ds_SignaturePropertyType_any;
624         goto exit;
625     }
626
627 0     instance->type = ds_SignaturePropertyType_undefined;
628 0     result = GlobusSoapMessageErrorDeserializeFailed(
629                 result, &ds_SignaturePropertyType_choice_qname);
630  
631 0     goto exit;
632
633  deserialize_failed:
634
635  any_destroy: 
636
637  exit:
638
639 0     xsd_QName_destroy_contents(&deselem_qname);
640
641 0     if(result == GLOBUS_SUCCESS)
642     {
643 0         do
644         {
645 0             result = globus_soap_message_deserialize_element(
646                 message_handle, NULL);
647 0             if(result != GLOBUS_SUCCESS &&
648                (GlobusSoapMessageStatusElementNotFoundCheck(result) ||
649                 GlobusSoapMessageStatusFailedElementCheck(result) ||
650                 GlobusSoapMessageStatusFailedWithTextCheck(result)))
651             {
652 0                 result = GLOBUS_SUCCESS;
653 0                 break;
654             }
655
656 0             if(globus_soap_message_deserialize_element_is_nil(
657                    message_handle))
658             {
659 0                 result = globus_soap_message_deserialize_element_end(
660                     message_handle,
661                     element_qname);
662 0                 if(result != GLOBUS_SUCCESS)
663                 {
664 0                     result = GlobusSoapMessageErrorDeserializeFailed(
665                         result, &ds_SignaturePropertyType_choice_qname);
666                     break;
667                 }
668             }
669             else
670             {
671 0                 break;
672             }
673
674 0         } while(1);
675     }
676
677 0     xsd_QName_destroy_contents(&deselem_qname);
678
679 0     GlobusSoapMessageDebugExit();
680 0     return result;
681 }
682
683
684
685 globus_result_t
686 ds_SignaturePropertyType_choice_deserialize_pointer(
687     const xsd_QName *                   element_qname,
688     ds_SignaturePropertyType_choice **            ip,
689     globus_soap_message_handle_t        message_handle,
690     globus_xsd_element_options_t        options)
691 0 {
692 0     ds_SignaturePropertyType_choice * instance = NULL;
693 0     globus_result_t                     result = GLOBUS_SUCCESS;
694 0     xsd_QName                           subelement;
695 0     GlobusFuncName(ds_SignaturePropertyType_choice_deserialize_pointer);
696 0     GlobusSoapMessageDebugEnter();
697
698 0     *ip = NULL;
699
700 0     result = ds_SignaturePropertyType_choice_init(&instance);
701 0     if(result != GLOBUS_SUCCESS)
702     {
703 0         result = GlobusSoapMessageErrorDeserializeFailed(
704             result, element_qname);
705 0         goto exit;
706     }
707
708 0     result = ds_SignaturePropertyType_choice_deserialize(
709         element_qname,
710         instance,
711         message_handle,
712         options);
713 0     if(result != GLOBUS_SUCCESS)
714     {
715 0         goto exit;
716     }
717
718 0     *ip = instance;
719
720  exit:
721
722 0     GlobusSoapMessageDebugExit();
723 0     return result;
724 }
725
726
727
728 globus_result_t
729 ds_SignaturePropertyType_choice_array_init_contents(
730     ds_SignaturePropertyType_choice_array * array)
731 0 {
732 0     return globus_xsd_generic_array_init_contents(
733         (globus_xsd_generic_array_t *) array,
734         &ds_SignaturePropertyType_choice_array_info);
735 }
736 /* ds_SignaturePropertyType_choice_array_init_contents() */
737
738 globus_result_t
739 ds_SignaturePropertyType_choice_array_init(
740     ds_SignaturePropertyType_choice_array ** arr)
741 0 {
742 0     return globus_xsd_generic_array_init(
743         (globus_xsd_generic_array_t **) arr,
744         &ds_SignaturePropertyType_choice_info);
745 }
746 /* ds_SignaturePropertyType_choice_array_init() */
747
748 void
749 ds_SignaturePropertyType_choice_array_destroy_contents(
750     ds_SignaturePropertyType_choice_array * array)
751 0 {
752 0     globus_xsd_generic_array_destroy_contents(
753         (globus_xsd_generic_array_t *) array);
754 }
755 /* ds_SignaturePropertyType_choice_array_destroy_contents() */
756
757 void
758 ds_SignaturePropertyType_choice_array_destroy(
759     ds_SignaturePropertyType_choice_array * array)
760 0 {
761 0     globus_xsd_generic_array_destroy(
762         (globus_xsd_generic_array_t *) array);
763 }
764 /* ds_SignaturePropertyType_choice_array_destroy() */
765
766 globus_result_t
767 ds_SignaturePropertyType_choice_array_copy(
768     ds_SignaturePropertyType_choice_array ** dest_arr,
769     const ds_SignaturePropertyType_choice_array * src_arr)
770 0 {
771 0     return globus_xsd_generic_array_copy(
772         (globus_xsd_generic_array_t **) dest_arr,
773         (const globus_xsd_generic_array_t *) src_arr);
774 }
775 /* ds_SignaturePropertyType_choice_array_copy() */
776
777 globus_result_t
778 ds_SignaturePropertyType_choice_array_copy_contents(
779     ds_SignaturePropertyType_choice_array * dest_arr,
780     const ds_SignaturePropertyType_choice_array * src_arr)
781 0 {
782 0     return globus_xsd_generic_array_copy_contents(
783         (globus_xsd_generic_array_t *) dest_arr,
784         (const globus_xsd_generic_array_t *) src_arr);
785 }
786
787 ds_SignaturePropertyType_choice *
788 ds_SignaturePropertyType_choice_array_push(
789     ds_SignaturePropertyType_choice_array * array)
790 0 {
791     /* Some contents initializers don't initialize subelments but to set their
792      * values to be NULL
793      */
794 0     if (array->type_info == NULL)
795     {
796 0         array->type_info = &ds_SignaturePropertyType_choice_info;
797     }
798 0     return globus_xsd_generic_array_push(
799         (globus_xsd_generic_array_t *) array);
800 }
801 /* ds_SignaturePropertyType_choice_array_push() */
802
803 void *
804 ds_SignaturePropertyType_choice_array_push_wrapper(
805     void * array)
806 0 {
807 0     return (void *) ds_SignaturePropertyType_choice_array_push(
808         (ds_SignaturePropertyType_choice_array *) array);
809 }
810
811 globus_result_t
812 ds_SignaturePropertyType_choice_array_serialize(
813     const xsd_QName *                   element_qname,
814     const ds_SignaturePropertyType_choice_array * array,
815     globus_soap_message_handle_t        message,
816     globus_xsd_element_options_t        options)
817 0 {
818 0     return globus_xsd_generic_array_serialize(
819         element_qname,
820         (const globus_xsd_generic_array_t *) array,
821         message,
822         options);
823 }
824 /* ds_SignaturePropertyType_choice_array_serialize() */
825
826 globus_result_t
827 ds_SignaturePropertyType_choice_array_deserialize(
828     const xsd_QName *                   element_qname,
829     ds_SignaturePropertyType_choice_array *       array,
830     globus_soap_message_handle_t        message,
831     globus_xsd_element_options_t        options)
832 0 {
833     /* Some initializers set the array's contents to NULL */
834 0     if (array->type_info == NULL)
835     {
836 0         array->type_info = &ds_SignaturePropertyType_choice_info;
837     }
838 0     return globus_xsd_generic_array_deserialize(
839         element_qname,
840         (globus_xsd_generic_array_t *) array,
841         message,
842         options);
843 }