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