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