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