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 "wst_AuthenticatorType.h"
26 #include "globus_xsd_generic_array.h"
27
28 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
29 xsd_QName wst_AuthenticatorType_qname =
30 {
31 WST_AUTHENTICATORTYPE_NS,
32 WST_AUTHENTICATORTYPE_LOCAL
33 };
34 #endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */
35
36 static
37 globus_result_t
38 wst_AuthenticatorType_serialize_wrapper(
39 const xsd_QName * element_qname,
40 const void * instance,
41 globus_soap_message_handle_t message_handle,
42 globus_xsd_element_options_t options)
43 0 {
44 0 return wst_AuthenticatorType_serialize(
45 element_qname,
46 (const wst_AuthenticatorType *) instance,
47 message_handle, options);
48 }
49
50 static
51 globus_result_t
52 wst_AuthenticatorType_deserialize_pointer_wrapper(
53 const xsd_QName * element_qname,
54 void ** ip,
55 globus_soap_message_handle_t message_handle,
56 globus_xsd_element_options_t options)
57 0 {
58 0 return wst_AuthenticatorType_deserialize_pointer(
59 element_qname,
60 (wst_AuthenticatorType **) ip,
61 message_handle, options);
62 }
63
64 static
65 globus_result_t
66 wst_AuthenticatorType_init_wrapper(void **object)
67 0 {
68 0 return wst_AuthenticatorType_init(
69 (wst_AuthenticatorType **) object);
70 }
71
72 static
73 void
74 wst_AuthenticatorType_destroy_wrapper(
75 void * object)
76 0 {
77 0 wst_AuthenticatorType_destroy(
78 (wst_AuthenticatorType *) object);
79 0 }
80
81 static
82 globus_result_t
83 wst_AuthenticatorType_copy_wrapper(
84 void ** dest_obj,
85 const void * src_obj)
86 0 {
87 0 return wst_AuthenticatorType_copy(
88 (wst_AuthenticatorType **) dest_obj,
89 (wst_AuthenticatorType *) src_obj);
90 }
91
92 static
93 globus_result_t
94 wst_AuthenticatorType_init_contents_wrapper(void *object)
95 0 {
96 0 return wst_AuthenticatorType_init_contents(
97 (wst_AuthenticatorType *) object);
98 }
99
100 static
101 void
102 wst_AuthenticatorType_destroy_contents_wrapper(
103 void * object)
104 0 {
105 0 wst_AuthenticatorType_destroy_contents(
106 (wst_AuthenticatorType *) object);
107 0 }
108
109 static
110 globus_result_t
111 wst_AuthenticatorType_copy_contents_wrapper(
112 void * dest_obj,
113 const void * src_obj)
114 0 {
115 0 return wst_AuthenticatorType_copy_contents(
116 (wst_AuthenticatorType *) dest_obj,
117 (const wst_AuthenticatorType *) src_obj);
118 }
119
120 static
121 globus_result_t
122 wst_AuthenticatorType_serialize_contents_wrapper(
123 const xsd_QName * element_qname,
124 const void * instance,
125 globus_soap_message_handle_t message_handle,
126 globus_xsd_element_options_t options)
127 0 {
128 0 return wst_AuthenticatorType_serialize_contents(
129 element_qname,
130 (wst_AuthenticatorType *) instance,
131 message_handle, options);
132 }
133
134 static
135 globus_result_t
136 wst_AuthenticatorType_deserialize_contents_wrapper(
137 const xsd_QName * element_qname,
138 void ** instance,
139 globus_soap_message_handle_t message_handle,
140 globus_xsd_element_options_t options)
141 0 {
142 globus_result_t result;
143 GlobusFuncName(wst_AuthenticatorType_deserialize_contents_wrapper);
144 0 GlobusSoapMessageDebugEnter();
145
146 0 if(!*instance)
147 {
148 0 result = wst_AuthenticatorType_init(
149 (wst_AuthenticatorType **)instance);
150 0 if(result != GLOBUS_SUCCESS)
151 {
152 0 goto error;
153 }
154 }
155
156 0 result = wst_AuthenticatorType_deserialize_contents(
157 element_qname,
158 *(wst_AuthenticatorType **)instance,
159 message_handle, options);
160 0 error:
161 0 GlobusSoapMessageDebugExit();
162 0 return result;
163 }
164
165 static
166 globus_result_t
167 wst_AuthenticatorType_array_serialize_wrapper(
168 const xsd_QName * element,
169 const void * instance,
170 globus_soap_message_handle_t message,
171 globus_xsd_element_options_t options)
172 0 {
173 0 return wst_AuthenticatorType_array_serialize(
174 element,
175 (wst_AuthenticatorType_array *) instance,
176 message, options);
177 }
178
179 static
180 globus_result_t
181 wst_AuthenticatorType_array_deserialize_wrapper(
182 const xsd_QName * element_qname,
183 void ** inst,
184 globus_soap_message_handle_t message,
185 globus_xsd_element_options_t options)
186 0 {
187 0 if(!*inst)
188 {
189 globus_result_t result;
190
191 0 result = wst_AuthenticatorType_array_init(
192 (wst_AuthenticatorType_array **)inst);
193 0 if(result != GLOBUS_SUCCESS)
194 {
195 0 return result;
196 }
197 }
198
199 0 return wst_AuthenticatorType_array_deserialize(
200 element_qname,
201 *(wst_AuthenticatorType_array **) inst,
202 message, options);
203 }
204
205 static
206 globus_result_t
207 wst_AuthenticatorType_array_init_wrapper(
208 void ** arr)
209 0 {
210 0 return wst_AuthenticatorType_array_init(
211 (wst_AuthenticatorType_array **) arr);
212 }
213
214 static
215 void
216 wst_AuthenticatorType_array_destroy_wrapper(
217 void * arr)
218 0 {
219 0 wst_AuthenticatorType_array_destroy(
220 (wst_AuthenticatorType_array *) arr);
221 0 }
222
223 static
224 globus_result_t
225 wst_AuthenticatorType_array_copy_wrapper(
226 void ** dest_arr,
227 const void * src_arr)
228 0 {
229 0 return wst_AuthenticatorType_array_copy(
230 (wst_AuthenticatorType_array **) dest_arr,
231 (const wst_AuthenticatorType_array *) src_arr);
232 }
233
234 static
235 globus_result_t
236 wst_AuthenticatorType_array_init_contents_wrapper(
237 void * arr)
238 0 {
239 0 return wst_AuthenticatorType_array_init_contents(
240 (wst_AuthenticatorType_array *) arr);
241 }
242
243 static
244 void
245 wst_AuthenticatorType_array_destroy_contents_wrapper(
246 void * arr)
247 0 {
248 0 wst_AuthenticatorType_array_destroy_contents(
249 (wst_AuthenticatorType_array *) arr);
250 0 }
251
252 static
253 globus_result_t
254 wst_AuthenticatorType_array_copy_contents_wrapper(
255 void * dest_arr,
256 const void * src_arr)
257 0 {
258 0 return wst_AuthenticatorType_array_copy_contents(
259 (wst_AuthenticatorType_array *) dest_arr,
260 (const wst_AuthenticatorType_array *) src_arr);
261 }
262
263 static
264 void *
265 wst_AuthenticatorType_array_push_wrapper(
266 void * array)
267 0 {
268 0 return (void *) wst_AuthenticatorType_array_push((wst_AuthenticatorType_array *) array);
269 }
270
271 struct globus_xsd_type_info_s wst_AuthenticatorType_contents_info =
272 {
273 &wst_AuthenticatorType_qname,
274 wst_AuthenticatorType_serialize_contents_wrapper,
275 wst_AuthenticatorType_deserialize_contents_wrapper,
276 wst_AuthenticatorType_init_wrapper,
277 wst_AuthenticatorType_destroy_wrapper,
278 wst_AuthenticatorType_copy_wrapper,
279 wst_AuthenticatorType_init_contents_wrapper,
280 wst_AuthenticatorType_destroy_contents_wrapper,
281 wst_AuthenticatorType_copy_contents_wrapper,
282 sizeof(wst_AuthenticatorType),
283 NULL,
284 NULL,
285 NULL
286 };
287
288 struct globus_xsd_type_info_s wst_AuthenticatorType_array_info =
289 {
290 &wst_AuthenticatorType_qname,
291 wst_AuthenticatorType_array_serialize_wrapper,
292 wst_AuthenticatorType_array_deserialize_wrapper,
293 wst_AuthenticatorType_array_init_wrapper,
294 wst_AuthenticatorType_array_destroy_wrapper,
295 wst_AuthenticatorType_array_copy_wrapper,
296 wst_AuthenticatorType_array_init_contents_wrapper,
297 wst_AuthenticatorType_array_destroy_contents_wrapper,
298 wst_AuthenticatorType_array_copy_contents_wrapper,
299 sizeof(wst_AuthenticatorType),
300 wst_AuthenticatorType_array_push_wrapper,
301 NULL,
302 NULL
303 };
304
305 struct globus_xsd_type_info_s wst_AuthenticatorType_info =
306 {
307 &wst_AuthenticatorType_qname,
308 wst_AuthenticatorType_serialize_wrapper,
309 wst_AuthenticatorType_deserialize_pointer_wrapper,
310 wst_AuthenticatorType_init_wrapper,
311 wst_AuthenticatorType_destroy_wrapper,
312 wst_AuthenticatorType_copy_wrapper,
313 wst_AuthenticatorType_init_contents_wrapper,
314 wst_AuthenticatorType_destroy_contents_wrapper,
315 wst_AuthenticatorType_copy_contents_wrapper,
316 sizeof(wst_AuthenticatorType),
317 NULL,
318 &wst_AuthenticatorType_contents_info,
319 &wst_AuthenticatorType_array_info
320 };
321
322 globus_result_t
323 wst_AuthenticatorType_init_contents(
324 wst_AuthenticatorType * instance)
325 0 {
326 0 globus_result_t result = GLOBUS_SUCCESS;
327 GlobusFuncName(wst_AuthenticatorType_init_contents);
328 0 GlobusSoapMessageDebugEnter();
329
330 0 memset(instance, 0, sizeof(wst_AuthenticatorType));
331
332 0 GlobusSoapMessageDebugExit();
333 0 return result;
334 }
335
336 globus_result_t
337 wst_AuthenticatorType_init(
338 wst_AuthenticatorType ** object)
339 0 {
340 wst_AuthenticatorType * instance;
341 0 globus_result_t result = GLOBUS_SUCCESS;
342 GlobusFuncName(wst_AuthenticatorType_init);
343 0 GlobusSoapMessageDebugEnter();
344
345 0 instance = globus_malloc(sizeof(wst_AuthenticatorType));
346 0 if(!instance)
347 {
348 0 result = GlobusSoapMessageErrorOutOfMemory;
349 0 goto exit;
350 }
351
352 0 memset(instance, 0, sizeof(wst_AuthenticatorType));
353
354 0 *object = instance;
355
356 0 exit:
357 0 GlobusSoapMessageDebugExit();
358 0 return result;
359 }
360
361 void
362 wst_AuthenticatorType_destroy(
363 wst_AuthenticatorType * instance)
364 0 {
365 GlobusFuncName(wst_AuthenticatorType_destroy);
366 0 GlobusSoapMessageDebugEnter();
367
368 0 if(!instance)
369 {
370 0 goto exit;
371 }
372
373 0 wst_AuthenticatorType_destroy_contents(instance);
374 0 globus_free(instance);
375
376 0 exit:
377
378 0 GlobusSoapMessageDebugExit();
379 0 }
380
381
382 void
383 wst_AuthenticatorType_destroy_contents(
384 wst_AuthenticatorType * instance)
385 0 {
386 GlobusFuncName(wst_AuthenticatorType_destroy_contents);
387 0 GlobusSoapMessageDebugEnter();
388
389 0 if(instance)
390 {
391
392
393 0 xsd_base64Binary_destroy(instance->CombinedHash);
394 0 instance->CombinedHash = NULL;
395
396 0 xsd_any_array_destroy_contents(&instance->any);
397
398 }
399
400 0 GlobusSoapMessageDebugExit();
401 0 }
402
403
404 globus_result_t
405 wst_AuthenticatorType_copy(
406 wst_AuthenticatorType ** dest_obj,
407 const wst_AuthenticatorType * src_obj)
408 0 {
409 0 globus_result_t result = GLOBUS_SUCCESS;
410 wst_AuthenticatorType * instance;
411 GlobusFuncName(wst_AuthenticatorType_copy);
412
413 0 GlobusSoapMessageDebugEnter();
414
415 0 instance = calloc(1, sizeof(wst_AuthenticatorType));
416 0 if (instance == NULL)
417 {
418 0 GlobusSoapMessageDebugExit();
419 0 return GlobusSoapMessageErrorOutOfMemory;
420 }
421
422 0 result = wst_AuthenticatorType_copy_contents(instance, src_obj);
423 0 if(result != GLOBUS_SUCCESS)
424 {
425 0 globus_free(instance);
426 0 GlobusSoapMessageDebugExit();
427 0 return GlobusSoapMessageErrorOutOfMemory;
428 }
429
430 0 *dest_obj = instance;
431 0 GlobusSoapMessageDebugExit();
432 0 return result;
433 }
434
435 globus_result_t
436 wst_AuthenticatorType_copy_contents(
437 wst_AuthenticatorType * instance,
438 const wst_AuthenticatorType * src_obj)
439 0 {
440 0 globus_result_t result = GLOBUS_SUCCESS;
441 GlobusFuncName(wst_AuthenticatorType_copy_contents);
442
443 0 GlobusSoapMessageDebugEnter();
444
445 0 if(src_obj->CombinedHash)
446 {
447 0 result = xsd_base64Binary_copy(
448 &instance->CombinedHash,
449 src_obj->CombinedHash);
450 0 if(result != GLOBUS_SUCCESS)
451 {
452 0 result = GlobusSoapMessageErrorCopyFailed(
453 result, NULL, &xsd_base64Binary_qname);
454 0 goto CombinedHash_destroy_pointer;
455 }
456 }
457 else
458 {
459 0 instance->CombinedHash = NULL;
460 }
461
462 0 result = xsd_any_array_copy_contents(
463 &instance->any,
464 &src_obj->any);
465 0 if(result != GLOBUS_SUCCESS)
466 {
467 0 result = GlobusSoapMessageErrorCopyFailed(
468 result, NULL, &xsd_any_qname);
469 0 goto any_destroy_array;
470 }
471
472 0 goto exit;
473
474 fail_deserialize:
475 xsd_any_array_destroy_contents(
476 &instance->any);
477
478 0 any_destroy_array:
479 0 xsd_base64Binary_destroy(
480 instance->CombinedHash);
481 0 instance->CombinedHash = NULL;
482
483 0 CombinedHash_destroy_pointer:
484
485
486 0 exit:
487
488 0 GlobusSoapMessageDebugExit();
489 0 return result;
490 }
491
492
493
494 globus_result_t
495 wst_AuthenticatorType_serialize_contents(
496 const xsd_QName * element_qname, /* ignored */
497 const wst_AuthenticatorType * inst,
498 globus_soap_message_handle_t message_handle,
499 globus_xsd_element_options_t options)
500 0 {
501 0 globus_result_t result = GLOBUS_SUCCESS;
502 GlobusFuncName(wst_AuthenticatorType_serialize_contents);
503 0 GlobusSoapMessageDebugEnter();
504
505 0 result = wst_AuthenticatorType_serialize(
506 NULL,
507 inst,
508 message_handle,
509 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
510 0 if(result != GLOBUS_SUCCESS)
511 {
512 0 result = GlobusSoapMessageErrorSerializeFailed(
513 result, NULL, element_qname);
514 0 goto exit;
515 }
516
517 0 exit:
518
519 0 GlobusSoapMessageDebugExit();
520 0 return result;
521 }
522
523
524
525 globus_result_t
526 wst_AuthenticatorType_serialize(
527 const xsd_QName * element_qname,
528 const wst_AuthenticatorType * instance,
529 globus_soap_message_handle_t message_handle,
530 globus_xsd_element_options_t options)
531 0 {
532 0 globus_result_t result = GLOBUS_SUCCESS;
533 xsd_QName subelement;
534 0 globus_list_t * any_attr_keys = NULL;
535 0 globus_list_t * any_attr_keys_iterator = NULL;
536 0 xsd_QName * type_attr = NULL;
537
538 0 char * prefix = NULL;
539 int prefix_created;
540 0 int define_prefix = 0;
541 0 int save_options = options;
542
543 GlobusFuncName(wst_AuthenticatorType_serialize);
544 0 GlobusSoapMessageDebugEnter();
545
546
547 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
548 {
549 /* serialize wst_AuthenticatorType element */
550 0 result = globus_soap_message_element_ns_set(
551 message_handle,
552 element_qname,
553 element_qname->Namespace,
554 &options);
555 0 if(result != GLOBUS_SUCCESS)
556 {
557 0 result = GlobusSoapMessageErrorSerializeFailed(
558 result, NULL, element_qname);
559 0 goto exit;
560 }
561
562 0 if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
563 !globus_soap_message_serialize_is_c14n_subset(message_handle)))
564 {
565 0 result = globus_soap_message_attribute_ns_set(
566 message_handle,
567 element_qname,
568 "http://www.w3.org/2001/XMLSchema-instance",
569 &options);
570 0 if(result != GLOBUS_SUCCESS)
571 {
572 0 result = GlobusSoapMessageErrorSerializeFailed(
573 result, NULL, element_qname);
574 0 goto exit;
575 }
576 }
577
578 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
579 !globus_soap_message_serialize_is_c14n_subset(message_handle))
580 {
581
582 0 result = globus_soap_message_attribute_ns_set(
583 message_handle,
584 element_qname,
585 wst_AuthenticatorType_qname.Namespace,
586 &options);
587 0 if(result != GLOBUS_SUCCESS)
588 {
589 0 result = GlobusSoapMessageErrorSerializeFailed(
590 result, NULL, element_qname);
591 0 goto exit;
592 }
593 }
594
595 0 result = globus_soap_message_serialize_element(
596 message_handle,
597 element_qname,
598 options,
599 &wst_AuthenticatorType_qname);
600 0 if(result != GLOBUS_SUCCESS)
601 {
602 0 result = GlobusSoapMessageErrorSerializeFailed(
603 result, NULL, element_qname);
604 0 goto exit;
605 }
606
607 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
608 !globus_soap_message_serialize_is_c14n_subset(message_handle))
609 {
610 0 xsd_QName_init(&type_attr);
611
612 0 type_attr->local = globus_libc_strdup("type");
613 0 type_attr->Namespace = globus_libc_strdup(XSI_NS);
614 }
615
616
617 /* serialize namespaces */
618 0 result = globus_soap_message_element_ns_add(
619 message_handle,
620 element_qname,
621 element_qname->Namespace,
622 &options);
623 0 if(result != GLOBUS_SUCCESS)
624 {
625 0 result = GlobusSoapMessageErrorSerializeFailed(
626 result, NULL, element_qname);
627 0 goto exit;
628 }
629
630 0 if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
631 !globus_soap_message_serialize_is_c14n_subset(message_handle)))
632 {
633 0 result = globus_soap_message_attribute_ns_add(
634 message_handle,
635 element_qname,
636 "http://www.w3.org/2001/XMLSchema-instance",
637 &options);
638 0 if(result != GLOBUS_SUCCESS)
639 {
640 0 result = GlobusSoapMessageErrorSerializeFailed(
641 result, NULL, element_qname);
642 0 goto exit;
643 }
644 }
645 0 if ((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
646 !globus_soap_message_serialize_is_c14n_subset(message_handle))
647 {
648
649 0 result = globus_soap_message_attribute_ns_add(
650 message_handle,
651 element_qname,
652 wst_AuthenticatorType_qname.Namespace,
653 &options);
654 0 if(result != GLOBUS_SUCCESS)
655 {
656 0 result = GlobusSoapMessageErrorSerializeFailed(
657 result, NULL, element_qname);
658 0 goto exit;
659 }
660 }
661
662 /* serialize attributes */
663
664 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
665 !globus_soap_message_serialize_is_c14n_subset(message_handle))
666 {
667 0 result = globus_soap_message_serialize_QName_attribute(
668 message_handle,
669 type_attr,
670 &wst_AuthenticatorType_qname);
671 0 if(result != GLOBUS_SUCCESS)
672 {
673 0 result = GlobusSoapMessageErrorSerializeFailed(
674 result, NULL, element_qname);
675 0 goto exit;
676 }
677 }
678
679
680 }
681
682 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
683 {
684 0 result = globus_soap_message_serialize_element_begin_close(
685 message_handle, element_qname);
686 0 if(result != GLOBUS_SUCCESS)
687 {
688 0 result = GlobusSoapMessageErrorSerializeFailed(
689 result, NULL, element_qname);
690 0 goto exit;
691 }
692 }
693 0 options &= ~GLOBUS_XSD_ELEMENT_CONTENTS_ONLY;
694
695
696 /* serialize contents of type */
697
698 0 subelement.local = "CombinedHash";
699 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2004/04/trust";
700
701 0 if(instance->CombinedHash)
702 {
703 0 result = xsd_base64Binary_serialize(
704 &subelement,
705 instance->CombinedHash,
706 message_handle,
707 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
708 0 if(result != GLOBUS_SUCCESS)
709 {
710 0 result = GlobusSoapMessageErrorSerializeFailed(
711 result, NULL, &xsd_base64Binary_qname);
712 0 goto exit;
713 }
714 }
715
716 0 subelement.local = "any";
717 0 subelement.Namespace = "http://www.w3.org/2001/XMLSchema";
718
719 0 result = xsd_any_array_serialize(
720 &subelement,
721 &instance->any,
722 message_handle,
723 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
724 0 if(result != GLOBUS_SUCCESS)
725 {
726 0 result = GlobusSoapMessageErrorSerializeFailed(
727 result, NULL, &xsd_any_qname);
728 0 goto exit;
729 }
730
731 0 options = save_options;
732
733 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
734 {
735 /* add end element */
736 0 result = globus_soap_message_serialize_element_end(
737 message_handle,
738 element_qname,
739 options,
740 &wst_AuthenticatorType_qname);
741 0 if(result != GLOBUS_SUCCESS)
742 {
743 0 result = GlobusSoapMessageErrorSerializeFailed(
744 result, NULL, element_qname);
745 0 goto exit;
746 }
747
748 0 globus_soap_message_element_ns_remove(
749 message_handle,
750 element_qname->Namespace,
751 &options);
752
753 /* remove namespace/prefix mappings for these types */
754
755 0 if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
756 !globus_soap_message_serialize_is_c14n_subset(message_handle)))
757 {
758 0 globus_soap_message_attribute_ns_remove(
759 message_handle,
760 "http://www.w3.org/2001/XMLSchema-instance",
761 &options);
762 }
763 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
764 !globus_soap_message_serialize_is_c14n_subset(message_handle))
765 {
766 0 globus_soap_message_attribute_ns_remove(
767 message_handle,
768 wst_AuthenticatorType_qname.Namespace,
769 &options);
770 }
771
772 }
773
774 0 exit:
775 0 if (type_attr)
776 {
777 0 xsd_QName_destroy(type_attr);
778 }
779
780
781 0 if(any_attr_keys)
782 {
783 0 globus_list_free(any_attr_keys);
784 }
785
786 0 GlobusSoapMessageDebugExit();
787 0 return result;
788 }
789
790
791
792 globus_result_t
793 wst_AuthenticatorType_deserialize_contents(
794 const xsd_QName * element_qname, /* ignored */
795 wst_AuthenticatorType * inst,
796 globus_soap_message_handle_t message_handle,
797 globus_xsd_element_options_t options)
798 0 {
799 0 globus_result_t result = GLOBUS_SUCCESS;
800 GlobusFuncName(wst_AuthenticatorType_deserialize_contents);
801 0 GlobusSoapMessageDebugEnter();
802
803 0 result = wst_AuthenticatorType_deserialize(
804 NULL,
805 inst,
806 message_handle,
807 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
808 0 if(result != GLOBUS_SUCCESS)
809 {
810 0 result = GlobusSoapMessageErrorDeserializeFailed(
811 result, element_qname);
812 0 goto exit;
813 }
814
815 0 exit:
816
817 0 GlobusSoapMessageDebugExit();
818 0 return result;
819 }
820
821
822
823 globus_result_t
824 wst_AuthenticatorType_deserialize(
825 const xsd_QName * element_qname,
826 wst_AuthenticatorType * instance,
827 globus_soap_message_handle_t message_handle,
828 globus_xsd_element_options_t options)
829 0 {
830 0 globus_result_t result = GLOBUS_SUCCESS;
831 xsd_QName subelement;
832 GlobusFuncName(wst_AuthenticatorType_deserialize);
833 0 GlobusSoapMessageDebugEnter();
834
835
836 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
837 {
838 0 result = globus_soap_message_deserialize_element(
839 message_handle, element_qname);
840 0 if(result != GLOBUS_SUCCESS)
841 {
842 0 result = GlobusSoapMessageErrorDeserializeFailed(
843 result, element_qname);
844 0 goto exit;
845 }
846
847
848 0 result = globus_soap_message_deserialize_element_begin_close(
849 message_handle);
850 0 if(result != GLOBUS_SUCCESS)
851 {
852 0 result = GlobusSoapMessageErrorDeserializeFailed(
853 result, element_qname);
854 0 goto fail_deserialize;
855 }
856 }
857
858 0 subelement.local = "CombinedHash";
859 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2004/04/trust";
860
861 0 result = xsd_base64Binary_deserialize_pointer(
862 &subelement,
863 &instance->CombinedHash,
864 message_handle,
865 0);
866 0 if(result != GLOBUS_SUCCESS)
867 {
868 0 result = GlobusSoapMessageErrorDeserializeFailed(
869 result,
870 (&subelement));
871 0 goto CombinedHash_destroy_pointer;
872 }
873
874 0 subelement.local = "any";
875
876 0 subelement.Namespace = "##other{http://schemas.xmlsoap.org/ws/2004/04/trust}";
877
878 0 result = xsd_any_array_deserialize(
879 &subelement,
880 &instance->any,
881 message_handle,
882 0);
883 0 if(result != GLOBUS_SUCCESS)
884 {
885 0 result = GlobusSoapMessageErrorDeserializeFailed(
886 result,
887 (&subelement));
888 0 goto any_destroy_array;
889 }
890
891 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
892 {
893 0 result = globus_soap_message_deserialize_element_end(
894 message_handle,
895 element_qname);
896 0 if(result != GLOBUS_SUCCESS)
897 {
898 0 result = GlobusSoapMessageErrorDeserializeFailed(
899 result, element_qname);
900 0 goto fail_deserialize;
901 }
902 }
903
904 0 goto exit;
905
906 0 fail_deserialize:
907 0 xsd_any_array_destroy_contents(
908 &instance->any);
909
910 0 any_destroy_array:
911 0 xsd_base64Binary_destroy(
912 instance->CombinedHash);
913 0 instance->CombinedHash = NULL;
914
915 0 CombinedHash_destroy_pointer:
916
917
918 0 exit:
919
920 0 GlobusSoapMessageDebugExit();
921 0 return result;
922 }
923
924
925
926 globus_result_t
927 wst_AuthenticatorType_deserialize_pointer(
928 const xsd_QName * element_qname,
929 wst_AuthenticatorType ** ip,
930 globus_soap_message_handle_t message_handle,
931 globus_xsd_element_options_t options)
932 0 {
933 0 wst_AuthenticatorType * instance = NULL;
934 0 globus_result_t result = GLOBUS_SUCCESS;
935 xsd_QName subelement;
936 0 int found_attrs = 0;
937 0 int empty_element = 0;
938 GlobusFuncName(wst_AuthenticatorType_deserialize_pointer);
939 0 GlobusSoapMessageDebugEnter();
940
941 0 *ip = NULL;
942
943 0 result = globus_soap_message_deserialize_element(
944 message_handle, element_qname);
945 0 if(result != GLOBUS_SUCCESS &&
946 (GlobusSoapMessageStatusElementNotFoundCheck(result) ||
947 GlobusSoapMessageStatusFailedElementCheck(result) ||
948 GlobusSoapMessageStatusFailedWithTextCheck(result)))
949 {
950 0 result = GLOBUS_SUCCESS;
951 0 goto exit;
952 }
953
954 0 if(result != GLOBUS_SUCCESS)
955 {
956 0 result = GlobusSoapMessageErrorDeserializeFailed(
957 result, element_qname);
958 0 goto exit;
959 }
960
961 0 if(globus_soap_message_deserialize_element_is_empty(
962 message_handle))
963 {
964 0 empty_element = 1;
965 }
966
967 0 result = wst_AuthenticatorType_init(&instance);
968 0 if(result != GLOBUS_SUCCESS)
969 {
970 0 result = GlobusSoapMessageErrorDeserializeFailed(
971 result, element_qname);
972 0 goto exit;
973 }
974
975
976 0 if(found_attrs == 0 &&
977 globus_soap_message_deserialize_element_is_nil(message_handle))
978 {
979 0 wst_AuthenticatorType_destroy(instance);
980
981 0 result = globus_soap_message_deserialize_element_end(
982 message_handle,
983 element_qname);
984 0 if(result != GLOBUS_SUCCESS)
985 {
986 0 result = GlobusSoapMessageErrorDeserializeFailed(
987 result, element_qname);
988 0 goto exit;
989 }
990
991 0 *ip = NULL;
992 0 globus_object_free(globus_error_get(result));
993 0 result = GLOBUS_SUCCESS;
994 0 goto exit;
995 }
996
997 0 if(empty_element)
998 {
999 0 result = globus_soap_message_deserialize_element_end(
1000 message_handle,
1001 element_qname);
1002 0 if(result != GLOBUS_SUCCESS)
1003 {
1004 0 result = GlobusSoapMessageErrorDeserializeFailed(
1005 result, element_qname);
1006 0 goto fail_deserialize;
1007 }
1008
1009 0 *ip = instance;
1010 0 goto exit;
1011 }
1012
1013 0 result = globus_soap_message_deserialize_element_begin_close(
1014 message_handle);
1015 0 if(result != GLOBUS_SUCCESS)
1016 {
1017 0 result = GlobusSoapMessageErrorDeserializeFailed(
1018 result, element_qname);
1019 0 goto exit;
1020 }
1021
1022 0 result = wst_AuthenticatorType_deserialize(
1023 element_qname,
1024 instance,
1025 message_handle,
1026 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
1027 0 if(result != GLOBUS_SUCCESS)
1028 {
1029 0 result = GlobusSoapMessageErrorDeserializeFailed(
1030 result, element_qname);
1031 0 goto exit;
1032 }
1033
1034 0 result = globus_soap_message_deserialize_element_end(
1035 message_handle,
1036 element_qname);
1037 0 if(result != GLOBUS_SUCCESS)
1038 {
1039 0 result = GlobusSoapMessageErrorDeserializeFailed(
1040 result, element_qname);
1041 0 goto fail_deserialize;
1042 }
1043
1044 0 *ip = instance;
1045
1046 0 goto exit;
1047
1048 0 fail_deserialize:
1049 0 xsd_any_array_destroy_contents(
1050 &instance->any);
1051
1052 0 any_destroy_array:
1053 0 xsd_base64Binary_destroy(
1054 instance->CombinedHash);
1055 0 instance->CombinedHash = NULL;
1056
1057 0 CombinedHash_destroy_pointer:
1058
1059 0 exit:
1060
1061 0 GlobusSoapMessageDebugExit();
1062 0 return result;
1063 }
1064
1065
1066 globus_result_t
1067 wst_AuthenticatorType_array_init_contents(
1068 wst_AuthenticatorType_array * array)
1069 0 {
1070 0 return globus_xsd_generic_array_init_contents(
1071 (globus_xsd_generic_array_t *) array,
1072 &wst_AuthenticatorType_info);
1073 }
1074 /* wst_AuthenticatorType_array_init_contents() */
1075
1076 globus_result_t
1077 wst_AuthenticatorType_array_init(
1078 wst_AuthenticatorType_array ** arr)
1079 0 {
1080 0 return globus_xsd_generic_array_init(
1081 (globus_xsd_generic_array_t **) arr,
1082 &wst_AuthenticatorType_info);
1083 }
1084 /* wst_AuthenticatorType_array_init() */
1085
1086 void
1087 wst_AuthenticatorType_array_destroy_contents(
1088 wst_AuthenticatorType_array * array)
1089 0 {
1090 0 globus_xsd_generic_array_destroy_contents(
1091 (globus_xsd_generic_array_t *) array);
1092 0 }
1093 /* wst_AuthenticatorType_array_destroy_contents() */
1094
1095 void
1096 wst_AuthenticatorType_array_destroy(
1097 wst_AuthenticatorType_array * array)
1098 0 {
1099 0 globus_xsd_generic_array_destroy(
1100 (globus_xsd_generic_array_t *) array);
1101 0 }
1102 /* wst_AuthenticatorType_array_destroy() */
1103
1104 globus_result_t
1105 wst_AuthenticatorType_array_copy(
1106 wst_AuthenticatorType_array ** dest_arr,
1107 const wst_AuthenticatorType_array * src_arr)
1108 0 {
1109 0 return globus_xsd_generic_array_copy(
1110 (globus_xsd_generic_array_t **) dest_arr,
1111 (globus_xsd_generic_array_t *) src_arr);
1112 }
1113 /* wst_AuthenticatorType_array_copy() */
1114
1115 globus_result_t
1116 wst_AuthenticatorType_array_copy_contents(
1117 wst_AuthenticatorType_array * dest_arr,
1118 const wst_AuthenticatorType_array * src_arr)
1119 0 {
1120 0 return globus_xsd_generic_array_copy_contents(
1121 (globus_xsd_generic_array_t *) dest_arr,
1122 (globus_xsd_generic_array_t *) src_arr);
1123 }
1124 /* wst_AuthenticatorType_array_copy_contents() */
1125
1126 wst_AuthenticatorType *
1127 wst_AuthenticatorType_array_push(
1128 wst_AuthenticatorType_array * array)
1129 0 {
1130 /* Some contents initializers don't initialize subelments but to set their
1131 * values to be NULL
1132 */
1133 0 if (array->type_info == NULL)
1134 {
1135 0 array->type_info = &wst_AuthenticatorType_info;
1136 }
1137
1138 0 return globus_xsd_generic_array_push(
1139 (globus_xsd_generic_array_t *) array);
1140 }
1141 /* wst_AuthenticatorType_array_push() */
1142
1143 globus_result_t
1144 wst_AuthenticatorType_array_serialize(
1145 const xsd_QName * element_qname,
1146 const wst_AuthenticatorType_array * array,
1147 globus_soap_message_handle_t message,
1148 globus_xsd_element_options_t options)
1149 0 {
1150 0 return globus_xsd_generic_array_serialize(
1151 element_qname,
1152 (const globus_xsd_generic_array_t *) array,
1153 message,
1154 options);
1155 }
1156 /* wst_AuthenticatorType_array_serialize() */
1157
1158 globus_result_t
1159 wst_AuthenticatorType_array_deserialize(
1160 const xsd_QName * element_qname,
1161 wst_AuthenticatorType_array * array,
1162 globus_soap_message_handle_t message,
1163 globus_xsd_element_options_t options)
1164 0 {
1165 /* Some initializers set the array's contents to NULL */
1166 0 if (array->type_info == NULL)
1167 {
1168 0 array->type_info = &wst_AuthenticatorType_info;
1169 }
1170 0 return globus_xsd_generic_array_deserialize(
1171 element_qname,
1172 (globus_xsd_generic_array_t *) array,
1173 message,
1174 options);