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 "wsp_PolicyAssertions_group.h"
26
27 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
28 xsd_QName wsp_PolicyAssertions_group_qname =
29 {
30     WSP_POLICYASSERTIONS_GROUP_NS,
31     WSP_POLICYASSERTIONS_GROUP_LOCAL
32 };
33 #endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */
34
35 globus_result_t
36 wsp_PolicyAssertions_group_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 wsp_PolicyAssertions_group_serialize(
43         element_qname,
44         (const wsp_PolicyAssertions_group *) instance,
45         message_handle, options);
46 }
47
48 globus_result_t
49 wsp_PolicyAssertions_group_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 wsp_PolicyAssertions_group_deserialize_pointer(
56         element_qname,
57         (wsp_PolicyAssertions_group **) ip,
58         message_handle, options);
59 }
60
61 globus_result_t
62 wsp_PolicyAssertions_group_init_wrapper(void **object)
63 0 {
64 0     return wsp_PolicyAssertions_group_init(
65         (wsp_PolicyAssertions_group **) object);
66 }
67
68 void
69 wsp_PolicyAssertions_group_destroy_wrapper(
70     void *                          object)
71 0 {
72 0     wsp_PolicyAssertions_group_destroy(
73         (wsp_PolicyAssertions_group *) object);
74 }
75
76 globus_result_t
77 wsp_PolicyAssertions_group_copy_wrapper(
78     void **                         dest_obj,
79     const void *                    src_obj)
80 0 {
81 0     return wsp_PolicyAssertions_group_copy(
82         (wsp_PolicyAssertions_group **) dest_obj,
83         (wsp_PolicyAssertions_group *) src_obj);
84 }
85
86 globus_result_t
87 wsp_PolicyAssertions_group_init_contents_wrapper(void *object)
88 0 {
89 0     return wsp_PolicyAssertions_group_init_contents(
90         (wsp_PolicyAssertions_group *) object);
91 }
92
93 void
94 wsp_PolicyAssertions_group_destroy_contents_wrapper(
95     void *                          object)
96 0 {
97 0     wsp_PolicyAssertions_group_destroy_contents(
98         (wsp_PolicyAssertions_group *) object);
99 }
100
101 globus_result_t
102 wsp_PolicyAssertions_group_copy_contents_wrapper(
103     void *                          dest_obj,
104     const void *                    src_obj)
105 0 {
106 0     return wsp_PolicyAssertions_group_copy_contents(
107         (wsp_PolicyAssertions_group *) dest_obj,
108         (const wsp_PolicyAssertions_group *) src_obj);
109 }
110
111 globus_result_t
112 wsp_PolicyAssertions_group_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 wsp_PolicyAssertions_group_serialize_contents(
119         element_qname,
120         (wsp_PolicyAssertions_group *) instance,
121         message_handle, options);
122 }
123
124 globus_result_t
125 wsp_PolicyAssertions_group_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(wsp_PolicyAssertions_group_deserialize_contents_wrapper);
133 0     GlobusSoapMessageDebugEnter();
134
135 0     if(!*instance)
136     {
137 0         result = wsp_PolicyAssertions_group_init(
138             (wsp_PolicyAssertions_group **)instance);
139 0         if(result != GLOBUS_SUCCESS)
140         {
141 0             goto error;
142         }
143     }
144
145 0     result = wsp_PolicyAssertions_group_deserialize_contents(
146         element_qname,
147         *(wsp_PolicyAssertions_group **)instance,
148         message_handle, options);
149 error:
150 0     GlobusSoapMessageDebugExit();
151 0     return result;
152 }
153
154 globus_result_t
155 wsp_PolicyAssertions_group_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 wsp_PolicyAssertions_group_array_serialize(
162         element,
163         (wsp_PolicyAssertions_group_array *) instance,
164         message, options);
165 }
166
167 globus_result_t
168 wsp_PolicyAssertions_group_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 = wsp_PolicyAssertions_group_array_init(
179             (wsp_PolicyAssertions_group_array **)inst);
180 0         if(result != GLOBUS_SUCCESS)
181         {
182 0             return result;
183         }
184     }
185
186 0     return wsp_PolicyAssertions_group_array_deserialize(
187         element_qname,
188         *(wsp_PolicyAssertions_group_array **) inst,
189         message, options);
190 }
191
192 globus_result_t
193 wsp_PolicyAssertions_group_array_init_wrapper(
194     void **                             arr)
195 0 {
196 0     return wsp_PolicyAssertions_group_array_init(
197         (wsp_PolicyAssertions_group_array **) arr);
198 }
199
200 void
201 wsp_PolicyAssertions_group_array_destroy_wrapper(
202     void *                              arr)
203 0 {
204 0     wsp_PolicyAssertions_group_array_destroy(
205         (wsp_PolicyAssertions_group_array *) arr);
206 }
207
208 globus_result_t
209 wsp_PolicyAssertions_group_array_copy_wrapper(
210     void **                             dest_arr,
211     const void *                        src_arr)
212 0 {
213 0     return wsp_PolicyAssertions_group_array_copy(
214         (wsp_PolicyAssertions_group_array **) dest_arr,
215         (const wsp_PolicyAssertions_group_array *) src_arr);
216 }
217
218 globus_result_t
219 wsp_PolicyAssertions_group_array_init_contents_wrapper(
220     void *                              arr)
221 0 {
222 0     return wsp_PolicyAssertions_group_array_init_contents(
223         (wsp_PolicyAssertions_group_array *) arr);
224 }
225
226 void
227 wsp_PolicyAssertions_group_array_destroy_contents_wrapper(
228     void *                              arr)
229 0 {
230 0     wsp_PolicyAssertions_group_array_destroy_contents(
231         (wsp_PolicyAssertions_group_array *) arr);
232 }
233
234 globus_result_t
235 wsp_PolicyAssertions_group_array_copy_contents_wrapper(
236     void *                              dest_arr,
237     const void *                        src_arr)
238 0 {
239 0     return wsp_PolicyAssertions_group_array_copy_contents(
240         (wsp_PolicyAssertions_group_array *) dest_arr,
241         (const wsp_PolicyAssertions_group_array *) src_arr);
242 }
243
244 struct globus_xsd_type_info_s wsp_PolicyAssertions_group_contents_info =
245 {
246     &wsp_PolicyAssertions_group_qname,
247     wsp_PolicyAssertions_group_serialize_contents_wrapper,
248     wsp_PolicyAssertions_group_deserialize_contents_wrapper,
249     wsp_PolicyAssertions_group_init_wrapper,
250     wsp_PolicyAssertions_group_destroy_wrapper,
251     wsp_PolicyAssertions_group_copy_wrapper,
252     wsp_PolicyAssertions_group_init_contents_wrapper,
253     wsp_PolicyAssertions_group_destroy_contents_wrapper,
254     wsp_PolicyAssertions_group_copy_contents_wrapper,
255     sizeof(wsp_PolicyAssertions_group),
256     NULL,
257     NULL,
258     NULL
259 };
260
261 struct globus_xsd_type_info_s wsp_PolicyAssertions_group_array_info =
262 {
263     &wsp_PolicyAssertions_group_qname,
264     wsp_PolicyAssertions_group_array_serialize_wrapper,
265     wsp_PolicyAssertions_group_array_deserialize_wrapper,
266     wsp_PolicyAssertions_group_array_init_wrapper,
267     wsp_PolicyAssertions_group_array_destroy_wrapper,
268     wsp_PolicyAssertions_group_array_copy_wrapper,
269     wsp_PolicyAssertions_group_array_init_contents_wrapper,
270     wsp_PolicyAssertions_group_array_destroy_contents_wrapper,
271     wsp_PolicyAssertions_group_array_copy_contents_wrapper,
272     sizeof(wsp_PolicyAssertions_group),
273     wsp_PolicyAssertions_group_array_push_wrapper,
274     NULL,
275     NULL
276 };
277
278 struct globus_xsd_type_info_s wsp_PolicyAssertions_group_info =
279 {
280     &wsp_PolicyAssertions_group_qname,
281     wsp_PolicyAssertions_group_serialize_wrapper,
282     wsp_PolicyAssertions_group_deserialize_pointer_wrapper,
283     wsp_PolicyAssertions_group_init_wrapper,
284     wsp_PolicyAssertions_group_destroy_wrapper,
285     wsp_PolicyAssertions_group_copy_wrapper,
286     wsp_PolicyAssertions_group_init_contents_wrapper,
287     wsp_PolicyAssertions_group_destroy_contents_wrapper,
288     wsp_PolicyAssertions_group_copy_contents_wrapper,
289     sizeof(wsp_PolicyAssertions_group),
290     NULL,
291     &wsp_PolicyAssertions_group_contents_info,
292     &wsp_PolicyAssertions_group_array_info
293 };
294
295 globus_result_t
296 wsp_PolicyAssertions_group_init_contents(
297     wsp_PolicyAssertions_group * instance)
298 0 {
299 0     globus_result_t                     result = GLOBUS_SUCCESS;
300 0     GlobusFuncName(wsp_PolicyAssertions_group_init_contents);
301 0     GlobusSoapMessageDebugEnter();
302
303 0     memset(instance, 0, sizeof(wsp_PolicyAssertions_group));
304
305 0     GlobusSoapMessageDebugExit();
306 0     return result;
307 }
308
309 globus_result_t
310 wsp_PolicyAssertions_group_init(
311     wsp_PolicyAssertions_group ** object)
312 0 {
313 0     wsp_PolicyAssertions_group * instance;
314 0     globus_result_t                     result = GLOBUS_SUCCESS;
315 0     GlobusFuncName(wsp_PolicyAssertions_group_init);
316 0     GlobusSoapMessageDebugEnter();
317
318 0     instance = globus_malloc(sizeof(wsp_PolicyAssertions_group));
319 0     if(!instance)
320     {
321 0         result = GlobusSoapMessageErrorOutOfMemory;
322 0         goto exit;
323     }
324
325 0     memset(instance, 0, sizeof(wsp_PolicyAssertions_group));
326
327 0     *object = instance;
328
329  exit:
330 0     GlobusSoapMessageDebugExit();
331 0     return result;
332 }
333
334 void
335 wsp_PolicyAssertions_group_destroy(
336     wsp_PolicyAssertions_group * instance)
337 0 {
338 0     GlobusFuncName(wsp_PolicyAssertions_group_destroy);
339 0     GlobusSoapMessageDebugEnter();
340
341 0     if(!instance)
342     {
343 0         goto exit;
344     }
345
346 0     wsp_PolicyAssertions_group_destroy_contents(instance);
347 0     globus_free(instance);
348
349  exit:
350
351 0     GlobusSoapMessageDebugExit();
352 }
353
354
355 void
356 wsp_PolicyAssertions_group_destroy_contents(
357     wsp_PolicyAssertions_group * instance)
358 0 {
359 0     GlobusFuncName(wsp_PolicyAssertions_group_destroy_contents);
360 0     GlobusSoapMessageDebugEnter();
361
362 0     if(instance)
363     {
364
365
366 0     wsp_PolicyAssertions_group_choice_destroy_contents(
367          &instance->choice_value);
368
369     }
370
371 0     GlobusSoapMessageDebugExit();
372 }
373
374
375 globus_result_t
376 wsp_PolicyAssertions_group_copy(
377     wsp_PolicyAssertions_group ** dest_obj,
378     const wsp_PolicyAssertions_group * src_obj)
379 0 {
380 0     globus_result_t                     result = GLOBUS_SUCCESS;
381 0     wsp_PolicyAssertions_group * instance;
382 0     GlobusFuncName(wsp_PolicyAssertions_group_copy);
383
384 0     GlobusSoapMessageDebugEnter();
385
386 0     instance = calloc(1, sizeof(wsp_PolicyAssertions_group));
387 0     if (instance == NULL)
388     {
389 0         GlobusSoapMessageDebugExit();
390 0         return GlobusSoapMessageErrorOutOfMemory;
391     }
392
393 0     result = wsp_PolicyAssertions_group_copy_contents(instance, src_obj);
394 0     if(result != GLOBUS_SUCCESS)
395     {
396 0         globus_free(instance);
397 0         GlobusSoapMessageDebugExit();
398 0         return GlobusSoapMessageErrorOutOfMemory;
399     }
400
401 0     *dest_obj = instance;
402 0     GlobusSoapMessageDebugExit();
403 0     return result;
404 }
405
406 globus_result_t
407 wsp_PolicyAssertions_group_copy_contents(
408     wsp_PolicyAssertions_group * instance,
409     const wsp_PolicyAssertions_group * src_obj)
410 0 {
411 0     globus_result_t                     result = GLOBUS_SUCCESS;
412 0     GlobusFuncName(wsp_PolicyAssertions_group_copy_contents);
413
414 0     GlobusSoapMessageDebugEnter();
415
416 0     result = wsp_PolicyAssertions_group_choice_copy_contents(
417         &instance->choice_value,
418         &src_obj->choice_value);
419 0     if(result != GLOBUS_SUCCESS)
420     {
421 0         result = GlobusSoapMessageErrorCopyFailed(
422                 result, NULL, &wsp_PolicyAssertions_group_choice_qname);
423         goto choice_value_destroy;
424     }
425
426 0     goto exit;
427
428  fail_deserialize:
429 0         wsp_PolicyAssertions_group_choice_destroy_contents(
430              &instance->choice_value);
431
432  choice_value_destroy:
433
434
435  exit:
436
437 0     GlobusSoapMessageDebugExit();
438 0     return result;
439 }
440
441
442
443 globus_result_t
444 wsp_PolicyAssertions_group_serialize_contents(
445     const xsd_QName *                   element_qname, /* ignored */
446     const wsp_PolicyAssertions_group *              inst,
447     globus_soap_message_handle_t        message_handle,
448     globus_xsd_element_options_t        options)
449 0 {
450 0     globus_result_t                     result = GLOBUS_SUCCESS;
451 0     GlobusFuncName(wsp_PolicyAssertions_group_serialize_contents);
452 0     GlobusSoapMessageDebugEnter();
453
454 0     result = wsp_PolicyAssertions_group_serialize(
455         NULL,
456         inst,
457         message_handle,
458         options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
459 0     if(result != GLOBUS_SUCCESS)
460     {
461 0         result = GlobusSoapMessageErrorSerializeFailed(
462             result, NULL, element_qname);
463         goto exit;
464     }
465
466  exit:
467
468 0     GlobusSoapMessageDebugExit();
469 0     return result;
470 }
471
472
473
474 globus_result_t
475 wsp_PolicyAssertions_group_serialize(
476     const xsd_QName *                   element_qname,
477     const wsp_PolicyAssertions_group *              instance,
478     globus_soap_message_handle_t        message_handle,
479     globus_xsd_element_options_t        options)
480 0 {
481 0     globus_result_t                     result = GLOBUS_SUCCESS;
482 0     xsd_QName                           subelement;
483 0     globus_list_t *                     any_attr_keys = NULL;
484 0     globus_list_t *                     any_attr_keys_iterator = NULL;
485 0     xsd_QName *                         type_attr = NULL;
486
487 0     char *                              prefix = NULL;
488 0     int                                 prefix_created;
489 0     int                                 define_prefix = 0;
490 0     int                                 save_options = options;
491
492 0     GlobusFuncName(wsp_PolicyAssertions_group_serialize);
493 0     GlobusSoapMessageDebugEnter();
494
495
496     /* serialize contents of type */
497
498 0     subelement.local = "choice_value";
499 0     subelement.Namespace = NULL;
500
501 0     result = wsp_PolicyAssertions_group_choice_serialize(
502          &subelement,
503          &instance->choice_value,
504          message_handle,
505          options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
506 0     if(result != GLOBUS_SUCCESS)
507     {
508 0         result = GlobusSoapMessageErrorSerializeFailed(
509                 result, NULL, &wsp_PolicyAssertions_group_choice_qname);
510         goto exit;
511     }
512
513  exit:
514 0     if (type_attr)
515     {
516 0         xsd_QName_destroy(type_attr);
517     }
518
519
520 0     if(any_attr_keys)
521     {
522 0         globus_list_free(any_attr_keys);
523     }
524
525 0     GlobusSoapMessageDebugExit();
526 0     return result;
527 }
528
529
530
531 globus_result_t
532 wsp_PolicyAssertions_group_deserialize_contents(
533     const xsd_QName *                   element_qname, /* ignored */
534     wsp_PolicyAssertions_group *                    inst,
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(wsp_PolicyAssertions_group_deserialize_contents);
540 0     GlobusSoapMessageDebugEnter();
541
542 0     result = wsp_PolicyAssertions_group_deserialize(
543         NULL,
544         inst,
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 wsp_PolicyAssertions_group_deserialize(
564     const xsd_QName *                   element_qname,
565     wsp_PolicyAssertions_group *                    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     GlobusFuncName(wsp_PolicyAssertions_group_deserialize);
572 0     GlobusSoapMessageDebugEnter();
573
574
575 0     subelement.local = "choice_value";
576 0     subelement.Namespace = NULL;
577
578 0     result = wsp_PolicyAssertions_group_choice_deserialize(
579          &subelement,
580          &instance->choice_value,
581          message_handle,
582          0);
583 0     if(result != GLOBUS_SUCCESS)
584     {
585 0         result = GlobusSoapMessageErrorDeserializeFailed(
586             result, 
587             &wsp_PolicyAssertions_group_choice_qname);
588         goto choice_value_destroy;
589     }
590
591 0     goto exit;
592
593  fail_deserialize:
594 0         wsp_PolicyAssertions_group_choice_destroy_contents(
595              &instance->choice_value);
596
597  choice_value_destroy:
598
599
600  exit:
601
602 0     GlobusSoapMessageDebugExit();
603 0     return result;
604 }
605
606
607
608 globus_result_t
609 wsp_PolicyAssertions_group_deserialize_pointer(
610     const xsd_QName *                   element_qname,
611     wsp_PolicyAssertions_group **                   ip,
612     globus_soap_message_handle_t        message_handle,
613     globus_xsd_element_options_t        options)
614 0 {
615 0     wsp_PolicyAssertions_group * instance = NULL;
616 0     globus_result_t                     result = GLOBUS_SUCCESS;
617 0     xsd_QName                           subelement;
618 0     int                                 found_attrs = 0;
619 0     int                                 empty_element = 0;
620 0     GlobusFuncName(wsp_PolicyAssertions_group_deserialize_pointer);
621 0     GlobusSoapMessageDebugEnter();
622
623 0     *ip = NULL;
624
625 0     result = globus_soap_message_deserialize_element(
626         message_handle, element_qname);
627 0     if(result != GLOBUS_SUCCESS &&
628        (GlobusSoapMessageStatusElementNotFoundCheck(result) ||
629         GlobusSoapMessageStatusFailedElementCheck(result) ||
630         GlobusSoapMessageStatusFailedWithTextCheck(result)))
631     {
632 0         result = GLOBUS_SUCCESS;
633 0         goto exit;
634     }
635
636 0     if(result != GLOBUS_SUCCESS)
637     {
638 0         result = GlobusSoapMessageErrorDeserializeFailed(
639             result, element_qname);
640 0         goto exit;
641     }
642
643 0     if(globus_soap_message_deserialize_element_is_empty(
644            message_handle))
645     {
646 0         empty_element = 1;
647     }
648
649 0     result = wsp_PolicyAssertions_group_init(&instance);
650 0     if(result != GLOBUS_SUCCESS)
651     {
652 0         result = GlobusSoapMessageErrorDeserializeFailed(
653             result, element_qname);
654 0         goto exit;
655     }
656
657
658 0     if(found_attrs == 0 && 
659        globus_soap_message_deserialize_element_is_nil(message_handle))
660     {
661 0         wsp_PolicyAssertions_group_destroy(instance);
662         
663 0         result = globus_soap_message_deserialize_element_end(
664                 message_handle,
665                 element_qname);
666 0         if(result != GLOBUS_SUCCESS)
667         {
668 0             result = GlobusSoapMessageErrorDeserializeFailed(
669                 result, element_qname);
670 0             goto exit;
671         }
672
673 0         *ip = NULL;
674 0         globus_object_free(globus_error_get(result));
675 0         result = GLOBUS_SUCCESS;
676 0         goto exit;
677     }
678
679
680 0     if(empty_element)
681     {
682 0         result = globus_soap_message_deserialize_element_end(
683             message_handle,
684             element_qname);
685 0         if(result != GLOBUS_SUCCESS)
686         {
687 0             result = GlobusSoapMessageErrorDeserializeFailed(
688                 result, element_qname);
689 0             goto fail_deserialize;
690         }
691
692 0         *ip = instance;
693 0         goto exit;
694     }
695
696 0     result = globus_soap_message_deserialize_element_begin_close(
697         message_handle);
698 0     if(result != GLOBUS_SUCCESS)
699     {
700 0         result = GlobusSoapMessageErrorDeserializeFailed(
701             result, element_qname);
702 0         goto exit;
703     }
704
705 0     result = wsp_PolicyAssertions_group_deserialize(
706             element_qname,
707             instance,
708             message_handle,
709             options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
710
711 0     result = globus_soap_message_deserialize_element_end(
712         message_handle,
713         element_qname);
714 0     if(result != GLOBUS_SUCCESS)
715     {
716 0         result = GlobusSoapMessageErrorDeserializeFailed(
717             result, element_qname);
718 0         goto fail_deserialize;
719     }
720
721 0     *ip = instance;
722
723 0     goto exit;
724
725  fail_deserialize:
726 0         wsp_PolicyAssertions_group_choice_destroy_contents(
727              &instance->choice_value);
728
729  choice_value_destroy:
730
731  exit:
732
733 0     GlobusSoapMessageDebugExit();
734 0     return result;
735 }
736
737
738 globus_result_t
739 wsp_PolicyAssertions_group_array_init_contents(
740     wsp_PolicyAssertions_group_array * array)
741 0 {
742 0     return globus_xsd_generic_array_init_contents(
743         (globus_xsd_generic_array_t *) array,
744         &wsp_PolicyAssertions_group_info);
745 }
746 /* wsp_PolicyAssertions_group_array_init_contents() */
747
748 globus_result_t
749 wsp_PolicyAssertions_group_array_init(
750     wsp_PolicyAssertions_group_array ** arr)
751 0 {
752 0     return globus_xsd_generic_array_init(
753         (globus_xsd_generic_array_t **) arr,
754         &wsp_PolicyAssertions_group_info);
755 }
756 /* wsp_PolicyAssertions_group_array_init() */
757
758 void
759 wsp_PolicyAssertions_group_array_destroy_contents(
760     wsp_PolicyAssertions_group_array * array)
761 0 {
762 0     globus_xsd_generic_array_destroy_contents(
763         (globus_xsd_generic_array_t *) array);
764 }
765 /* wsp_PolicyAssertions_group_array_destroy_contents() */
766
767 void
768 wsp_PolicyAssertions_group_array_destroy(
769     wsp_PolicyAssertions_group_array * array)
770 0 {
771 0     globus_xsd_generic_array_destroy(
772         (globus_xsd_generic_array_t *) array);
773 }
774 /* wsp_PolicyAssertions_group_array_destroy() */
775
776 globus_result_t
777 wsp_PolicyAssertions_group_array_copy(
778     wsp_PolicyAssertions_group_array ** dest_arr,
779     const wsp_PolicyAssertions_group_array * src_arr)
780 0 {
781 0     return globus_xsd_generic_array_copy(
782         (globus_xsd_generic_array_t **) dest_arr,
783         (globus_xsd_generic_array_t *) src_arr);
784 }
785 /* wsp_PolicyAssertions_group_array_copy() */
786
787 globus_result_t
788 wsp_PolicyAssertions_group_array_copy_contents(
789     wsp_PolicyAssertions_group_array * dest_arr,
790     const wsp_PolicyAssertions_group_array * src_arr)
791 0 {
792 0     return globus_xsd_generic_array_copy_contents(
793         (globus_xsd_generic_array_t *) dest_arr,
794         (globus_xsd_generic_array_t *) src_arr);
795 }
796 /* wsp_PolicyAssertions_group_array_copy_contents() */
797
798 wsp_PolicyAssertions_group *
799 wsp_PolicyAssertions_group_array_push(
800     wsp_PolicyAssertions_group_array * array)
801 0 {
802     /* Some contents initializers don't initialize subelments but to set their
803      * values to be NULL
804      */
805 0     if (array->type_info == NULL)
806     {
807 0         array->type_info = &wsp_PolicyAssertions_group_info;
808     }
809
810 0     return globus_xsd_generic_array_push(
811         (globus_xsd_generic_array_t *) array);
812 }
813 /* wsp_PolicyAssertions_group_array_push() */
814
815 void *
816 wsp_PolicyAssertions_group_array_push_wrapper(
817     void * array)
818 0 {
819 0     return (void *) wsp_PolicyAssertions_group_array_push((wsp_PolicyAssertions_group_array *) array);
820 }
821
822 globus_result_t
823 wsp_PolicyAssertions_group_array_serialize(
824     const xsd_QName *                   element_qname,
825     const wsp_PolicyAssertions_group_array *        array,
826     globus_soap_message_handle_t        message,
827     globus_xsd_element_options_t        options)
828 0 {
829 0     return globus_xsd_generic_array_serialize(
830         element_qname,
831         (const globus_xsd_generic_array_t *) array,
832         message,
833         options);
834 }
835 /* wsp_PolicyAssertions_group_array_serialize() */
836
837 globus_result_t
838 wsp_PolicyAssertions_group_array_deserialize(
839     const xsd_QName *                   element_qname,
840     wsp_PolicyAssertions_group_array * array,
841     globus_soap_message_handle_t        message,
842     globus_xsd_element_options_t        options)
843 0 {
844     /* Some initializers set the array's contents to NULL */
845 0     if (array->type_info == NULL)
846     {
847 0         array->type_info = &wsp_PolicyAssertions_group_info;
848     }
849 0     return globus_xsd_generic_array_deserialize(
850         element_qname,
851         (globus_xsd_generic_array_t *) array,
852         message,
853         options);