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 "wsu_ReceivedType.h"
26 #include "globus_xsd_generic_array.h"
27
28 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
29 xsd_QName wsu_ReceivedType_qname =
30 {
31 WSU_RECEIVEDTYPE_NS,
32 WSU_RECEIVEDTYPE_LOCAL
33 };
34 #endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */
35
36 static
37 globus_result_t
38 wsu_ReceivedType_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 wsu_ReceivedType_serialize(
45 element_qname,
46 (const wsu_ReceivedType *) instance,
47 message_handle, options);
48 }
49
50 static
51 globus_result_t
52 wsu_ReceivedType_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 wsu_ReceivedType_deserialize_pointer(
59 element_qname,
60 (wsu_ReceivedType **) ip,
61 message_handle, options);
62 }
63
64 static
65 globus_result_t
66 wsu_ReceivedType_init_wrapper(void **object)
67 0 {
68 0 return wsu_ReceivedType_init(
69 (wsu_ReceivedType **) object);
70 }
71
72 static
73 void
74 wsu_ReceivedType_destroy_wrapper(
75 void * object)
76 0 {
77 0 wsu_ReceivedType_destroy(
78 (wsu_ReceivedType *) object);
79 0 }
80
81 static
82 globus_result_t
83 wsu_ReceivedType_copy_wrapper(
84 void ** dest_obj,
85 const void * src_obj)
86 0 {
87 0 return wsu_ReceivedType_copy(
88 (wsu_ReceivedType **) dest_obj,
89 (wsu_ReceivedType *) src_obj);
90 }
91
92 static
93 globus_result_t
94 wsu_ReceivedType_init_contents_wrapper(void *object)
95 0 {
96 0 return wsu_ReceivedType_init_contents(
97 (wsu_ReceivedType *) object);
98 }
99
100 static
101 void
102 wsu_ReceivedType_destroy_contents_wrapper(
103 void * object)
104 0 {
105 0 wsu_ReceivedType_destroy_contents(
106 (wsu_ReceivedType *) object);
107 0 }
108
109 static
110 globus_result_t
111 wsu_ReceivedType_copy_contents_wrapper(
112 void * dest_obj,
113 const void * src_obj)
114 0 {
115 0 return wsu_ReceivedType_copy_contents(
116 (wsu_ReceivedType *) dest_obj,
117 (const wsu_ReceivedType *) src_obj);
118 }
119
120 static
121 globus_result_t
122 wsu_ReceivedType_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 wsu_ReceivedType_serialize_contents(
129 element_qname,
130 (wsu_ReceivedType *) instance,
131 message_handle, options);
132 }
133
134 static
135 globus_result_t
136 wsu_ReceivedType_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(wsu_ReceivedType_deserialize_contents_wrapper);
144 0 GlobusSoapMessageDebugEnter();
145
146 0 if(!*instance)
147 {
148 0 result = wsu_ReceivedType_init(
149 (wsu_ReceivedType **)instance);
150 0 if(result != GLOBUS_SUCCESS)
151 {
152 0 goto error;
153 }
154 }
155
156 0 result = wsu_ReceivedType_deserialize_contents(
157 element_qname,
158 *(wsu_ReceivedType **)instance,
159 message_handle, options);
160 0 error:
161 0 GlobusSoapMessageDebugExit();
162 0 return result;
163 }
164
165 static
166 globus_result_t
167 wsu_ReceivedType_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 wsu_ReceivedType_array_serialize(
174 element,
175 (wsu_ReceivedType_array *) instance,
176 message, options);
177 }
178
179 static
180 globus_result_t
181 wsu_ReceivedType_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 = wsu_ReceivedType_array_init(
192 (wsu_ReceivedType_array **)inst);
193 0 if(result != GLOBUS_SUCCESS)
194 {
195 0 return result;
196 }
197 }
198
199 0 return wsu_ReceivedType_array_deserialize(
200 element_qname,
201 *(wsu_ReceivedType_array **) inst,
202 message, options);
203 }
204
205 static
206 globus_result_t
207 wsu_ReceivedType_array_init_wrapper(
208 void ** arr)
209 0 {
210 0 return wsu_ReceivedType_array_init(
211 (wsu_ReceivedType_array **) arr);
212 }
213
214 static
215 void
216 wsu_ReceivedType_array_destroy_wrapper(
217 void * arr)
218 0 {
219 0 wsu_ReceivedType_array_destroy(
220 (wsu_ReceivedType_array *) arr);
221 0 }
222
223 static
224 globus_result_t
225 wsu_ReceivedType_array_copy_wrapper(
226 void ** dest_arr,
227 const void * src_arr)
228 0 {
229 0 return wsu_ReceivedType_array_copy(
230 (wsu_ReceivedType_array **) dest_arr,
231 (const wsu_ReceivedType_array *) src_arr);
232 }
233
234 static
235 globus_result_t
236 wsu_ReceivedType_array_init_contents_wrapper(
237 void * arr)
238 0 {
239 0 return wsu_ReceivedType_array_init_contents(
240 (wsu_ReceivedType_array *) arr);
241 }
242
243 static
244 void
245 wsu_ReceivedType_array_destroy_contents_wrapper(
246 void * arr)
247 0 {
248 0 wsu_ReceivedType_array_destroy_contents(
249 (wsu_ReceivedType_array *) arr);
250 0 }
251
252 static
253 globus_result_t
254 wsu_ReceivedType_array_copy_contents_wrapper(
255 void * dest_arr,
256 const void * src_arr)
257 0 {
258 0 return wsu_ReceivedType_array_copy_contents(
259 (wsu_ReceivedType_array *) dest_arr,
260 (const wsu_ReceivedType_array *) src_arr);
261 }
262
263 static
264 void *
265 wsu_ReceivedType_array_push_wrapper(
266 void * array)
267 0 {
268 0 return (void *) wsu_ReceivedType_array_push((wsu_ReceivedType_array *) array);
269 }
270
271 struct globus_xsd_type_info_s wsu_ReceivedType_contents_info =
272 {
273 &wsu_ReceivedType_qname,
274 wsu_ReceivedType_serialize_contents_wrapper,
275 wsu_ReceivedType_deserialize_contents_wrapper,
276 wsu_ReceivedType_init_wrapper,
277 wsu_ReceivedType_destroy_wrapper,
278 wsu_ReceivedType_copy_wrapper,
279 wsu_ReceivedType_init_contents_wrapper,
280 wsu_ReceivedType_destroy_contents_wrapper,
281 wsu_ReceivedType_copy_contents_wrapper,
282 sizeof(wsu_ReceivedType),
283 NULL,
284 NULL,
285 NULL
286 };
287
288 struct globus_xsd_type_info_s wsu_ReceivedType_array_info =
289 {
290 &wsu_ReceivedType_qname,
291 wsu_ReceivedType_array_serialize_wrapper,
292 wsu_ReceivedType_array_deserialize_wrapper,
293 wsu_ReceivedType_array_init_wrapper,
294 wsu_ReceivedType_array_destroy_wrapper,
295 wsu_ReceivedType_array_copy_wrapper,
296 wsu_ReceivedType_array_init_contents_wrapper,
297 wsu_ReceivedType_array_destroy_contents_wrapper,
298 wsu_ReceivedType_array_copy_contents_wrapper,
299 sizeof(wsu_ReceivedType),
300 wsu_ReceivedType_array_push_wrapper,
301 NULL,
302 NULL
303 };
304
305 struct globus_xsd_type_info_s wsu_ReceivedType_info =
306 {
307 &wsu_ReceivedType_qname,
308 wsu_ReceivedType_serialize_wrapper,
309 wsu_ReceivedType_deserialize_pointer_wrapper,
310 wsu_ReceivedType_init_wrapper,
311 wsu_ReceivedType_destroy_wrapper,
312 wsu_ReceivedType_copy_wrapper,
313 wsu_ReceivedType_init_contents_wrapper,
314 wsu_ReceivedType_destroy_contents_wrapper,
315 wsu_ReceivedType_copy_contents_wrapper,
316 sizeof(wsu_ReceivedType),
317 NULL,
318 &wsu_ReceivedType_contents_info,
319 &wsu_ReceivedType_array_info
320 };
321
322 globus_result_t
323 wsu_ReceivedType_init_contents(
324 wsu_ReceivedType * instance)
325 0 {
326 0 globus_result_t result = GLOBUS_SUCCESS;
327 GlobusFuncName(wsu_ReceivedType_init_contents);
328 0 GlobusSoapMessageDebugEnter();
329
330 0 memset(instance, 0, sizeof(wsu_ReceivedType));
331
332 0 GlobusSoapMessageDebugExit();
333 0 return result;
334 }
335
336 globus_result_t
337 wsu_ReceivedType_init(
338 wsu_ReceivedType ** object)
339 0 {
340 wsu_ReceivedType * instance;
341 0 globus_result_t result = GLOBUS_SUCCESS;
342 GlobusFuncName(wsu_ReceivedType_init);
343 0 GlobusSoapMessageDebugEnter();
344
345 0 instance = globus_malloc(sizeof(wsu_ReceivedType));
346 0 if(!instance)
347 {
348 0 result = GlobusSoapMessageErrorOutOfMemory;
349 0 goto exit;
350 }
351
352 0 memset(instance, 0, sizeof(wsu_ReceivedType));
353
354 0 *object = instance;
355
356 0 exit:
357 0 GlobusSoapMessageDebugExit();
358 0 return result;
359 }
360
361 void
362 wsu_ReceivedType_destroy(
363 wsu_ReceivedType * instance)
364 0 {
365 GlobusFuncName(wsu_ReceivedType_destroy);
366 0 GlobusSoapMessageDebugEnter();
367
368 0 if(!instance)
369 {
370 0 goto exit;
371 }
372
373 0 wsu_ReceivedType_destroy_contents(instance);
374 0 globus_free(instance);
375
376 0 exit:
377
378 0 GlobusSoapMessageDebugExit();
379 0 }
380
381
382 void
383 wsu_ReceivedType_destroy_contents(
384 wsu_ReceivedType * instance)
385 0 {
386 GlobusFuncName(wsu_ReceivedType_destroy_contents);
387 0 GlobusSoapMessageDebugEnter();
388
389 0 if(instance)
390 {
391
392
393 0 xsd_string_destroy_contents(
394 &instance->base_value);
395
396 0 if(instance->_ValueType)
397 {
398 0 xsd_QName_destroy(
399 instance->_ValueType);
400 0 instance->_ValueType = NULL;
401 }
402
403 0 if(instance->_Id)
404 {
405 0 xsd_ID_destroy(
406 instance->_Id);
407 0 instance->_Id = NULL;
408 }
409
410 0 xsd_anyAttributes_destroy(instance->anyAttributes);
411 0 instance->anyAttributes = NULL;
412
413 0 xsd_anyURI_destroy_contents(
414 &instance->_Actor);
415
416 0 if(instance->_Delay)
417 {
418 0 xsd_int_destroy(
419 instance->_Delay);
420 0 instance->_Delay = NULL;
421 }
422
423 }
424
425 0 GlobusSoapMessageDebugExit();
426 0 }
427
428
429 globus_result_t
430 wsu_ReceivedType_copy(
431 wsu_ReceivedType ** dest_obj,
432 const wsu_ReceivedType * src_obj)
433 0 {
434 0 globus_result_t result = GLOBUS_SUCCESS;
435 wsu_ReceivedType * instance;
436 GlobusFuncName(wsu_ReceivedType_copy);
437
438 0 GlobusSoapMessageDebugEnter();
439
440 0 instance = calloc(1, sizeof(wsu_ReceivedType));
441 0 if (instance == NULL)
442 {
443 0 GlobusSoapMessageDebugExit();
444 0 return GlobusSoapMessageErrorOutOfMemory;
445 }
446
447 0 result = wsu_ReceivedType_copy_contents(instance, src_obj);
448 0 if(result != GLOBUS_SUCCESS)
449 {
450 0 globus_free(instance);
451 0 GlobusSoapMessageDebugExit();
452 0 return GlobusSoapMessageErrorOutOfMemory;
453 }
454
455 0 *dest_obj = instance;
456 0 GlobusSoapMessageDebugExit();
457 0 return result;
458 }
459
460 globus_result_t
461 wsu_ReceivedType_copy_contents(
462 wsu_ReceivedType * instance,
463 const wsu_ReceivedType * src_obj)
464 0 {
465 0 globus_result_t result = GLOBUS_SUCCESS;
466 GlobusFuncName(wsu_ReceivedType_copy_contents);
467
468 0 GlobusSoapMessageDebugEnter();
469
470 0 if(src_obj->_ValueType)
471 {
472 0 result = xsd_QName_copy(
473 &instance->_ValueType,
474 src_obj->_ValueType);
475 0 if(result != GLOBUS_SUCCESS)
476 {
477 0 result = GlobusSoapMessageErrorCopyFailed(
478 result, NULL, &xsd_QName_qname);
479 0 goto _ValueType_destroy;
480 }
481 }
482 else
483 {
484 0 instance->_ValueType = NULL;
485 }
486
487 0 if(src_obj->_Id)
488 {
489 0 result = xsd_ID_copy(
490 &instance->_Id,
491 src_obj->_Id);
492 0 if(result != GLOBUS_SUCCESS)
493 {
494 0 result = GlobusSoapMessageErrorCopyFailed(
495 result, NULL, &xsd_ID_qname);
496 0 goto _Id_destroy;
497 }
498 }
499 else
500 {
501 0 instance->_Id = NULL;
502 }
503
504 0 if(src_obj->anyAttributes)
505 {
506 0 result = xsd_anyAttributes_copy(&instance->anyAttributes,
507 src_obj->anyAttributes);
508 0 if(result != GLOBUS_SUCCESS)
509 {
510 0 result = GlobusSoapMessageErrorCopyAnyAttrsFailed(
511 result, NULL);
512 0 goto xsd_anyAttributes_after_destroy;
513 }
514 }
515 else
516 {
517 0 instance->anyAttributes = NULL;
518 }
519
520 0 result = xsd_anyURI_copy_contents(
521 &instance->_Actor,
522 &src_obj->_Actor);
523 0 if(result != GLOBUS_SUCCESS)
524 {
525 0 result = GlobusSoapMessageErrorCopyFailed(
526 result, NULL, &xsd_anyURI_qname);
527 0 goto _Actor_destroy;
528 }
529
530 0 if(src_obj->_Delay)
531 {
532 0 result = xsd_int_copy(
533 &instance->_Delay,
534 src_obj->_Delay);
535 0 if(result != GLOBUS_SUCCESS)
536 {
537 0 result = GlobusSoapMessageErrorCopyFailed(
538 result, NULL, &xsd_int_qname);
539 0 goto _Delay_destroy;
540 }
541 }
542 else
543 {
544 0 instance->_Delay = NULL;
545 }
546
547 0 result = xsd_string_copy_contents(
548 &instance->base_value,
549 &src_obj->base_value);
550 0 if(result != GLOBUS_SUCCESS)
551 {
552 0 result = GlobusSoapMessageErrorCopyFailed(
553 result, NULL, &xsd_string_qname);
554 0 goto base_value_destroy;
555 }
556
557 0 goto exit;
558
559 fail_deserialize:
560
561 xsd_anyAttributes_destroy:
562 xsd_anyAttributes_destroy(instance->anyAttributes);
563 instance->anyAttributes = NULL;
564 0 xsd_anyAttributes_after_destroy:
565 0 xsd_string_destroy_contents(
566 &instance->base_value);
567
568 0 base_value_destroy:
569
570 0 _ValueType_destroy:
571
572 0 if(instance->_ValueType)
573 {
574 0 xsd_QName_destroy(
575 instance->_ValueType);
576 0 instance->_ValueType = NULL;
577 }
578
579 0 _Id_destroy:
580
581 0 if(instance->_Id)
582 {
583 0 xsd_ID_destroy(
584 instance->_Id);
585 0 instance->_Id = NULL;
586 }
587
588 0 _Actor_destroy:
589
590 0 xsd_anyURI_destroy_contents(
591 &instance->_Actor);
592
593 0 _Delay_destroy:
594
595 0 if(instance->_Delay)
596 {
597 0 xsd_int_destroy(
598 instance->_Delay);
599 0 instance->_Delay = NULL;
600 }
601
602
603 0 exit:
604
605 0 GlobusSoapMessageDebugExit();
606 0 return result;
607 }
608
609
610
611 globus_result_t
612 wsu_ReceivedType_serialize_contents(
613 const xsd_QName * element_qname, /* ignored */
614 const wsu_ReceivedType * inst,
615 globus_soap_message_handle_t message_handle,
616 globus_xsd_element_options_t options)
617 0 {
618 0 globus_result_t result = GLOBUS_SUCCESS;
619 GlobusFuncName(wsu_ReceivedType_serialize_contents);
620 0 GlobusSoapMessageDebugEnter();
621
622 0 result = wsu_ReceivedType_serialize(
623 NULL,
624 inst,
625 message_handle,
626 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
627 0 if(result != GLOBUS_SUCCESS)
628 {
629 0 result = GlobusSoapMessageErrorSerializeFailed(
630 result, NULL, element_qname);
631 0 goto exit;
632 }
633
634 0 exit:
635
636 0 GlobusSoapMessageDebugExit();
637 0 return result;
638 }
639
640
641
642 globus_result_t
643 wsu_ReceivedType_serialize(
644 const xsd_QName * element_qname,
645 const wsu_ReceivedType * instance,
646 globus_soap_message_handle_t message_handle,
647 globus_xsd_element_options_t options)
648 0 {
649 0 globus_result_t result = GLOBUS_SUCCESS;
650 xsd_QName subelement;
651 0 globus_list_t * any_attr_keys = NULL;
652 0 globus_list_t * any_attr_keys_iterator = NULL;
653 0 xsd_QName * type_attr = NULL;
654
655 0 char * prefix = NULL;
656 int prefix_created;
657 0 int define_prefix = 0;
658 0 int save_options = options;
659
660 GlobusFuncName(wsu_ReceivedType_serialize);
661 0 GlobusSoapMessageDebugEnter();
662
663
664 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
665 {
666 /* serialize wsu_ReceivedType element */
667 0 result = globus_soap_message_element_ns_set(
668 message_handle,
669 element_qname,
670 element_qname->Namespace,
671 &options);
672 0 if(result != GLOBUS_SUCCESS)
673 {
674 0 result = GlobusSoapMessageErrorSerializeFailed(
675 result, NULL, element_qname);
676 0 goto exit;
677 }
678
679 0 if(instance->_ValueType)
680 {
681
682 0 if(result != GLOBUS_SUCCESS)
683 {
684 xsd_QName error_qname;
685 0 error_qname.local = prefix;
686 0 error_qname.Namespace = "";
687 0 result = GlobusSoapMessageErrorSerializeFailed(result,
688 NULL,
689 &error_qname);
690 0 goto exit;
691 }
692
693
694 0 result = globus_soap_message_attribute_ns_set(
695 message_handle,
696 element_qname,
697 instance->_ValueType->Namespace,
698 &options);
699 0 if(result != GLOBUS_SUCCESS)
700 {
701 xsd_QName error_qname;
702 0 error_qname.local = prefix;
703 0 error_qname.Namespace = "";
704 0 result = GlobusSoapMessageErrorSerializeFailed(result,
705 NULL,
706 &error_qname);
707 0 goto exit;
708 }
709
710 }
711
712 0 if(instance->_Id)
713 {
714
715 0 result = globus_soap_message_attribute_ns_set(
716 message_handle,
717 element_qname,
718 "http://schemas.xmlsoap.org/ws/2002/07/utility",
719 &options);
720
721 0 if(result != GLOBUS_SUCCESS)
722 {
723 xsd_QName error_qname;
724 0 error_qname.local = prefix;
725 0 error_qname.Namespace = "http://schemas.xmlsoap.org/ws/2002/07/utility";
726 0 result = GlobusSoapMessageErrorSerializeFailed(result,
727 NULL,
728 &error_qname);
729 0 goto exit;
730 }
731
732
733 }
734
735 0 if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
736 !globus_soap_message_serialize_is_c14n_subset(message_handle)))
737 {
738 0 result = globus_soap_message_attribute_ns_set(
739 message_handle,
740 element_qname,
741 "http://www.w3.org/2001/XMLSchema-instance",
742 &options);
743 0 if(result != GLOBUS_SUCCESS)
744 {
745 0 result = GlobusSoapMessageErrorSerializeFailed(
746 result, NULL, element_qname);
747 0 goto exit;
748 }
749 }
750
751 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
752 !globus_soap_message_serialize_is_c14n_subset(message_handle))
753 {
754
755 0 result = globus_soap_message_attribute_ns_set(
756 message_handle,
757 element_qname,
758 wsu_ReceivedType_qname.Namespace,
759 &options);
760 0 if(result != GLOBUS_SUCCESS)
761 {
762 0 result = GlobusSoapMessageErrorSerializeFailed(
763 result, NULL, element_qname);
764 0 goto exit;
765 }
766 }
767
768 0 result = xsd_anyAttributes_namespace_set(
769 message_handle, element_qname, instance->anyAttributes, &options);
770 0 if(result != GLOBUS_SUCCESS)
771 {
772 0 result = GlobusSoapMessageErrorSerializeAnyAttrsFailed(
773 result, "Failed to set namespace");
774 0 goto exit;
775 }
776
777 0 if(result != GLOBUS_SUCCESS)
778 {
779 xsd_QName error_qname;
780 0 error_qname.local = prefix;
781 0 error_qname.Namespace = "";
782 0 result = GlobusSoapMessageErrorSerializeFailed(result,
783 NULL,
784 &error_qname);
785 0 goto exit;
786 }
787
788
789 0 if(instance->_Delay)
790 {
791
792 0 if(result != GLOBUS_SUCCESS)
793 {
794 xsd_QName error_qname;
795 0 error_qname.local = prefix;
796 0 error_qname.Namespace = "";
797 0 result = GlobusSoapMessageErrorSerializeFailed(result,
798 NULL,
799 &error_qname);
800 0 goto exit;
801 }
802
803
804 }
805
806 0 result = globus_soap_message_serialize_element(
807 message_handle,
808 element_qname,
809 options,
810 &wsu_ReceivedType_qname);
811 0 if(result != GLOBUS_SUCCESS)
812 {
813 0 result = GlobusSoapMessageErrorSerializeFailed(
814 result, NULL, element_qname);
815 0 goto exit;
816 }
817
818 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
819 !globus_soap_message_serialize_is_c14n_subset(message_handle))
820 {
821 0 xsd_QName_init(&type_attr);
822
823 0 type_attr->local = globus_libc_strdup("type");
824 0 type_attr->Namespace = globus_libc_strdup(XSI_NS);
825 }
826
827
828 /* serialize namespaces */
829 0 result = globus_soap_message_element_ns_add(
830 message_handle,
831 element_qname,
832 element_qname->Namespace,
833 &options);
834 0 if(result != GLOBUS_SUCCESS)
835 {
836 0 result = GlobusSoapMessageErrorSerializeFailed(
837 result, NULL, element_qname);
838 0 goto exit;
839 }
840
841 0 if(instance->_ValueType)
842 {
843
844 0 result = globus_soap_message_attribute_ns_add(
845 message_handle,
846 element_qname,
847 instance->_ValueType->Namespace,
848 &options);
849 0 if(result != GLOBUS_SUCCESS)
850 {
851 xsd_QName error_qname;
852 0 error_qname.local = prefix;
853 0 error_qname.Namespace = "";
854 0 result = GlobusSoapMessageErrorSerializeFailed(result,
855 NULL,
856 &error_qname);
857 0 goto exit;
858 }
859
860 }
861
862 0 if(instance->_Id)
863 {
864
865 0 result = globus_soap_message_attribute_ns_add(
866 message_handle,
867 element_qname,
868 "http://schemas.xmlsoap.org/ws/2002/07/utility",
869 &options);
870 0 if(result != GLOBUS_SUCCESS)
871 {
872 xsd_QName error_qname;
873 0 error_qname.local = prefix;
874 0 error_qname.Namespace = "http://schemas.xmlsoap.org/ws/2002/07/utility";
875 0 result = GlobusSoapMessageErrorSerializeFailed(result,
876 NULL,
877 &error_qname);
878 0 goto exit;
879 }
880
881 }
882
883 0 if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
884 !globus_soap_message_serialize_is_c14n_subset(message_handle)))
885 {
886 0 result = globus_soap_message_attribute_ns_add(
887 message_handle,
888 element_qname,
889 "http://www.w3.org/2001/XMLSchema-instance",
890 &options);
891 0 if(result != GLOBUS_SUCCESS)
892 {
893 0 result = GlobusSoapMessageErrorSerializeFailed(
894 result, NULL, element_qname);
895 0 goto exit;
896 }
897 }
898 0 if ((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
899 !globus_soap_message_serialize_is_c14n_subset(message_handle))
900 {
901
902 0 result = globus_soap_message_attribute_ns_add(
903 message_handle,
904 element_qname,
905 wsu_ReceivedType_qname.Namespace,
906 &options);
907 0 if(result != GLOBUS_SUCCESS)
908 {
909 0 result = GlobusSoapMessageErrorSerializeFailed(
910 result, NULL, element_qname);
911 0 goto exit;
912 }
913 }
914
915 0 result = xsd_anyAttributes_namespace_add(
916 message_handle, element_qname, instance->anyAttributes, &options);
917 0 if(result != GLOBUS_SUCCESS)
918 {
919 0 result = GlobusSoapMessageErrorSerializeAnyAttrsFailed(
920 result, "Failed to add namespace");
921 0 goto exit;
922 }
923
924 0 if(instance->_Delay)
925 {
926
927 }
928
929 /* serialize attributes */
930
931 0 subelement.Namespace = "";
932 0 subelement.local = "ValueType";
933
934 0 if(instance->_ValueType)
935 {
936
937 0 result = xsd_QName_serialize_attribute(
938 &subelement,
939 instance->_ValueType,
940 message_handle,
941 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
942 0 if(result != GLOBUS_SUCCESS)
943 {
944 0 result = GlobusSoapMessageErrorSerializeFailed(result,
945 NULL,
946 element_qname);
947 0 goto exit;
948 }
949
950 }
951
952 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/07/utility";
953 0 subelement.local = "Id";
954
955 0 if(instance->_Id)
956 {
957
958 0 result = xsd_ID_serialize_attribute(
959 &subelement,
960 instance->_Id,
961 message_handle,
962 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
963 0 if(result != GLOBUS_SUCCESS)
964 {
965 0 result = GlobusSoapMessageErrorSerializeFailed(result,
966 NULL,
967 element_qname);
968 0 goto exit;
969 }
970
971 }
972
973 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
974 !globus_soap_message_serialize_is_c14n_subset(message_handle))
975 {
976 0 result = globus_soap_message_serialize_QName_attribute(
977 message_handle,
978 type_attr,
979 &wsu_ReceivedType_qname);
980 0 if(result != GLOBUS_SUCCESS)
981 {
982 0 result = GlobusSoapMessageErrorSerializeFailed(
983 result, NULL, element_qname);
984 0 goto exit;
985 }
986 }
987
988 0 if(instance->anyAttributes)
989 {
990 0 any_attr_keys = xsd_anyAttributes_lex_sort(
991 instance->anyAttributes);
992 0 any_attr_keys_iterator = any_attr_keys;
993 }
994
995 0 subelement.Namespace = "";
996 0 subelement.local = "Actor";
997
998 0 result = xsd_anyURI_serialize_attribute(
999 &subelement,
1000 &instance->_Actor,
1001 message_handle,
1002 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
1003 0 if(result != GLOBUS_SUCCESS)
1004 {
1005 0 result = GlobusSoapMessageErrorSerializeFailed(result,
1006 NULL,
1007 element_qname);
1008 0 goto exit;
1009 }
1010
1011 0 subelement.Namespace = "";
1012 0 subelement.local = "Delay";
1013
1014 0 if(instance->_Delay)
1015 {
1016
1017 0 result = xsd_int_serialize_attribute(
1018 &subelement,
1019 instance->_Delay,
1020 message_handle,
1021 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
1022 0 if(result != GLOBUS_SUCCESS)
1023 {
1024 0 result = GlobusSoapMessageErrorSerializeFailed(result,
1025 NULL,
1026 element_qname);
1027 0 goto exit;
1028 }
1029
1030 }
1031
1032
1033 }
1034
1035 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
1036 {
1037 0 result = globus_soap_message_serialize_element_begin_close(
1038 message_handle, element_qname);
1039 0 if(result != GLOBUS_SUCCESS)
1040 {
1041 0 result = GlobusSoapMessageErrorSerializeFailed(
1042 result, NULL, element_qname);
1043 0 goto exit;
1044 }
1045 }
1046 0 options &= ~GLOBUS_XSD_ELEMENT_CONTENTS_ONLY;
1047
1048
1049 /* serialize contents of type */
1050
1051 0 subelement.local = "base_value";
1052 0 subelement.Namespace = NULL;
1053
1054 0 result = xsd_string_serialize(
1055 &subelement,
1056 &instance->base_value,
1057 message_handle,
1058 GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
1059 0 if(result != GLOBUS_SUCCESS)
1060 {
1061 0 result = GlobusSoapMessageErrorSerializeFailed(
1062 result, NULL, &xsd_string_qname);
1063 0 goto exit;
1064 }
1065
1066 0 options = save_options;
1067
1068 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
1069 {
1070 /* add end element */
1071 0 result = globus_soap_message_serialize_element_end(
1072 message_handle,
1073 element_qname,
1074 options,
1075 &wsu_ReceivedType_qname);
1076 0 if(result != GLOBUS_SUCCESS)
1077 {
1078 0 result = GlobusSoapMessageErrorSerializeFailed(
1079 result, NULL, element_qname);
1080 0 goto exit;
1081 }
1082
1083 0 globus_soap_message_element_ns_remove(
1084 message_handle,
1085 element_qname->Namespace,
1086 &options);
1087
1088 /* remove namespace/prefix mappings for these types */
1089
1090 0 if(instance->_ValueType)
1091 {
1092
1093 0 globus_soap_message_attribute_ns_remove(
1094 message_handle,
1095 NULL,
1096 &options);
1097
1098 0 globus_soap_message_attribute_ns_remove(
1099 message_handle,
1100 instance->_ValueType->Namespace,
1101 &options);
1102
1103 }
1104
1105 0 if(instance->_Id)
1106 {
1107
1108 0 globus_soap_message_attribute_ns_remove(
1109 message_handle,
1110 "http://schemas.xmlsoap.org/ws/2002/07/utility",
1111 &options);
1112
1113 }
1114
1115 0 if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
1116 !globus_soap_message_serialize_is_c14n_subset(message_handle)))
1117 {
1118 0 globus_soap_message_attribute_ns_remove(
1119 message_handle,
1120 "http://www.w3.org/2001/XMLSchema-instance",
1121 &options);
1122 }
1123 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
1124 !globus_soap_message_serialize_is_c14n_subset(message_handle))
1125 {
1126 0 globus_soap_message_attribute_ns_remove(
1127 message_handle,
1128 wsu_ReceivedType_qname.Namespace,
1129 &options);
1130 }
1131
1132 0 result = xsd_anyAttributes_namespace_remove(
1133 message_handle, instance->anyAttributes, &options);
1134 0 if(result != GLOBUS_SUCCESS)
1135 {
1136 0 result = GlobusSoapMessageErrorSerializeAnyAttrsFailed(
1137 result, "Failed to remove namespace");
1138 0 goto exit;
1139 }
1140
1141 0 globus_soap_message_attribute_ns_remove(
1142 message_handle,
1143 NULL,
1144 &options);
1145
1146 0 if(instance->_Delay)
1147 {
1148
1149 0 globus_soap_message_attribute_ns_remove(
1150 message_handle,
1151 NULL,
1152 &options);
1153
1154 }
1155
1156 }
1157
1158 0 exit:
1159 0 if (type_attr)
1160 {
1161 0 xsd_QName_destroy(type_attr);
1162 }
1163
1164
1165 0 if(any_attr_keys)
1166 {
1167 0 globus_list_free(any_attr_keys);
1168 }
1169
1170 0 GlobusSoapMessageDebugExit();
1171 0 return result;
1172 }
1173
1174
1175
1176 globus_result_t
1177 wsu_ReceivedType_deserialize_contents(
1178 const xsd_QName * element_qname, /* ignored */
1179 wsu_ReceivedType * inst,
1180 globus_soap_message_handle_t message_handle,
1181 globus_xsd_element_options_t options)
1182 0 {
1183 0 globus_result_t result = GLOBUS_SUCCESS;
1184 GlobusFuncName(wsu_ReceivedType_deserialize_contents);
1185 0 GlobusSoapMessageDebugEnter();
1186
1187 0 result = wsu_ReceivedType_deserialize(
1188 NULL,
1189 inst,
1190 message_handle,
1191 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
1192 0 if(result != GLOBUS_SUCCESS)
1193 {
1194 0 result = GlobusSoapMessageErrorDeserializeFailed(
1195 result, element_qname);
1196 0 goto exit;
1197 }
1198
1199 0 exit:
1200
1201 0 GlobusSoapMessageDebugExit();
1202 0 return result;
1203 }
1204
1205
1206
1207 globus_result_t
1208 wsu_ReceivedType_deserialize(
1209 const xsd_QName * element_qname,
1210 wsu_ReceivedType * instance,
1211 globus_soap_message_handle_t message_handle,
1212 globus_xsd_element_options_t options)
1213 0 {
1214 0 globus_result_t result = GLOBUS_SUCCESS;
1215 xsd_QName subelement;
1216 GlobusFuncName(wsu_ReceivedType_deserialize);
1217 0 GlobusSoapMessageDebugEnter();
1218
1219
1220 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
1221 {
1222 0 result = globus_soap_message_deserialize_element(
1223 message_handle, element_qname);
1224 0 if(result != GLOBUS_SUCCESS)
1225 {
1226 0 result = GlobusSoapMessageErrorDeserializeFailed(
1227 result, element_qname);
1228 0 goto exit;
1229 }
1230
1231 0 subelement.Namespace = "";
1232 0 subelement.local = "ValueType";
1233
1234 0 result = xsd_QName_deserialize_attribute_pointer(
1235 &subelement,
1236 &instance->_ValueType,
1237 message_handle,
1238 0);
1239 0 if(result != GLOBUS_SUCCESS)
1240 {
1241 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1242 0 goto _ValueType_destroy;
1243 }
1244
1245
1246 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/07/utility";
1247 0 subelement.local = "Id";
1248
1249 0 result = xsd_ID_deserialize_attribute_pointer(
1250 &subelement,
1251 &instance->_Id,
1252 message_handle,
1253 0);
1254 0 if(result != GLOBUS_SUCCESS)
1255 {
1256 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1257 0 goto _Id_destroy;
1258 }
1259
1260
1261 0 result = xsd_anyAttributes_init(&instance->anyAttributes);
1262 0 if(result != GLOBUS_SUCCESS)
1263 {
1264 0 result = GlobusSoapMessageErrorDeserializeFailed(
1265 result, element_qname);
1266 0 goto xsd_anyAttributes_after_destroy;
1267 }
1268 0 subelement.Namespace = "##any";
1269 0 subelement.local = "anyAttributes";
1270
1271 0 result = xsd_anyAttributes_deserialize(
1272 message_handle,
1273 instance->anyAttributes,
1274 &subelement);
1275 0 if(result != GLOBUS_SUCCESS)
1276 {
1277 0 result = GlobusSoapMessageErrorDeserializeFailed(
1278 result, element_qname);
1279 0 goto xsd_anyAttributes_destroy;
1280 }
1281
1282 0 subelement.Namespace = "";
1283 0 subelement.local = "Actor";
1284
1285 0 result = xsd_anyURI_deserialize_attribute(
1286 &subelement,
1287 &instance->_Actor,
1288 message_handle,
1289 0);
1290 0 if(result != GLOBUS_SUCCESS)
1291 {
1292 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1293 0 goto _Actor_destroy;
1294 }
1295
1296 0 subelement.Namespace = "";
1297 0 subelement.local = "Delay";
1298
1299 0 result = xsd_int_deserialize_attribute_pointer(
1300 &subelement,
1301 &instance->_Delay,
1302 message_handle,
1303 0);
1304 0 if(result != GLOBUS_SUCCESS)
1305 {
1306 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1307 0 goto _Delay_destroy;
1308 }
1309
1310
1311
1312 0 result = globus_soap_message_deserialize_element_begin_close(
1313 message_handle);
1314 0 if(result != GLOBUS_SUCCESS)
1315 {
1316 0 result = GlobusSoapMessageErrorDeserializeFailed(
1317 result, element_qname);
1318 0 goto fail_deserialize;
1319 }
1320 }
1321
1322 0 subelement.local = "base_value";
1323 0 subelement.Namespace = NULL;
1324
1325 0 result = xsd_string_deserialize(
1326 &subelement,
1327 &instance->base_value,
1328 message_handle,
1329 GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
1330 0 if(result != GLOBUS_SUCCESS)
1331 {
1332 0 result = GlobusSoapMessageErrorDeserializeFailed(
1333 result,
1334 &xsd_string_qname);
1335 0 goto base_value_destroy;
1336 }
1337
1338 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
1339 {
1340 0 result = globus_soap_message_deserialize_element_end(
1341 message_handle,
1342 element_qname);
1343 0 if(result != GLOBUS_SUCCESS)
1344 {
1345 0 result = GlobusSoapMessageErrorDeserializeFailed(
1346 result, element_qname);
1347 0 goto fail_deserialize;
1348 }
1349 }
1350
1351 0 goto exit;
1352
1353 0 fail_deserialize:
1354
1355 0 xsd_anyAttributes_destroy:
1356 0 xsd_anyAttributes_destroy(instance->anyAttributes);
1357 0 instance->anyAttributes = NULL;
1358 0 xsd_anyAttributes_after_destroy:
1359 0 xsd_string_destroy_contents(
1360 &instance->base_value);
1361
1362 0 base_value_destroy:
1363
1364 0 _ValueType_destroy:
1365 /* output_fail_destroy_attribute() */
1366
1367 0 if(instance->_ValueType)
1368 {
1369 0 xsd_QName_destroy(
1370 instance->_ValueType);
1371 0 instance->_ValueType = NULL;
1372 }
1373
1374 0 _Id_destroy:
1375 /* output_fail_destroy_attribute() */
1376
1377 0 if(instance->_Id)
1378 {
1379 0 xsd_ID_destroy(
1380 instance->_Id);
1381 0 instance->_Id = NULL;
1382 }
1383
1384 0 _Actor_destroy:
1385 /* output_fail_destroy_attribute() */
1386
1387 0 xsd_anyURI_destroy_contents(
1388 &instance->_Actor);
1389
1390 0 _Delay_destroy:
1391 /* output_fail_destroy_attribute() */
1392
1393 0 if(instance->_Delay)
1394 {
1395 0 xsd_int_destroy(
1396 instance->_Delay);
1397 0 instance->_Delay = NULL;
1398 }
1399
1400
1401 0 exit:
1402
1403 0 GlobusSoapMessageDebugExit();
1404 0 return result;
1405 }
1406
1407
1408
1409 globus_result_t
1410 wsu_ReceivedType_deserialize_pointer(
1411 const xsd_QName * element_qname,
1412 wsu_ReceivedType ** ip,
1413 globus_soap_message_handle_t message_handle,
1414 globus_xsd_element_options_t options)
1415 0 {
1416 0 wsu_ReceivedType * instance = NULL;
1417 0 globus_result_t result = GLOBUS_SUCCESS;
1418 xsd_QName subelement;
1419 0 int found_attrs = 0;
1420 0 int empty_element = 0;
1421 GlobusFuncName(wsu_ReceivedType_deserialize_pointer);
1422 0 GlobusSoapMessageDebugEnter();
1423
1424 0 *ip = NULL;
1425
1426 0 result = globus_soap_message_deserialize_element(
1427 message_handle, element_qname);
1428 0 if(result != GLOBUS_SUCCESS &&
1429 (GlobusSoapMessageStatusElementNotFoundCheck(result) ||
1430 GlobusSoapMessageStatusFailedElementCheck(result) ||
1431 GlobusSoapMessageStatusFailedWithTextCheck(result)))
1432 {
1433 0 result = GLOBUS_SUCCESS;
1434 0 goto exit;
1435 }
1436
1437 0 if(result != GLOBUS_SUCCESS)
1438 {
1439 0 result = GlobusSoapMessageErrorDeserializeFailed(
1440 result, element_qname);
1441 0 goto exit;
1442 }
1443
1444 0 if(globus_soap_message_deserialize_element_is_empty(
1445 message_handle))
1446 {
1447 0 empty_element = 1;
1448 }
1449
1450 0 result = wsu_ReceivedType_init(&instance);
1451 0 if(result != GLOBUS_SUCCESS)
1452 {
1453 0 result = GlobusSoapMessageErrorDeserializeFailed(
1454 result, element_qname);
1455 0 goto exit;
1456 }
1457
1458
1459 0 subelement.Namespace = "";
1460 0 subelement.local = "ValueType";
1461
1462 0 result = xsd_QName_deserialize_attribute_pointer(
1463 &subelement,
1464 &instance->_ValueType,
1465 message_handle,
1466 0);
1467 0 if(result != GLOBUS_SUCCESS)
1468 {
1469 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1470 0 goto _ValueType_destroy;
1471 }
1472
1473
1474 0 if(instance->_ValueType)
1475 {
1476 0 found_attrs++;
1477 }
1478
1479 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2002/07/utility";
1480 0 subelement.local = "Id";
1481
1482 0 result = xsd_ID_deserialize_attribute_pointer(
1483 &subelement,
1484 &instance->_Id,
1485 message_handle,
1486 0);
1487 0 if(result != GLOBUS_SUCCESS)
1488 {
1489 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1490 0 goto _Id_destroy;
1491 }
1492
1493
1494 0 if(instance->_Id)
1495 {
1496 0 found_attrs++;
1497 }
1498
1499 0 result = xsd_anyAttributes_init(&instance->anyAttributes);
1500 0 if(result != GLOBUS_SUCCESS)
1501 {
1502 0 result = GlobusSoapMessageErrorDeserializeFailed(
1503 result, element_qname);
1504 0 goto xsd_anyAttributes_after_destroy;
1505 }
1506 0 subelement.Namespace = "##any";
1507 0 subelement.local = "anyAttributes";
1508
1509 0 result = xsd_anyAttributes_deserialize(
1510 message_handle,
1511 instance->anyAttributes,
1512 &subelement);
1513 0 if(result != GLOBUS_SUCCESS)
1514 {
1515 0 result = GlobusSoapMessageErrorDeserializeFailed(
1516 result, element_qname);
1517 0 goto xsd_anyAttributes_destroy;
1518 }
1519
1520 0 if(instance->anyAttributes &&
1521 xsd_anyAttributes_size(instance->anyAttributes) > 0)
1522 {
1523 0 found_attrs++;
1524 }
1525
1526 0 subelement.Namespace = "";
1527 0 subelement.local = "Actor";
1528
1529 0 result = xsd_anyURI_deserialize_attribute(
1530 &subelement,
1531 &instance->_Actor,
1532 message_handle,
1533 0);
1534 0 if(result != GLOBUS_SUCCESS)
1535 {
1536 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1537 0 goto _Actor_destroy;
1538 }
1539
1540 0 found_attrs++;
1541
1542 0 subelement.Namespace = "";
1543 0 subelement.local = "Delay";
1544
1545 0 result = xsd_int_deserialize_attribute_pointer(
1546 &subelement,
1547 &instance->_Delay,
1548 message_handle,
1549 0);
1550 0 if(result != GLOBUS_SUCCESS)
1551 {
1552 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1553 0 goto _Delay_destroy;
1554 }
1555
1556
1557 0 if(instance->_Delay)
1558 {
1559 0 found_attrs++;
1560 }
1561
1562 0 if(found_attrs == 0 &&
1563 globus_soap_message_deserialize_element_is_nil(message_handle))
1564 {
1565 0 wsu_ReceivedType_destroy(instance);
1566
1567 0 result = globus_soap_message_deserialize_element_end(
1568 message_handle,
1569 element_qname);
1570 0 if(result != GLOBUS_SUCCESS)
1571 {
1572 0 result = GlobusSoapMessageErrorDeserializeFailed(
1573 result, element_qname);
1574 0 goto exit;
1575 }
1576
1577 0 *ip = NULL;
1578 0 globus_object_free(globus_error_get(result));
1579 0 result = GLOBUS_SUCCESS;
1580 0 goto exit;
1581 }
1582
1583 0 if(empty_element)
1584 {
1585 0 result = globus_soap_message_deserialize_element_end(
1586 message_handle,
1587 element_qname);
1588 0 if(result != GLOBUS_SUCCESS)
1589 {
1590 0 result = GlobusSoapMessageErrorDeserializeFailed(
1591 result, element_qname);
1592 0 goto fail_deserialize;
1593 }
1594
1595 0 *ip = instance;
1596 0 goto exit;
1597 }
1598
1599 0 result = globus_soap_message_deserialize_element_begin_close(
1600 message_handle);
1601 0 if(result != GLOBUS_SUCCESS)
1602 {
1603 0 result = GlobusSoapMessageErrorDeserializeFailed(
1604 result, element_qname);
1605 0 goto exit;
1606 }
1607
1608 0 result = wsu_ReceivedType_deserialize(
1609 element_qname,
1610 instance,
1611 message_handle,
1612 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
1613 0 if(result != GLOBUS_SUCCESS)
1614 {
1615 0 result = GlobusSoapMessageErrorDeserializeFailed(
1616 result, element_qname);
1617 0 goto exit;
1618 }
1619
1620 0 result = globus_soap_message_deserialize_element_end(
1621 message_handle,
1622 element_qname);
1623 0 if(result != GLOBUS_SUCCESS)
1624 {
1625 0 result = GlobusSoapMessageErrorDeserializeFailed(
1626 result, element_qname);
1627 0 goto fail_deserialize;
1628 }
1629
1630 0 *ip = instance;
1631
1632 0 goto exit;
1633
1634 0 fail_deserialize:
1635
1636 0 xsd_anyAttributes_destroy:
1637 0 xsd_anyAttributes_destroy(instance->anyAttributes);
1638 0 instance->anyAttributes = NULL;
1639 0 xsd_anyAttributes_after_destroy:
1640 0 xsd_string_destroy_contents(
1641 &instance->base_value);
1642
1643 0 base_value_destroy:
1644
1645 0 _ValueType_destroy:
1646 /* output_fail_destroy_attribute() */
1647
1648 0 if(instance->_ValueType)
1649 {
1650 0 xsd_QName_destroy(
1651 instance->_ValueType);
1652 0 instance->_ValueType = NULL;
1653 }
1654
1655 0 _Id_destroy:
1656 /* output_fail_destroy_attribute() */
1657
1658 0 if(instance->_Id)
1659 {
1660 0 xsd_ID_destroy(
1661 instance->_Id);
1662 0 instance->_Id = NULL;
1663 }
1664
1665 0 _Actor_destroy:
1666 /* output_fail_destroy_attribute() */
1667
1668 0 xsd_anyURI_destroy_contents(
1669 &instance->_Actor);
1670
1671 0 _Delay_destroy:
1672 /* output_fail_destroy_attribute() */
1673
1674 0 if(instance->_Delay)
1675 {
1676 0 xsd_int_destroy(
1677 instance->_Delay);
1678 0 instance->_Delay = NULL;
1679 }
1680
1681 0 exit:
1682
1683 0 GlobusSoapMessageDebugExit();
1684 0 return result;
1685 }
1686
1687
1688 globus_result_t
1689 wsu_ReceivedType_array_init_contents(
1690 wsu_ReceivedType_array * array)
1691 0 {
1692 0 return globus_xsd_generic_array_init_contents(
1693 (globus_xsd_generic_array_t *) array,
1694 &wsu_ReceivedType_info);
1695 }
1696 /* wsu_ReceivedType_array_init_contents() */
1697
1698 globus_result_t
1699 wsu_ReceivedType_array_init(
1700 wsu_ReceivedType_array ** arr)
1701 0 {
1702 0 return globus_xsd_generic_array_init(
1703 (globus_xsd_generic_array_t **) arr,
1704 &wsu_ReceivedType_info);
1705 }
1706 /* wsu_ReceivedType_array_init() */
1707
1708 void
1709 wsu_ReceivedType_array_destroy_contents(
1710 wsu_ReceivedType_array * array)
1711 0 {
1712 0 globus_xsd_generic_array_destroy_contents(
1713 (globus_xsd_generic_array_t *) array);
1714 0 }
1715 /* wsu_ReceivedType_array_destroy_contents() */
1716
1717 void
1718 wsu_ReceivedType_array_destroy(
1719 wsu_ReceivedType_array * array)
1720 0 {
1721 0 globus_xsd_generic_array_destroy(
1722 (globus_xsd_generic_array_t *) array);
1723 0 }
1724 /* wsu_ReceivedType_array_destroy() */
1725
1726 globus_result_t
1727 wsu_ReceivedType_array_copy(
1728 wsu_ReceivedType_array ** dest_arr,
1729 const wsu_ReceivedType_array * src_arr)
1730 0 {
1731 0 return globus_xsd_generic_array_copy(
1732 (globus_xsd_generic_array_t **) dest_arr,
1733 (globus_xsd_generic_array_t *) src_arr);
1734 }
1735 /* wsu_ReceivedType_array_copy() */
1736
1737 globus_result_t
1738 wsu_ReceivedType_array_copy_contents(
1739 wsu_ReceivedType_array * dest_arr,
1740 const wsu_ReceivedType_array * src_arr)
1741 0 {
1742 0 return globus_xsd_generic_array_copy_contents(
1743 (globus_xsd_generic_array_t *) dest_arr,
1744 (globus_xsd_generic_array_t *) src_arr);
1745 }
1746 /* wsu_ReceivedType_array_copy_contents() */
1747
1748 wsu_ReceivedType *
1749 wsu_ReceivedType_array_push(
1750 wsu_ReceivedType_array * array)
1751 0 {
1752 /* Some contents initializers don't initialize subelments but to set their
1753 * values to be NULL
1754 */
1755 0 if (array->type_info == NULL)
1756 {
1757 0 array->type_info = &wsu_ReceivedType_info;
1758 }
1759
1760 0 return globus_xsd_generic_array_push(
1761 (globus_xsd_generic_array_t *) array);
1762 }
1763 /* wsu_ReceivedType_array_push() */
1764
1765 globus_result_t
1766 wsu_ReceivedType_array_serialize(
1767 const xsd_QName * element_qname,
1768 const wsu_ReceivedType_array * array,
1769 globus_soap_message_handle_t message,
1770 globus_xsd_element_options_t options)
1771 0 {
1772 0 return globus_xsd_generic_array_serialize(
1773 element_qname,
1774 (const globus_xsd_generic_array_t *) array,
1775 message,
1776 options);
1777 }
1778 /* wsu_ReceivedType_array_serialize() */
1779
1780 globus_result_t
1781 wsu_ReceivedType_array_deserialize(
1782 const xsd_QName * element_qname,
1783 wsu_ReceivedType_array * array,
1784 globus_soap_message_handle_t message,
1785 globus_xsd_element_options_t options)
1786 0 {
1787 /* Some initializers set the array's contents to NULL */
1788 0 if (array->type_info == NULL)
1789 {
1790 0 array->type_info = &wsu_ReceivedType_info;
1791 }
1792 0 return globus_xsd_generic_array_deserialize(
1793 element_qname,
1794 (globus_xsd_generic_array_t *) array,
1795 message,
1796 options);