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