1 /*
2 * Copyright 1999-2006 University of Chicago
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18 /*
19 * This file is automatically generated by the Globus WSDLtoC converter
20 */
21
22 #include "xsd_QName.h"
23 #include "globus_soap_message.h"
24 #include "globus_xsd_type_info.h"
25 #include "wsp_PolicyAssertions_group.h"
26 #include "globus_xsd_generic_array.h"
27
28 xsd_QName wsp_PolicyAssertions_group_choice_qname =
29 {
30 "http://schemas.xmlsoap.org/ws/2002/12/policy",
31 "PolicyAssertions_group_choice"
32 };
33
34 static
35 globus_result_t
36 wsp_PolicyAssertions_group_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 wsp_PolicyAssertions_group_choice_serialize(
43 element_qname,
44 (wsp_PolicyAssertions_group_choice *) instance,
45 message_handle, options);
46 }
47
48 static
49 globus_result_t
50 wsp_PolicyAssertions_group_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 wsp_PolicyAssertions_group_choice_deserialize_pointer(
57 element_qname,
58 (wsp_PolicyAssertions_group_choice **) ip,
59 message_handle, options);
60 }
61
62 static
63 globus_result_t
64 wsp_PolicyAssertions_group_choice_init_wrapper(void **object)
65 0 {
66 0 return wsp_PolicyAssertions_group_choice_init(
67 (wsp_PolicyAssertions_group_choice **) object);
68 }
69
70 static
71 void
72 wsp_PolicyAssertions_group_choice_destroy_wrapper(
73 void * object)
74 0 {
75 0 wsp_PolicyAssertions_group_choice_destroy(
76 (wsp_PolicyAssertions_group_choice *) object);
77 0 }
78
79 static
80 globus_result_t
81 wsp_PolicyAssertions_group_choice_copy_wrapper(
82 void ** dest_obj,
83 const void * src_obj)
84 0 {
85 0 return wsp_PolicyAssertions_group_choice_copy(
86 (wsp_PolicyAssertions_group_choice **) dest_obj,
87 (wsp_PolicyAssertions_group_choice *) src_obj);
88 }
89
90 static
91 globus_result_t
92 wsp_PolicyAssertions_group_choice_init_contents_wrapper(void *object)
93 0 {
94 0 return wsp_PolicyAssertions_group_choice_init_contents(
95 (wsp_PolicyAssertions_group_choice *) object);
96 }
97
98 static
99 void
100 wsp_PolicyAssertions_group_choice_destroy_contents_wrapper(
101 void * object)
102 0 {
103 0 wsp_PolicyAssertions_group_choice_destroy_contents(
104 (wsp_PolicyAssertions_group_choice *) object);
105 0 }
106
107 static
108 globus_result_t
109 wsp_PolicyAssertions_group_choice_copy_contents_wrapper(
110 void * dest_obj,
111 const void * src_obj)
112 0 {
113 0 return wsp_PolicyAssertions_group_choice_copy_contents(
114 (wsp_PolicyAssertions_group_choice *) dest_obj,
115 (wsp_PolicyAssertions_group_choice *) src_obj);
116 }
117
118 static
119 globus_result_t
120 wsp_PolicyAssertions_group_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 wsp_PolicyAssertions_group_choice_serialize_contents(
127 element_qname,
128 (const wsp_PolicyAssertions_group_choice *) instance,
129 message_handle, options);
130 }
131
132 static
133 globus_result_t
134 wsp_PolicyAssertions_group_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(wsp_PolicyAssertions_group_choice_deserialize_contents_wrapper);
142 0 GlobusSoapMessageDebugEnter();
143
144 0 if(!*instance)
145 {
146 0 result = wsp_PolicyAssertions_group_choice_init(
147 (wsp_PolicyAssertions_group_choice **)instance);
148 0 if(result != GLOBUS_SUCCESS)
149 {
150 0 goto error;
151 }
152 }
153
154 0 result = wsp_PolicyAssertions_group_choice_deserialize_contents(
155 element_qname,
156 *(wsp_PolicyAssertions_group_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 wsp_PolicyAssertions_group_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 wsp_PolicyAssertions_group_choice_array_serialize(
172 element,
173 (wsp_PolicyAssertions_group_choice_array *) instance,
174 message, options);
175 }
176
177 static
178 globus_result_t
179 wsp_PolicyAssertions_group_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 = wsp_PolicyAssertions_group_choice_array_init(
190 (wsp_PolicyAssertions_group_choice_array **)inst);
191 0 if(result != GLOBUS_SUCCESS)
192 {
193 0 return result;
194 }
195 }
196
197 0 return wsp_PolicyAssertions_group_choice_array_deserialize(
198 element_qname,
199 *(wsp_PolicyAssertions_group_choice_array **) inst,
200 message, options);
201 }
202
203 static
204 globus_result_t
205 wsp_PolicyAssertions_group_choice_array_init_wrapper(
206 void ** arr)
207 0 {
208 0 return wsp_PolicyAssertions_group_choice_array_init(
209 (wsp_PolicyAssertions_group_choice_array **) arr);
210 }
211
212 static
213 void
214 wsp_PolicyAssertions_group_choice_array_destroy_wrapper(
215 void * arr)
216 0 {
217 0 wsp_PolicyAssertions_group_choice_array_destroy(
218 (wsp_PolicyAssertions_group_choice_array *) arr);
219 0 }
220
221 static
222 globus_result_t
223 wsp_PolicyAssertions_group_choice_array_copy_wrapper(
224 void ** dest_arr,
225 const void * src_arr)
226 0 {
227 0 return wsp_PolicyAssertions_group_choice_array_copy(
228 (wsp_PolicyAssertions_group_choice_array **) dest_arr,
229 (const wsp_PolicyAssertions_group_choice_array *) src_arr);
230 }
231
232 static
233 globus_result_t
234 wsp_PolicyAssertions_group_choice_array_init_contents_wrapper(
235 void * arr)
236 0 {
237 0 return wsp_PolicyAssertions_group_choice_array_init_contents(
238 (wsp_PolicyAssertions_group_choice_array *) arr);
239 }
240
241 static
242 void
243 wsp_PolicyAssertions_group_choice_array_destroy_contents_wrapper(
244 void * arr)
245 0 {
246 0 wsp_PolicyAssertions_group_choice_array_destroy_contents(
247 (wsp_PolicyAssertions_group_choice_array *) arr);
248 0 }
249
250 static
251 globus_result_t
252 wsp_PolicyAssertions_group_choice_array_copy_contents_wrapper(
253 void * dest_arr,
254 const void * src_arr)
255 0 {
256 0 return wsp_PolicyAssertions_group_choice_array_copy_contents(
257 (wsp_PolicyAssertions_group_choice_array *) dest_arr,
258 (const wsp_PolicyAssertions_group_choice_array *) src_arr);
259 }
260
261 static
262 void *
263 wsp_PolicyAssertions_group_choice_array_push_wrapper(
264 void * array)
265 0 {
266 0 return (void *) wsp_PolicyAssertions_group_choice_array_push(
267 (wsp_PolicyAssertions_group_choice_array *) array);
268 }
269
270 struct globus_xsd_type_info_s wsp_PolicyAssertions_group_choice_array_info =
271 {
272 &wsp_PolicyAssertions_group_choice_qname,
273 wsp_PolicyAssertions_group_choice_array_serialize_wrapper,
274 wsp_PolicyAssertions_group_choice_array_deserialize_wrapper,
275 wsp_PolicyAssertions_group_choice_array_init_wrapper,
276 wsp_PolicyAssertions_group_choice_array_destroy_wrapper,
277 wsp_PolicyAssertions_group_choice_array_copy_wrapper,
278 wsp_PolicyAssertions_group_choice_array_init_contents_wrapper,
279 wsp_PolicyAssertions_group_choice_array_destroy_contents_wrapper,
280 wsp_PolicyAssertions_group_choice_array_copy_contents_wrapper,
281 sizeof(wsp_PolicyAssertions_group_choice),
282 wsp_PolicyAssertions_group_choice_array_push_wrapper,
283 NULL,
284 NULL
285 };
286
287 struct globus_xsd_type_info_s wsp_PolicyAssertions_group_choice_contents_info =
288 {
289 &wsp_PolicyAssertions_group_choice_qname,
290 wsp_PolicyAssertions_group_choice_serialize_contents_wrapper,
291 wsp_PolicyAssertions_group_choice_deserialize_contents_wrapper,
292 wsp_PolicyAssertions_group_choice_init_wrapper,
293 wsp_PolicyAssertions_group_choice_destroy_wrapper,
294 wsp_PolicyAssertions_group_choice_copy_wrapper,
295 wsp_PolicyAssertions_group_choice_init_contents_wrapper,
296 wsp_PolicyAssertions_group_choice_destroy_contents_wrapper,
297 wsp_PolicyAssertions_group_choice_copy_contents_wrapper,
298 sizeof(wsp_PolicyAssertions_group_choice),
299 NULL,
300 NULL,
301 NULL
302 };
303
304 struct globus_xsd_type_info_s wsp_PolicyAssertions_group_choice_info =
305 {
306 &wsp_PolicyAssertions_group_choice_qname,
307 wsp_PolicyAssertions_group_choice_serialize_wrapper,
308 wsp_PolicyAssertions_group_choice_deserialize_pointer_wrapper,
309 wsp_PolicyAssertions_group_choice_init_wrapper,
310 wsp_PolicyAssertions_group_choice_destroy_wrapper,
311 wsp_PolicyAssertions_group_choice_copy_wrapper,
312 wsp_PolicyAssertions_group_choice_init_contents_wrapper,
313 wsp_PolicyAssertions_group_choice_destroy_contents_wrapper,
314 wsp_PolicyAssertions_group_choice_copy_contents_wrapper,
315 sizeof(wsp_PolicyAssertions_group_choice),
316 NULL,
317 &wsp_PolicyAssertions_group_choice_contents_info,
318 &wsp_PolicyAssertions_group_choice_array_info
319 };
320
321 globus_result_t
322 wsp_PolicyAssertions_group_choice_init_contents(
323 wsp_PolicyAssertions_group_choice * instance)
324 0 {
325 0 globus_result_t result = GLOBUS_SUCCESS;
326 GlobusFuncName(wsp_PolicyAssertions_group_choice_init_contents);
327 0 GlobusSoapMessageDebugEnter();
328
329 0 memset(instance, 0, sizeof(wsp_PolicyAssertions_group));
330
331 0 GlobusSoapMessageDebugExit();
332 0 return result;
333 }
334
335 globus_result_t
336 wsp_PolicyAssertions_group_choice_init(
337 wsp_PolicyAssertions_group_choice ** object)
338 0 {
339 wsp_PolicyAssertions_group_choice * instance;
340 0 globus_result_t result = GLOBUS_SUCCESS;
341 GlobusFuncName(wsp_PolicyAssertions_group_choice_init);
342 0 GlobusSoapMessageDebugEnter();
343
344 0 instance = globus_malloc(sizeof(wsp_PolicyAssertions_group_choice));
345 0 if(!instance)
346 {
347 0 result = GlobusSoapMessageErrorOutOfMemory;
348 0 goto exit;
349 }
350
351 0 memset(instance, 0, sizeof(wsp_PolicyAssertions_group_choice));
352
353 0 *object = instance;
354
355 0 exit:
356 0 GlobusSoapMessageDebugExit();
357 0 return result;
358 }
359
360 void
361 wsp_PolicyAssertions_group_choice_destroy(
362 wsp_PolicyAssertions_group_choice * instance)
363 0 {
364 GlobusFuncName(wsp_PolicyAssertions_group_choice_destroy);
365 0 GlobusSoapMessageDebugEnter();
366
367 0 if(!instance)
368 {
369 0 goto exit;
370 }
371
372 0 wsp_PolicyAssertions_group_choice_destroy_contents(instance);
373 0 free(instance);
374
375 0 exit:
376
377 0 GlobusSoapMessageDebugExit();
378 0 }
379
380
381
382 void
383 wsp_PolicyAssertions_group_choice_destroy_contents(
384 wsp_PolicyAssertions_group_choice * instance)
385 0 {
386 GlobusFuncName(wsp_PolicyAssertions_group_choice_destroy_contents);
387 0 GlobusSoapMessageDebugEnter();
388
389 0 switch(instance->type)
390 {
391
392 case wsp_PolicyAssertions_group_TextEncoding:
393
394 0 wsp_TextEncodingAssertion_destroy_contents(
395 &instance->value.TextEncoding);
396 0 break;
397
398 case wsp_PolicyAssertions_group_Language:
399
400 0 wsp_LanguageAssertion_destroy_contents(
401 &instance->value.Language);
402 0 break;
403
404 case wsp_PolicyAssertions_group_SpecVersion:
405
406 0 wsp_SpecVersionAssertion_destroy_contents(
407 &instance->value.SpecVersion);
408 0 break;
409
410 case wsp_PolicyAssertions_group_MessagePredicate:
411
412 0 wsp_MessagePredicateAssertion_destroy_contents(
413 &instance->value.MessagePredicate);
414 break;
415
416 default:
417 break;
418 }
419
420 0 instance->type = wsp_PolicyAssertions_group_undefined;
421
422 0 GlobusSoapMessageDebugExit();
423 0 }
424
425 globus_result_t
426 wsp_PolicyAssertions_group_choice_copy(
427 wsp_PolicyAssertions_group_choice ** dest_obj,
428 const wsp_PolicyAssertions_group_choice * src_obj)
429 0 {
430 0 globus_result_t result = GLOBUS_SUCCESS;
431 wsp_PolicyAssertions_group_choice * instance;
432 GlobusFuncName(wsp_PolicyAssertions_group_choice_copy);
433
434 0 GlobusSoapMessageDebugEnter();
435
436 0 instance = malloc(sizeof(wsp_PolicyAssertions_group_choice));
437 0 if (instance == NULL)
438 {
439 0 GlobusSoapMessageDebugExit();
440 0 return GlobusSoapMessageErrorOutOfMemory;
441 }
442
443 0 result = wsp_PolicyAssertions_group_choice_copy_contents(instance, src_obj);
444 0 if(result != GLOBUS_SUCCESS)
445 {
446 0 globus_free(instance);
447 0 GlobusSoapMessageDebugExit();
448 0 return GlobusSoapMessageErrorOutOfMemory;
449 }
450
451 0 *dest_obj = instance;
452 0 GlobusSoapMessageDebugExit();
453 0 return result;
454 }
455
456
457
458 globus_result_t
459 wsp_PolicyAssertions_group_choice_copy_contents(
460 wsp_PolicyAssertions_group_choice * instance,
461 const wsp_PolicyAssertions_group_choice * src_obj)
462 0 {
463 xsd_QName subelement;
464 0 globus_result_t result = GLOBUS_SUCCESS;
465 GlobusFuncName(wsp_PolicyAssertions_group_choice_copy_contents);
466
467 0 GlobusSoapMessageDebugEnter();
468
469 0 switch(src_obj->type)
470 {
471
472 case wsp_PolicyAssertions_group_TextEncoding:
473 0 instance->type = wsp_PolicyAssertions_group_TextEncoding;
474 0 result = wsp_TextEncodingAssertion_copy_contents(
475 &instance->value.TextEncoding,
476 &src_obj->value.TextEncoding);
477 0 if(result != GLOBUS_SUCCESS)
478 {
479 0 result = GlobusSoapMessageErrorSerializeFailed(
480 result, NULL, &wsp_PolicyAssertions_group_choice_qname);
481 0 goto exit;
482 }
483
484 0 break;
485
486 case wsp_PolicyAssertions_group_Language:
487 0 instance->type = wsp_PolicyAssertions_group_Language;
488 0 result = wsp_LanguageAssertion_copy_contents(
489 &instance->value.Language,
490 &src_obj->value.Language);
491 0 if(result != GLOBUS_SUCCESS)
492 {
493 0 result = GlobusSoapMessageErrorSerializeFailed(
494 result, NULL, &wsp_PolicyAssertions_group_choice_qname);
495 0 goto exit;
496 }
497
498 0 break;
499
500 case wsp_PolicyAssertions_group_SpecVersion:
501 0 instance->type = wsp_PolicyAssertions_group_SpecVersion;
502 0 result = wsp_SpecVersionAssertion_copy_contents(
503 &instance->value.SpecVersion,
504 &src_obj->value.SpecVersion);
505 0 if(result != GLOBUS_SUCCESS)
506 {
507 0 result = GlobusSoapMessageErrorSerializeFailed(
508 result, NULL, &wsp_PolicyAssertions_group_choice_qname);
509 0 goto exit;
510 }
511
512 0 break;
513
514 case wsp_PolicyAssertions_group_MessagePredicate:
515 0 instance->type = wsp_PolicyAssertions_group_MessagePredicate;
516 0 result = wsp_MessagePredicateAssertion_copy_contents(
517 &instance->value.MessagePredicate,
518 &src_obj->value.MessagePredicate);
519 0 if(result != GLOBUS_SUCCESS)
520 {
521 0 result = GlobusSoapMessageErrorSerializeFailed(
522 result, NULL, &wsp_PolicyAssertions_group_choice_qname);
523 0 goto exit;
524 }
525
526 break;
527
528 default:
529 break;
530 }
531
532 0 exit:
533
534 0 GlobusSoapMessageDebugExit();
535 0 return result;
536 }
537
538
539
540
541
542 globus_result_t
543 wsp_PolicyAssertions_group_choice_serialize_contents(
544 const xsd_QName * element_qname, /* ignored */
545 const wsp_PolicyAssertions_group_choice * instance,
546 globus_soap_message_handle_t message_handle,
547 globus_xsd_element_options_t options)
548 0 {
549 xsd_QName subelement;
550 0 globus_result_t result = GLOBUS_SUCCESS;
551 GlobusFuncName(wsp_PolicyAssertions_group_choice_serialize_contents);
552 0 GlobusSoapMessageDebugEnter();
553
554 0 switch(instance->type)
555 {
556
557 case wsp_PolicyAssertions_group_TextEncoding:
558
559 0 subelement.local = "TextEncoding";
560 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/12/policy";
561 0 result = wsp_TextEncodingAssertion_serialize(
562 &subelement,
563 &instance->value.TextEncoding,
564 message_handle,
565 options);
566 0 if(result != GLOBUS_SUCCESS)
567 {
568 0 result = GlobusSoapMessageErrorSerializeFailed(
569 result, NULL, &wsp_PolicyAssertions_group_choice_qname);
570 0 goto exit;
571 }
572
573 0 break;
574
575 case wsp_PolicyAssertions_group_Language:
576
577 0 subelement.local = "Language";
578 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/12/policy";
579 0 result = wsp_LanguageAssertion_serialize(
580 &subelement,
581 &instance->value.Language,
582 message_handle,
583 options);
584 0 if(result != GLOBUS_SUCCESS)
585 {
586 0 result = GlobusSoapMessageErrorSerializeFailed(
587 result, NULL, &wsp_PolicyAssertions_group_choice_qname);
588 0 goto exit;
589 }
590
591 0 break;
592
593 case wsp_PolicyAssertions_group_SpecVersion:
594
595 0 subelement.local = "SpecVersion";
596 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/12/policy";
597 0 result = wsp_SpecVersionAssertion_serialize(
598 &subelement,
599 &instance->value.SpecVersion,
600 message_handle,
601 options);
602 0 if(result != GLOBUS_SUCCESS)
603 {
604 0 result = GlobusSoapMessageErrorSerializeFailed(
605 result, NULL, &wsp_PolicyAssertions_group_choice_qname);
606 0 goto exit;
607 }
608
609 0 break;
610
611 case wsp_PolicyAssertions_group_MessagePredicate:
612
613 0 subelement.local = "MessagePredicate";
614 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/12/policy";
615 0 result = wsp_MessagePredicateAssertion_serialize(
616 &subelement,
617 &instance->value.MessagePredicate,
618 message_handle,
619 options);
620 0 if(result != GLOBUS_SUCCESS)
621 {
622 0 result = GlobusSoapMessageErrorSerializeFailed(
623 result, NULL, &wsp_PolicyAssertions_group_choice_qname);
624 0 goto exit;
625 }
626
627 break;
628
629 default:
630 break;
631 }
632
633 0 exit:
634
635 0 GlobusSoapMessageDebugExit();
636 0 return result;
637 }
638
639
640
641 globus_result_t
642 wsp_PolicyAssertions_group_choice_serialize(
643 const xsd_QName * element_qname,
644 const wsp_PolicyAssertions_group_choice * instance,
645 globus_soap_message_handle_t message_handle,
646 globus_xsd_element_options_t options)
647 0 {
648 0 globus_result_t result = GLOBUS_SUCCESS;
649 GlobusFuncName(wsp_PolicyAssertions_group_choice_serialize);
650 0 GlobusSoapMessageDebugEnter();
651
652 0 result = wsp_PolicyAssertions_group_choice_serialize_contents(
653 element_qname,
654 instance,
655 message_handle,
656 options);
657 0 if(result != GLOBUS_SUCCESS)
658 {
659 0 result = GlobusSoapMessageErrorSerializeFailed(
660 result, NULL, &wsp_PolicyAssertions_group_choice_qname);
661 0 goto exit;
662 }
663
664 0 exit:
665 0 GlobusSoapMessageDebugExit();
666 0 return result;
667 }
668
669
670
671
672
673 globus_result_t
674 wsp_PolicyAssertions_group_choice_deserialize_contents(
675 const xsd_QName * element_qname, /* ignored */
676 wsp_PolicyAssertions_group_choice * instance,
677 globus_soap_message_handle_t message_handle,
678 globus_xsd_element_options_t options)
679 0 {
680 0 globus_result_t result = GLOBUS_SUCCESS;
681 GlobusFuncName(wsp_PolicyAssertions_group_choice_deserialize_contents);
682 0 GlobusSoapMessageDebugEnter();
683
684 0 result = wsp_PolicyAssertions_group_choice_deserialize(
685 NULL,
686 instance,
687 message_handle,
688 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
689 0 if(result != GLOBUS_SUCCESS)
690 {
691 0 result = GlobusSoapMessageErrorDeserializeFailed(
692 result, element_qname);
693 0 goto exit;
694 }
695
696 0 exit:
697
698 0 GlobusSoapMessageDebugExit();
699 0 return result;
700 }
701
702
703
704 globus_result_t
705 wsp_PolicyAssertions_group_choice_deserialize(
706 const xsd_QName * element_qname,
707 wsp_PolicyAssertions_group_choice * instance,
708 globus_soap_message_handle_t message_handle,
709 globus_xsd_element_options_t options)
710 0 {
711 0 globus_result_t result = GLOBUS_SUCCESS;
712 xsd_QName subelement;
713 0 xsd_QName deselem_qname = { NULL, NULL } ;
714 GlobusFuncName(wsp_PolicyAssertions_group_choice_deserialize);
715 0 GlobusSoapMessageDebugEnter();
716
717 0 xsd_QName_init_contents(&deselem_qname);
718
719 0 result = globus_soap_message_deserialize_element_unknown(
720 message_handle, &deselem_qname);
721 0 if(result != GLOBUS_SUCCESS)
722 {
723 0 result = GlobusSoapMessageErrorDeserializeFailed(
724 result, &wsp_PolicyAssertions_group_choice_qname);
725 0 goto exit;
726 }
727
728 /*
729 if(globus_soap_message_deserialize_element_is_nil(message_handle))
730 {
731 xsd_QName_destroy_contents(&deselem_qname);
732 result = globus_soap_message_deserialize_element_end(
733 message_handle,
734 element_qname);
735 if(result != GLOBUS_SUCCESS)
736 {
737 result = GlobusSoapMessageErrorDeserializeFailed(
738 result, &wsp_PolicyAssertions_group_choice_qname);
739 goto exit;
740 }
741 }
742 */
743
744 0 globus_soap_message_deserialize_push_element(message_handle);
745
746 0 subelement.local = "TextEncoding";
747 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/12/policy";
748 0 if(xsd_QName_keyeq((void *)&subelement, (void *)&deselem_qname))
749 {
750 0 instance->type=wsp_PolicyAssertions_group_TextEncoding;
751 0 result = wsp_TextEncodingAssertion_deserialize(
752 &subelement,
753 &instance->value.TextEncoding,
754 message_handle,
755 options);
756 0 if(result != GLOBUS_SUCCESS)
757 {
758 0 result = GlobusSoapMessageErrorDeserializeFailed(
759 result, &wsp_PolicyAssertions_group_choice_qname);
760 0 goto TextEncoding_destroy;
761 }
762
763 0 goto exit;
764 }
765
766 0 subelement.local = "Language";
767 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/12/policy";
768 0 if(xsd_QName_keyeq((void *)&subelement, (void *)&deselem_qname))
769 {
770 0 instance->type=wsp_PolicyAssertions_group_Language;
771 0 result = wsp_LanguageAssertion_deserialize(
772 &subelement,
773 &instance->value.Language,
774 message_handle,
775 options);
776 0 if(result != GLOBUS_SUCCESS)
777 {
778 0 result = GlobusSoapMessageErrorDeserializeFailed(
779 result, &wsp_PolicyAssertions_group_choice_qname);
780 0 goto Language_destroy;
781 }
782
783 0 goto exit;
784 }
785
786 0 subelement.local = "SpecVersion";
787 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/12/policy";
788 0 if(xsd_QName_keyeq((void *)&subelement, (void *)&deselem_qname))
789 {
790 0 instance->type=wsp_PolicyAssertions_group_SpecVersion;
791 0 result = wsp_SpecVersionAssertion_deserialize(
792 &subelement,
793 &instance->value.SpecVersion,
794 message_handle,
795 options);
796 0 if(result != GLOBUS_SUCCESS)
797 {
798 0 result = GlobusSoapMessageErrorDeserializeFailed(
799 result, &wsp_PolicyAssertions_group_choice_qname);
800 0 goto SpecVersion_destroy;
801 }
802
803 0 goto exit;
804 }
805
806 0 subelement.local = "MessagePredicate";
807 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/12/policy";
808 0 if(xsd_QName_keyeq((void *)&subelement, (void *)&deselem_qname))
809 {
810 0 instance->type=wsp_PolicyAssertions_group_MessagePredicate;
811 0 result = wsp_MessagePredicateAssertion_deserialize(
812 &subelement,
813 &instance->value.MessagePredicate,
814 message_handle,
815 options);
816 0 if(result != GLOBUS_SUCCESS)
817 {
818 0 result = GlobusSoapMessageErrorDeserializeFailed(
819 result, &wsp_PolicyAssertions_group_choice_qname);
820 0 goto MessagePredicate_destroy;
821 }
822
823 0 goto exit;
824 }
825
826 0 instance->type = wsp_PolicyAssertions_group_undefined;
827 0 result = GlobusSoapMessageErrorDeserializeFailed(
828 result, &wsp_PolicyAssertions_group_choice_qname);
829
830 goto exit;
831
832 0 deserialize_failed:
833
834 0 MessagePredicate_destroy:
835
836 0 SpecVersion_destroy:
837
838 0 Language_destroy:
839
840 0 TextEncoding_destroy:
841
842 0 exit:
843
844 0 xsd_QName_destroy_contents(&deselem_qname);
845
846 0 GlobusSoapMessageDebugExit();
847 0 return result;
848 }
849
850
851
852 globus_result_t
853 wsp_PolicyAssertions_group_choice_deserialize_pointer(
854 const xsd_QName * element_qname,
855 wsp_PolicyAssertions_group_choice ** ip,
856 globus_soap_message_handle_t message_handle,
857 globus_xsd_element_options_t options)
858 0 {
859 0 wsp_PolicyAssertions_group_choice * instance = NULL;
860 0 globus_result_t result = GLOBUS_SUCCESS;
861 xsd_QName subelement;
862 GlobusFuncName(wsp_PolicyAssertions_group_choice_deserialize_pointer);
863 0 GlobusSoapMessageDebugEnter();
864
865 0 *ip = NULL;
866
867 0 result = wsp_PolicyAssertions_group_choice_init(&instance);
868 0 if(result != GLOBUS_SUCCESS)
869 {
870 0 result = GlobusSoapMessageErrorDeserializeFailed(
871 result, element_qname);
872 0 goto exit;
873 }
874
875 0 result = wsp_PolicyAssertions_group_choice_deserialize(
876 element_qname,
877 instance,
878 message_handle,
879 options);
880 0 if(result != GLOBUS_SUCCESS)
881 {
882 0 goto exit;
883 }
884
885 0 *ip = instance;
886
887 0 exit:
888
889 0 GlobusSoapMessageDebugExit();
890 0 return result;
891 }
892
893
894
895 globus_result_t
896 wsp_PolicyAssertions_group_choice_array_init_contents(
897 wsp_PolicyAssertions_group_choice_array * array)
898 0 {
899 0 return globus_xsd_generic_array_init_contents(
900 (globus_xsd_generic_array_t *) array,
901 &wsp_PolicyAssertions_group_choice_array_info);
902 }
903 /* wsp_PolicyAssertions_group_choice_array_init_contents() */
904
905 globus_result_t
906 wsp_PolicyAssertions_group_choice_array_init(
907 wsp_PolicyAssertions_group_choice_array ** arr)
908 0 {
909 0 return globus_xsd_generic_array_init(
910 (globus_xsd_generic_array_t **) arr,
911 &wsp_PolicyAssertions_group_choice_info);
912 }
913 /* wsp_PolicyAssertions_group_choice_array_init() */
914
915 void
916 wsp_PolicyAssertions_group_choice_array_destroy_contents(
917 wsp_PolicyAssertions_group_choice_array * array)
918 0 {
919 0 globus_xsd_generic_array_destroy_contents(
920 (globus_xsd_generic_array_t *) array);
921 0 }
922 /* wsp_PolicyAssertions_group_choice_array_destroy_contents() */
923
924 void
925 wsp_PolicyAssertions_group_choice_array_destroy(
926 wsp_PolicyAssertions_group_choice_array * array)
927 0 {
928 0 globus_xsd_generic_array_destroy(
929 (globus_xsd_generic_array_t *) array);
930 0 }
931 /* wsp_PolicyAssertions_group_choice_array_destroy() */
932
933 globus_result_t
934 wsp_PolicyAssertions_group_choice_array_copy(
935 wsp_PolicyAssertions_group_choice_array ** dest_arr,
936 const wsp_PolicyAssertions_group_choice_array * src_arr)
937 0 {
938 0 return globus_xsd_generic_array_copy(
939 (globus_xsd_generic_array_t **) dest_arr,
940 (const globus_xsd_generic_array_t *) src_arr);
941 }
942 /* wsp_PolicyAssertions_group_choice_array_copy() */
943
944 globus_result_t
945 wsp_PolicyAssertions_group_choice_array_copy_contents(
946 wsp_PolicyAssertions_group_choice_array * dest_arr,
947 const wsp_PolicyAssertions_group_choice_array * src_arr)
948 0 {
949 0 return globus_xsd_generic_array_copy_contents(
950 (globus_xsd_generic_array_t *) dest_arr,
951 (const globus_xsd_generic_array_t *) src_arr);
952 }
953
954 wsp_PolicyAssertions_group_choice *
955 wsp_PolicyAssertions_group_choice_array_push(
956 wsp_PolicyAssertions_group_choice_array * array)
957 0 {
958 /* Some contents initializers don't initialize subelments but to set their
959 * values to be NULL
960 */
961 0 if (array->type_info == NULL)
962 {
963 0 array->type_info = &wsp_PolicyAssertions_group_choice_info;
964 }
965 0 return globus_xsd_generic_array_push(
966 (globus_xsd_generic_array_t *) array);
967 }
968 /* wsp_PolicyAssertions_group_choice_array_push() */
969
970 globus_result_t
971 wsp_PolicyAssertions_group_choice_array_serialize(
972 const xsd_QName * element_qname,
973 const wsp_PolicyAssertions_group_choice_array * array,
974 globus_soap_message_handle_t message,
975 globus_xsd_element_options_t options)
976 0 {
977 0 return globus_xsd_generic_array_serialize(
978 element_qname,
979 (const globus_xsd_generic_array_t *) array,
980 message,
981 options);
982 }
983 /* wsp_PolicyAssertions_group_choice_array_serialize() */
984
985 globus_result_t
986 wsp_PolicyAssertions_group_choice_array_deserialize(
987 const xsd_QName * element_qname,
988 wsp_PolicyAssertions_group_choice_array * array,
989 globus_soap_message_handle_t message,
990 globus_xsd_element_options_t options)
991 0 {
992 /* Some initializers set the array's contents to NULL */
993 0 if (array->type_info == NULL)
994 {
995 0 array->type_info = &wsp_PolicyAssertions_group_choice_info;
996 }
997 0 return globus_xsd_generic_array_deserialize(
998 element_qname,
999 (globus_xsd_generic_array_t *) array,
1000 message,
1001 options);
1002 }