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