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