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