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