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