1 /*
2 * Portions of this file Copyright 1999-2005 University of Chicago
3 * Portions of this file Copyright 1999-2005 The University of Southern California.
4 *
5 * This file or a portion of this file is licensed under the
6 * terms of the Globus Toolkit Public License, found at
7 * http://www.globus.org/toolkit/download/license.html.
8 * If you redistribute this file, with or without
9 * modifications, you must include this notice in the file.
10 */
11
12
13 /*
14 * This file is automatically generated by the Globus WSDLtoC converter
15 */
16
17 #include "xsd_QName.h"
18 #include "globus_soap_message.h"
19 #include "globus_xsd_type_info.h"
20 #include "wsp_tPolicyURIs.h"
21
22 xsd_QName wsp_tPolicyURIs_qname =
23 {
24 "http://schemas.xmlsoap.org/ws/2002/12/policy",
25 "tPolicyURIs"
26 };
27
28 globus_result_t
29 wsp_tPolicyURIs_serialize_wrapper(
30 xsd_QName * element_qname,
31 void * instance,
32 globus_soap_message_handle_t message_handle,
33 globus_xsd_element_options_t options)
34 0 {
35 0 return wsp_tPolicyURIs_serialize(
36 element_qname,
37 (wsp_tPolicyURIs *) instance,
38 message_handle, options);
39 }
40
41 globus_result_t
42 wsp_tPolicyURIs_deserialize_pointer_wrapper(
43 xsd_QName * element_qname,
44 void ** ip,
45 globus_soap_message_handle_t message_handle,
46 globus_xsd_element_options_t options)
47 0 {
48 0 return wsp_tPolicyURIs_deserialize_pointer(
49 element_qname,
50 (wsp_tPolicyURIs **) ip,
51 message_handle, options);
52 }
53
54 globus_result_t
55 wsp_tPolicyURIs_init_wrapper(void **object)
56 0 {
57 0 return wsp_tPolicyURIs_init(
58 (wsp_tPolicyURIs **) object);
59 }
60
61 void
62 wsp_tPolicyURIs_destroy_wrapper(
63 void * object)
64 0 {
65 0 wsp_tPolicyURIs_destroy(
66 (wsp_tPolicyURIs *) object);
67 }
68
69 globus_result_t
70 wsp_tPolicyURIs_copy_wrapper(
71 void ** dest_obj,
72 void * src_obj)
73 0 {
74 0 return wsp_tPolicyURIs_copy(
75 (wsp_tPolicyURIs **) dest_obj,
76 (wsp_tPolicyURIs *) src_obj);
77 }
78
79 globus_result_t
80 wsp_tPolicyURIs_init_contents_wrapper(void *object)
81 0 {
82 0 return wsp_tPolicyURIs_init_contents(
83 (wsp_tPolicyURIs *) object);
84 }
85
86 void
87 wsp_tPolicyURIs_destroy_contents_wrapper(
88 void * object)
89 0 {
90 0 wsp_tPolicyURIs_destroy_contents(
91 (wsp_tPolicyURIs *) object);
92 }
93
94 globus_result_t
95 wsp_tPolicyURIs_copy_contents_wrapper(
96 void * dest_obj,
97 void * src_obj)
98 0 {
99 0 return wsp_tPolicyURIs_copy_contents(
100 (wsp_tPolicyURIs *) dest_obj,
101 (wsp_tPolicyURIs *) src_obj);
102 }
103
104 globus_result_t
105 wsp_tPolicyURIs_serialize_contents_wrapper(
106 xsd_QName * element_qname,
107 void * instance,
108 globus_soap_message_handle_t message_handle,
109 globus_xsd_element_options_t options)
110 0 {
111 0 return wsp_tPolicyURIs_serialize_contents(
112 element_qname,
113 (wsp_tPolicyURIs *) instance,
114 message_handle, options);
115 }
116
117 globus_result_t
118 wsp_tPolicyURIs_deserialize_contents_wrapper(
119 xsd_QName * element_qname,
120 void ** instance,
121 globus_soap_message_handle_t message_handle,
122 globus_xsd_element_options_t options)
123 0 {
124 globus_result_t result;
125 GlobusFuncName(wsp_tPolicyURIs_deserialize_contents_wrapper);
126 0 GlobusSoapMessageDebugEnter();
127
128 0 if(!*instance)
129 {
130 0 result = wsp_tPolicyURIs_init(
131 (wsp_tPolicyURIs **)instance);
132 0 if(result != GLOBUS_SUCCESS)
133 {
134 0 goto error;
135 }
136 }
137
138 0 result = wsp_tPolicyURIs_deserialize_contents(
139 element_qname,
140 *(wsp_tPolicyURIs **)instance,
141 message_handle, options);
142 0 error:
143 0 GlobusSoapMessageDebugExit();
144 0 return result;
145 }
146
147 globus_result_t
148 wsp_tPolicyURIs_array_serialize_wrapper(
149 xsd_QName * element,
150 void * instance,
151 globus_soap_message_handle_t message,
152 globus_xsd_element_options_t options)
153 0 {
154 0 return wsp_tPolicyURIs_array_serialize(
155 element,
156 (wsp_tPolicyURIs_array *) instance,
157 message, options);
158 }
159
160 globus_result_t
161 wsp_tPolicyURIs_array_deserialize_wrapper(
162 xsd_QName * element_qname,
163 void ** inst,
164 globus_soap_message_handle_t message,
165 globus_xsd_element_options_t options)
166 0 {
167 0 if(!*inst)
168 {
169 globus_result_t result;
170
171 0 result = wsp_tPolicyURIs_array_init(
172 (wsp_tPolicyURIs_array **)inst);
173 0 if(result != GLOBUS_SUCCESS)
174 {
175 0 return result;
176 }
177 }
178
179 0 return wsp_tPolicyURIs_array_deserialize(
180 element_qname,
181 *(wsp_tPolicyURIs_array **) inst,
182 message, options);
183 }
184
185 globus_result_t
186 wsp_tPolicyURIs_array_init_wrapper(
187 void ** arr)
188 0 {
189 0 return wsp_tPolicyURIs_array_init(
190 (wsp_tPolicyURIs_array **) arr);
191 }
192
193 void
194 wsp_tPolicyURIs_array_destroy_wrapper(
195 void * arr)
196 0 {
197 0 wsp_tPolicyURIs_array_destroy(
198 (wsp_tPolicyURIs_array *) arr);
199 }
200
201 globus_result_t
202 wsp_tPolicyURIs_array_copy_wrapper(
203 void ** dest_arr,
204 void * src_arr)
205 0 {
206 0 return wsp_tPolicyURIs_array_copy(
207 (wsp_tPolicyURIs_array **) dest_arr,
208 (wsp_tPolicyURIs_array *) src_arr);
209 }
210 globus_result_t
211 wsp_tPolicyURIs_array_init_contents_wrapper(
212 void * arr)
213 0 {
214 0 return wsp_tPolicyURIs_array_init_contents(
215 (wsp_tPolicyURIs_array *) arr);
216 }
217
218 void
219 wsp_tPolicyURIs_array_destroy_contents_wrapper(
220 void * arr)
221 0 {
222 0 wsp_tPolicyURIs_array_destroy_contents(
223 (wsp_tPolicyURIs_array *) arr);
224 }
225
226 globus_result_t
227 wsp_tPolicyURIs_array_copy_contents_wrapper(
228 void * dest_arr,
229 void * src_arr)
230 0 {
231 0 return wsp_tPolicyURIs_array_copy_contents(
232 (wsp_tPolicyURIs_array *) dest_arr,
233 (wsp_tPolicyURIs_array *) src_arr);
234 }
235
236 struct globus_xsd_type_info_s wsp_tPolicyURIs_array_info =
237 {
238 &wsp_tPolicyURIs_qname,
239 wsp_tPolicyURIs_array_serialize_wrapper,
240 wsp_tPolicyURIs_array_deserialize_wrapper,
241 wsp_tPolicyURIs_array_init_wrapper,
242 wsp_tPolicyURIs_array_destroy_wrapper,
243 wsp_tPolicyURIs_array_copy_wrapper,
244 wsp_tPolicyURIs_array_init_contents_wrapper,
245 wsp_tPolicyURIs_array_destroy_contents_wrapper,
246 wsp_tPolicyURIs_array_copy_contents_wrapper,
247 sizeof(wsp_tPolicyURIs),
248 wsp_tPolicyURIs_array_push_wrapper,
249 NULL,
250 NULL
251 };
252
253 struct globus_xsd_type_info_s wsp_tPolicyURIs_contents_info =
254 {
255 &wsp_tPolicyURIs_qname,
256 wsp_tPolicyURIs_serialize_contents_wrapper,
257 wsp_tPolicyURIs_deserialize_contents_wrapper,
258 wsp_tPolicyURIs_init_wrapper,
259 wsp_tPolicyURIs_destroy_wrapper,
260 wsp_tPolicyURIs_copy_wrapper,
261 wsp_tPolicyURIs_init_contents_wrapper,
262 wsp_tPolicyURIs_destroy_contents_wrapper,
263 wsp_tPolicyURIs_copy_contents_wrapper,
264 sizeof(wsp_tPolicyURIs),
265 NULL,
266 NULL,
267 NULL
268 };
269
270 struct globus_xsd_type_info_s wsp_tPolicyURIs_info =
271 {
272 &wsp_tPolicyURIs_qname,
273 wsp_tPolicyURIs_serialize_wrapper,
274 wsp_tPolicyURIs_deserialize_pointer_wrapper,
275 wsp_tPolicyURIs_init_wrapper,
276 wsp_tPolicyURIs_destroy_wrapper,
277 wsp_tPolicyURIs_copy_wrapper,
278 wsp_tPolicyURIs_init_contents_wrapper,
279 wsp_tPolicyURIs_destroy_contents_wrapper,
280 wsp_tPolicyURIs_copy_contents_wrapper,
281 sizeof(wsp_tPolicyURIs),
282 NULL,
283 &wsp_tPolicyURIs_contents_info,
284 &wsp_tPolicyURIs_array_info
285 };
286
287 globus_result_t
288 wsp_tPolicyURIs_init_contents(
289 wsp_tPolicyURIs * instance)
290 0 {
291 0 globus_result_t result = GLOBUS_SUCCESS;
292 GlobusFuncName(wsp_tPolicyURIs_init_contents);
293 0 GlobusSoapMessageDebugEnter();
294
295
296 0 result = xsd_anyURI_array_init_contents((xsd_anyURI_array *) instance);
297
298 0 GlobusSoapMessageDebugExit();
299 0 return result;
300 }
301
302 globus_result_t
303 wsp_tPolicyURIs_init(
304 wsp_tPolicyURIs ** object)
305 0 {
306 wsp_tPolicyURIs * instance;
307 0 globus_result_t result = GLOBUS_SUCCESS;
308 GlobusFuncName(wsp_tPolicyURIs_init);
309 0 GlobusSoapMessageDebugEnter();
310
311
312
313 0 instance = (wsp_tPolicyURIs *)
314 globus_malloc(sizeof(wsp_tPolicyURIs));
315 0 if(!instance)
316 {
317 0 result = GlobusSoapMessageErrorOutOfMemory;
318 0 GlobusSoapMessageDebugExit();
319 0 return result;
320 }
321
322 0 memset(instance, 0, sizeof(wsp_tPolicyURIs));
323
324 0 *object = instance;
325
326 0 GlobusSoapMessageDebugExit();
327 0 return result;
328 }
329
330 void
331 wsp_tPolicyURIs_destroy(
332 wsp_tPolicyURIs * instance)
333 0 {
334 GlobusFuncName(wsp_tPolicyURIs_destroy);
335 0 GlobusSoapMessageDebugEnter();
336
337 0 if(!instance)
338 {
339 0 goto exit;
340 }
341
342 0 wsp_tPolicyURIs_destroy_contents(instance);
343 0 globus_free(instance);
344
345 0 exit:
346
347 0 GlobusSoapMessageDebugExit();
348 }
349
350 void
351 wsp_tPolicyURIs_destroy_contents(
352 wsp_tPolicyURIs * instance)
353 0 {
354 GlobusFuncName(wsp_tPolicyURIs_destroy_contents);
355 0 GlobusSoapMessageDebugEnter();
356
357 0 if(instance)
358 {
359
360
361 0 xsd_anyURI_array_destroy_contents((xsd_anyURI_array *)instance);
362
363 }
364
365 0 GlobusSoapMessageDebugExit();
366 }
367
368 globus_result_t
369 wsp_tPolicyURIs_copy(
370 wsp_tPolicyURIs ** dest_obj,
371 const wsp_tPolicyURIs * src_obj)
372 0 {
373 0 globus_result_t result = GLOBUS_SUCCESS;
374 wsp_tPolicyURIs * instance;
375 GlobusFuncName(wsp_tPolicyURIs_copy);
376
377 0 GlobusSoapMessageDebugEnter();
378
379 0 instance = malloc(sizeof(wsp_tPolicyURIs));
380 0 if (instance == NULL)
381 {
382 0 GlobusSoapMessageDebugExit();
383 0 return GlobusSoapMessageErrorOutOfMemory;
384 }
385
386 0 result = wsp_tPolicyURIs_copy_contents(instance, src_obj);
387 0 if(result != GLOBUS_SUCCESS)
388 {
389 0 globus_free(instance);
390 0 GlobusSoapMessageDebugExit();
391 0 return GlobusSoapMessageErrorOutOfMemory;
392 }
393
394 0 *dest_obj = instance;
395 0 GlobusSoapMessageDebugExit();
396 0 return result;
397 }
398
399 globus_result_t
400 wsp_tPolicyURIs_copy_contents(
401 wsp_tPolicyURIs * instance,
402 const wsp_tPolicyURIs * src_obj)
403 0 {
404 0 globus_result_t result = GLOBUS_SUCCESS;
405 GlobusFuncName(wsp_tPolicyURIs_copy_contents);
406
407 0 GlobusSoapMessageDebugEnter();
408
409
410 0 result = xsd_anyURI_array_copy_contents(
411 (xsd_anyURI_array *)instance, (const xsd_anyURI_array *) src_obj);
412 goto exit;
413
414 goto exit;
415
416 0 fail_copy:
417
418
419 0 exit:
420
421 0 GlobusSoapMessageDebugExit();
422 0 return result;
423 }
424
425
426
427 globus_result_t
428 wsp_tPolicyURIs_serialize_contents(
429 xsd_QName * element_qname, /* ignored */
430 wsp_tPolicyURIs * inst,
431 globus_soap_message_handle_t message_handle,
432 globus_xsd_element_options_t options)
433 0 {
434 0 globus_result_t result = GLOBUS_SUCCESS;
435 GlobusFuncName(wsp_tPolicyURIs_serialize_contents);
436 0 GlobusSoapMessageDebugEnter();
437
438 0 result = wsp_tPolicyURIs_serialize(
439 NULL,
440 inst,
441 message_handle,
442 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
443 0 if(result != GLOBUS_SUCCESS)
444 {
445 0 result = GlobusSoapMessageErrorSerializeFailed(
446 result, NULL, element_qname);
447 goto exit;
448 }
449
450 0 exit:
451
452 0 GlobusSoapMessageDebugExit();
453 0 return result;
454 }
455
456
457
458 globus_result_t
459 wsp_tPolicyURIs_serialize(
460 xsd_QName * element_qname,
461 wsp_tPolicyURIs * instance,
462 globus_soap_message_handle_t message_handle,
463 globus_xsd_element_options_t options)
464 0 {
465 0 globus_result_t result = GLOBUS_SUCCESS;
466 xsd_QName subelement;
467 0 globus_list_t * any_attr_keys = NULL;
468 0 globus_list_t * any_attr_keys_iterator = NULL;
469 0 xsd_QName * type_attr = NULL;
470 0 char * type_value = NULL;
471 0 char * prefix = NULL;
472 int prefix_created;
473 0 int define_prefix = 0;
474 0 char * type_attr_prefix = NULL;
475
476 GlobusFuncName(wsp_tPolicyURIs_serialize);
477 0 GlobusSoapMessageDebugEnter();
478
479
480
481 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
482 {
483
484 /* serialize wsp_tPolicyURIs element */
485
486 0 result = globus_soap_message_invoke_ns_callouts(
487 message_handle,
488 element_qname,
489 GLOBUS_SOAP_MESSAGE_CALLOUT_NS_SET,
490 &options);
491 0 if(result != GLOBUS_SUCCESS)
492 {
493 0 result = GlobusSoapMessageErrorSerializeFailed(
494 result, NULL, element_qname);
495 0 goto exit;
496 }
497
498 0 result = globus_soap_message_element_ns_set(
499 message_handle,
500 element_qname->Namespace,
501 &options);
502 0 if(result != GLOBUS_SUCCESS)
503 {
504 0 result = GlobusSoapMessageErrorSerializeFailed(
505 result, NULL, element_qname);
506 0 goto exit;
507 }
508
509 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
510 !globus_soap_message_serialize_is_c14n_subset(message_handle))
511 {
512 0 result = globus_soap_message_attribute_ns_set(
513 message_handle,
514 "http://www.w3.org/2001/XMLSchema-instance",
515 &options);
516 0 if(result != GLOBUS_SUCCESS)
517 {
518 0 result = GlobusSoapMessageErrorSerializeFailed(
519 result, NULL, element_qname);
520 0 goto exit;
521 }
522
523 0 result = globus_soap_message_attribute_ns_set(
524 message_handle,
525 wsp_tPolicyURIs_qname.Namespace,
526 &options);
527 0 if(result != GLOBUS_SUCCESS)
528 {
529 0 result = GlobusSoapMessageErrorSerializeFailed(
530 result, NULL, element_qname);
531 0 goto exit;
532 }
533 }
534
535 0 result = globus_soap_message_invoke_callouts(
536 message_handle,
537 element_qname,
538 GLOBUS_SOAP_MESSAGE_CALLOUT_BEGIN);
539 0 if(result != GLOBUS_SUCCESS)
540 {
541 0 result = GlobusSoapMessageErrorSerializeFailed(
542 result, NULL, element_qname);
543 0 goto exit;
544 }
545
546 0 result = globus_soap_message_serialize_element(
547 message_handle,
548 element_qname,
549 options,
550 &wsp_tPolicyURIs_qname);
551 0 if(result != GLOBUS_SUCCESS)
552 {
553 0 result = GlobusSoapMessageErrorSerializeFailed(
554 result, NULL, element_qname);
555 0 goto exit;
556 }
557
558 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
559 !globus_soap_message_serialize_is_c14n_subset(message_handle))
560 {
561 0 xsd_QName_init(&type_attr);
562
563 0 type_attr->local = globus_libc_strdup("type");
564 0 type_attr->Namespace = globus_libc_strdup(XSI_NS);
565
566 0 if(prefix)
567 {
568 0 type_value = globus_common_create_string(
569 "%s:%s", type_attr_prefix,
570 wsp_tPolicyURIs_qname.local);
571 }
572 else
573 {
574 0 type_value = globus_libc_strdup(wsp_tPolicyURIs_qname.local);
575 }
576 }
577
578 /* serialize namespaces */
579
580 0 result = globus_soap_message_invoke_ns_callouts(
581 message_handle,
582 element_qname,
583 GLOBUS_SOAP_MESSAGE_CALLOUT_NS_ADD,
584 &options);
585 0 if(result != GLOBUS_SUCCESS)
586 {
587 0 result = GlobusSoapMessageErrorSerializeFailed(
588 result, NULL, element_qname);
589 0 goto exit;
590 }
591
592
593 0 result = globus_soap_message_element_ns_add(
594 message_handle,
595 element_qname->Namespace,
596 &options);
597 0 if(result != GLOBUS_SUCCESS)
598 {
599 0 result = GlobusSoapMessageErrorSerializeFailed(
600 result, NULL, element_qname);
601 0 goto exit;
602 }
603
604 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
605 !globus_soap_message_serialize_is_c14n_subset(message_handle))
606 {
607 0 result = globus_soap_message_attribute_ns_add(
608 message_handle,
609 "http://www.w3.org/2001/XMLSchema-instance",
610 &options);
611 0 if(result != GLOBUS_SUCCESS)
612 {
613 0 result = GlobusSoapMessageErrorSerializeFailed(
614 result, NULL, element_qname);
615 0 goto exit;
616 }
617
618 0 result = globus_soap_message_attribute_ns_add(
619 message_handle,
620 wsp_tPolicyURIs_qname.Namespace,
621 &options);
622 0 if(result != GLOBUS_SUCCESS)
623 {
624 0 result = GlobusSoapMessageErrorSerializeFailed(
625 result, NULL, element_qname);
626 0 goto exit;
627 }
628 }
629
630 /* serialize attributes */
631
632 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
633 !globus_soap_message_serialize_is_c14n_subset(message_handle))
634 {
635 0 result = globus_soap_message_serialize_QName_attribute(
636 message_handle,
637 type_attr,
638 &wsp_tPolicyURIs_qname);
639 0 if(result != GLOBUS_SUCCESS)
640 {
641 0 result = GlobusSoapMessageErrorSerializeFailed(
642 result, NULL, element_qname);
643 0 goto exit;
644 }
645 }
646
647 }
648
649 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
650 {
651 0 result = globus_soap_message_serialize_element_begin_close(
652 message_handle);
653 0 if(result != GLOBUS_SUCCESS)
654 {
655 0 result = GlobusSoapMessageErrorSerializeFailed(
656 result, NULL, element_qname);
657 0 goto exit;
658 }
659 }
660
661 /* serialize contents of type */
662
663 0 result = xsd_anyURI_list_serialize_contents(
664 (xsd_anyURI_array *)instance,
665 message_handle,
666 options);
667 0 if(result != GLOBUS_SUCCESS)
668 {
669 0 result = GlobusSoapMessageErrorSerializeFailed(
670 result, NULL, element_qname);
671 0 goto exit;
672 }
673
674 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
675 {
676 /* add end element */
677 0 result = globus_soap_message_serialize_element_end(
678 message_handle,
679 element_qname,
680 options,
681 &wsp_tPolicyURIs_qname);
682 0 if(result != GLOBUS_SUCCESS)
683 {
684 0 result = GlobusSoapMessageErrorSerializeFailed(
685 result, NULL, element_qname);
686 0 goto exit;
687 }
688
689 0 globus_soap_message_element_ns_remove(
690 message_handle,
691 element_qname->Namespace,
692 &options);
693
694 /* remove namespace/prefix mappings for these types */
695
696 0 result = globus_soap_message_invoke_ns_callouts(
697 message_handle,
698 element_qname,
699 GLOBUS_SOAP_MESSAGE_CALLOUT_NS_REMOVE,
700 &options);
701 0 if(result != GLOBUS_SUCCESS)
702 {
703 0 result = GlobusSoapMessageErrorSerializeFailed(
704 result, NULL, element_qname);
705 0 goto exit;
706 }
707
708 0 result = globus_soap_message_invoke_callouts(
709 message_handle,
710 element_qname,
711 GLOBUS_SOAP_MESSAGE_CALLOUT_END);
712 0 if(result != GLOBUS_SUCCESS)
713 {
714 0 result = GlobusSoapMessageErrorSerializeFailed(
715 result, NULL, element_qname);
716 goto exit;
717 }
718 }
719
720 0 exit:
721
722 0 if(any_attr_keys)
723 {
724 0 globus_list_free(any_attr_keys);
725 }
726
727 0 GlobusSoapMessageDebugExit();
728 0 return result;
729 }
730
731
732
733 globus_result_t
734 wsp_tPolicyURIs_deserialize_contents(
735 xsd_QName * element_qname, /* ignored */
736 wsp_tPolicyURIs * inst,
737 globus_soap_message_handle_t message_handle,
738 globus_xsd_element_options_t options)
739 0 {
740 0 globus_result_t result = GLOBUS_SUCCESS;
741 GlobusFuncName(wsp_tPolicyURIs_deserialize_contents);
742 0 GlobusSoapMessageDebugEnter();
743
744 0 result = wsp_tPolicyURIs_deserialize(
745 NULL,
746 inst,
747 message_handle,
748 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
749 0 if(result != GLOBUS_SUCCESS)
750 {
751 0 result = GlobusSoapMessageErrorDeserializeFailed(
752 result, element_qname);
753 goto exit;
754 }
755
756 0 exit:
757
758 0 GlobusSoapMessageDebugExit();
759 0 return result;
760 }
761
762
763
764 globus_result_t
765 wsp_tPolicyURIs_deserialize(
766 xsd_QName * element_qname,
767 wsp_tPolicyURIs * instance,
768 globus_soap_message_handle_t message_handle,
769 globus_xsd_element_options_t options)
770 0 {
771 0 globus_result_t result = GLOBUS_SUCCESS;
772 xsd_QName subelement;
773 GlobusFuncName(wsp_tPolicyURIs_deserialize);
774 0 GlobusSoapMessageDebugEnter();
775
776
777 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
778 {
779 0 result = globus_soap_message_deserialize_element(
780 message_handle, element_qname);
781 0 if(result != GLOBUS_SUCCESS)
782 {
783 0 result = GlobusSoapMessageErrorDeserializeFailed(
784 result, element_qname);
785 0 goto exit;
786 }
787
788 0 result = globus_soap_message_deserialize_element_begin_close(
789 message_handle);
790 0 if(result != GLOBUS_SUCCESS)
791 {
792 0 result = GlobusSoapMessageErrorDeserializeFailed(
793 result, element_qname);
794 0 goto fail_deserialize;
795 }
796 }
797
798 0 result = xsd_anyURI_list_deserialize_contents(
799 (xsd_anyURI_array *)instance,
800 message_handle,
801 options);
802 0 if(result != GLOBUS_SUCCESS)
803 {
804 0 result = GlobusSoapMessageErrorDeserializeFailed(
805 result, element_qname);
806 0 goto base_value_destroy;
807 }
808
809 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
810 {
811 0 result = globus_soap_message_deserialize_element_end(
812 message_handle,
813 element_qname);
814 0 if(result != GLOBUS_SUCCESS)
815 {
816 0 result = GlobusSoapMessageErrorDeserializeFailed(
817 result, element_qname);
818 goto fail_deserialize;
819 }
820 }
821
822 goto exit;
823
824 0 fail_deserialize:
825
826 0 xsd_anyURI_array_destroy_contents((xsd_anyURI_array *)instance);
827 0 base_value_destroy:
828
829
830 0 exit:
831
832 0 GlobusSoapMessageDebugExit();
833 0 return result;
834 }
835
836
837
838 globus_result_t
839 wsp_tPolicyURIs_deserialize_pointer(
840 xsd_QName * element_qname,
841 wsp_tPolicyURIs ** ip,
842 globus_soap_message_handle_t message_handle,
843 globus_xsd_element_options_t options)
844 0 {
845 0 wsp_tPolicyURIs * instance = NULL;
846 0 globus_result_t result = GLOBUS_SUCCESS;
847 xsd_QName subelement;
848 GlobusFuncName(wsp_tPolicyURIs_deserialize_pointer);
849 0 GlobusSoapMessageDebugEnter();
850
851 0 *ip = NULL;
852
853
854 0 result = globus_soap_message_deserialize_element(
855 message_handle, element_qname);
856 0 if(GlobusSoapMessageStatusElementNotFoundCheck(result) ||
857 GlobusSoapMessageStatusFailedElementCheck(result) ||
858 GlobusSoapMessageStatusFailedWithTextCheck(result))
859 {
860 0 *ip = NULL;
861 0 result = GLOBUS_SUCCESS;
862 0 goto exit;
863 }
864
865 0 if(result != GLOBUS_SUCCESS)
866 {
867 0 result = GlobusSoapMessageErrorDeserializeFailed(
868 result, element_qname);
869 0 goto exit;
870 }
871
872 0 if(globus_soap_message_deserialize_element_is_empty(
873 message_handle))
874 {
875 0 *ip = NULL;
876 0 goto exit;
877 }
878
879 0 result = wsp_tPolicyURIs_init(&instance);
880 0 if(result != GLOBUS_SUCCESS)
881 {
882 0 result = GlobusSoapMessageErrorDeserializeFailed(
883 result, element_qname);
884 0 goto exit;
885 }
886
887 0 result = globus_soap_message_deserialize_element_begin_close(
888 message_handle);
889 0 if(result != GLOBUS_SUCCESS)
890 {
891 0 result = GlobusSoapMessageErrorDeserializeFailed(
892 result, element_qname);
893 0 goto exit;
894 }
895
896
897
898 0 result = globus_soap_message_deserialize_element_end(
899 message_handle,
900 element_qname);
901 0 if(result != GLOBUS_SUCCESS)
902 {
903 0 result = GlobusSoapMessageErrorDeserializeFailed(
904 result, element_qname);
905 0 goto exit;
906 }
907
908 0 *ip = instance;
909
910 goto exit;
911
912 0 fail_deserialize:
913
914
915 0 exit:
916
917 0 GlobusSoapMessageDebugExit();
918 0 return result;
919 }
920
921
922
923 globus_result_t
924 wsp_tPolicyURIs_array_init_contents(
925 wsp_tPolicyURIs_array * array)
926 0 {
927 GlobusFuncName(wsp_tPolicyURIs_array_init_contents);
928 0 GlobusSoapMessageDebugEnter();
929
930 0 memset(array, 0, sizeof(wsp_tPolicyURIs_array));
931
932 0 GlobusSoapMessageDebugExit();
933 0 return GLOBUS_SUCCESS;
934 }
935
936 globus_result_t
937 wsp_tPolicyURIs_array_init(
938 wsp_tPolicyURIs_array ** arr)
939 0 {
940 wsp_tPolicyURIs_array * array;
941 globus_result_t result;
942 GlobusFuncName(wsp_tPolicyURIs_array_init);
943 0 GlobusSoapMessageDebugEnter();
944
945 0 array = (wsp_tPolicyURIs_array *)
946 globus_malloc(sizeof(wsp_tPolicyURIs_array));
947 0 if(!array)
948 {
949 0 result = GlobusSoapMessageErrorOutOfMemory;
950 0 GlobusSoapMessageDebugExit();
951 0 return result;
952 }
953
954 0 result = wsp_tPolicyURIs_array_init_contents(array);
955 0 if(result != GLOBUS_SUCCESS)
956 {
957 0 globus_free(array);
958 0 array = NULL;
959
960 }
961
962 0 *arr = array;
963
964 0 GlobusSoapMessageDebugExit();
965 0 return result;
966 }
967
968 void
969 wsp_tPolicyURIs_array_destroy_contents(
970 wsp_tPolicyURIs_array * array)
971 0 {
972 0 int i = 0;
973 GlobusFuncName(wsp_tPolicyURIs_array_destroy_contents);
974 0 GlobusSoapMessageDebugEnter();
975
976 0 for(; i < array->length; ++i)
977 {
978 0 wsp_tPolicyURIs_destroy_contents(&array->elements[i]);
979 }
980
981 0 if(array->elements)
982 {
983 0 globus_free(array->elements);
984 0 array->elements = NULL;
985 }
986 0 array->length = 0;
987
988 0 GlobusSoapMessageDebugExit();
989 }
990
991 void
992 wsp_tPolicyURIs_array_destroy(
993 wsp_tPolicyURIs_array * array)
994 0 {
995 GlobusFuncName(wsp_tPolicyURIs_array_destroy);
996 0 GlobusSoapMessageDebugEnter();
997
998 0 wsp_tPolicyURIs_array_destroy_contents(array);
999 0 globus_free(array);
1000
1001 0 GlobusSoapMessageDebugExit();
1002 }
1003
1004 globus_result_t
1005 wsp_tPolicyURIs_array_copy(
1006 wsp_tPolicyURIs_array ** dest_arr,
1007 const wsp_tPolicyURIs_array * src_arr)
1008 0 {
1009 wsp_tPolicyURIs_array * array;
1010 globus_result_t result;
1011 GlobusFuncName(wsp_tPolicyURIs_array_copy);
1012 0 GlobusSoapMessageDebugEnter();
1013
1014 0 array = (wsp_tPolicyURIs_array *) malloc(
1015 sizeof(wsp_tPolicyURIs_array));
1016 0 if(!array)
1017 {
1018 0 result = GlobusSoapMessageErrorOutOfMemory;
1019 0 GlobusSoapMessageDebugExit();
1020 0 return result;
1021 }
1022
1023 0 result = wsp_tPolicyURIs_array_copy_contents(array, src_arr);
1024 0 if(result != GLOBUS_SUCCESS)
1025 {
1026 0 globus_free(array);
1027 0 GlobusSoapMessageDebugExit();
1028 0 return result;
1029 }
1030
1031 0 *dest_arr = array;
1032
1033 0 GlobusSoapMessageDebugExit();
1034 0 return GLOBUS_SUCCESS;
1035 }
1036
1037 globus_result_t
1038 wsp_tPolicyURIs_array_copy_contents(
1039 wsp_tPolicyURIs_array * dest_arr,
1040 const wsp_tPolicyURIs_array * src_arr)
1041 0 {
1042 int i;
1043 0 globus_result_t result = GLOBUS_SUCCESS;
1044 GlobusFuncName(wsp_tPolicyURIs_array_copy_contents);
1045 0 GlobusSoapMessageDebugEnter();
1046
1047 0 dest_arr->length = src_arr->length;
1048 0 if(dest_arr->length > 0)
1049 {
1050 0 dest_arr->elements = (wsp_tPolicyURIs *) malloc(
1051 sizeof(wsp_tPolicyURIs) * dest_arr->length);
1052 0 if(!dest_arr->elements)
1053 {
1054 0 result = GlobusSoapMessageErrorOutOfMemory;
1055 0 GlobusSoapMessageDebugExit();
1056 0 return result;
1057 }
1058 }
1059 else
1060 {
1061 0 dest_arr->elements = NULL;
1062 }
1063
1064 0 for(i = 0; i < dest_arr->length; i++)
1065 {
1066 0 result = wsp_tPolicyURIs_copy_contents(
1067 &dest_arr->elements[i], &src_arr->elements[i]);
1068 0 if(result != GLOBUS_SUCCESS)
1069 {
1070 0 while(i--)
1071 {
1072 0 wsp_tPolicyURIs_destroy_contents(&dest_arr->elements[i]);
1073 }
1074
1075 0 globus_free(dest_arr->elements);
1076 0 dest_arr->elements = NULL;
1077 0 dest_arr->length = 0;
1078 0 break;
1079 }
1080 }
1081
1082 0 GlobusSoapMessageDebugExit();
1083 0 return result;
1084 }
1085
1086 wsp_tPolicyURIs *
1087 wsp_tPolicyURIs_array_push(
1088 wsp_tPolicyURIs_array * array)
1089 0 {
1090 GlobusFuncName(wsp_tPolicyURIs_array_push);
1091 0 GlobusSoapMessageDebugEnter();
1092
1093 0 array->elements = realloc(array->elements,
1094 sizeof(wsp_tPolicyURIs) *
1095 (array->length + 1));
1096 0 memset(&array->elements[array->length], 0, sizeof(wsp_tPolicyURIs));
1097 0 array->length++;
1098
1099 0 GlobusSoapMessageDebugExit();
1100 0 return (&array->elements[array->length - 1]);
1101 }
1102
1103 void *
1104 wsp_tPolicyURIs_array_push_wrapper(
1105 void * array)
1106 0 {
1107 0 return (void *) wsp_tPolicyURIs_array_push((wsp_tPolicyURIs_array *) array);
1108 }
1109
1110 globus_result_t
1111 wsp_tPolicyURIs_array_serialize(
1112 xsd_QName * element_qname,
1113 wsp_tPolicyURIs_array * array,
1114 globus_soap_message_handle_t message,
1115 globus_xsd_element_options_t options)
1116 0 {
1117 0 globus_result_t result = GLOBUS_SUCCESS;
1118 0 int i = 0;
1119 GlobusFuncName(wsp_tPolicyURIs_array_serialize);
1120 0 GlobusSoapMessageDebugEnter();
1121
1122 0 for(; i < array->length; ++i)
1123 {
1124 0 result = wsp_tPolicyURIs_serialize(
1125 element_qname,
1126 &array->elements[i],
1127 message,
1128 options);
1129 0 if(result != GLOBUS_SUCCESS)
1130 {
1131 0 goto exit;
1132 }
1133 }
1134
1135 0 exit:
1136
1137 0 GlobusSoapMessageDebugExit();
1138 0 return result;
1139 }
1140
1141 globus_result_t
1142 wsp_tPolicyURIs_array_deserialize(
1143 xsd_QName * element_qname,
1144 wsp_tPolicyURIs_array * array,
1145 globus_soap_message_handle_t message,
1146 globus_xsd_element_options_t options)
1147 0 {
1148 0 globus_result_t result = GLOBUS_SUCCESS;
1149 0 int i = 0;
1150 int pre_length;
1151 GlobusFuncName(wsp_tPolicyURIs_array_deserialize);
1152 0 GlobusSoapMessageDebugEnter();
1153
1154 0 pre_length = array->length;
1155
1156 0 for(i = 0; i < pre_length; ++i)
1157 {
1158 0 result = wsp_tPolicyURIs_deserialize(
1159 element_qname,
1160 &array->elements[i],
1161 message,
1162 options);
1163 0 if(result != GLOBUS_SUCCESS)
1164 {
1165 0 if(GlobusSoapMessageStatusFailedElementCheck(result) ||
1166 GlobusSoapMessageStatusElementNotFoundCheck(result) ||
1167 GlobusSoapMessageStatusFailedWithTextCheck(result))
1168 {
1169 0 result = GLOBUS_SUCCESS;
1170 0 break;
1171 }
1172
1173 0 result = GlobusSoapMessageErrorDeserializeFailed(
1174 result, element_qname);
1175 0 goto exit;
1176 }
1177 }
1178
1179 0 while(result == GLOBUS_SUCCESS)
1180 {
1181 wsp_tPolicyURIs next;
1182 0 memset(&next, 0, sizeof(wsp_tPolicyURIs));
1183
1184 0 result = wsp_tPolicyURIs_deserialize(
1185 element_qname,
1186 &next,
1187 message,
1188 options);
1189 0 if(result != GLOBUS_SUCCESS)
1190 {
1191 0 if(GlobusSoapMessageStatusFailedElementCheck(result) ||
1192 GlobusSoapMessageStatusElementNotFoundCheck(result) ||
1193 GlobusSoapMessageStatusFailedWithTextCheck(result))
1194 {
1195 0 result = GLOBUS_SUCCESS;
1196 0 break;
1197 }
1198
1199 0 result = GlobusSoapMessageErrorDeserializeFailed(
1200 result, element_qname);
1201 0 goto exit;
1202 }
1203
1204 0 array->elements = realloc(
1205 array->elements,
1206 (array->length + 1) * sizeof(wsp_tPolicyURIs));
1207 0 if(!array->elements)
1208 {
1209 0 result = GlobusSoapMessageErrorOutOfMemory;
1210 0 goto exit;
1211 }
1212 0 array->elements[array->length] = next;
1213 0 array->length++;
1214 0 ++i;
1215 }
1216
1217 0 exit:
1218
1219 0 if(result != GLOBUS_SUCCESS)
1220 {
1221 0 int di = 0;
1222 0 for(; di < i; ++di)
1223 {
1224 0 wsp_tPolicyURIs_destroy_contents(
1225 &array->elements[di]);
1226 0 memset(&array->elements[di], 0, sizeof(wsp_tPolicyURIs));
1227 }
1228 }
1229
1230 0 GlobusSoapMessageDebugExit();
1231 0 return result;
1232 }
1233
1234
1235 globus_result_t
1236 wsp_tPolicyURIs_serialize_attribute(
1237 xsd_QName * attr_qname,
1238 wsp_tPolicyURIs * val,
1239 globus_soap_message_handle_t handle,
1240 globus_xsd_element_options_t options)
1241 0 {
1242 0 globus_result_t result = GLOBUS_SUCCESS;
1243 GlobusFuncName(wsp_tPolicyURIs_serialize_attribute);
1244 0 GlobusSoapMessageDebugEnter();
1245
1246
1247 0 result = xsd_anyURI_list_serialize_attribute(
1248 attr_qname, (xsd_anyURI_array *)val, handle, options);
1249
1250 0 exit:
1251
1252 0 GlobusSoapMessageDebugExit();
1253 0 return result;
1254 }
1255
1256 globus_result_t
1257 wsp_tPolicyURIs_deserialize_attribute(
1258 xsd_QName * attr_qname,
1259 wsp_tPolicyURIs * instance,
1260 globus_soap_message_handle_t message,
1261 globus_xsd_element_options_t options)
1262 0 {
1263 0 globus_result_t result = GLOBUS_SUCCESS;
1264 GlobusFuncName(wsp_tPolicyURIs_deserialize_attribute);
1265 0 GlobusSoapMessageDebugEnter();
1266
1267
1268 0 result = xsd_anyURI_list_deserialize_attribute(
1269 attr_qname, (xsd_anyURI_array *)instance, message, options);
1270
1271 0 if(result != GLOBUS_SUCCESS)
1272 {
1273 0 result = GlobusSoapMessageErrorDeserializeFailed(
1274 result, attr_qname);
1275 goto exit;
1276 }
1277
1278 0 exit:
1279
1280 0 GlobusSoapMessageDebugExit();
1281 0 return result;
1282 }
1283
1284 globus_result_t
1285 wsp_tPolicyURIs_deserialize_attribute_pointer(
1286 xsd_QName * attr_qname,
1287 wsp_tPolicyURIs ** instance,
1288 globus_soap_message_handle_t message,
1289 globus_xsd_element_options_t options)
1290 0 {
1291 0 globus_result_t result = GLOBUS_SUCCESS;
1292 GlobusFuncName(wsp_tPolicyURIs_deserialize_attribute_pointer);
1293 0 GlobusSoapMessageDebugEnter();
1294
1295
1296 0 xsd_anyURI_array_init((xsd_anyURI_array **)instance);
1297 0 result = xsd_anyURI_list_deserialize_attribute(
1298 attr_qname, (xsd_anyURI_array *)(*instance), message, options);
1299
1300 0 if(result != GLOBUS_SUCCESS)
1301 {
1302 0 result = GlobusSoapMessageErrorDeserializeFailed(
1303 result, attr_qname);
1304 goto exit;
1305 }
1306
1307 0 exit:
1308
1309 0 GlobusSoapMessageDebugExit();
1310 0 return result;