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