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 "nptest_DestroyTopicTestType.h"
26
27 xsd_QName nptest_DestroyTopicTestType_choice_qname =
28 {
29     "http://www.globus.org/namespaces/2005/03/NotificationProducerTest",
30     "DestroyTopicTestType_choice"
31 };
32
33 globus_result_t
34 nptest_DestroyTopicTestType_choice_serialize_wrapper(
35     const xsd_QName *                   element_qname,
36     const void *                        instance,
37     globus_soap_message_handle_t        message_handle,
38     globus_xsd_element_options_t        options)
39 0 {
40 0     return nptest_DestroyTopicTestType_choice_serialize(
41         element_qname,
42         (nptest_DestroyTopicTestType_choice *) instance,
43         message_handle, options);
44 }
45
46 globus_result_t
47 nptest_DestroyTopicTestType_choice_deserialize_pointer_wrapper(
48     const xsd_QName *                   element_qname,
49     void **                             ip,
50     globus_soap_message_handle_t        message_handle,
51     globus_xsd_element_options_t        options)
52 0 {
53 0     return nptest_DestroyTopicTestType_choice_deserialize_pointer(
54         element_qname,
55         (nptest_DestroyTopicTestType_choice **) ip,
56         message_handle, options);
57 }
58
59 globus_result_t
60 nptest_DestroyTopicTestType_choice_init_wrapper(void **object)
61 0 {
62 0     return nptest_DestroyTopicTestType_choice_init(
63         (nptest_DestroyTopicTestType_choice **) object);
64 }
65
66 void
67 nptest_DestroyTopicTestType_choice_destroy_wrapper(
68     void *                          object)
69 0 {
70 0     nptest_DestroyTopicTestType_choice_destroy(
71         (nptest_DestroyTopicTestType_choice *) object);
72 }
73
74 globus_result_t
75 nptest_DestroyTopicTestType_choice_copy_wrapper(
76     void **                         dest_obj,
77     const void *                    src_obj)
78 0 {
79 0     return nptest_DestroyTopicTestType_choice_copy(
80         (nptest_DestroyTopicTestType_choice **) dest_obj,
81         (nptest_DestroyTopicTestType_choice *) src_obj);
82 }
83
84 globus_result_t
85 nptest_DestroyTopicTestType_choice_init_contents_wrapper(void *object)
86 0 {
87 0     return nptest_DestroyTopicTestType_choice_init_contents(
88         (nptest_DestroyTopicTestType_choice *) object);
89 }
90
91 void
92 nptest_DestroyTopicTestType_choice_destroy_contents_wrapper(
93     void *                          object)
94 0 {
95 0     nptest_DestroyTopicTestType_choice_destroy_contents(
96         (nptest_DestroyTopicTestType_choice *) object);
97 }
98
99 globus_result_t
100 nptest_DestroyTopicTestType_choice_copy_contents_wrapper(
101     void *                          dest_obj,
102     const void *                    src_obj)
103 0 {
104 0     return nptest_DestroyTopicTestType_choice_copy_contents(
105         (nptest_DestroyTopicTestType_choice *) dest_obj,
106         (nptest_DestroyTopicTestType_choice *) src_obj);
107 }
108
109 globus_result_t
110 nptest_DestroyTopicTestType_choice_serialize_contents_wrapper(
111     const xsd_QName *                   element_qname,
112     const void *                        instance,
113     globus_soap_message_handle_t        message_handle,
114     globus_xsd_element_options_t        options)
115 0 {
116 0     return nptest_DestroyTopicTestType_choice_serialize_contents(
117         element_qname,
118         (const nptest_DestroyTopicTestType_choice *) instance,
119         message_handle, options);
120 }
121
122 globus_result_t
123 nptest_DestroyTopicTestType_choice_deserialize_contents_wrapper(
124     const xsd_QName *                   element_qname,
125     void **                             instance,
126     globus_soap_message_handle_t        message_handle,
127     globus_xsd_element_options_t        options)
128 0 {
129 0     globus_result_t                     result;
130 0     GlobusFuncName(nptest_DestroyTopicTestType_choice_deserialize_contents_wrapper);
131 0     GlobusSoapMessageDebugEnter();
132
133 0     if(!*instance)
134     {
135 0         result = nptest_DestroyTopicTestType_choice_init(
136             (nptest_DestroyTopicTestType_choice **)instance);
137 0         if(result != GLOBUS_SUCCESS)
138         {
139 0             goto error;
140         }
141     }
142
143 0     result = nptest_DestroyTopicTestType_choice_deserialize_contents(
144         element_qname,
145         *(nptest_DestroyTopicTestType_choice **)instance,
146         message_handle, options);
147 error:
148 0     GlobusSoapMessageDebugExit();
149 0     return result;
150 }
151
152 globus_result_t
153 nptest_DestroyTopicTestType_choice_array_serialize_wrapper(
154     const xsd_QName *               element,
155     const void *                    instance,
156     globus_soap_message_handle_t    message,
157     globus_xsd_element_options_t    options)
158 0 {
159 0     return nptest_DestroyTopicTestType_choice_array_serialize(
160         element,
161         (nptest_DestroyTopicTestType_choice_array *) instance,
162         message, options);
163 }
164
165 globus_result_t
166 nptest_DestroyTopicTestType_choice_array_deserialize_wrapper(
167     const xsd_QName *                   element_qname,
168     void **                             inst,
169     globus_soap_message_handle_t        message,
170     globus_xsd_element_options_t        options)
171 0 {
172 0     if(!*inst)
173     {
174 0         globus_result_t                 result;
175
176 0         result = nptest_DestroyTopicTestType_choice_array_init(
177             (nptest_DestroyTopicTestType_choice_array **)inst);
178 0         if(result != GLOBUS_SUCCESS)
179         {
180 0             return result;
181         }
182     }
183
184 0     return nptest_DestroyTopicTestType_choice_array_deserialize(
185         element_qname,
186         *(nptest_DestroyTopicTestType_choice_array **) inst,
187         message, options);
188 }
189
190 globus_result_t
191 nptest_DestroyTopicTestType_choice_array_init_wrapper(
192     void **                             arr)
193 0 {
194 0     return nptest_DestroyTopicTestType_choice_array_init(
195         (nptest_DestroyTopicTestType_choice_array **) arr);
196 }
197
198 void
199 nptest_DestroyTopicTestType_choice_array_destroy_wrapper(
200     void *                              arr)
201 0 {
202 0     nptest_DestroyTopicTestType_choice_array_destroy(
203         (nptest_DestroyTopicTestType_choice_array *) arr);
204 }
205
206 globus_result_t
207 nptest_DestroyTopicTestType_choice_array_copy_wrapper(
208     void **                             dest_arr,
209     const void *                        src_arr)
210 0 {
211 0     return nptest_DestroyTopicTestType_choice_array_copy(
212         (nptest_DestroyTopicTestType_choice_array **) dest_arr,
213         (const nptest_DestroyTopicTestType_choice_array *) src_arr);
214 }
215
216 globus_result_t
217 nptest_DestroyTopicTestType_choice_array_init_contents_wrapper(
218     void *                              arr)
219 0 {
220 0     return nptest_DestroyTopicTestType_choice_array_init_contents(
221         (nptest_DestroyTopicTestType_choice_array *) arr);
222 }
223
224 void
225 nptest_DestroyTopicTestType_choice_array_destroy_contents_wrapper(
226     void *                              arr)
227 0 {
228 0     nptest_DestroyTopicTestType_choice_array_destroy_contents(
229         (nptest_DestroyTopicTestType_choice_array *) arr);
230 }
231
232 globus_result_t
233 nptest_DestroyTopicTestType_choice_array_copy_contents_wrapper(
234     void *                              dest_arr,
235     const void *                        src_arr)
236 0 {
237 0     return nptest_DestroyTopicTestType_choice_array_copy_contents(
238         (nptest_DestroyTopicTestType_choice_array *) dest_arr,
239         (const nptest_DestroyTopicTestType_choice_array *) src_arr);
240 }
241
242 struct globus_xsd_type_info_s nptest_DestroyTopicTestType_choice_array_info =
243 {
244     &nptest_DestroyTopicTestType_choice_qname,
245     nptest_DestroyTopicTestType_choice_array_serialize_wrapper,
246     nptest_DestroyTopicTestType_choice_array_deserialize_wrapper,
247     nptest_DestroyTopicTestType_choice_array_init_wrapper,
248     nptest_DestroyTopicTestType_choice_array_destroy_wrapper,
249     nptest_DestroyTopicTestType_choice_array_copy_wrapper,
250     nptest_DestroyTopicTestType_choice_array_init_contents_wrapper,
251     nptest_DestroyTopicTestType_choice_array_destroy_contents_wrapper,
252     nptest_DestroyTopicTestType_choice_array_copy_contents_wrapper,
253     sizeof(nptest_DestroyTopicTestType_choice),
254     nptest_DestroyTopicTestType_choice_array_push_wrapper,
255     NULL,
256     NULL
257 };
258
259 struct globus_xsd_type_info_s nptest_DestroyTopicTestType_choice_contents_info =
260 {
261     &nptest_DestroyTopicTestType_choice_qname,
262     nptest_DestroyTopicTestType_choice_serialize_contents_wrapper,
263     nptest_DestroyTopicTestType_choice_deserialize_contents_wrapper,
264     nptest_DestroyTopicTestType_choice_init_wrapper,
265     nptest_DestroyTopicTestType_choice_destroy_wrapper,
266     nptest_DestroyTopicTestType_choice_copy_wrapper,
267     nptest_DestroyTopicTestType_choice_init_contents_wrapper,
268     nptest_DestroyTopicTestType_choice_destroy_contents_wrapper,
269     nptest_DestroyTopicTestType_choice_copy_contents_wrapper,
270     sizeof(nptest_DestroyTopicTestType_choice),
271     NULL,
272     NULL,
273     NULL
274 };
275
276 struct globus_xsd_type_info_s nptest_DestroyTopicTestType_choice_info =
277 {
278     &nptest_DestroyTopicTestType_choice_qname,
279     nptest_DestroyTopicTestType_choice_serialize_wrapper,
280     nptest_DestroyTopicTestType_choice_deserialize_pointer_wrapper,
281     nptest_DestroyTopicTestType_choice_init_wrapper,
282     nptest_DestroyTopicTestType_choice_destroy_wrapper,
283     nptest_DestroyTopicTestType_choice_copy_wrapper,
284     nptest_DestroyTopicTestType_choice_init_contents_wrapper,
285     nptest_DestroyTopicTestType_choice_destroy_contents_wrapper,
286     nptest_DestroyTopicTestType_choice_copy_contents_wrapper,
287     sizeof(nptest_DestroyTopicTestType_choice),
288     NULL,
289     &nptest_DestroyTopicTestType_choice_contents_info,
290     &nptest_DestroyTopicTestType_choice_array_info
291 };
292
293 globus_result_t
294 nptest_DestroyTopicTestType_choice_init_contents(
295     nptest_DestroyTopicTestType_choice *                    instance)
296 0 {
297 0     globus_result_t                     result = GLOBUS_SUCCESS;
298 0     GlobusFuncName(nptest_DestroyTopicTestType_choice_init_contents);
299 0     GlobusSoapMessageDebugEnter();
300
301 0     memset(instance, 0, sizeof(nptest_DestroyTopicTestType));
302
303 0     GlobusSoapMessageDebugExit();
304 0     return result;
305 }
306
307 globus_result_t
308 nptest_DestroyTopicTestType_choice_init(
309     nptest_DestroyTopicTestType_choice ** object)
310 0 {
311 0     nptest_DestroyTopicTestType_choice * instance;
312 0     globus_result_t                     result = GLOBUS_SUCCESS;
313 0     GlobusFuncName(nptest_DestroyTopicTestType_choice_init);
314 0     GlobusSoapMessageDebugEnter();
315
316 0     instance = globus_malloc(sizeof(nptest_DestroyTopicTestType_choice));
317 0     if(!instance)
318     {
319 0         result = GlobusSoapMessageErrorOutOfMemory;
320 0         goto exit;
321     }
322
323 0     memset(instance, 0, sizeof(nptest_DestroyTopicTestType_choice));
324
325 0     *object = instance;
326
327  exit:
328 0     GlobusSoapMessageDebugExit();
329 0     return result;
330 }
331
332 void
333 nptest_DestroyTopicTestType_choice_destroy(
334     nptest_DestroyTopicTestType_choice * instance)
335 0 {
336 0     GlobusFuncName(nptest_DestroyTopicTestType_choice_destroy);
337 0     GlobusSoapMessageDebugEnter();
338
339 0     if(!instance)
340     {
341 0         goto exit;
342     }
343
344 0     nptest_DestroyTopicTestType_choice_destroy_contents(instance);
345 0     free(instance);
346
347  exit:
348
349 0     GlobusSoapMessageDebugExit();
350 }
351
352
353
354 void
355 nptest_DestroyTopicTestType_choice_destroy_contents(
356     nptest_DestroyTopicTestType_choice * instance)
357 1 {
358 1     GlobusFuncName(nptest_DestroyTopicTestType_choice_destroy_contents);
359 1     GlobusSoapMessageDebugEnter();
360
361 1     switch(instance->type)
362     {
363
364     case nptest_DestroyTopicTestType_DestroyTopicResponse:
365
366 1         xsd_anyType_destroy_contents(
367              &instance->value.DestroyTopicResponse);
368 1         break;
369
370     case nptest_DestroyTopicTestType_Fault:
371
372 0         nptest_FaultType_destroy_contents(
373              &instance->value.Fault);
374         break;
375
376         default:
377 1             break;
378     }
379
380 1     instance->type = nptest_DestroyTopicTestType_undefined;
381
382 1     GlobusSoapMessageDebugExit();
383 }
384
385 globus_result_t
386 nptest_DestroyTopicTestType_choice_copy(
387     nptest_DestroyTopicTestType_choice ** dest_obj,
388     const nptest_DestroyTopicTestType_choice * src_obj)
389 0 {
390 0     globus_result_t                     result = GLOBUS_SUCCESS;
391 0     nptest_DestroyTopicTestType_choice * instance;
392 0     GlobusFuncName(nptest_DestroyTopicTestType_choice_copy);
393
394 0     GlobusSoapMessageDebugEnter();
395
396 0     instance = malloc(sizeof(nptest_DestroyTopicTestType_choice));
397 0     if (instance == NULL)
398     {
399 0         GlobusSoapMessageDebugExit();
400 0         return GlobusSoapMessageErrorOutOfMemory;
401     }
402
403 0     result = nptest_DestroyTopicTestType_choice_copy_contents(instance, src_obj);
404 0     if(result != GLOBUS_SUCCESS)
405     {
406 0         globus_free(instance);
407 0         GlobusSoapMessageDebugExit();
408 0         return GlobusSoapMessageErrorOutOfMemory;
409     }
410
411 0     *dest_obj = instance;
412 0     GlobusSoapMessageDebugExit();
413 0     return result;
414 }
415
416
417
418 globus_result_t
419 nptest_DestroyTopicTestType_choice_copy_contents(
420     nptest_DestroyTopicTestType_choice * instance,
421     const nptest_DestroyTopicTestType_choice * src_obj)
422 1 {
423 1     xsd_QName                           subelement;
424 1     globus_result_t                     result = GLOBUS_SUCCESS;
425 1     GlobusFuncName(nptest_DestroyTopicTestType_choice_copy_contents);
426
427 1     GlobusSoapMessageDebugEnter();
428
429 1     switch(src_obj->type)
430     {
431
432     case nptest_DestroyTopicTestType_DestroyTopicResponse:
433 1         instance->type = nptest_DestroyTopicTestType_DestroyTopicResponse;
434 1         result = xsd_anyType_copy_contents(
435             &instance->value.DestroyTopicResponse,
436             &src_obj->value.DestroyTopicResponse);
437 1         if(result != GLOBUS_SUCCESS)
438         {
439 0             result = GlobusSoapMessageErrorSerializeFailed(
440                 result, NULL, &nptest_DestroyTopicTestType_choice_qname);
441 0             goto exit;
442         }
443
444 0         break;
445
446     case nptest_DestroyTopicTestType_Fault:
447 0         instance->type = nptest_DestroyTopicTestType_Fault;
448 0         result = nptest_FaultType_copy_contents(
449             &instance->value.Fault,
450             &src_obj->value.Fault);
451 0         if(result != GLOBUS_SUCCESS)
452         {
453 0             result = GlobusSoapMessageErrorSerializeFailed(
454                 result, NULL, &nptest_DestroyTopicTestType_choice_qname);
455             goto exit;
456         }
457
458 1         break;
459
460     default:
461 1         break;
462     }
463
464  exit:
465
466 1     GlobusSoapMessageDebugExit();
467 1     return result;
468 }
469
470
471
472
473
474 globus_result_t
475 nptest_DestroyTopicTestType_choice_serialize_contents(
476     const xsd_QName *                   element_qname, /* ignored */
477     const nptest_DestroyTopicTestType_choice *       instance,
478     globus_soap_message_handle_t        message_handle,
479     globus_xsd_element_options_t        options)
480 0 {
481 0     xsd_QName                           subelement;
482 0     globus_result_t                     result = GLOBUS_SUCCESS;
483 0     GlobusFuncName(nptest_DestroyTopicTestType_choice_serialize_contents);
484 0     GlobusSoapMessageDebugEnter();
485
486 0     switch(instance->type)
487     {
488
489     case nptest_DestroyTopicTestType_DestroyTopicResponse:
490
491 0         subelement.local = "DestroyTopicResponse";
492 0         subelement.Namespace = "http://www.globus.org/namespaces/2005/03/NotificationProducerTest";
493 0         result = xsd_anyType_serialize(
494             &subelement,
495             &instance->value.DestroyTopicResponse,
496             message_handle,
497             options);
498 0         if(result != GLOBUS_SUCCESS)
499         {
500 0             result = GlobusSoapMessageErrorSerializeFailed(
501                 result, NULL, &nptest_DestroyTopicTestType_choice_qname);
502 0             goto exit;
503         }
504
505 0         break;
506
507     case nptest_DestroyTopicTestType_Fault:
508
509 0         subelement.local = "Fault";
510 0         subelement.Namespace = "http://www.globus.org/namespaces/2005/03/NotificationProducerTest";
511 0         result = nptest_FaultType_serialize(
512             &subelement,
513             &instance->value.Fault,
514             message_handle,
515             options);
516 0         if(result != GLOBUS_SUCCESS)
517         {
518 0             result = GlobusSoapMessageErrorSerializeFailed(
519                 result, NULL, &nptest_DestroyTopicTestType_choice_qname);
520             goto exit;
521         }
522
523 0         break;
524
525         default:
526 0             break;
527     }
528
529  exit:
530
531 0     GlobusSoapMessageDebugExit();
532 0     return result;
533 }
534
535
536
537 globus_result_t
538 nptest_DestroyTopicTestType_choice_serialize(
539     const xsd_QName *                   element_qname,
540     const nptest_DestroyTopicTestType_choice *       instance,
541     globus_soap_message_handle_t        message_handle,
542     globus_xsd_element_options_t        options)
543 0 {
544 0     globus_result_t                     result = GLOBUS_SUCCESS;
545 0     GlobusFuncName(nptest_DestroyTopicTestType_choice_serialize);
546 0     GlobusSoapMessageDebugEnter();
547
548 0     result = nptest_DestroyTopicTestType_choice_serialize_contents(
549         element_qname,
550         instance,
551         message_handle,
552         options);
553 0     if(result != GLOBUS_SUCCESS)
554     {
555 0         result = GlobusSoapMessageErrorSerializeFailed(
556             result, NULL, &nptest_DestroyTopicTestType_choice_qname);
557         goto exit;
558     }
559
560  exit:
561 0     GlobusSoapMessageDebugExit();
562 0     return result;
563 }
564
565
566
567
568
569 globus_result_t
570 nptest_DestroyTopicTestType_choice_deserialize_contents(
571     const xsd_QName *                   element_qname, /* ignored */
572     nptest_DestroyTopicTestType_choice *             instance,
573     globus_soap_message_handle_t        message_handle,
574     globus_xsd_element_options_t        options)
575 0 {
576 0     globus_result_t                     result = GLOBUS_SUCCESS;
577 0     GlobusFuncName(nptest_DestroyTopicTestType_choice_deserialize_contents);
578 0     GlobusSoapMessageDebugEnter();
579
580 0     result = nptest_DestroyTopicTestType_choice_deserialize(
581         NULL,
582         instance,
583         message_handle,
584         options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
585 0     if(result != GLOBUS_SUCCESS)
586     {
587 0         result = GlobusSoapMessageErrorDeserializeFailed(
588             result, element_qname);
589         goto exit;
590     }
591
592  exit:
593
594 0     GlobusSoapMessageDebugExit();
595 0     return result;
596 }
597
598
599
600 globus_result_t
601 nptest_DestroyTopicTestType_choice_deserialize(
602     const xsd_QName *                   element_qname,
603     nptest_DestroyTopicTestType_choice *             instance,
604     globus_soap_message_handle_t        message_handle,
605     globus_xsd_element_options_t        options)
606 1 {
607 1     globus_result_t                     result = GLOBUS_SUCCESS;
608 1     xsd_QName                           subelement;
609 1     xsd_QName                           deselem_qname = { NULL, NULL } ;
610 1     GlobusFuncName(nptest_DestroyTopicTestType_choice_deserialize);
611 1     GlobusSoapMessageDebugEnter();
612
613 1     xsd_QName_init_contents(&deselem_qname);
614
615 1     do
616     {
617 1         result = globus_soap_message_deserialize_element_unknown(
618             message_handle, &deselem_qname);
619 1         if(result != GLOBUS_SUCCESS)
620         {
621 0             result = GlobusSoapMessageErrorDeserializeFailed(
622                 result, &nptest_DestroyTopicTestType_choice_qname);
623 0             goto exit;
624         }
625
626 1         if(globus_soap_message_deserialize_element_is_nil(message_handle))
627         {
628 0             xsd_QName_destroy_contents(&deselem_qname);
629 0             result = globus_soap_message_deserialize_element_end(
630                 message_handle,
631                 element_qname);
632 0             if(result != GLOBUS_SUCCESS)
633             {
634 0                 result = GlobusSoapMessageErrorDeserializeFailed(
635                     result, &nptest_DestroyTopicTestType_choice_qname);
636 0                 goto exit;
637             }
638         }
639         else
640         {
641 1             break;
642         }
643 1     } while(1);
644
645 1     globus_soap_message_deserialize_push_element(message_handle);
646
647 1     subelement.local = "DestroyTopicResponse";
648 1     subelement.Namespace = "http://www.globus.org/namespaces/2005/03/NotificationProducerTest";
649 1     if(xsd_QName_keyeq((void *)&subelement, (void *)&deselem_qname))
650     {
651 1         instance->type=nptest_DestroyTopicTestType_DestroyTopicResponse;
652 1         result = xsd_anyType_deserialize(
653             &subelement,
654             &instance->value.DestroyTopicResponse,
655             message_handle,
656             options);
657 1         if(result != GLOBUS_SUCCESS)
658         {
659 0             result = GlobusSoapMessageErrorDeserializeFailed(
660                 result, &nptest_DestroyTopicTestType_choice_qname);
661 0             goto DestroyTopicResponse_destroy;
662         }
663
664 0         goto exit;
665     }
666
667 0     subelement.local = "Fault";
668 0     subelement.Namespace = "http://www.globus.org/namespaces/2005/03/NotificationProducerTest";
669 0     if(xsd_QName_keyeq((void *)&subelement, (void *)&deselem_qname))
670     {
671 0         instance->type=nptest_DestroyTopicTestType_Fault;
672 0         result = nptest_FaultType_deserialize(
673             &subelement,
674             &instance->value.Fault,
675             message_handle,
676             options);
677 0         if(result != GLOBUS_SUCCESS)
678         {
679 0             result = GlobusSoapMessageErrorDeserializeFailed(
680                 result, &nptest_DestroyTopicTestType_choice_qname);
681 0             goto Fault_destroy;
682         }
683
684 0         goto exit;
685     }
686
687 0     instance->type = nptest_DestroyTopicTestType_undefined;
688 0     result = GlobusSoapMessageErrorDeserializeFailed(
689                 result, &nptest_DestroyTopicTestType_choice_qname);
690  
691     goto exit;
692
693  deserialize_failed:
694
695  Fault_destroy:
696
697  DestroyTopicResponse_destroy:
698
699  exit:
700
701 1     xsd_QName_destroy_contents(&deselem_qname);
702
703 1     if(result == GLOBUS_SUCCESS)
704     {
705 1         do
706         {
707 1             result = globus_soap_message_deserialize_element(
708                 message_handle, NULL);
709 1             if(result != GLOBUS_SUCCESS &&
710                (GlobusSoapMessageStatusElementNotFoundCheck(result) ||
711                 GlobusSoapMessageStatusFailedElementCheck(result) ||
712                 GlobusSoapMessageStatusFailedWithTextCheck(result)))
713             {
714 1                 result = GLOBUS_SUCCESS;
715 1                 break;
716             }
717
718 0             if(globus_soap_message_deserialize_element_is_nil(
719                    message_handle))
720             {
721 0                 result = globus_soap_message_deserialize_element_end(
722                     message_handle,
723                     element_qname);
724 0                 if(result != GLOBUS_SUCCESS)
725                 {
726 0                     result = GlobusSoapMessageErrorDeserializeFailed(
727                         result, &nptest_DestroyTopicTestType_choice_qname);
728                     break;
729                 }
730             }
731             else
732             {
733 1                 break;
734             }
735
736 1         } while(1);
737     }
738
739 1     xsd_QName_destroy_contents(&deselem_qname);
740
741 1     GlobusSoapMessageDebugExit();
742 1     return result;
743 }
744
745
746
747 globus_result_t
748 nptest_DestroyTopicTestType_choice_deserialize_pointer(
749     const xsd_QName *                   element_qname,
750     nptest_DestroyTopicTestType_choice **            ip,
751     globus_soap_message_handle_t        message_handle,
752     globus_xsd_element_options_t        options)
753 0 {
754 0     nptest_DestroyTopicTestType_choice * instance = NULL;
755 0     globus_result_t                     result = GLOBUS_SUCCESS;
756 0     xsd_QName                           subelement;
757 0     GlobusFuncName(nptest_DestroyTopicTestType_choice_deserialize_pointer);
758 0     GlobusSoapMessageDebugEnter();
759
760 0     *ip = NULL;
761
762 0     result = nptest_DestroyTopicTestType_choice_init(&instance);
763 0     if(result != GLOBUS_SUCCESS)
764     {
765 0         result = GlobusSoapMessageErrorDeserializeFailed(
766             result, element_qname);
767 0         goto exit;
768     }
769
770 0     result = nptest_DestroyTopicTestType_choice_deserialize(
771         element_qname,
772         instance,
773         message_handle,
774         options);
775 0     if(result != GLOBUS_SUCCESS)
776     {
777 0         goto exit;
778     }
779
780 0     *ip = instance;
781
782  exit:
783
784 0     GlobusSoapMessageDebugExit();
785 0     return result;
786 }
787
788
789
790 globus_result_t
791 nptest_DestroyTopicTestType_choice_array_init_contents(
792     nptest_DestroyTopicTestType_choice_array * array)
793 0 {
794 0     return globus_xsd_generic_array_init_contents(
795         (globus_xsd_generic_array_t *) array,
796         &nptest_DestroyTopicTestType_choice_array_info);
797 }
798 /* nptest_DestroyTopicTestType_choice_array_init_contents() */
799
800 globus_result_t
801 nptest_DestroyTopicTestType_choice_array_init(
802     nptest_DestroyTopicTestType_choice_array ** arr)
803 0 {
804 0     return globus_xsd_generic_array_init(
805         (globus_xsd_generic_array_t **) arr,
806         &nptest_DestroyTopicTestType_choice_info);
807 }
808 /* nptest_DestroyTopicTestType_choice_array_init() */
809
810 void
811 nptest_DestroyTopicTestType_choice_array_destroy_contents(
812     nptest_DestroyTopicTestType_choice_array * array)
813 0 {
814 0     globus_xsd_generic_array_destroy_contents(
815         (globus_xsd_generic_array_t *) array);
816 }
817 /* nptest_DestroyTopicTestType_choice_array_destroy_contents() */
818
819 void
820 nptest_DestroyTopicTestType_choice_array_destroy(
821     nptest_DestroyTopicTestType_choice_array * array)
822 0 {
823 0     globus_xsd_generic_array_destroy(
824         (globus_xsd_generic_array_t *) array);
825 }
826 /* nptest_DestroyTopicTestType_choice_array_destroy() */
827
828 globus_result_t
829 nptest_DestroyTopicTestType_choice_array_copy(
830     nptest_DestroyTopicTestType_choice_array ** dest_arr,
831     const nptest_DestroyTopicTestType_choice_array * src_arr)
832 0 {
833 0     return globus_xsd_generic_array_copy(
834         (globus_xsd_generic_array_t **) dest_arr,
835         (const globus_xsd_generic_array_t *) src_arr);
836 }
837 /* nptest_DestroyTopicTestType_choice_array_copy() */
838
839 globus_result_t
840 nptest_DestroyTopicTestType_choice_array_copy_contents(
841     nptest_DestroyTopicTestType_choice_array * dest_arr,
842     const nptest_DestroyTopicTestType_choice_array * src_arr)
843 0 {
844 0     return globus_xsd_generic_array_copy_contents(
845         (globus_xsd_generic_array_t *) dest_arr,
846         (const globus_xsd_generic_array_t *) src_arr);
847 }
848
849 nptest_DestroyTopicTestType_choice *
850 nptest_DestroyTopicTestType_choice_array_push(
851     nptest_DestroyTopicTestType_choice_array * array)
852 0 {
853     /* Some contents initializers don't initialize subelments but to set their
854      * values to be NULL
855      */
856 0     if (array->type_info == NULL)
857     {
858 0         array->type_info = &nptest_DestroyTopicTestType_choice_info;
859     }
860 0     return globus_xsd_generic_array_push(
861         (globus_xsd_generic_array_t *) array);
862 }
863 /* nptest_DestroyTopicTestType_choice_array_push() */
864
865 void *
866 nptest_DestroyTopicTestType_choice_array_push_wrapper(
867     void * array)
868 0 {
869 0     return (void *) nptest_DestroyTopicTestType_choice_array_push(
870         (nptest_DestroyTopicTestType_choice_array *) array);
871 }
872
873 globus_result_t
874 nptest_DestroyTopicTestType_choice_array_serialize(
875     const xsd_QName *                   element_qname,
876     const nptest_DestroyTopicTestType_choice_array * array,
877     globus_soap_message_handle_t        message,
878     globus_xsd_element_options_t        options)
879 0 {
880 0     return globus_xsd_generic_array_serialize(
881         element_qname,
882         (const globus_xsd_generic_array_t *) array,
883         message,
884         options);
885 }
886 /* nptest_DestroyTopicTestType_choice_array_serialize() */
887
888 globus_result_t
889 nptest_DestroyTopicTestType_choice_array_deserialize(
890     const xsd_QName *                   element_qname,
891     nptest_DestroyTopicTestType_choice_array *       array,
892     globus_soap_message_handle_t        message,
893     globus_xsd_element_options_t        options)
894 0 {
895     /* Some initializers set the array's contents to NULL */
896 0     if (array->type_info == NULL)
897     {
898 0         array->type_info = &nptest_DestroyTopicTestType_choice_info;
899     }
900 0     return globus_xsd_generic_array_deserialize(
901         element_qname,
902         (globus_xsd_generic_array_t *) array,
903         message,
904         options);
905 }