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