1 /*
2 * Portions of this file Copyright 1999-2005 University of Chicago
3 * Portions of this file Copyright 1999-2005 The University of Southern California.
4 *
5 * This file or a portion of this file is licensed under the
6 * terms of the Globus Toolkit Public License, found at
7 * http://www.globus.org/toolkit/download/license.html.
8 * If you redistribute this file, with or without
9 * modifications, you must include this notice in the file.
10 */
11
12
13 /*
14 * This file is automatically generated by the Globus WSDLtoC converter
15 */
16
17 #include "xsd_QName.h"
18 #include "globus_soap_message.h"
19 #include "globus_xsd_type_info.h"
20 #include "rptest_TestStepType.h"
21
22 xsd_QName rptest_TestStepType_choice_qname =
23 {
24 "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest",
25 "TestStepType_choice"
26 };
27
28 globus_result_t
29 rptest_TestStepType_choice_serialize_wrapper(
30 xsd_QName * element_qname,
31 void * instance,
32 globus_soap_message_handle_t message_handle,
33 globus_xsd_element_options_t options)
34 0 {
35 0 return rptest_TestStepType_choice_serialize(
36 element_qname,
37 (rptest_TestStepType_choice *) instance,
38 message_handle, options);
39 }
40
41 globus_result_t
42 rptest_TestStepType_choice_deserialize_pointer_wrapper(
43 xsd_QName * element_qname,
44 void ** ip,
45 globus_soap_message_handle_t message_handle,
46 globus_xsd_element_options_t options)
47 0 {
48 0 return rptest_TestStepType_choice_deserialize_pointer(
49 element_qname,
50 (rptest_TestStepType_choice **) ip,
51 message_handle, options);
52 }
53
54 globus_result_t
55 rptest_TestStepType_choice_init_wrapper(void **object)
56 0 {
57 0 return rptest_TestStepType_choice_init(
58 (rptest_TestStepType_choice **) object);
59 }
60
61 void
62 rptest_TestStepType_choice_destroy_wrapper(
63 void * object)
64 0 {
65 0 rptest_TestStepType_choice_destroy(
66 (rptest_TestStepType_choice *) object);
67 }
68
69 globus_result_t
70 rptest_TestStepType_choice_copy_wrapper(
71 void ** dest_obj,
72 void * src_obj)
73 0 {
74 0 return rptest_TestStepType_choice_copy(
75 (rptest_TestStepType_choice **) dest_obj,
76 (rptest_TestStepType_choice *) src_obj);
77 }
78
79 globus_result_t
80 rptest_TestStepType_choice_init_contents_wrapper(void *object)
81 0 {
82 0 return rptest_TestStepType_choice_init_contents(
83 (rptest_TestStepType_choice *) object);
84 }
85
86 void
87 rptest_TestStepType_choice_destroy_contents_wrapper(
88 void * object)
89 0 {
90 0 rptest_TestStepType_choice_destroy_contents(
91 (rptest_TestStepType_choice *) object);
92 }
93
94 globus_result_t
95 rptest_TestStepType_choice_copy_contents_wrapper(
96 void * dest_obj,
97 void * src_obj)
98 0 {
99 0 return rptest_TestStepType_choice_copy_contents(
100 (rptest_TestStepType_choice *) dest_obj,
101 (rptest_TestStepType_choice *) src_obj);
102 }
103
104 globus_result_t
105 rptest_TestStepType_choice_serialize_contents_wrapper(
106 xsd_QName * element_qname,
107 void * instance,
108 globus_soap_message_handle_t message_handle,
109 globus_xsd_element_options_t options)
110 0 {
111 0 return rptest_TestStepType_choice_serialize_contents(
112 element_qname,
113 (rptest_TestStepType_choice *) instance,
114 message_handle, options);
115 }
116
117 globus_result_t
118 rptest_TestStepType_choice_deserialize_contents_wrapper(
119 xsd_QName * element_qname,
120 void ** instance,
121 globus_soap_message_handle_t message_handle,
122 globus_xsd_element_options_t options)
123 0 {
124 globus_result_t result;
125 GlobusFuncName(rptest_TestStepType_choice_deserialize_contents_wrapper);
126 0 GlobusSoapMessageDebugEnter();
127
128 0 if(!*instance)
129 {
130 0 result = rptest_TestStepType_choice_init(
131 (rptest_TestStepType_choice **)instance);
132 0 if(result != GLOBUS_SUCCESS)
133 {
134 0 goto error;
135 }
136 }
137
138 0 result = rptest_TestStepType_choice_deserialize_contents(
139 element_qname,
140 *(rptest_TestStepType_choice **)instance,
141 message_handle, options);
142 0 error:
143 0 GlobusSoapMessageDebugExit();
144 0 return result;
145 }
146
147 globus_result_t
148 rptest_TestStepType_choice_array_serialize_wrapper(
149 xsd_QName * element,
150 void * instance,
151 globus_soap_message_handle_t message,
152 globus_xsd_element_options_t options)
153 0 {
154 0 return rptest_TestStepType_choice_array_serialize(
155 element,
156 (rptest_TestStepType_choice_array *) instance,
157 message, options);
158 }
159
160 globus_result_t
161 rptest_TestStepType_choice_array_deserialize_wrapper(
162 xsd_QName * element_qname,
163 void ** inst,
164 globus_soap_message_handle_t message,
165 globus_xsd_element_options_t options)
166 0 {
167 0 if(!*inst)
168 {
169 globus_result_t result;
170
171 0 result = rptest_TestStepType_choice_array_init(
172 (rptest_TestStepType_choice_array **)inst);
173 0 if(result != GLOBUS_SUCCESS)
174 {
175 0 return result;
176 }
177 }
178
179 0 return rptest_TestStepType_choice_array_deserialize(
180 element_qname,
181 *(rptest_TestStepType_choice_array **) inst,
182 message, options);
183 }
184
185 globus_result_t
186 rptest_TestStepType_choice_array_init_wrapper(
187 void ** arr)
188 0 {
189 0 return rptest_TestStepType_choice_array_init(
190 (rptest_TestStepType_choice_array **) arr);
191 }
192
193 void
194 rptest_TestStepType_choice_array_destroy_wrapper(
195 void * arr)
196 0 {
197 0 rptest_TestStepType_choice_array_destroy(
198 (rptest_TestStepType_choice_array *) arr);
199 }
200
201 globus_result_t
202 rptest_TestStepType_choice_array_copy_wrapper(
203 void ** dest_arr,
204 void * src_arr)
205 0 {
206 0 return rptest_TestStepType_choice_array_copy(
207 (rptest_TestStepType_choice_array **) dest_arr,
208 (rptest_TestStepType_choice_array *) src_arr);
209 }
210
211 globus_result_t
212 rptest_TestStepType_choice_array_init_contents_wrapper(
213 void * arr)
214 0 {
215 0 return rptest_TestStepType_choice_array_init_contents(
216 (rptest_TestStepType_choice_array *) arr);
217 }
218
219 void
220 rptest_TestStepType_choice_array_destroy_contents_wrapper(
221 void * arr)
222 0 {
223 0 rptest_TestStepType_choice_array_destroy_contents(
224 (rptest_TestStepType_choice_array *) arr);
225 }
226
227 globus_result_t
228 rptest_TestStepType_choice_array_copy_contents_wrapper(
229 void * dest_arr,
230 void * src_arr)
231 0 {
232 0 return rptest_TestStepType_choice_array_copy_contents(
233 (rptest_TestStepType_choice_array *) dest_arr,
234 (rptest_TestStepType_choice_array *) src_arr);
235 }
236
237 struct globus_xsd_type_info_s rptest_TestStepType_choice_array_info =
238 {
239 &rptest_TestStepType_choice_qname,
240 rptest_TestStepType_choice_array_serialize_wrapper,
241 rptest_TestStepType_choice_array_deserialize_wrapper,
242 rptest_TestStepType_choice_array_init_wrapper,
243 rptest_TestStepType_choice_array_destroy_wrapper,
244 rptest_TestStepType_choice_array_copy_wrapper,
245 rptest_TestStepType_choice_array_init_contents_wrapper,
246 rptest_TestStepType_choice_array_destroy_contents_wrapper,
247 rptest_TestStepType_choice_array_copy_contents_wrapper,
248 sizeof(rptest_TestStepType_choice),
249 rptest_TestStepType_choice_array_push_wrapper,
250 NULL,
251 NULL
252 };
253
254 struct globus_xsd_type_info_s rptest_TestStepType_choice_contents_info =
255 {
256 &rptest_TestStepType_choice_qname,
257 rptest_TestStepType_choice_serialize_contents_wrapper,
258 rptest_TestStepType_choice_deserialize_contents_wrapper,
259 rptest_TestStepType_choice_init_wrapper,
260 rptest_TestStepType_choice_destroy_wrapper,
261 rptest_TestStepType_choice_copy_wrapper,
262 rptest_TestStepType_choice_init_contents_wrapper,
263 rptest_TestStepType_choice_destroy_contents_wrapper,
264 rptest_TestStepType_choice_copy_contents_wrapper,
265 sizeof(rptest_TestStepType_choice),
266 NULL,
267 NULL,
268 NULL
269 };
270
271 struct globus_xsd_type_info_s rptest_TestStepType_choice_info =
272 {
273 &rptest_TestStepType_choice_qname,
274 rptest_TestStepType_choice_serialize_wrapper,
275 rptest_TestStepType_choice_deserialize_pointer_wrapper,
276 rptest_TestStepType_choice_init_wrapper,
277 rptest_TestStepType_choice_destroy_wrapper,
278 rptest_TestStepType_choice_copy_wrapper,
279 rptest_TestStepType_choice_init_contents_wrapper,
280 rptest_TestStepType_choice_destroy_contents_wrapper,
281 rptest_TestStepType_choice_copy_contents_wrapper,
282 sizeof(rptest_TestStepType),
283 NULL,
284 &rptest_TestStepType_choice_contents_info,
285 &rptest_TestStepType_choice_array_info
286 };
287
288 globus_result_t
289 rptest_TestStepType_choice_init_contents(
290 rptest_TestStepType_choice * instance)
291 0 {
292 0 globus_result_t result = GLOBUS_SUCCESS;
293 GlobusFuncName(rptest_TestStepType_choice_init_contents);
294 0 GlobusSoapMessageDebugEnter();
295
296 0 memset(instance, 0, sizeof(rptest_TestStepType));
297
298 0 GlobusSoapMessageDebugExit();
299 0 return result;
300 }
301
302 globus_result_t
303 rptest_TestStepType_choice_init(
304 rptest_TestStepType_choice ** object)
305 0 {
306 rptest_TestStepType_choice * instance;
307 0 globus_result_t result = GLOBUS_SUCCESS;
308 GlobusFuncName(rptest_TestStepType_choice_init);
309 0 GlobusSoapMessageDebugEnter();
310
311 0 instance = globus_malloc(sizeof(rptest_TestStepType_choice));
312 0 if(!instance)
313 {
314 0 result = GlobusSoapMessageErrorOutOfMemory;
315 0 goto exit;
316 }
317
318 0 memset(instance, 0, sizeof(rptest_TestStepType_choice));
319
320 0 *object = instance;
321
322 0 exit:
323 0 GlobusSoapMessageDebugExit();
324 0 return result;
325 }
326
327 void
328 rptest_TestStepType_choice_destroy(
329 rptest_TestStepType_choice * instance)
330 0 {
331 GlobusFuncName(rptest_TestStepType_choice_destroy);
332 0 GlobusSoapMessageDebugEnter();
333
334 0 if(!instance)
335 {
336 0 goto exit;
337 }
338
339 0 rptest_TestStepType_choice_destroy_contents(instance);
340 0 free(instance);
341
342 0 exit:
343
344 0 GlobusSoapMessageDebugExit();
345 }
346
347
348
349 void
350 rptest_TestStepType_choice_destroy_contents(
351 rptest_TestStepType_choice * instance)
352 212 {
353 GlobusFuncName(rptest_TestStepType_choice_destroy_contents);
354 212 GlobusSoapMessageDebugEnter();
355
356 212 switch(instance->type)
357 {
358
359 case rptest_TestStepType_GetResourcePropertyTest:
360
361 78 rptest_GetResourcePropertyTestType_destroy_contents(
362 &instance->value.GetResourcePropertyTest);
363 78 break;
364
365 case rptest_TestStepType_GetMultipleResourcePropertiesTest:
366
367 8 rptest_GetMultipleResourcePropertiesTestType_destroy_contents(
368 &instance->value.GetMultipleResourcePropertiesTest);
369 8 break;
370
371 case rptest_TestStepType_SetResourcePropertiesTest:
372
373 126 rptest_SetResourcePropertiesTestType_destroy_contents(
374 &instance->value.SetResourcePropertiesTest);
375 126 break;
376
377 case rptest_TestStepType_QueryResourcePropertiesTest:
378
379 0 rptest_QueryResourcePropertiesTestType_destroy_contents(
380 &instance->value.QueryResourcePropertiesTest);
381 break;
382
383 default:
384 break;
385 }
386
387 212 instance->type = rptest_TestStepType_undefined;
388
389 212 GlobusSoapMessageDebugExit();
390 }
391
392 globus_result_t
393 rptest_TestStepType_choice_copy(
394 rptest_TestStepType_choice ** dest_obj,
395 const rptest_TestStepType_choice * src_obj)
396 0 {
397 0 globus_result_t result = GLOBUS_SUCCESS;
398 rptest_TestStepType_choice * instance;
399 GlobusFuncName(rptest_TestStepType_choice_copy);
400
401 0 GlobusSoapMessageDebugEnter();
402
403 0 instance = malloc(sizeof(rptest_TestStepType_choice));
404 0 if (instance == NULL)
405 {
406 0 GlobusSoapMessageDebugExit();
407 0 return GlobusSoapMessageErrorOutOfMemory;
408 }
409
410 0 result = rptest_TestStepType_choice_copy_contents(instance, src_obj);
411 0 if(result != GLOBUS_SUCCESS)
412 {
413 0 globus_free(instance);
414 0 GlobusSoapMessageDebugExit();
415 0 return GlobusSoapMessageErrorOutOfMemory;
416 }
417
418 0 *dest_obj = instance;
419 0 GlobusSoapMessageDebugExit();
420 0 return result;
421 }
422
423
424
425 globus_result_t
426 rptest_TestStepType_choice_copy_contents(
427 rptest_TestStepType_choice * instance,
428 const rptest_TestStepType_choice * src_obj)
429 0 {
430 xsd_QName subelement;
431 0 globus_result_t result = GLOBUS_SUCCESS;
432 GlobusFuncName(rptest_TestStepType_choice_copy_contents);
433
434 0 GlobusSoapMessageDebugEnter();
435
436 0 switch(src_obj->type)
437 {
438
439 case rptest_TestStepType_GetResourcePropertyTest:
440 0 instance->type = rptest_TestStepType_GetResourcePropertyTest;
441 0 result = rptest_GetResourcePropertyTestType_copy_contents(
442 &instance->value.GetResourcePropertyTest,
443 &src_obj->value.GetResourcePropertyTest);
444 0 if(result != GLOBUS_SUCCESS)
445 {
446 0 result = GlobusSoapMessageErrorSerializeFailed(
447 result, NULL, &rptest_TestStepType_choice_qname);
448 0 goto exit;
449 }
450
451 break;
452
453 case rptest_TestStepType_GetMultipleResourcePropertiesTest:
454 0 instance->type = rptest_TestStepType_GetMultipleResourcePropertiesTest;
455 0 result = rptest_GetMultipleResourcePropertiesTestType_copy_contents(
456 &instance->value.GetMultipleResourcePropertiesTest,
457 &src_obj->value.GetMultipleResourcePropertiesTest);
458 0 if(result != GLOBUS_SUCCESS)
459 {
460 0 result = GlobusSoapMessageErrorSerializeFailed(
461 result, NULL, &rptest_TestStepType_choice_qname);
462 0 goto exit;
463 }
464
465 break;
466
467 case rptest_TestStepType_SetResourcePropertiesTest:
468 0 instance->type = rptest_TestStepType_SetResourcePropertiesTest;
469 0 result = rptest_SetResourcePropertiesTestType_copy_contents(
470 &instance->value.SetResourcePropertiesTest,
471 &src_obj->value.SetResourcePropertiesTest);
472 0 if(result != GLOBUS_SUCCESS)
473 {
474 0 result = GlobusSoapMessageErrorSerializeFailed(
475 result, NULL, &rptest_TestStepType_choice_qname);
476 0 goto exit;
477 }
478
479 break;
480
481 case rptest_TestStepType_QueryResourcePropertiesTest:
482 0 instance->type = rptest_TestStepType_QueryResourcePropertiesTest;
483 0 result = rptest_QueryResourcePropertiesTestType_copy_contents(
484 &instance->value.QueryResourcePropertiesTest,
485 &src_obj->value.QueryResourcePropertiesTest);
486 0 if(result != GLOBUS_SUCCESS)
487 {
488 0 result = GlobusSoapMessageErrorSerializeFailed(
489 result, NULL, &rptest_TestStepType_choice_qname);
490 goto exit;
491 }
492
493 break;
494
495 default:
496 break;
497 }
498
499 0 exit:
500
501 0 GlobusSoapMessageDebugExit();
502 0 return result;
503 }
504
505
506
507
508
509 globus_result_t
510 rptest_TestStepType_choice_serialize_contents(
511 xsd_QName * element_qname, /* ignored */
512 rptest_TestStepType_choice * instance,
513 globus_soap_message_handle_t message_handle,
514 globus_xsd_element_options_t options)
515 0 {
516 xsd_QName subelement;
517 0 globus_result_t result = GLOBUS_SUCCESS;
518 GlobusFuncName(rptest_TestStepType_choice_serialize_contents);
519 0 GlobusSoapMessageDebugEnter();
520
521 0 switch(instance->type)
522 {
523
524 case rptest_TestStepType_GetResourcePropertyTest:
525
526 0 subelement.local = "GetResourcePropertyTest";
527 0 subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
528 0 result = rptest_GetResourcePropertyTestType_serialize(
529 &subelement,
530 &instance->value.GetResourcePropertyTest,
531 message_handle,
532 options);
533 0 if(result != GLOBUS_SUCCESS)
534 {
535 0 result = GlobusSoapMessageErrorSerializeFailed(
536 result, NULL, &rptest_TestStepType_choice_qname);
537 0 goto exit;
538 }
539
540 break;
541
542 case rptest_TestStepType_GetMultipleResourcePropertiesTest:
543
544 0 subelement.local = "GetMultipleResourcePropertiesTest";
545 0 subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
546 0 result = rptest_GetMultipleResourcePropertiesTestType_serialize(
547 &subelement,
548 &instance->value.GetMultipleResourcePropertiesTest,
549 message_handle,
550 options);
551 0 if(result != GLOBUS_SUCCESS)
552 {
553 0 result = GlobusSoapMessageErrorSerializeFailed(
554 result, NULL, &rptest_TestStepType_choice_qname);
555 0 goto exit;
556 }
557
558 break;
559
560 case rptest_TestStepType_SetResourcePropertiesTest:
561
562 0 subelement.local = "SetResourcePropertiesTest";
563 0 subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
564 0 result = rptest_SetResourcePropertiesTestType_serialize(
565 &subelement,
566 &instance->value.SetResourcePropertiesTest,
567 message_handle,
568 options);
569 0 if(result != GLOBUS_SUCCESS)
570 {
571 0 result = GlobusSoapMessageErrorSerializeFailed(
572 result, NULL, &rptest_TestStepType_choice_qname);
573 0 goto exit;
574 }
575
576 break;
577
578 case rptest_TestStepType_QueryResourcePropertiesTest:
579
580 0 subelement.local = "QueryResourcePropertiesTest";
581 0 subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
582 0 result = rptest_QueryResourcePropertiesTestType_serialize(
583 &subelement,
584 &instance->value.QueryResourcePropertiesTest,
585 message_handle,
586 options);
587 0 if(result != GLOBUS_SUCCESS)
588 {
589 0 result = GlobusSoapMessageErrorSerializeFailed(
590 result, NULL, &rptest_TestStepType_choice_qname);
591 goto exit;
592 }
593
594 break;
595
596 default:
597 break;
598 }
599
600 0 exit:
601
602 0 GlobusSoapMessageDebugExit();
603 0 return result;
604 }
605
606
607
608 globus_result_t
609 rptest_TestStepType_choice_serialize(
610 xsd_QName * element_qname,
611 rptest_TestStepType_choice * instance,
612 globus_soap_message_handle_t message_handle,
613 globus_xsd_element_options_t options)
614 0 {
615 0 globus_result_t result = GLOBUS_SUCCESS;
616 GlobusFuncName(rptest_TestStepType_choice_serialize);
617 0 GlobusSoapMessageDebugEnter();
618
619 0 result = rptest_TestStepType_choice_serialize_contents(
620 element_qname,
621 instance,
622 message_handle,
623 options);
624 0 if(result != GLOBUS_SUCCESS)
625 {
626 0 result = GlobusSoapMessageErrorSerializeFailed(
627 result, NULL, &rptest_TestStepType_choice_qname);
628 goto exit;
629 }
630
631 0 exit:
632 0 GlobusSoapMessageDebugExit();
633 0 return result;
634 }
635
636
637
638
639
640 globus_result_t
641 rptest_TestStepType_choice_deserialize_contents(
642 xsd_QName * element_qname, /* ignored */
643 rptest_TestStepType_choice * instance,
644 globus_soap_message_handle_t message_handle,
645 globus_xsd_element_options_t options)
646 0 {
647 0 globus_result_t result = GLOBUS_SUCCESS;
648 GlobusFuncName(rptest_TestStepType_choice_deserialize_contents);
649 0 GlobusSoapMessageDebugEnter();
650
651 0 result = rptest_TestStepType_choice_deserialize(
652 NULL,
653 instance,
654 message_handle,
655 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
656 0 if(result != GLOBUS_SUCCESS)
657 {
658 0 result = GlobusSoapMessageErrorDeserializeFailed(
659 result, element_qname);
660 goto exit;
661 }
662
663 0 exit:
664
665 0 GlobusSoapMessageDebugExit();
666 0 return result;
667 }
668
669
670
671 globus_result_t
672 rptest_TestStepType_choice_deserialize(
673 xsd_QName * element_qname,
674 rptest_TestStepType_choice * instance,
675 globus_soap_message_handle_t message_handle,
676 globus_xsd_element_options_t options)
677 212 {
678 212 globus_result_t result = GLOBUS_SUCCESS;
679 xsd_QName subelement;
680 212 xsd_QName deselem_qname = { NULL, NULL } ;
681 GlobusFuncName(rptest_TestStepType_choice_deserialize);
682 212 GlobusSoapMessageDebugEnter();
683
684 212 xsd_QName_init_contents(&deselem_qname);
685
686 do
687 {
688 212 result = globus_soap_message_deserialize_element_unknown(
689 message_handle, &deselem_qname);
690 212 if(result != GLOBUS_SUCCESS)
691 {
692 0 result = GlobusSoapMessageErrorDeserializeFailed(
693 result, &rptest_TestStepType_choice_qname);
694 0 goto exit;
695 }
696
697 212 if(globus_soap_message_deserialize_element_is_nil(message_handle))
698 {
699 0 xsd_QName_destroy_contents(&deselem_qname);
700 0 result = globus_soap_message_deserialize_element_end(
701 message_handle,
702 element_qname);
703 0 if(result != GLOBUS_SUCCESS)
704 {
705 0 result = GlobusSoapMessageErrorDeserializeFailed(
706 result, &rptest_TestStepType_choice_qname);
707 0 goto exit;
708 }
709 }
710 else
711 {
712 0 break;
713 }
714 } while(1);
715
716 212 globus_soap_message_deserialize_push_element(message_handle);
717
718 212 subelement.local = "GetResourcePropertyTest";
719 212 subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
720 212 if(xsd_QName_keyeq((void *)&subelement, (void *)&deselem_qname))
721 {
722 78 instance->type=rptest_TestStepType_GetResourcePropertyTest;
723 78 result = rptest_GetResourcePropertyTestType_deserialize(
724 &subelement,
725 &instance->value.GetResourcePropertyTest,
726 message_handle,
727 options);
728 78 if(result != GLOBUS_SUCCESS)
729 {
730 0 result = GlobusSoapMessageErrorDeserializeFailed(
731 result, &rptest_TestStepType_choice_qname);
732 0 goto GetResourcePropertyTest_destroy;
733 }
734
735 goto exit;
736 }
737
738 134 subelement.local = "GetMultipleResourcePropertiesTest";
739 134 subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
740 134 if(xsd_QName_keyeq((void *)&subelement, (void *)&deselem_qname))
741 {
742 8 instance->type=rptest_TestStepType_GetMultipleResourcePropertiesTest;
743 8 result = rptest_GetMultipleResourcePropertiesTestType_deserialize(
744 &subelement,
745 &instance->value.GetMultipleResourcePropertiesTest,
746 message_handle,
747 options);
748 8 if(result != GLOBUS_SUCCESS)
749 {
750 0 result = GlobusSoapMessageErrorDeserializeFailed(
751 result, &rptest_TestStepType_choice_qname);
752 0 goto GetMultipleResourcePropertiesTest_destroy;
753 }
754
755 goto exit;
756 }
757
758 126 subelement.local = "SetResourcePropertiesTest";
759 126 subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
760 126 if(xsd_QName_keyeq((void *)&subelement, (void *)&deselem_qname))
761 {
762 126 instance->type=rptest_TestStepType_SetResourcePropertiesTest;
763 126 result = rptest_SetResourcePropertiesTestType_deserialize(
764 &subelement,
765 &instance->value.SetResourcePropertiesTest,
766 message_handle,
767 options);
768 126 if(result != GLOBUS_SUCCESS)
769 {
770 0 result = GlobusSoapMessageErrorDeserializeFailed(
771 result, &rptest_TestStepType_choice_qname);
772 0 goto SetResourcePropertiesTest_destroy;
773 }
774
775 goto exit;
776 }
777
778 0 subelement.local = "QueryResourcePropertiesTest";
779 0 subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
780 0 if(xsd_QName_keyeq((void *)&subelement, (void *)&deselem_qname))
781 {
782 0 instance->type=rptest_TestStepType_QueryResourcePropertiesTest;
783 0 result = rptest_QueryResourcePropertiesTestType_deserialize(
784 &subelement,
785 &instance->value.QueryResourcePropertiesTest,
786 message_handle,
787 options);
788 0 if(result != GLOBUS_SUCCESS)
789 {
790 0 result = GlobusSoapMessageErrorDeserializeFailed(
791 result, &rptest_TestStepType_choice_qname);
792 0 goto QueryResourcePropertiesTest_destroy;
793 }
794
795 goto exit;
796 }
797
798 0 instance->type = rptest_TestStepType_undefined;
799
800 goto exit;
801
802 212 deserialize_failed:
803
804 212 QueryResourcePropertiesTest_destroy:
805
806 212 SetResourcePropertiesTest_destroy:
807
808 212 GetMultipleResourcePropertiesTest_destroy:
809
810 212 GetResourcePropertyTest_destroy:
811
812 212 exit:
813
814 212 xsd_QName_destroy_contents(&deselem_qname);
815
816 212 if(result == GLOBUS_SUCCESS)
817 {
818 do
819 {
820 212 result = globus_soap_message_deserialize_element(
821 message_handle, NULL);
822 212 if(result != GLOBUS_SUCCESS &&
823 (GlobusSoapMessageStatusElementNotFoundCheck(result) ||
824 GlobusSoapMessageStatusFailedElementCheck(result) ||
825 GlobusSoapMessageStatusFailedWithTextCheck(result)))
826 {
827 212 result = GLOBUS_SUCCESS;
828 212 break;
829 }
830
831 0 if(globus_soap_message_deserialize_element_is_nil(
832 message_handle))
833 {
834 0 result = globus_soap_message_deserialize_element_end(
835 message_handle,
836 element_qname);
837 0 if(result != GLOBUS_SUCCESS)
838 {
839 0 result = GlobusSoapMessageErrorDeserializeFailed(
840 result, &rptest_TestStepType_choice_qname);
841 break;
842 }
843 }
844 else
845 {
846 0 break;
847 }
848
849 } while(1);
850 }
851
852 212 xsd_QName_destroy_contents(&deselem_qname);
853
854 212 GlobusSoapMessageDebugExit();
855 212 return result;
856 }
857
858
859
860 globus_result_t
861 rptest_TestStepType_choice_deserialize_pointer(
862 xsd_QName * element_qname,
863 rptest_TestStepType_choice ** ip,
864 globus_soap_message_handle_t message_handle,
865 globus_xsd_element_options_t options)
866 0 {
867 0 rptest_TestStepType_choice * instance = NULL;
868 0 globus_result_t result = GLOBUS_SUCCESS;
869 xsd_QName subelement;
870 GlobusFuncName(rptest_TestStepType_choice_deserialize_pointer);
871 0 GlobusSoapMessageDebugEnter();
872
873 0 *ip = NULL;
874
875 0 result = rptest_TestStepType_choice_init(&instance);
876 0 if(result != GLOBUS_SUCCESS)
877 {
878 0 result = GlobusSoapMessageErrorDeserializeFailed(
879 result, element_qname);
880 0 goto exit;
881 }
882
883 0 result = rptest_TestStepType_choice_deserialize_contents(
884 element_qname,
885 instance,
886 message_handle,
887 options);
888 0 if(result != GLOBUS_SUCCESS)
889 {
890 0 goto exit;
891 }
892
893 0 *ip = instance;
894
895 0 exit:
896
897 0 GlobusSoapMessageDebugExit();
898 0 return result;
899 }
900
901
902
903 globus_result_t
904 rptest_TestStepType_choice_array_init_contents(
905 rptest_TestStepType_choice_array * array)
906 0 {
907 GlobusFuncName(rptest_TestStepType_choice_array_init_contents);
908 0 GlobusSoapMessageDebugEnter();
909
910 0 memset(array, 0, sizeof(rptest_TestStepType_choice_array));
911
912 0 GlobusSoapMessageDebugExit();
913 0 return GLOBUS_SUCCESS;
914 }
915
916 globus_result_t
917 rptest_TestStepType_choice_array_init(
918 rptest_TestStepType_choice_array ** arr)
919 0 {
920 rptest_TestStepType_choice_array * array;
921 globus_result_t result;
922 GlobusFuncName(rptest_TestStepType_choice_array_init);
923 0 GlobusSoapMessageDebugEnter();
924
925 0 array = (rptest_TestStepType_choice_array *)
926 globus_malloc(sizeof(rptest_TestStepType_choice_array));
927 0 if(!array)
928 {
929 0 result = GlobusSoapMessageErrorOutOfMemory;
930 0 goto exit;
931 }
932
933 0 result = rptest_TestStepType_choice_array_init_contents(array);
934 0 if(result != GLOBUS_SUCCESS)
935 {
936 0 globus_free(array);
937 0 array = NULL;
938 }
939
940 0 *arr = array;
941
942 0 exit:
943 0 GlobusSoapMessageDebugExit();
944 0 return result;
945 }
946
947 void
948 rptest_TestStepType_choice_array_destroy_contents(
949 rptest_TestStepType_choice_array * array)
950 0 {
951 0 int i = 0;
952 GlobusFuncName(rptest_TestStepType_choice_array_destroy_contents);
953 0 GlobusSoapMessageDebugEnter();
954
955 0 for(; i < array->length; ++i)
956 {
957 0 rptest_TestStepType_choice_destroy_contents(&array->elements[i]);
958 }
959
960 0 if(array->elements)
961 {
962 0 globus_free(array->elements);
963 0 array->elements = NULL;
964 }
965 0 array->length = 0;
966
967 0 GlobusSoapMessageDebugExit();
968 }
969
970 void
971 rptest_TestStepType_choice_array_destroy(
972 rptest_TestStepType_choice_array * array)
973 0 {
974 GlobusFuncName(rptest_TestStepType_choice_array_destroy);
975 0 GlobusSoapMessageDebugEnter();
976
977 0 rptest_TestStepType_choice_array_destroy_contents(array);
978 0 globus_free(array);
979
980 0 GlobusSoapMessageDebugExit();
981 }
982
983 globus_result_t
984 rptest_TestStepType_choice_array_copy(
985 rptest_TestStepType_choice_array ** dest_arr,
986 const rptest_TestStepType_choice_array * src_arr)
987 0 {
988 rptest_TestStepType_choice_array * array;
989 globus_result_t result;
990 GlobusFuncName(rptest_TestStepType_choice_array_copy);
991 0 GlobusSoapMessageDebugEnter();
992
993 0 array = (rptest_TestStepType_choice_array *) malloc(
994 sizeof(rptest_TestStepType_choice_array));
995 0 if(!array)
996 {
997 0 result = GlobusSoapMessageErrorOutOfMemory;
998 0 GlobusSoapMessageDebugExit();
999 0 return result;
1000 }
1001
1002 0 result = rptest_TestStepType_choice_array_copy_contents(array, src_arr);
1003 0 if(result != GLOBUS_SUCCESS)
1004 {
1005 0 globus_free(array);
1006 0 GlobusSoapMessageDebugExit();
1007 0 return result;
1008 }
1009
1010 0 *dest_arr = array;
1011
1012 0 GlobusSoapMessageDebugExit();
1013 0 return GLOBUS_SUCCESS;
1014 }
1015
1016 globus_result_t
1017 rptest_TestStepType_choice_array_copy_contents(
1018 rptest_TestStepType_choice_array * dest_arr,
1019 const rptest_TestStepType_choice_array * src_arr)
1020 0 {
1021 int i;
1022 0 globus_result_t result = GLOBUS_SUCCESS;
1023 GlobusFuncName(rptest_TestStepType_choice_array_copy_contents);
1024 0 GlobusSoapMessageDebugEnter();
1025
1026 0 dest_arr->length = src_arr->length;
1027 0 if(dest_arr->length > 0)
1028 {
1029 0 dest_arr->elements = (rptest_TestStepType_choice *) malloc(
1030 sizeof(rptest_TestStepType_choice) * dest_arr->length);
1031 0 if(!dest_arr->elements)
1032 {
1033 0 result = GlobusSoapMessageErrorOutOfMemory;
1034 0 goto exit;
1035 }
1036 }
1037 else
1038 {
1039 0 dest_arr->elements = NULL;
1040 }
1041
1042 0 for(i = 0; i < dest_arr->length; i++)
1043 {
1044 0 result = rptest_TestStepType_choice_copy_contents(
1045 &dest_arr->elements[i], &src_arr->elements[i]);
1046 0 if(result != GLOBUS_SUCCESS)
1047 {
1048 0 while(i--)
1049 {
1050 0 rptest_TestStepType_choice_destroy_contents(&dest_arr->elements[i]);
1051 }
1052
1053 0 globus_free(dest_arr->elements);
1054 0 dest_arr->elements = NULL;
1055 0 dest_arr->length = 0;
1056 0 break;
1057 }
1058 }
1059
1060 0 exit:
1061 0 GlobusSoapMessageDebugExit();
1062 0 return result;
1063 }
1064
1065 rptest_TestStepType_choice *
1066 rptest_TestStepType_choice_array_push(
1067 rptest_TestStepType_choice_array * array)
1068 0 {
1069 rptest_TestStepType_choice * tmp;
1070
1071 GlobusFuncName(rptest_TestStepType_choice_array_push);
1072 0 GlobusSoapMessageDebugEnter();
1073
1074 0 tmp = realloc(array->elements,
1075 sizeof(rptest_TestStepType_choice) *
1076 (array->length + 1));
1077 0 if (tmp == NULL)
1078 {
1079 0 goto error;
1080 }
1081 0 array->elements = tmp;
1082
1083 0 memset(&array->elements[array->length], 0, sizeof(rptest_TestStepType_choice));
1084 0 array->length++;
1085
1086 0 GlobusSoapMessageDebugExit();
1087 0 return (&array->elements[array->length - 1]);
1088 0 error:
1089 0 GlobusSoapMessageDebugExit();
1090 0 return NULL;
1091 }
1092
1093 void *
1094 rptest_TestStepType_choice_array_push_wrapper(
1095 void * array)
1096 0 {
1097 0 return (void *) rptest_TestStepType_choice_array_push(
1098 (rptest_TestStepType_choice_array *) array);
1099 }
1100
1101 globus_result_t
1102 rptest_TestStepType_choice_array_serialize(
1103 xsd_QName * element_qname,
1104 rptest_TestStepType_choice_array * array,
1105 globus_soap_message_handle_t message,
1106 globus_xsd_element_options_t options)
1107 0 {
1108 0 globus_result_t result = GLOBUS_SUCCESS;
1109 0 int i = 0;
1110 GlobusFuncName(rptest_TestStepType_choice_array_serialize);
1111 0 GlobusSoapMessageDebugEnter();
1112
1113 0 for(; i < array->length; ++i)
1114 {
1115 0 result = rptest_TestStepType_choice_serialize(
1116 element_qname,
1117 &array->elements[i],
1118 message,
1119 options);
1120 0 if(result != GLOBUS_SUCCESS)
1121 {
1122 0 goto exit;
1123 }
1124 }
1125
1126 0 exit:
1127
1128 0 GlobusSoapMessageDebugExit();
1129 0 return result;
1130 }
1131
1132 globus_result_t
1133 rptest_TestStepType_choice_array_deserialize(
1134 xsd_QName * element_qname,
1135 rptest_TestStepType_choice_array * array,
1136 globus_soap_message_handle_t message,
1137 globus_xsd_element_options_t options)
1138 0 {
1139 0 globus_result_t result = GLOBUS_SUCCESS;
1140 0 int i = 0;
1141 int pre_length;
1142 GlobusFuncName(rptest_TestStepType_choice_array_deserialize);
1143 0 GlobusSoapMessageDebugEnter();
1144
1145 0 pre_length = array->length;
1146
1147 0 for(i = 0; i < pre_length; ++i)
1148 {
1149 0 result = rptest_TestStepType_choice_deserialize(
1150 element_qname,
1151 &array->elements[i],
1152 message,
1153 options);
1154 0 if(result != GLOBUS_SUCCESS)
1155 {
1156 0 if(GlobusSoapMessageStatusFailedElementCheck(result) ||
1157 GlobusSoapMessageStatusElementNotFoundCheck(result) ||
1158 GlobusSoapMessageStatusFailedWithTextCheck(result))
1159 {
1160 0 result = GLOBUS_SUCCESS;
1161 0 break;
1162 }
1163
1164 0 result = GlobusSoapMessageErrorDeserializeFailed(
1165 result, element_qname);
1166 0 goto exit;
1167 }
1168 }
1169
1170 0 while(result == GLOBUS_SUCCESS)
1171 {
1172 rptest_TestStepType_choice next;
1173 0 memset(&next, 0, sizeof(rptest_TestStepType_choice));
1174
1175 0 result = rptest_TestStepType_choice_deserialize(
1176 element_qname,
1177 &next,
1178 message,
1179 options);
1180 0 if(result != GLOBUS_SUCCESS)
1181 {
1182 0 if(GlobusSoapMessageStatusFailedElementCheck(result) ||
1183 GlobusSoapMessageStatusElementNotFoundCheck(result) ||
1184 GlobusSoapMessageStatusFailedWithTextCheck(result))
1185 {
1186 0 result = GLOBUS_SUCCESS;
1187 0 break;
1188 }
1189
1190 0 result = GlobusSoapMessageErrorDeserializeFailed(
1191 result, element_qname);
1192 0 goto exit;
1193 }
1194
1195 0 array->elements = realloc(
1196 array->elements,
1197 (array->length + 1) * sizeof(rptest_TestStepType_choice));
1198 0 if(!array->elements)
1199 {
1200 0 result = GlobusSoapMessageErrorOutOfMemory;
1201 0 goto exit;
1202 }
1203 0 array->elements[array->length] = next;
1204 0 array->length++;
1205 0 ++i;
1206 }
1207
1208 0 exit:
1209
1210 0 if(result != GLOBUS_SUCCESS)
1211 {
1212 0 int di = 0;
1213 0 for(; di < i; ++di)
1214 {
1215 0 rptest_TestStepType_choice_destroy_contents(
1216 &array->elements[di]);
1217 0 memset(&array->elements[di], 0, sizeof(rptest_TestStepType_choice));
1218 }
1219 }
1220
1221 0 GlobusSoapMessageDebugExit();
1222 0 return result;