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 "rptest_TestStepType.h"
26
27 xsd_QName rptest_TestStepType_choice_qname =
28 {
29     "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest",
30     "TestStepType_choice"
31 };
32
33 globus_result_t
34 rptest_TestStepType_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 rptest_TestStepType_choice_serialize(
41         element_qname,
42         (rptest_TestStepType_choice *) instance,
43         message_handle, options);
44 }
45
46 globus_result_t
47 rptest_TestStepType_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 rptest_TestStepType_choice_deserialize_pointer(
54         element_qname,
55         (rptest_TestStepType_choice **) ip,
56         message_handle, options);
57 }
58
59 globus_result_t
60 rptest_TestStepType_choice_init_wrapper(void **object)
61 0 {
62 0     return rptest_TestStepType_choice_init(
63         (rptest_TestStepType_choice **) object);
64 }
65
66 void
67 rptest_TestStepType_choice_destroy_wrapper(
68     void *                          object)
69 0 {
70 0     rptest_TestStepType_choice_destroy(
71         (rptest_TestStepType_choice *) object);
72 }
73
74 globus_result_t
75 rptest_TestStepType_choice_copy_wrapper(
76     void **                         dest_obj,
77     const void *                    src_obj)
78 0 {
79 0     return rptest_TestStepType_choice_copy(
80         (rptest_TestStepType_choice **) dest_obj,
81         (rptest_TestStepType_choice *) src_obj);
82 }
83
84 globus_result_t
85 rptest_TestStepType_choice_init_contents_wrapper(void *object)
86 0 {
87 0     return rptest_TestStepType_choice_init_contents(
88         (rptest_TestStepType_choice *) object);
89 }
90
91 void
92 rptest_TestStepType_choice_destroy_contents_wrapper(
93     void *                          object)
94 0 {
95 0     rptest_TestStepType_choice_destroy_contents(
96         (rptest_TestStepType_choice *) object);
97 }
98
99 globus_result_t
100 rptest_TestStepType_choice_copy_contents_wrapper(
101     void *                          dest_obj,
102     const void *                    src_obj)
103 0 {
104 0     return rptest_TestStepType_choice_copy_contents(
105         (rptest_TestStepType_choice *) dest_obj,
106         (rptest_TestStepType_choice *) src_obj);
107 }
108
109 globus_result_t
110 rptest_TestStepType_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 rptest_TestStepType_choice_serialize_contents(
117         element_qname,
118         (const rptest_TestStepType_choice *) instance,
119         message_handle, options);
120 }
121
122 globus_result_t
123 rptest_TestStepType_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(rptest_TestStepType_choice_deserialize_contents_wrapper);
131 0     GlobusSoapMessageDebugEnter();
132
133 0     if(!*instance)
134     {
135 0         result = rptest_TestStepType_choice_init(
136             (rptest_TestStepType_choice **)instance);
137 0         if(result != GLOBUS_SUCCESS)
138         {
139 0             goto error;
140         }
141     }
142
143 0     result = rptest_TestStepType_choice_deserialize_contents(
144         element_qname,
145         *(rptest_TestStepType_choice **)instance,
146         message_handle, options);
147 error:
148 0     GlobusSoapMessageDebugExit();
149 0     return result;
150 }
151
152 globus_result_t
153 rptest_TestStepType_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 rptest_TestStepType_choice_array_serialize(
160         element,
161         (rptest_TestStepType_choice_array *) instance,
162         message, options);
163 }
164
165 globus_result_t
166 rptest_TestStepType_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 = rptest_TestStepType_choice_array_init(
177             (rptest_TestStepType_choice_array **)inst);
178 0         if(result != GLOBUS_SUCCESS)
179         {
180 0             return result;
181         }
182     }
183
184 0     return rptest_TestStepType_choice_array_deserialize(
185         element_qname,
186         *(rptest_TestStepType_choice_array **) inst,
187         message, options);
188 }
189
190 globus_result_t
191 rptest_TestStepType_choice_array_init_wrapper(
192     void **                             arr)
193 0 {
194 0     return rptest_TestStepType_choice_array_init(
195         (rptest_TestStepType_choice_array **) arr);
196 }
197
198 void
199 rptest_TestStepType_choice_array_destroy_wrapper(
200     void *                              arr)
201 0 {
202 0     rptest_TestStepType_choice_array_destroy(
203         (rptest_TestStepType_choice_array *) arr);
204 }
205
206 globus_result_t
207 rptest_TestStepType_choice_array_copy_wrapper(
208     void **                             dest_arr,
209     const void *                        src_arr)
210 0 {
211 0     return rptest_TestStepType_choice_array_copy(
212         (rptest_TestStepType_choice_array **) dest_arr,
213         (const rptest_TestStepType_choice_array *) src_arr);
214 }
215
216 globus_result_t
217 rptest_TestStepType_choice_array_init_contents_wrapper(
218     void *                              arr)
219 0 {
220 0     return rptest_TestStepType_choice_array_init_contents(
221         (rptest_TestStepType_choice_array *) arr);
222 }
223
224 void
225 rptest_TestStepType_choice_array_destroy_contents_wrapper(
226     void *                              arr)
227 0 {
228 0     rptest_TestStepType_choice_array_destroy_contents(
229         (rptest_TestStepType_choice_array *) arr);
230 }
231
232 globus_result_t
233 rptest_TestStepType_choice_array_copy_contents_wrapper(
234     void *                              dest_arr,
235     const void *                        src_arr)
236 0 {
237 0     return rptest_TestStepType_choice_array_copy_contents(
238         (rptest_TestStepType_choice_array *) dest_arr,
239         (const rptest_TestStepType_choice_array *) src_arr);
240 }
241
242 struct globus_xsd_type_info_s rptest_TestStepType_choice_array_info =
243 {
244     &rptest_TestStepType_choice_qname,
245     rptest_TestStepType_choice_array_serialize_wrapper,
246     rptest_TestStepType_choice_array_deserialize_wrapper,
247     rptest_TestStepType_choice_array_init_wrapper,
248     rptest_TestStepType_choice_array_destroy_wrapper,
249     rptest_TestStepType_choice_array_copy_wrapper,
250     rptest_TestStepType_choice_array_init_contents_wrapper,
251     rptest_TestStepType_choice_array_destroy_contents_wrapper,
252     rptest_TestStepType_choice_array_copy_contents_wrapper,
253     sizeof(rptest_TestStepType_choice),
254     rptest_TestStepType_choice_array_push_wrapper,
255     NULL,
256     NULL
257 };
258
259 struct globus_xsd_type_info_s rptest_TestStepType_choice_contents_info =
260 {
261     &rptest_TestStepType_choice_qname,
262     rptest_TestStepType_choice_serialize_contents_wrapper,
263     rptest_TestStepType_choice_deserialize_contents_wrapper,
264     rptest_TestStepType_choice_init_wrapper,
265     rptest_TestStepType_choice_destroy_wrapper,
266     rptest_TestStepType_choice_copy_wrapper,
267     rptest_TestStepType_choice_init_contents_wrapper,
268     rptest_TestStepType_choice_destroy_contents_wrapper,
269     rptest_TestStepType_choice_copy_contents_wrapper,
270     sizeof(rptest_TestStepType_choice),
271     NULL,
272     NULL,
273     NULL
274 };
275
276 struct globus_xsd_type_info_s rptest_TestStepType_choice_info =
277 {
278     &rptest_TestStepType_choice_qname,
279     rptest_TestStepType_choice_serialize_wrapper,
280     rptest_TestStepType_choice_deserialize_pointer_wrapper,
281     rptest_TestStepType_choice_init_wrapper,
282     rptest_TestStepType_choice_destroy_wrapper,
283     rptest_TestStepType_choice_copy_wrapper,
284     rptest_TestStepType_choice_init_contents_wrapper,
285     rptest_TestStepType_choice_destroy_contents_wrapper,
286     rptest_TestStepType_choice_copy_contents_wrapper,
287     sizeof(rptest_TestStepType_choice),
288     NULL,
289     &rptest_TestStepType_choice_contents_info,
290     &rptest_TestStepType_choice_array_info
291 };
292
293 globus_result_t
294 rptest_TestStepType_choice_init_contents(
295     rptest_TestStepType_choice *                    instance)
296 0 {
297 0     globus_result_t                     result = GLOBUS_SUCCESS;
298 0     GlobusFuncName(rptest_TestStepType_choice_init_contents);
299 0     GlobusSoapMessageDebugEnter();
300
301 0     memset(instance, 0, sizeof(rptest_TestStepType));
302
303 0     GlobusSoapMessageDebugExit();
304 0     return result;
305 }
306
307 globus_result_t
308 rptest_TestStepType_choice_init(
309     rptest_TestStepType_choice ** object)
310 0 {
311 0     rptest_TestStepType_choice * instance;
312 0     globus_result_t                     result = GLOBUS_SUCCESS;
313 0     GlobusFuncName(rptest_TestStepType_choice_init);
314 0     GlobusSoapMessageDebugEnter();
315
316 0     instance = globus_malloc(sizeof(rptest_TestStepType_choice));
317 0     if(!instance)
318     {
319 0         result = GlobusSoapMessageErrorOutOfMemory;
320 0         goto exit;
321     }
322
323 0     memset(instance, 0, sizeof(rptest_TestStepType_choice));
324
325 0     *object = instance;
326
327  exit:
328 0     GlobusSoapMessageDebugExit();
329 0     return result;
330 }
331
332 void
333 rptest_TestStepType_choice_destroy(
334     rptest_TestStepType_choice * instance)
335 0 {
336 0     GlobusFuncName(rptest_TestStepType_choice_destroy);
337 0     GlobusSoapMessageDebugEnter();
338
339 0     if(!instance)
340     {
341 0         goto exit;
342     }
343
344 0     rptest_TestStepType_choice_destroy_contents(instance);
345 0     free(instance);
346
347  exit:
348
349 0     GlobusSoapMessageDebugExit();
350 }
351
352
353
354 void
355 rptest_TestStepType_choice_destroy_contents(
356     rptest_TestStepType_choice * instance)
357 520 {
358 520     GlobusFuncName(rptest_TestStepType_choice_destroy_contents);
359 520     GlobusSoapMessageDebugEnter();
360
361 520     switch(instance->type)
362     {
363
364     case rptest_TestStepType_GetResourcePropertyTest:
365
366 180         rptest_GetResourcePropertyTestType_destroy_contents(
367              &instance->value.GetResourcePropertyTest);
368 180         break;
369
370     case rptest_TestStepType_GetMultipleResourcePropertiesTest:
371
372 16         rptest_GetMultipleResourcePropertiesTestType_destroy_contents(
373              &instance->value.GetMultipleResourcePropertiesTest);
374 16         break;
375
376     case rptest_TestStepType_SetResourcePropertiesTest:
377
378 284         rptest_SetResourcePropertiesTestType_destroy_contents(
379              &instance->value.SetResourcePropertiesTest);
380 284         break;
381
382     case rptest_TestStepType_QueryResourcePropertiesTest:
383
384 40         rptest_QueryResourcePropertiesTestType_destroy_contents(
385              &instance->value.QueryResourcePropertiesTest);
386         break;
387
388         default:
389 520             break;
390     }
391
392 520     instance->type = rptest_TestStepType_undefined;
393
394 520     GlobusSoapMessageDebugExit();
395 }
396
397 globus_result_t
398 rptest_TestStepType_choice_copy(
399     rptest_TestStepType_choice ** dest_obj,
400     const rptest_TestStepType_choice * src_obj)
401 0 {
402 0     globus_result_t                     result = GLOBUS_SUCCESS;
403 0     rptest_TestStepType_choice * instance;
404 0     GlobusFuncName(rptest_TestStepType_choice_copy);
405
406 0     GlobusSoapMessageDebugEnter();
407
408 0     instance = malloc(sizeof(rptest_TestStepType_choice));
409 0     if (instance == NULL)
410     {
411 0         GlobusSoapMessageDebugExit();
412 0         return GlobusSoapMessageErrorOutOfMemory;
413     }
414
415 0     result = rptest_TestStepType_choice_copy_contents(instance, src_obj);
416 0     if(result != GLOBUS_SUCCESS)
417     {
418 0         globus_free(instance);
419 0         GlobusSoapMessageDebugExit();
420 0         return GlobusSoapMessageErrorOutOfMemory;
421     }
422
423 0     *dest_obj = instance;
424 0     GlobusSoapMessageDebugExit();
425 0     return result;
426 }
427
428
429
430 globus_result_t
431 rptest_TestStepType_choice_copy_contents(
432     rptest_TestStepType_choice * instance,
433     const rptest_TestStepType_choice * src_obj)
434 260 {
435 260     xsd_QName                           subelement;
436 260     globus_result_t                     result = GLOBUS_SUCCESS;
437 260     GlobusFuncName(rptest_TestStepType_choice_copy_contents);
438
439 260     GlobusSoapMessageDebugEnter();
440
441 260     switch(src_obj->type)
442     {
443
444     case rptest_TestStepType_GetResourcePropertyTest:
445 90         instance->type = rptest_TestStepType_GetResourcePropertyTest;
446 90         result = rptest_GetResourcePropertyTestType_copy_contents(
447             &instance->value.GetResourcePropertyTest,
448             &src_obj->value.GetResourcePropertyTest);
449 90         if(result != GLOBUS_SUCCESS)
450         {
451 0             result = GlobusSoapMessageErrorSerializeFailed(
452                 result, NULL, &rptest_TestStepType_choice_qname);
453 0             goto exit;
454         }
455
456 8         break;
457
458     case rptest_TestStepType_GetMultipleResourcePropertiesTest:
459 8         instance->type = rptest_TestStepType_GetMultipleResourcePropertiesTest;
460 8         result = rptest_GetMultipleResourcePropertiesTestType_copy_contents(
461             &instance->value.GetMultipleResourcePropertiesTest,
462             &src_obj->value.GetMultipleResourcePropertiesTest);
463 8         if(result != GLOBUS_SUCCESS)
464         {
465 0             result = GlobusSoapMessageErrorSerializeFailed(
466                 result, NULL, &rptest_TestStepType_choice_qname);
467 0             goto exit;
468         }
469
470 142         break;
471
472     case rptest_TestStepType_SetResourcePropertiesTest:
473 142         instance->type = rptest_TestStepType_SetResourcePropertiesTest;
474 142         result = rptest_SetResourcePropertiesTestType_copy_contents(
475             &instance->value.SetResourcePropertiesTest,
476             &src_obj->value.SetResourcePropertiesTest);
477 142         if(result != GLOBUS_SUCCESS)
478         {
479 0             result = GlobusSoapMessageErrorSerializeFailed(
480                 result, NULL, &rptest_TestStepType_choice_qname);
481 0             goto exit;
482         }
483
484 20         break;
485
486     case rptest_TestStepType_QueryResourcePropertiesTest:
487 20         instance->type = rptest_TestStepType_QueryResourcePropertiesTest;
488 20         result = rptest_QueryResourcePropertiesTestType_copy_contents(
489             &instance->value.QueryResourcePropertiesTest,
490             &src_obj->value.QueryResourcePropertiesTest);
491 20         if(result != GLOBUS_SUCCESS)
492         {
493 0             result = GlobusSoapMessageErrorSerializeFailed(
494                 result, NULL, &rptest_TestStepType_choice_qname);
495             goto exit;
496         }
497
498 260         break;
499
500     default:
501 260         break;
502     }
503
504  exit:
505
506 260     GlobusSoapMessageDebugExit();
507 260     return result;
508 }
509
510
511
512
513
514 globus_result_t
515 rptest_TestStepType_choice_serialize_contents(
516     const xsd_QName *                   element_qname, /* ignored */
517     const rptest_TestStepType_choice *       instance,
518     globus_soap_message_handle_t        message_handle,
519     globus_xsd_element_options_t        options)
520 0 {
521 0     xsd_QName                           subelement;
522 0     globus_result_t                     result = GLOBUS_SUCCESS;
523 0     GlobusFuncName(rptest_TestStepType_choice_serialize_contents);
524 0     GlobusSoapMessageDebugEnter();
525
526 0     switch(instance->type)
527     {
528
529     case rptest_TestStepType_GetResourcePropertyTest:
530
531 0         subelement.local = "GetResourcePropertyTest";
532 0         subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
533 0         result = rptest_GetResourcePropertyTestType_serialize(
534             &subelement,
535             &instance->value.GetResourcePropertyTest,
536             message_handle,
537             options);
538 0         if(result != GLOBUS_SUCCESS)
539         {
540 0             result = GlobusSoapMessageErrorSerializeFailed(
541                 result, NULL, &rptest_TestStepType_choice_qname);
542 0             goto exit;
543         }
544
545 0         break;
546
547     case rptest_TestStepType_GetMultipleResourcePropertiesTest:
548
549 0         subelement.local = "GetMultipleResourcePropertiesTest";
550 0         subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
551 0         result = rptest_GetMultipleResourcePropertiesTestType_serialize(
552             &subelement,
553             &instance->value.GetMultipleResourcePropertiesTest,
554             message_handle,
555             options);
556 0         if(result != GLOBUS_SUCCESS)
557         {
558 0             result = GlobusSoapMessageErrorSerializeFailed(
559                 result, NULL, &rptest_TestStepType_choice_qname);
560 0             goto exit;
561         }
562
563 0         break;
564
565     case rptest_TestStepType_SetResourcePropertiesTest:
566
567 0         subelement.local = "SetResourcePropertiesTest";
568 0         subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
569 0         result = rptest_SetResourcePropertiesTestType_serialize(
570             &subelement,
571             &instance->value.SetResourcePropertiesTest,
572             message_handle,
573             options);
574 0         if(result != GLOBUS_SUCCESS)
575         {
576 0             result = GlobusSoapMessageErrorSerializeFailed(
577                 result, NULL, &rptest_TestStepType_choice_qname);
578 0             goto exit;
579         }
580
581 0         break;
582
583     case rptest_TestStepType_QueryResourcePropertiesTest:
584
585 0         subelement.local = "QueryResourcePropertiesTest";
586 0         subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
587 0         result = rptest_QueryResourcePropertiesTestType_serialize(
588             &subelement,
589             &instance->value.QueryResourcePropertiesTest,
590             message_handle,
591             options);
592 0         if(result != GLOBUS_SUCCESS)
593         {
594 0             result = GlobusSoapMessageErrorSerializeFailed(
595                 result, NULL, &rptest_TestStepType_choice_qname);
596             goto exit;
597         }
598
599 0         break;
600
601         default:
602 0             break;
603     }
604
605  exit:
606
607 0     GlobusSoapMessageDebugExit();
608 0     return result;
609 }
610
611
612
613 globus_result_t
614 rptest_TestStepType_choice_serialize(
615     const xsd_QName *                   element_qname,
616     const rptest_TestStepType_choice *       instance,
617     globus_soap_message_handle_t        message_handle,
618     globus_xsd_element_options_t        options)
619 0 {
620 0     globus_result_t                     result = GLOBUS_SUCCESS;
621 0     GlobusFuncName(rptest_TestStepType_choice_serialize);
622 0     GlobusSoapMessageDebugEnter();
623
624 0     result = rptest_TestStepType_choice_serialize_contents(
625         element_qname,
626         instance,
627         message_handle,
628         options);
629 0     if(result != GLOBUS_SUCCESS)
630     {
631 0         result = GlobusSoapMessageErrorSerializeFailed(
632             result, NULL, &rptest_TestStepType_choice_qname);
633         goto exit;
634     }
635
636  exit:
637 0     GlobusSoapMessageDebugExit();
638 0     return result;
639 }
640
641
642
643
644
645 globus_result_t
646 rptest_TestStepType_choice_deserialize_contents(
647     const xsd_QName *                   element_qname, /* ignored */
648     rptest_TestStepType_choice *             instance,
649     globus_soap_message_handle_t        message_handle,
650     globus_xsd_element_options_t        options)
651 0 {
652 0     globus_result_t                     result = GLOBUS_SUCCESS;
653 0     GlobusFuncName(rptest_TestStepType_choice_deserialize_contents);
654 0     GlobusSoapMessageDebugEnter();
655
656 0     result = rptest_TestStepType_choice_deserialize(
657         NULL,
658         instance,
659         message_handle,
660         options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
661 0     if(result != GLOBUS_SUCCESS)
662     {
663 0         result = GlobusSoapMessageErrorDeserializeFailed(
664             result, element_qname);
665         goto exit;
666     }
667
668  exit:
669
670 0     GlobusSoapMessageDebugExit();
671 0     return result;
672 }
673
674
675
676 globus_result_t
677 rptest_TestStepType_choice_deserialize(
678     const xsd_QName *                   element_qname,
679     rptest_TestStepType_choice *             instance,
680     globus_soap_message_handle_t        message_handle,
681     globus_xsd_element_options_t        options)
682 260 {
683 260     globus_result_t                     result = GLOBUS_SUCCESS;
684 260     xsd_QName                           subelement;
685 260     xsd_QName                           deselem_qname = { NULL, NULL } ;
686 260     GlobusFuncName(rptest_TestStepType_choice_deserialize);
687 260     GlobusSoapMessageDebugEnter();
688
689 260     xsd_QName_init_contents(&deselem_qname);
690
691 260     do
692     {
693 260         result = globus_soap_message_deserialize_element_unknown(
694             message_handle, &deselem_qname);
695 260         if(result != GLOBUS_SUCCESS)
696         {
697 0             result = GlobusSoapMessageErrorDeserializeFailed(
698                 result, &rptest_TestStepType_choice_qname);
699 0             goto exit;
700         }
701
702 260         if(globus_soap_message_deserialize_element_is_nil(message_handle))
703         {
704 0             xsd_QName_destroy_contents(&deselem_qname);
705 0             result = globus_soap_message_deserialize_element_end(
706                 message_handle,
707                 element_qname);
708 0             if(result != GLOBUS_SUCCESS)
709             {
710 0                 result = GlobusSoapMessageErrorDeserializeFailed(
711                     result, &rptest_TestStepType_choice_qname);
712 0                 goto exit;
713             }
714         }
715         else
716         {
717 260             break;
718         }
719 260     } while(1);
720
721 260     globus_soap_message_deserialize_push_element(message_handle);
722
723 260     subelement.local = "GetResourcePropertyTest";
724 260     subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
725 260     if(xsd_QName_keyeq((void *)&subelement, (void *)&deselem_qname))
726     {
727 90         instance->type=rptest_TestStepType_GetResourcePropertyTest;
728 90         result = rptest_GetResourcePropertyTestType_deserialize(
729             &subelement,
730             &instance->value.GetResourcePropertyTest,
731             message_handle,
732             options);
733 90         if(result != GLOBUS_SUCCESS)
734         {
735 0             result = GlobusSoapMessageErrorDeserializeFailed(
736                 result, &rptest_TestStepType_choice_qname);
737 0             goto GetResourcePropertyTest_destroy;
738         }
739
740 170         goto exit;
741     }
742
743 170     subelement.local = "GetMultipleResourcePropertiesTest";
744 170     subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
745 170     if(xsd_QName_keyeq((void *)&subelement, (void *)&deselem_qname))
746     {
747 8         instance->type=rptest_TestStepType_GetMultipleResourcePropertiesTest;
748 8         result = rptest_GetMultipleResourcePropertiesTestType_deserialize(
749             &subelement,
750             &instance->value.GetMultipleResourcePropertiesTest,
751             message_handle,
752             options);
753 8         if(result != GLOBUS_SUCCESS)
754         {
755 0             result = GlobusSoapMessageErrorDeserializeFailed(
756                 result, &rptest_TestStepType_choice_qname);
757 0             goto GetMultipleResourcePropertiesTest_destroy;
758         }
759
760 162         goto exit;
761     }
762
763 162     subelement.local = "SetResourcePropertiesTest";
764 162     subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
765 162     if(xsd_QName_keyeq((void *)&subelement, (void *)&deselem_qname))
766     {
767 142         instance->type=rptest_TestStepType_SetResourcePropertiesTest;
768 142         result = rptest_SetResourcePropertiesTestType_deserialize(
769             &subelement,
770             &instance->value.SetResourcePropertiesTest,
771             message_handle,
772             options);
773 142         if(result != GLOBUS_SUCCESS)
774         {
775 0             result = GlobusSoapMessageErrorDeserializeFailed(
776                 result, &rptest_TestStepType_choice_qname);
777 0             goto SetResourcePropertiesTest_destroy;
778         }
779
780 20         goto exit;
781     }
782
783 20     subelement.local = "QueryResourcePropertiesTest";
784 20     subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
785 20     if(xsd_QName_keyeq((void *)&subelement, (void *)&deselem_qname))
786     {
787 20         instance->type=rptest_TestStepType_QueryResourcePropertiesTest;
788 20         result = rptest_QueryResourcePropertiesTestType_deserialize(
789             &subelement,
790             &instance->value.QueryResourcePropertiesTest,
791             message_handle,
792             options);
793 20         if(result != GLOBUS_SUCCESS)
794         {
795 0             result = GlobusSoapMessageErrorDeserializeFailed(
796                 result, &rptest_TestStepType_choice_qname);
797 0             goto QueryResourcePropertiesTest_destroy;
798         }
799
800 0         goto exit;
801     }
802
803 0     instance->type = rptest_TestStepType_undefined;
804 0     result = GlobusSoapMessageErrorDeserializeFailed(
805                 result, &rptest_TestStepType_choice_qname);
806  
807     goto exit;
808
809  deserialize_failed:
810
811  QueryResourcePropertiesTest_destroy:
812
813  SetResourcePropertiesTest_destroy:
814
815  GetMultipleResourcePropertiesTest_destroy:
816
817  GetResourcePropertyTest_destroy:
818
819  exit:
820
821 260     xsd_QName_destroy_contents(&deselem_qname);
822
823 260     if(result == GLOBUS_SUCCESS)
824     {
825 260         do
826         {
827 260             result = globus_soap_message_deserialize_element(
828                 message_handle, NULL);
829 260             if(result != GLOBUS_SUCCESS &&
830                (GlobusSoapMessageStatusElementNotFoundCheck(result) ||
831                 GlobusSoapMessageStatusFailedElementCheck(result) ||
832                 GlobusSoapMessageStatusFailedWithTextCheck(result)))
833             {
834 260                 result = GLOBUS_SUCCESS;
835 260                 break;
836             }
837
838 0             if(globus_soap_message_deserialize_element_is_nil(
839                    message_handle))
840             {
841 0                 result = globus_soap_message_deserialize_element_end(
842                     message_handle,
843                     element_qname);
844 0                 if(result != GLOBUS_SUCCESS)
845                 {
846 0                     result = GlobusSoapMessageErrorDeserializeFailed(
847                         result, &rptest_TestStepType_choice_qname);
848                     break;
849                 }
850             }
851             else
852             {
853 260                 break;
854             }
855
856 260         } while(1);
857     }
858
859 260     xsd_QName_destroy_contents(&deselem_qname);
860
861 260     GlobusSoapMessageDebugExit();
862 260     return result;
863 }
864
865
866
867 globus_result_t
868 rptest_TestStepType_choice_deserialize_pointer(
869     const xsd_QName *                   element_qname,
870     rptest_TestStepType_choice **            ip,
871     globus_soap_message_handle_t        message_handle,
872     globus_xsd_element_options_t        options)
873 0 {
874 0     rptest_TestStepType_choice * instance = NULL;
875 0     globus_result_t                     result = GLOBUS_SUCCESS;
876 0     xsd_QName                           subelement;
877 0     GlobusFuncName(rptest_TestStepType_choice_deserialize_pointer);
878 0     GlobusSoapMessageDebugEnter();
879
880 0     *ip = NULL;
881
882 0     result = rptest_TestStepType_choice_init(&instance);
883 0     if(result != GLOBUS_SUCCESS)
884     {
885 0         result = GlobusSoapMessageErrorDeserializeFailed(
886             result, element_qname);
887 0         goto exit;
888     }
889
890 0     result = rptest_TestStepType_choice_deserialize(
891         element_qname,
892         instance,
893         message_handle,
894         options);
895 0     if(result != GLOBUS_SUCCESS)
896     {
897 0         goto exit;
898     }
899
900 0     *ip = instance;
901
902  exit:
903
904 0     GlobusSoapMessageDebugExit();
905 0     return result;
906 }
907
908
909
910 globus_result_t
911 rptest_TestStepType_choice_array_init_contents(
912     rptest_TestStepType_choice_array * array)
913 0 {
914 0     return globus_xsd_generic_array_init_contents(
915         (globus_xsd_generic_array_t *) array,
916         &rptest_TestStepType_choice_array_info);
917 }
918 /* rptest_TestStepType_choice_array_init_contents() */
919
920 globus_result_t
921 rptest_TestStepType_choice_array_init(
922     rptest_TestStepType_choice_array ** arr)
923 0 {
924 0     return globus_xsd_generic_array_init(
925         (globus_xsd_generic_array_t **) arr,
926         &rptest_TestStepType_choice_info);
927 }
928 /* rptest_TestStepType_choice_array_init() */
929
930 void
931 rptest_TestStepType_choice_array_destroy_contents(
932     rptest_TestStepType_choice_array * array)
933 0 {
934 0     globus_xsd_generic_array_destroy_contents(
935         (globus_xsd_generic_array_t *) array);
936 }
937 /* rptest_TestStepType_choice_array_destroy_contents() */
938
939 void
940 rptest_TestStepType_choice_array_destroy(
941     rptest_TestStepType_choice_array * array)
942 0 {
943 0     globus_xsd_generic_array_destroy(
944         (globus_xsd_generic_array_t *) array);
945 }
946 /* rptest_TestStepType_choice_array_destroy() */
947
948 globus_result_t
949 rptest_TestStepType_choice_array_copy(
950     rptest_TestStepType_choice_array ** dest_arr,
951     const rptest_TestStepType_choice_array * src_arr)
952 0 {
953 0     return globus_xsd_generic_array_copy(
954         (globus_xsd_generic_array_t **) dest_arr,
955         (const globus_xsd_generic_array_t *) src_arr);
956 }
957 /* rptest_TestStepType_choice_array_copy() */
958
959 globus_result_t
960 rptest_TestStepType_choice_array_copy_contents(
961     rptest_TestStepType_choice_array * dest_arr,
962     const rptest_TestStepType_choice_array * src_arr)
963 0 {
964 0     return globus_xsd_generic_array_copy_contents(
965         (globus_xsd_generic_array_t *) dest_arr,
966         (const globus_xsd_generic_array_t *) src_arr);
967 }
968
969 rptest_TestStepType_choice *
970 rptest_TestStepType_choice_array_push(
971     rptest_TestStepType_choice_array * array)
972 0 {
973     /* Some contents initializers don't initialize subelments but to set their
974      * values to be NULL
975      */
976 0     if (array->type_info == NULL)
977     {
978 0         array->type_info = &rptest_TestStepType_choice_info;
979     }
980 0     return globus_xsd_generic_array_push(
981         (globus_xsd_generic_array_t *) array);
982 }
983 /* rptest_TestStepType_choice_array_push() */
984
985 void *
986 rptest_TestStepType_choice_array_push_wrapper(
987     void * array)
988 0 {
989 0     return (void *) rptest_TestStepType_choice_array_push(
990         (rptest_TestStepType_choice_array *) array);
991 }
992
993 globus_result_t
994 rptest_TestStepType_choice_array_serialize(
995     const xsd_QName *                   element_qname,
996     const rptest_TestStepType_choice_array * array,
997     globus_soap_message_handle_t        message,
998     globus_xsd_element_options_t        options)
999 0 {
1000 0     return globus_xsd_generic_array_serialize(
1001         element_qname,
1002         (const globus_xsd_generic_array_t *) array,
1003         message,
1004         options);
1005 }
1006 /* rptest_TestStepType_choice_array_serialize() */
1007
1008 globus_result_t
1009 rptest_TestStepType_choice_array_deserialize(
1010     const xsd_QName *                   element_qname,
1011     rptest_TestStepType_choice_array *       array,
1012     globus_soap_message_handle_t        message,
1013     globus_xsd_element_options_t        options)
1014 0 {
1015     /* Some initializers set the array's contents to NULL */
1016 0     if (array->type_info == NULL)
1017     {
1018 0         array->type_info = &rptest_TestStepType_choice_info;
1019     }
1020 0     return globus_xsd_generic_array_deserialize(
1021         element_qname,
1022         (globus_xsd_generic_array_t *) array,
1023         message,
1024         options);
1025 }