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_RenewingType.h"
26 #include "globus_xsd_generic_array.h"
27
28 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
29 xsd_QName wst_RenewingType_qname =
30 {
31 WST_RENEWINGTYPE_NS,
32 WST_RENEWINGTYPE_LOCAL
33 };
34 #endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */
35
36 static
37 globus_result_t
38 wst_RenewingType_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_RenewingType_serialize(
45 element_qname,
46 (const wst_RenewingType *) instance,
47 message_handle, options);
48 }
49
50 static
51 globus_result_t
52 wst_RenewingType_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_RenewingType_deserialize_pointer(
59 element_qname,
60 (wst_RenewingType **) ip,
61 message_handle, options);
62 }
63
64 static
65 globus_result_t
66 wst_RenewingType_init_wrapper(void **object)
67 0 {
68 0 return wst_RenewingType_init(
69 (wst_RenewingType **) object);
70 }
71
72 static
73 void
74 wst_RenewingType_destroy_wrapper(
75 void * object)
76 0 {
77 0 wst_RenewingType_destroy(
78 (wst_RenewingType *) object);
79 0 }
80
81 static
82 globus_result_t
83 wst_RenewingType_copy_wrapper(
84 void ** dest_obj,
85 const void * src_obj)
86 0 {
87 0 return wst_RenewingType_copy(
88 (wst_RenewingType **) dest_obj,
89 (wst_RenewingType *) src_obj);
90 }
91
92 static
93 globus_result_t
94 wst_RenewingType_init_contents_wrapper(void *object)
95 0 {
96 0 return wst_RenewingType_init_contents(
97 (wst_RenewingType *) object);
98 }
99
100 static
101 void
102 wst_RenewingType_destroy_contents_wrapper(
103 void * object)
104 0 {
105 0 wst_RenewingType_destroy_contents(
106 (wst_RenewingType *) object);
107 0 }
108
109 static
110 globus_result_t
111 wst_RenewingType_copy_contents_wrapper(
112 void * dest_obj,
113 const void * src_obj)
114 0 {
115 0 return wst_RenewingType_copy_contents(
116 (wst_RenewingType *) dest_obj,
117 (const wst_RenewingType *) src_obj);
118 }
119
120 static
121 globus_result_t
122 wst_RenewingType_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_RenewingType_serialize_contents(
129 element_qname,
130 (wst_RenewingType *) instance,
131 message_handle, options);
132 }
133
134 static
135 globus_result_t
136 wst_RenewingType_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_RenewingType_deserialize_contents_wrapper);
144 0 GlobusSoapMessageDebugEnter();
145
146 0 if(!*instance)
147 {
148 0 result = wst_RenewingType_init(
149 (wst_RenewingType **)instance);
150 0 if(result != GLOBUS_SUCCESS)
151 {
152 0 goto error;
153 }
154 }
155
156 0 result = wst_RenewingType_deserialize_contents(
157 element_qname,
158 *(wst_RenewingType **)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_RenewingType_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_RenewingType_array_serialize(
174 element,
175 (wst_RenewingType_array *) instance,
176 message, options);
177 }
178
179 static
180 globus_result_t
181 wst_RenewingType_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_RenewingType_array_init(
192 (wst_RenewingType_array **)inst);
193 0 if(result != GLOBUS_SUCCESS)
194 {
195 0 return result;
196 }
197 }
198
199 0 return wst_RenewingType_array_deserialize(
200 element_qname,
201 *(wst_RenewingType_array **) inst,
202 message, options);
203 }
204
205 static
206 globus_result_t
207 wst_RenewingType_array_init_wrapper(
208 void ** arr)
209 0 {
210 0 return wst_RenewingType_array_init(
211 (wst_RenewingType_array **) arr);
212 }
213
214 static
215 void
216 wst_RenewingType_array_destroy_wrapper(
217 void * arr)
218 0 {
219 0 wst_RenewingType_array_destroy(
220 (wst_RenewingType_array *) arr);
221 0 }
222
223 static
224 globus_result_t
225 wst_RenewingType_array_copy_wrapper(
226 void ** dest_arr,
227 const void * src_arr)
228 0 {
229 0 return wst_RenewingType_array_copy(
230 (wst_RenewingType_array **) dest_arr,
231 (const wst_RenewingType_array *) src_arr);
232 }
233
234 static
235 globus_result_t
236 wst_RenewingType_array_init_contents_wrapper(
237 void * arr)
238 0 {
239 0 return wst_RenewingType_array_init_contents(
240 (wst_RenewingType_array *) arr);
241 }
242
243 static
244 void
245 wst_RenewingType_array_destroy_contents_wrapper(
246 void * arr)
247 0 {
248 0 wst_RenewingType_array_destroy_contents(
249 (wst_RenewingType_array *) arr);
250 0 }
251
252 static
253 globus_result_t
254 wst_RenewingType_array_copy_contents_wrapper(
255 void * dest_arr,
256 const void * src_arr)
257 0 {
258 0 return wst_RenewingType_array_copy_contents(
259 (wst_RenewingType_array *) dest_arr,
260 (const wst_RenewingType_array *) src_arr);
261 }
262
263 static
264 void *
265 wst_RenewingType_array_push_wrapper(
266 void * array)
267 0 {
268 0 return (void *) wst_RenewingType_array_push((wst_RenewingType_array *) array);
269 }
270
271 struct globus_xsd_type_info_s wst_RenewingType_contents_info =
272 {
273 &wst_RenewingType_qname,
274 wst_RenewingType_serialize_contents_wrapper,
275 wst_RenewingType_deserialize_contents_wrapper,
276 wst_RenewingType_init_wrapper,
277 wst_RenewingType_destroy_wrapper,
278 wst_RenewingType_copy_wrapper,
279 wst_RenewingType_init_contents_wrapper,
280 wst_RenewingType_destroy_contents_wrapper,
281 wst_RenewingType_copy_contents_wrapper,
282 sizeof(wst_RenewingType),
283 NULL,
284 NULL,
285 NULL
286 };
287
288 struct globus_xsd_type_info_s wst_RenewingType_array_info =
289 {
290 &wst_RenewingType_qname,
291 wst_RenewingType_array_serialize_wrapper,
292 wst_RenewingType_array_deserialize_wrapper,
293 wst_RenewingType_array_init_wrapper,
294 wst_RenewingType_array_destroy_wrapper,
295 wst_RenewingType_array_copy_wrapper,
296 wst_RenewingType_array_init_contents_wrapper,
297 wst_RenewingType_array_destroy_contents_wrapper,
298 wst_RenewingType_array_copy_contents_wrapper,
299 sizeof(wst_RenewingType),
300 wst_RenewingType_array_push_wrapper,
301 NULL,
302 NULL
303 };
304
305 struct globus_xsd_type_info_s wst_RenewingType_info =
306 {
307 &wst_RenewingType_qname,
308 wst_RenewingType_serialize_wrapper,
309 wst_RenewingType_deserialize_pointer_wrapper,
310 wst_RenewingType_init_wrapper,
311 wst_RenewingType_destroy_wrapper,
312 wst_RenewingType_copy_wrapper,
313 wst_RenewingType_init_contents_wrapper,
314 wst_RenewingType_destroy_contents_wrapper,
315 wst_RenewingType_copy_contents_wrapper,
316 sizeof(wst_RenewingType),
317 NULL,
318 &wst_RenewingType_contents_info,
319 &wst_RenewingType_array_info
320 };
321
322 globus_result_t
323 wst_RenewingType_init_contents(
324 wst_RenewingType * instance)
325 0 {
326 0 globus_result_t result = GLOBUS_SUCCESS;
327 GlobusFuncName(wst_RenewingType_init_contents);
328 0 GlobusSoapMessageDebugEnter();
329
330 0 memset(instance, 0, sizeof(wst_RenewingType));
331
332 0 GlobusSoapMessageDebugExit();
333 0 return result;
334 }
335
336 globus_result_t
337 wst_RenewingType_init(
338 wst_RenewingType ** object)
339 0 {
340 wst_RenewingType * instance;
341 0 globus_result_t result = GLOBUS_SUCCESS;
342 GlobusFuncName(wst_RenewingType_init);
343 0 GlobusSoapMessageDebugEnter();
344
345 0 instance = globus_malloc(sizeof(wst_RenewingType));
346 0 if(!instance)
347 {
348 0 result = GlobusSoapMessageErrorOutOfMemory;
349 0 goto exit;
350 }
351
352 0 memset(instance, 0, sizeof(wst_RenewingType));
353
354 0 *object = instance;
355
356 0 exit:
357 0 GlobusSoapMessageDebugExit();
358 0 return result;
359 }
360
361 void
362 wst_RenewingType_destroy(
363 wst_RenewingType * instance)
364 0 {
365 GlobusFuncName(wst_RenewingType_destroy);
366 0 GlobusSoapMessageDebugEnter();
367
368 0 if(!instance)
369 {
370 0 goto exit;
371 }
372
373 0 wst_RenewingType_destroy_contents(instance);
374 0 globus_free(instance);
375
376 0 exit:
377
378 0 GlobusSoapMessageDebugExit();
379 0 }
380
381
382 void
383 wst_RenewingType_destroy_contents(
384 wst_RenewingType * instance)
385 0 {
386 GlobusFuncName(wst_RenewingType_destroy_contents);
387 0 GlobusSoapMessageDebugEnter();
388
389 0 if(instance)
390 {
391
392
393 0 if(instance->_Allow)
394 {
395 0 xsd_boolean_destroy(
396 instance->_Allow);
397 0 instance->_Allow = NULL;
398 }
399
400 0 if(instance->_OK)
401 {
402 0 xsd_boolean_destroy(
403 instance->_OK);
404 0 instance->_OK = NULL;
405 }
406
407 }
408
409 0 GlobusSoapMessageDebugExit();
410 0 }
411
412
413 globus_result_t
414 wst_RenewingType_copy(
415 wst_RenewingType ** dest_obj,
416 const wst_RenewingType * src_obj)
417 0 {
418 0 globus_result_t result = GLOBUS_SUCCESS;
419 wst_RenewingType * instance;
420 GlobusFuncName(wst_RenewingType_copy);
421
422 0 GlobusSoapMessageDebugEnter();
423
424 0 instance = calloc(1, sizeof(wst_RenewingType));
425 0 if (instance == NULL)
426 {
427 0 GlobusSoapMessageDebugExit();
428 0 return GlobusSoapMessageErrorOutOfMemory;
429 }
430
431 0 result = wst_RenewingType_copy_contents(instance, src_obj);
432 0 if(result != GLOBUS_SUCCESS)
433 {
434 0 globus_free(instance);
435 0 GlobusSoapMessageDebugExit();
436 0 return GlobusSoapMessageErrorOutOfMemory;
437 }
438
439 0 *dest_obj = instance;
440 0 GlobusSoapMessageDebugExit();
441 0 return result;
442 }
443
444 globus_result_t
445 wst_RenewingType_copy_contents(
446 wst_RenewingType * instance,
447 const wst_RenewingType * src_obj)
448 0 {
449 0 globus_result_t result = GLOBUS_SUCCESS;
450 GlobusFuncName(wst_RenewingType_copy_contents);
451
452 0 GlobusSoapMessageDebugEnter();
453
454 0 if(src_obj->_Allow)
455 {
456 0 result = xsd_boolean_copy(
457 &instance->_Allow,
458 src_obj->_Allow);
459 0 if(result != GLOBUS_SUCCESS)
460 {
461 0 result = GlobusSoapMessageErrorCopyFailed(
462 result, NULL, &xsd_boolean_qname);
463 0 goto _Allow_destroy;
464 }
465 }
466 else
467 {
468 0 instance->_Allow = NULL;
469 }
470
471 0 if(src_obj->_OK)
472 {
473 0 result = xsd_boolean_copy(
474 &instance->_OK,
475 src_obj->_OK);
476 0 if(result != GLOBUS_SUCCESS)
477 {
478 0 result = GlobusSoapMessageErrorCopyFailed(
479 result, NULL, &xsd_boolean_qname);
480 0 goto _OK_destroy;
481 }
482 }
483 else
484 {
485 0 instance->_OK = NULL;
486 }
487
488 0 goto exit;
489
490 0 fail_deserialize:
491
492 0 _OK_destroy:
493
494 0 if(instance->_OK)
495 {
496 0 xsd_boolean_destroy(
497 instance->_OK);
498 0 instance->_OK = NULL;
499 }
500
501 0 _Allow_destroy:
502
503 0 if(instance->_Allow)
504 {
505 0 xsd_boolean_destroy(
506 instance->_Allow);
507 0 instance->_Allow = NULL;
508 }
509
510
511 0 exit:
512
513 0 GlobusSoapMessageDebugExit();
514 0 return result;
515 }
516
517
518
519 globus_result_t
520 wst_RenewingType_serialize_contents(
521 const xsd_QName * element_qname, /* ignored */
522 const wst_RenewingType * inst,
523 globus_soap_message_handle_t message_handle,
524 globus_xsd_element_options_t options)
525 0 {
526 0 globus_result_t result = GLOBUS_SUCCESS;
527 GlobusFuncName(wst_RenewingType_serialize_contents);
528 0 GlobusSoapMessageDebugEnter();
529
530 0 result = wst_RenewingType_serialize(
531 NULL,
532 inst,
533 message_handle,
534 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
535 0 if(result != GLOBUS_SUCCESS)
536 {
537 0 result = GlobusSoapMessageErrorSerializeFailed(
538 result, NULL, element_qname);
539 0 goto exit;
540 }
541
542 0 exit:
543
544 0 GlobusSoapMessageDebugExit();
545 0 return result;
546 }
547
548
549
550 globus_result_t
551 wst_RenewingType_serialize(
552 const xsd_QName * element_qname,
553 const wst_RenewingType * instance,
554 globus_soap_message_handle_t message_handle,
555 globus_xsd_element_options_t options)
556 0 {
557 0 globus_result_t result = GLOBUS_SUCCESS;
558 xsd_QName subelement;
559 0 globus_list_t * any_attr_keys = NULL;
560 0 globus_list_t * any_attr_keys_iterator = NULL;
561 0 xsd_QName * type_attr = NULL;
562
563 0 char * prefix = NULL;
564 int prefix_created;
565 0 int define_prefix = 0;
566 0 int save_options = options;
567
568 GlobusFuncName(wst_RenewingType_serialize);
569 0 GlobusSoapMessageDebugEnter();
570
571
572 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
573 {
574 /* serialize wst_RenewingType element */
575 0 result = globus_soap_message_element_ns_set(
576 message_handle,
577 element_qname,
578 element_qname->Namespace,
579 &options);
580 0 if(result != GLOBUS_SUCCESS)
581 {
582 0 result = GlobusSoapMessageErrorSerializeFailed(
583 result, NULL, element_qname);
584 0 goto exit;
585 }
586
587 0 if(instance->_Allow)
588 {
589
590 0 if(result != GLOBUS_SUCCESS)
591 {
592 xsd_QName error_qname;
593 0 error_qname.local = prefix;
594 0 error_qname.Namespace = "";
595 0 result = GlobusSoapMessageErrorSerializeFailed(result,
596 NULL,
597 &error_qname);
598 0 goto exit;
599 }
600
601
602 }
603
604 0 if(instance->_OK)
605 {
606
607 0 if(result != GLOBUS_SUCCESS)
608 {
609 xsd_QName error_qname;
610 0 error_qname.local = prefix;
611 0 error_qname.Namespace = "";
612 0 result = GlobusSoapMessageErrorSerializeFailed(result,
613 NULL,
614 &error_qname);
615 0 goto exit;
616 }
617
618
619 }
620
621 0 if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
622 !globus_soap_message_serialize_is_c14n_subset(message_handle)))
623 {
624 0 result = globus_soap_message_attribute_ns_set(
625 message_handle,
626 element_qname,
627 "http://www.w3.org/2001/XMLSchema-instance",
628 &options);
629 0 if(result != GLOBUS_SUCCESS)
630 {
631 0 result = GlobusSoapMessageErrorSerializeFailed(
632 result, NULL, element_qname);
633 0 goto exit;
634 }
635 }
636
637 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
638 !globus_soap_message_serialize_is_c14n_subset(message_handle))
639 {
640
641 0 result = globus_soap_message_attribute_ns_set(
642 message_handle,
643 element_qname,
644 wst_RenewingType_qname.Namespace,
645 &options);
646 0 if(result != GLOBUS_SUCCESS)
647 {
648 0 result = GlobusSoapMessageErrorSerializeFailed(
649 result, NULL, element_qname);
650 0 goto exit;
651 }
652 }
653
654 0 result = globus_soap_message_serialize_element(
655 message_handle,
656 element_qname,
657 options,
658 &wst_RenewingType_qname);
659 0 if(result != GLOBUS_SUCCESS)
660 {
661 0 result = GlobusSoapMessageErrorSerializeFailed(
662 result, NULL, element_qname);
663 0 goto exit;
664 }
665
666 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
667 !globus_soap_message_serialize_is_c14n_subset(message_handle))
668 {
669 0 xsd_QName_init(&type_attr);
670
671 0 type_attr->local = globus_libc_strdup("type");
672 0 type_attr->Namespace = globus_libc_strdup(XSI_NS);
673 }
674
675
676 /* serialize namespaces */
677 0 result = globus_soap_message_element_ns_add(
678 message_handle,
679 element_qname,
680 element_qname->Namespace,
681 &options);
682 0 if(result != GLOBUS_SUCCESS)
683 {
684 0 result = GlobusSoapMessageErrorSerializeFailed(
685 result, NULL, element_qname);
686 0 goto exit;
687 }
688
689 0 if(instance->_Allow)
690 {
691
692 }
693
694 0 if(instance->_OK)
695 {
696
697 }
698
699 0 if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
700 !globus_soap_message_serialize_is_c14n_subset(message_handle)))
701 {
702 0 result = globus_soap_message_attribute_ns_add(
703 message_handle,
704 element_qname,
705 "http://www.w3.org/2001/XMLSchema-instance",
706 &options);
707 0 if(result != GLOBUS_SUCCESS)
708 {
709 0 result = GlobusSoapMessageErrorSerializeFailed(
710 result, NULL, element_qname);
711 0 goto exit;
712 }
713 }
714 0 if ((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
715 !globus_soap_message_serialize_is_c14n_subset(message_handle))
716 {
717
718 0 result = globus_soap_message_attribute_ns_add(
719 message_handle,
720 element_qname,
721 wst_RenewingType_qname.Namespace,
722 &options);
723 0 if(result != GLOBUS_SUCCESS)
724 {
725 0 result = GlobusSoapMessageErrorSerializeFailed(
726 result, NULL, element_qname);
727 0 goto exit;
728 }
729 }
730
731 /* serialize attributes */
732
733 0 subelement.Namespace = "";
734 0 subelement.local = "Allow";
735
736 0 if(instance->_Allow)
737 {
738
739 0 result = xsd_boolean_serialize_attribute(
740 &subelement,
741 instance->_Allow,
742 message_handle,
743 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
744 0 if(result != GLOBUS_SUCCESS)
745 {
746 0 result = GlobusSoapMessageErrorSerializeFailed(result,
747 NULL,
748 element_qname);
749 0 goto exit;
750 }
751
752 }
753
754 0 subelement.Namespace = "";
755 0 subelement.local = "OK";
756
757 0 if(instance->_OK)
758 {
759
760 0 result = xsd_boolean_serialize_attribute(
761 &subelement,
762 instance->_OK,
763 message_handle,
764 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
765 0 if(result != GLOBUS_SUCCESS)
766 {
767 0 result = GlobusSoapMessageErrorSerializeFailed(result,
768 NULL,
769 element_qname);
770 0 goto exit;
771 }
772
773 }
774
775 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
776 !globus_soap_message_serialize_is_c14n_subset(message_handle))
777 {
778 0 result = globus_soap_message_serialize_QName_attribute(
779 message_handle,
780 type_attr,
781 &wst_RenewingType_qname);
782 0 if(result != GLOBUS_SUCCESS)
783 {
784 0 result = GlobusSoapMessageErrorSerializeFailed(
785 result, NULL, element_qname);
786 0 goto exit;
787 }
788 }
789
790
791 }
792
793 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
794 {
795 0 result = globus_soap_message_serialize_element_begin_close(
796 message_handle, element_qname);
797 0 if(result != GLOBUS_SUCCESS)
798 {
799 0 result = GlobusSoapMessageErrorSerializeFailed(
800 result, NULL, element_qname);
801 0 goto exit;
802 }
803 }
804 0 options &= ~GLOBUS_XSD_ELEMENT_CONTENTS_ONLY;
805
806
807 /* serialize contents of type */
808
809 0 options = save_options;
810
811 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
812 {
813 /* add end element */
814 0 result = globus_soap_message_serialize_element_end(
815 message_handle,
816 element_qname,
817 options,
818 &wst_RenewingType_qname);
819 0 if(result != GLOBUS_SUCCESS)
820 {
821 0 result = GlobusSoapMessageErrorSerializeFailed(
822 result, NULL, element_qname);
823 0 goto exit;
824 }
825
826 0 globus_soap_message_element_ns_remove(
827 message_handle,
828 element_qname->Namespace,
829 &options);
830
831 /* remove namespace/prefix mappings for these types */
832
833 0 if(instance->_Allow)
834 {
835
836 0 globus_soap_message_attribute_ns_remove(
837 message_handle,
838 NULL,
839 &options);
840
841 }
842
843 0 if(instance->_OK)
844 {
845
846 0 globus_soap_message_attribute_ns_remove(
847 message_handle,
848 NULL,
849 &options);
850
851 }
852
853 0 if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
854 !globus_soap_message_serialize_is_c14n_subset(message_handle)))
855 {
856 0 globus_soap_message_attribute_ns_remove(
857 message_handle,
858 "http://www.w3.org/2001/XMLSchema-instance",
859 &options);
860 }
861 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
862 !globus_soap_message_serialize_is_c14n_subset(message_handle))
863 {
864 0 globus_soap_message_attribute_ns_remove(
865 message_handle,
866 wst_RenewingType_qname.Namespace,
867 &options);
868 }
869
870 }
871
872 0 exit:
873 0 if (type_attr)
874 {
875 0 xsd_QName_destroy(type_attr);
876 }
877
878
879 0 if(any_attr_keys)
880 {
881 0 globus_list_free(any_attr_keys);
882 }
883
884 0 GlobusSoapMessageDebugExit();
885 0 return result;
886 }
887
888
889
890 globus_result_t
891 wst_RenewingType_deserialize_contents(
892 const xsd_QName * element_qname, /* ignored */
893 wst_RenewingType * inst,
894 globus_soap_message_handle_t message_handle,
895 globus_xsd_element_options_t options)
896 0 {
897 0 globus_result_t result = GLOBUS_SUCCESS;
898 GlobusFuncName(wst_RenewingType_deserialize_contents);
899 0 GlobusSoapMessageDebugEnter();
900
901 0 result = wst_RenewingType_deserialize(
902 NULL,
903 inst,
904 message_handle,
905 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
906 0 if(result != GLOBUS_SUCCESS)
907 {
908 0 result = GlobusSoapMessageErrorDeserializeFailed(
909 result, element_qname);
910 0 goto exit;
911 }
912
913 0 exit:
914
915 0 GlobusSoapMessageDebugExit();
916 0 return result;
917 }
918
919
920
921 globus_result_t
922 wst_RenewingType_deserialize(
923 const xsd_QName * element_qname,
924 wst_RenewingType * instance,
925 globus_soap_message_handle_t message_handle,
926 globus_xsd_element_options_t options)
927 0 {
928 0 globus_result_t result = GLOBUS_SUCCESS;
929 xsd_QName subelement;
930 GlobusFuncName(wst_RenewingType_deserialize);
931 0 GlobusSoapMessageDebugEnter();
932
933
934 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
935 {
936 0 result = globus_soap_message_deserialize_element(
937 message_handle, element_qname);
938 0 if(result != GLOBUS_SUCCESS)
939 {
940 0 result = GlobusSoapMessageErrorDeserializeFailed(
941 result, element_qname);
942 0 goto exit;
943 }
944
945 0 subelement.Namespace = "";
946 0 subelement.local = "Allow";
947
948 0 result = xsd_boolean_deserialize_attribute_pointer(
949 &subelement,
950 &instance->_Allow,
951 message_handle,
952 0);
953 0 if(result != GLOBUS_SUCCESS)
954 {
955 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
956 0 goto _Allow_destroy;
957 }
958
959
960 0 subelement.Namespace = "";
961 0 subelement.local = "OK";
962
963 0 result = xsd_boolean_deserialize_attribute_pointer(
964 &subelement,
965 &instance->_OK,
966 message_handle,
967 0);
968 0 if(result != GLOBUS_SUCCESS)
969 {
970 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
971 0 goto _OK_destroy;
972 }
973
974
975
976 0 result = globus_soap_message_deserialize_element_begin_close(
977 message_handle);
978 0 if(result != GLOBUS_SUCCESS)
979 {
980 0 result = GlobusSoapMessageErrorDeserializeFailed(
981 result, element_qname);
982 0 goto fail_deserialize;
983 }
984 }
985
986 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
987 {
988 0 result = globus_soap_message_deserialize_element_end(
989 message_handle,
990 element_qname);
991 0 if(result != GLOBUS_SUCCESS)
992 {
993 0 result = GlobusSoapMessageErrorDeserializeFailed(
994 result, element_qname);
995 0 goto fail_deserialize;
996 }
997 }
998
999 0 goto exit;
1000
1001 0 fail_deserialize:
1002
1003 0 _OK_destroy:
1004 /* output_fail_destroy_attribute() */
1005
1006 0 if(instance->_OK)
1007 {
1008 0 xsd_boolean_destroy(
1009 instance->_OK);
1010 0 instance->_OK = NULL;
1011 }
1012
1013 0 _Allow_destroy:
1014 /* output_fail_destroy_attribute() */
1015
1016 0 if(instance->_Allow)
1017 {
1018 0 xsd_boolean_destroy(
1019 instance->_Allow);
1020 0 instance->_Allow = NULL;
1021 }
1022
1023
1024 0 exit:
1025
1026 0 GlobusSoapMessageDebugExit();
1027 0 return result;
1028 }
1029
1030
1031
1032 globus_result_t
1033 wst_RenewingType_deserialize_pointer(
1034 const xsd_QName * element_qname,
1035 wst_RenewingType ** ip,
1036 globus_soap_message_handle_t message_handle,
1037 globus_xsd_element_options_t options)
1038 0 {
1039 0 wst_RenewingType * instance = NULL;
1040 0 globus_result_t result = GLOBUS_SUCCESS;
1041 xsd_QName subelement;
1042 0 int found_attrs = 0;
1043 0 int empty_element = 0;
1044 GlobusFuncName(wst_RenewingType_deserialize_pointer);
1045 0 GlobusSoapMessageDebugEnter();
1046
1047 0 *ip = NULL;
1048
1049 0 result = globus_soap_message_deserialize_element(
1050 message_handle, element_qname);
1051 0 if(result != GLOBUS_SUCCESS &&
1052 (GlobusSoapMessageStatusElementNotFoundCheck(result) ||
1053 GlobusSoapMessageStatusFailedElementCheck(result) ||
1054 GlobusSoapMessageStatusFailedWithTextCheck(result)))
1055 {
1056 0 result = GLOBUS_SUCCESS;
1057 0 goto exit;
1058 }
1059
1060 0 if(result != GLOBUS_SUCCESS)
1061 {
1062 0 result = GlobusSoapMessageErrorDeserializeFailed(
1063 result, element_qname);
1064 0 goto exit;
1065 }
1066
1067 0 if(globus_soap_message_deserialize_element_is_empty(
1068 message_handle))
1069 {
1070 0 empty_element = 1;
1071 }
1072
1073 0 result = wst_RenewingType_init(&instance);
1074 0 if(result != GLOBUS_SUCCESS)
1075 {
1076 0 result = GlobusSoapMessageErrorDeserializeFailed(
1077 result, element_qname);
1078 0 goto exit;
1079 }
1080
1081
1082 0 subelement.Namespace = "";
1083 0 subelement.local = "Allow";
1084
1085 0 result = xsd_boolean_deserialize_attribute_pointer(
1086 &subelement,
1087 &instance->_Allow,
1088 message_handle,
1089 0);
1090 0 if(result != GLOBUS_SUCCESS)
1091 {
1092 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1093 0 goto _Allow_destroy;
1094 }
1095
1096
1097 0 if(instance->_Allow)
1098 {
1099 0 found_attrs++;
1100 }
1101
1102 0 subelement.Namespace = "";
1103 0 subelement.local = "OK";
1104
1105 0 result = xsd_boolean_deserialize_attribute_pointer(
1106 &subelement,
1107 &instance->_OK,
1108 message_handle,
1109 0);
1110 0 if(result != GLOBUS_SUCCESS)
1111 {
1112 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1113 0 goto _OK_destroy;
1114 }
1115
1116
1117 0 if(instance->_OK)
1118 {
1119 0 found_attrs++;
1120 }
1121
1122 0 if(found_attrs == 0 &&
1123 globus_soap_message_deserialize_element_is_nil(message_handle))
1124 {
1125 0 wst_RenewingType_destroy(instance);
1126
1127 0 result = globus_soap_message_deserialize_element_end(
1128 message_handle,
1129 element_qname);
1130 0 if(result != GLOBUS_SUCCESS)
1131 {
1132 0 result = GlobusSoapMessageErrorDeserializeFailed(
1133 result, element_qname);
1134 0 goto exit;
1135 }
1136
1137 0 *ip = NULL;
1138 0 globus_object_free(globus_error_get(result));
1139 0 result = GLOBUS_SUCCESS;
1140 0 goto exit;
1141 }
1142
1143 0 if(empty_element)
1144 {
1145 0 result = globus_soap_message_deserialize_element_end(
1146 message_handle,
1147 element_qname);
1148 0 if(result != GLOBUS_SUCCESS)
1149 {
1150 0 result = GlobusSoapMessageErrorDeserializeFailed(
1151 result, element_qname);
1152 0 goto fail_deserialize;
1153 }
1154
1155 0 *ip = instance;
1156 0 goto exit;
1157 }
1158
1159 0 result = globus_soap_message_deserialize_element_begin_close(
1160 message_handle);
1161 0 if(result != GLOBUS_SUCCESS)
1162 {
1163 0 result = GlobusSoapMessageErrorDeserializeFailed(
1164 result, element_qname);
1165 0 goto exit;
1166 }
1167
1168 0 result = wst_RenewingType_deserialize(
1169 element_qname,
1170 instance,
1171 message_handle,
1172 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
1173 0 if(result != GLOBUS_SUCCESS)
1174 {
1175 0 result = GlobusSoapMessageErrorDeserializeFailed(
1176 result, element_qname);
1177 0 goto exit;
1178 }
1179
1180 0 result = globus_soap_message_deserialize_element_end(
1181 message_handle,
1182 element_qname);
1183 0 if(result != GLOBUS_SUCCESS)
1184 {
1185 0 result = GlobusSoapMessageErrorDeserializeFailed(
1186 result, element_qname);
1187 0 goto fail_deserialize;
1188 }
1189
1190 0 *ip = instance;
1191
1192 0 goto exit;
1193
1194 0 fail_deserialize:
1195
1196 0 _OK_destroy:
1197 /* output_fail_destroy_attribute() */
1198
1199 0 if(instance->_OK)
1200 {
1201 0 xsd_boolean_destroy(
1202 instance->_OK);
1203 0 instance->_OK = NULL;
1204 }
1205
1206 0 _Allow_destroy:
1207 /* output_fail_destroy_attribute() */
1208
1209 0 if(instance->_Allow)
1210 {
1211 0 xsd_boolean_destroy(
1212 instance->_Allow);
1213 0 instance->_Allow = NULL;
1214 }
1215
1216 0 exit:
1217
1218 0 GlobusSoapMessageDebugExit();
1219 0 return result;
1220 }
1221
1222
1223 globus_result_t
1224 wst_RenewingType_array_init_contents(
1225 wst_RenewingType_array * array)
1226 0 {
1227 0 return globus_xsd_generic_array_init_contents(
1228 (globus_xsd_generic_array_t *) array,
1229 &wst_RenewingType_info);
1230 }
1231 /* wst_RenewingType_array_init_contents() */
1232
1233 globus_result_t
1234 wst_RenewingType_array_init(
1235 wst_RenewingType_array ** arr)
1236 0 {
1237 0 return globus_xsd_generic_array_init(
1238 (globus_xsd_generic_array_t **) arr,
1239 &wst_RenewingType_info);
1240 }
1241 /* wst_RenewingType_array_init() */
1242
1243 void
1244 wst_RenewingType_array_destroy_contents(
1245 wst_RenewingType_array * array)
1246 0 {
1247 0 globus_xsd_generic_array_destroy_contents(
1248 (globus_xsd_generic_array_t *) array);
1249 0 }
1250 /* wst_RenewingType_array_destroy_contents() */
1251
1252 void
1253 wst_RenewingType_array_destroy(
1254 wst_RenewingType_array * array)
1255 0 {
1256 0 globus_xsd_generic_array_destroy(
1257 (globus_xsd_generic_array_t *) array);
1258 0 }
1259 /* wst_RenewingType_array_destroy() */
1260
1261 globus_result_t
1262 wst_RenewingType_array_copy(
1263 wst_RenewingType_array ** dest_arr,
1264 const wst_RenewingType_array * src_arr)
1265 0 {
1266 0 return globus_xsd_generic_array_copy(
1267 (globus_xsd_generic_array_t **) dest_arr,
1268 (globus_xsd_generic_array_t *) src_arr);
1269 }
1270 /* wst_RenewingType_array_copy() */
1271
1272 globus_result_t
1273 wst_RenewingType_array_copy_contents(
1274 wst_RenewingType_array * dest_arr,
1275 const wst_RenewingType_array * src_arr)
1276 0 {
1277 0 return globus_xsd_generic_array_copy_contents(
1278 (globus_xsd_generic_array_t *) dest_arr,
1279 (globus_xsd_generic_array_t *) src_arr);
1280 }
1281 /* wst_RenewingType_array_copy_contents() */
1282
1283 wst_RenewingType *
1284 wst_RenewingType_array_push(
1285 wst_RenewingType_array * array)
1286 0 {
1287 /* Some contents initializers don't initialize subelments but to set their
1288 * values to be NULL
1289 */
1290 0 if (array->type_info == NULL)
1291 {
1292 0 array->type_info = &wst_RenewingType_info;
1293 }
1294
1295 0 return globus_xsd_generic_array_push(
1296 (globus_xsd_generic_array_t *) array);
1297 }
1298 /* wst_RenewingType_array_push() */
1299
1300 globus_result_t
1301 wst_RenewingType_array_serialize(
1302 const xsd_QName * element_qname,
1303 const wst_RenewingType_array * array,
1304 globus_soap_message_handle_t message,
1305 globus_xsd_element_options_t options)
1306 0 {
1307 0 return globus_xsd_generic_array_serialize(
1308 element_qname,
1309 (const globus_xsd_generic_array_t *) array,
1310 message,
1311 options);
1312 }
1313 /* wst_RenewingType_array_serialize() */
1314
1315 globus_result_t
1316 wst_RenewingType_array_deserialize(
1317 const xsd_QName * element_qname,
1318 wst_RenewingType_array * array,
1319 globus_soap_message_handle_t message,
1320 globus_xsd_element_options_t options)
1321 0 {
1322 /* Some initializers set the array's contents to NULL */
1323 0 if (array->type_info == NULL)
1324 {
1325 0 array->type_info = &wst_RenewingType_info;
1326 }
1327 0 return globus_xsd_generic_array_deserialize(
1328 element_qname,
1329 (globus_xsd_generic_array_t *) array,
1330 message,
1331 options);