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 from source-type-builtin.tmpl
20 */
21
22 #include "globus_common.h"
23 #include "globus_xsd_types.h"
24 #include "globus_soap_message.h"
25 #include "globus_xsd_type_info.h"
26 #include "xsd_NMTOKENS.h"
27 #include "globus_xsd_generic.h"
28 #include "globus_xsd_generic_array.h"
29 #include "globus_i_soap_message.h"
30 #include "xsd_QName.h"
31 #include "libxml/schemasInternals.h"
32 #include "libxml/xmlschemastypes.h"
33
34 /**
35 * QName of the xsd_NMTOKENS builtin type
36 * @ingroup xsd_NMTOKENS
37 */
38 xsd_QName xsd_NMTOKENS_qname =
39 {
40 "http://www.w3.org/2001/XMLSchema",
41 "NMTOKENS"
42
43 };
44
45 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
46 static
47 globus_result_t
48 xsd_NMTOKENS_serialize_wrapper(
49 const xsd_QName * element_qname,
50 const void * instance,
51 globus_soap_message_handle_t message_handle,
52 globus_xsd_element_options_t options)
53 0 {
54 0 return xsd_NMTOKENS_serialize(
55 element_qname,
56 (xsd_NMTOKENS *) instance,
57 message_handle, options);
58 }
59 /* xsd_NMTOKENS_serialize_wrapper() */
60
61 static
62 globus_result_t
63 xsd_NMTOKENS_deserialize_pointer_wrapper(
64 const xsd_QName * element_qname,
65 void ** ip,
66 globus_soap_message_handle_t message_handle,
67 globus_xsd_element_options_t options)
68 0 {
69 0 return xsd_NMTOKENS_deserialize_pointer(
70 element_qname,
71 (xsd_NMTOKENS **) ip,
72 message_handle, options);
73 }
74 /* xsd_NMTOKENS_deserialize_pointer_wrapper() */
75
76 static
77 globus_result_t
78 xsd_NMTOKENS_init_wrapper(void **object)
79 0 {
80 0 return xsd_NMTOKENS_init(
81 (xsd_NMTOKENS **) object);
82 }
83 /* xsd_NMTOKENS_init_wrapper() */
84
85 static
86 void
87 xsd_NMTOKENS_destroy_wrapper(
88 void * object)
89 0 {
90 0 xsd_NMTOKENS_destroy(
91 (xsd_NMTOKENS *) object);
92 0 }
93 /* xsd_NMTOKENS_destroy_wrapper() */
94
95 static
96 globus_result_t
97 xsd_NMTOKENS_copy_wrapper(
98 void ** dest_obj,
99 const void * src_obj)
100 0 {
101 0 return xsd_NMTOKENS_copy(
102 (xsd_NMTOKENS **) dest_obj,
103 (const xsd_NMTOKENS *) src_obj);
104 }
105 /* xsd_NMTOKENS_copy_wrapper() */
106
107 static
108 globus_result_t
109 xsd_NMTOKENS_init_contents_wrapper(void *object)
110 0 {
111 0 return xsd_NMTOKENS_init_contents(
112 (xsd_NMTOKENS *) object);
113 }
114 /* xsd_NMTOKENS_init_contents_wrapper() */
115
116 static
117 void
118 xsd_NMTOKENS_destroy_contents_wrapper(
119 void * object)
120 0 {
121 0 xsd_NMTOKENS_destroy_contents(
122 (xsd_NMTOKENS *) object);
123 0 }
124 /* xsd_NMTOKENS_destroy_contents_wrapper() */
125
126 static
127 globus_result_t
128 xsd_NMTOKENS_copy_contents_wrapper(
129 void * dest_obj,
130 const void * src_obj)
131 0 {
132 0 return xsd_NMTOKENS_copy_contents(
133 (xsd_NMTOKENS *) dest_obj,
134 (const xsd_NMTOKENS *) src_obj);
135 }
136 /* xsd_NMTOKENS_copy_contents_wrapper() */
137
138 static
139 globus_result_t
140 xsd_NMTOKENS_serialize_contents_wrapper(
141 const xsd_QName * element_qname,
142 const void * instance,
143 globus_soap_message_handle_t message_handle,
144 globus_xsd_element_options_t options)
145 0 {
146 0 return xsd_NMTOKENS_serialize_contents(
147 element_qname,
148 (xsd_NMTOKENS *) instance,
149 message_handle, options);
150 }
151 /* xsd_NMTOKENS_serialize_contents_wrapper() */
152
153 static
154 globus_result_t
155 xsd_NMTOKENS_deserialize_contents_wrapper(
156 const xsd_QName * element_qname,
157 void ** instance,
158 globus_soap_message_handle_t message_handle,
159 globus_xsd_element_options_t options)
160 0 {
161 globus_result_t result;
162 0 globus_bool_t allocated = GLOBUS_FALSE;
163 GlobusFuncName(xsd_NMTOKENS_deserialize_contents_wrapper);
164 0 GlobusSoapMessageDebugEnter();
165
166 0 if(!*instance)
167 {
168 0 result = xsd_NMTOKENS_init(
169 (xsd_NMTOKENS **)instance);
170 0 if(result != GLOBUS_SUCCESS)
171 {
172 0 goto error;
173 }
174 0 allocated = GLOBUS_TRUE;
175 }
176
177 0 result = xsd_NMTOKENS_deserialize_contents(
178 element_qname,
179 *(xsd_NMTOKENS **)instance,
180 message_handle, options);
181 0 error:
182 0 if (result != GLOBUS_SUCCESS && allocated)
183 {
184 0 xsd_NMTOKENS_destroy(*(xsd_NMTOKENS **)instance);
185 0 *instance = NULL;
186 }
187 0 GlobusSoapMessageDebugExit();
188 0 return result;
189 }
190 /* xsd_NMTOKENS_deserialize_contents_wrapper() */
191
192 static
193 globus_result_t
194 xsd_NMTOKENS_array_serialize_wrapper(
195 const xsd_QName * element,
196 const void * instance,
197 globus_soap_message_handle_t message,
198 globus_xsd_element_options_t options)
199 0 {
200 0 return xsd_NMTOKENS_array_serialize(
201 element,
202 (xsd_NMTOKENS_array *) instance,
203 message, options);
204 }
205 /* xsd_NMTOKENS_array_serialize_wrapper() */
206
207 static
208 globus_result_t
209 xsd_NMTOKENS_array_deserialize_wrapper(
210 const xsd_QName * element_qname,
211 void ** inst,
212 globus_soap_message_handle_t message,
213 globus_xsd_element_options_t options)
214 0 {
215 0 globus_bool_t allocated = GLOBUS_FALSE;
216
217 globus_result_t result;
218 0 if(!*inst)
219 {
220 0 result = xsd_NMTOKENS_array_init(
221 (xsd_NMTOKENS_array **)inst);
222 0 if(result != GLOBUS_SUCCESS)
223 {
224 0 return result;
225 }
226 0 allocated = GLOBUS_TRUE;
227 }
228
229 0 result = xsd_NMTOKENS_array_deserialize(
230 element_qname,
231 *(xsd_NMTOKENS_array **) inst,
232 message, options);
233 0 if (result != GLOBUS_SUCCESS && allocated)
234 {
235 0 xsd_NMTOKENS_array_destroy(*(xsd_NMTOKENS_array **) inst);
236 0 *inst = NULL;
237 }
238 0 return result;
239 }
240 /* xsd_NMTOKENS_array_deserialize_wrapper() */
241
242 static
243 globus_result_t
244 xsd_NMTOKENS_array_init_wrapper(
245 void ** arr)
246 0 {
247 0 return xsd_NMTOKENS_array_init(
248 (xsd_NMTOKENS_array **) arr);
249 }
250 /* xsd_NMTOKENS_array_init_wrapper() */
251
252 static
253 void
254 xsd_NMTOKENS_array_destroy_wrapper(
255 void * arr)
256 0 {
257 0 xsd_NMTOKENS_array_destroy(
258 (xsd_NMTOKENS_array *) arr);
259 0 }
260 /* xsd_NMTOKENS_array_destroy_wrapper() */
261
262 static
263 globus_result_t
264 xsd_NMTOKENS_array_copy_wrapper(
265 void ** dest_arr,
266 const void * src_arr)
267 0 {
268 0 return xsd_NMTOKENS_array_copy(
269 (xsd_NMTOKENS_array **) dest_arr,
270 (const xsd_NMTOKENS_array *) src_arr);
271 }
272 /* xsd_NMTOKENS_array_copy_wrapper() */
273
274 static
275 globus_result_t
276 xsd_NMTOKENS_array_init_contents_wrapper(
277 void * arr)
278 0 {
279 0 return xsd_NMTOKENS_array_init_contents(
280 (xsd_NMTOKENS_array *) arr);
281 }
282 /* xsd_NMTOKENS_array_init_contents_wrapper() */
283
284 static
285 void
286 xsd_NMTOKENS_array_destroy_contents_wrapper(
287 void * arr)
288 0 {
289 0 xsd_NMTOKENS_array_destroy_contents(
290 (xsd_NMTOKENS_array *) arr);
291 0 }
292 /* xsd_NMTOKENS_array_destroy_contents_wrapper() */
293
294 static
295 globus_result_t
296 xsd_NMTOKENS_array_copy_contents_wrapper(
297 void * dest_arr,
298 const void * src_arr)
299 0 {
300 0 return xsd_NMTOKENS_array_copy_contents(
301 (xsd_NMTOKENS_array *) dest_arr,
302 (const xsd_NMTOKENS_array *) src_arr);
303 }
304 /* xsd_NMTOKENS_array_copy_contents_wrapper() */
305
306 static
307 void *
308 xsd_NMTOKENS_array_push_wrapper(
309 void * array)
310 0 {
311 0 return (void *) xsd_NMTOKENS_array_push((xsd_NMTOKENS_array *) array);
312 }
313 /* xsd_NMTOKENS_array_push_wrapper() */
314 #endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */
315
316 /**
317 * Type info for xsd_NMTOKENS
318 * @ingroup xsd_NMTOKENS
319 * This type info is used when serializing/deserializing an xsd:any
320 * which contains array values of this type.
321 */
322 struct globus_xsd_type_info_s xsd_NMTOKENS_array_info =
323 {
324 &xsd_NMTOKENS_qname,
325 xsd_NMTOKENS_array_serialize_wrapper,
326 xsd_NMTOKENS_array_deserialize_wrapper,
327 xsd_NMTOKENS_array_init_wrapper,
328 xsd_NMTOKENS_array_destroy_wrapper,
329 xsd_NMTOKENS_array_copy_wrapper,
330 xsd_NMTOKENS_array_init_contents_wrapper,
331 xsd_NMTOKENS_array_destroy_contents_wrapper,
332 xsd_NMTOKENS_array_copy_contents_wrapper,
333 sizeof(xsd_NMTOKENS),
334 xsd_NMTOKENS_array_push_wrapper,
335 NULL,
336 NULL
337 };
338
339 /**
340 * Type info for xsd_NMTOKENS
341 * @ingroup xsd_NMTOKENS
342 * This type info is used when serializing/deserializing an xsd:anyType
343 * which contains values of this type.
344 */
345 struct globus_xsd_type_info_s xsd_NMTOKENS_contents_info =
346 {
347 &xsd_NMTOKENS_qname,
348 xsd_NMTOKENS_serialize_contents_wrapper,
349 xsd_NMTOKENS_deserialize_contents_wrapper,
350 xsd_NMTOKENS_init_wrapper,
351 xsd_NMTOKENS_destroy_wrapper,
352 xsd_NMTOKENS_copy_wrapper,
353 xsd_NMTOKENS_init_contents_wrapper,
354 xsd_NMTOKENS_destroy_contents_wrapper,
355 xsd_NMTOKENS_copy_contents_wrapper,
356 sizeof(xsd_NMTOKENS),
357 NULL,
358 NULL,
359 NULL
360 };
361
362 /**
363 * Type info for xsd_NMTOKENS
364 * @ingroup xsd_NMTOKENS
365 * This type info is used when serializing/deserializing an xsd:any
366 * which contains values of this type.
367 */
368 struct globus_xsd_type_info_s xsd_NMTOKENS_info =
369 {
370 &xsd_NMTOKENS_qname,
371 xsd_NMTOKENS_serialize_wrapper,
372 xsd_NMTOKENS_deserialize_pointer_wrapper,
373 xsd_NMTOKENS_init_wrapper,
374 xsd_NMTOKENS_destroy_wrapper,
375 xsd_NMTOKENS_copy_wrapper,
376 xsd_NMTOKENS_init_contents_wrapper,
377 xsd_NMTOKENS_destroy_contents_wrapper,
378 xsd_NMTOKENS_copy_contents_wrapper,
379 sizeof(xsd_NMTOKENS),
380 NULL,
381 &xsd_NMTOKENS_contents_info,
382 &xsd_NMTOKENS_array_info
383 };
384
385
386 /**
387 * Initialize the contents of a xsd_NMTOKENS
388 * @ingroup xsd_NMTOKENS
389 *
390 * Initialize the contents of a xsd_NMTOKENS. This should be used
391 * when the structure is allocated on the stack or by a some allocator besides
392 * xsd_NMTOKENS_init(). The contents may be freed
393 * by calling xsd_NMTOKENS_destroy_contents().
394 *
395 * @param instance
396 * Pointer to an allocated but uninitialized xsd_NMTOKENS.
397 */
398 globus_result_t
399 xsd_NMTOKENS_init_contents(
400 xsd_NMTOKENS * instance)
401 0 {
402 0 globus_result_t result = GLOBUS_SUCCESS;
403 GlobusFuncName(xsd_NMTOKENS_init_contents);
404 0 GlobusSoapMessageDebugEnter();
405
406 0 memset(instance, 0, sizeof(xsd_NMTOKENS));
407
408 0 GlobusSoapMessageDebugExit();
409 0 return result;
410 }
411
412
413
414 /**
415 * Initialize a xsd_NMTOKENS
416 * @ingroup xsd_NMTOKENS
417 *
418 * Allocates a new xsd_NMTOKENS and initializes its contents. When the
419 * structure is no longer needed, it should be freed by calling
420 * xsd_NMTOKENS_destroy().
421 *
422 * @param object
423 * Pointer to set to a newly allocated instance.
424 */
425 globus_result_t
426 xsd_NMTOKENS_init(
427 xsd_NMTOKENS ** object)
428 0 {
429 0 globus_result_t result = GLOBUS_SUCCESS;
430 GlobusFuncName(xsd_NMTOKENS_init);
431 0 GlobusSoapMessageDebugEnter();
432
433 0 *object = malloc(sizeof(xsd_NMTOKENS));
434 0 if (*object == NULL)
435 {
436 0 result = GlobusSoapMessageErrorOutOfMemory;
437
438 0 goto exit;
439 }
440 0 result = xsd_NMTOKENS_init_contents(*object);
441 0 if (result != GLOBUS_SUCCESS)
442 {
443 0 free(*object);
444 0 *object = NULL;
445 }
446 0 exit:
447 0 GlobusSoapMessageDebugExit();
448 0 return result;
449 }
450 /* xsd_NMTOKENS_init() */
451
452
453
454 /**
455 * Destroy a xsd_NMTOKENS
456 * @ingroup xsd_NMTOKENS
457 *
458 * Frees a xsd_NMTOKENS.
459 *
460 * @param instance
461 * Pointer to the instance to destroy.
462 */
463 void
464 xsd_NMTOKENS_destroy(
465 xsd_NMTOKENS * instance)
466 0 {
467 GlobusFuncName(xsd_NMTOKENS_destroy);
468 0 GlobusSoapMessageDebugEnter();
469
470 0 if(!instance)
471 {
472 0 goto exit;
473 }
474
475 0 xsd_NMTOKENS_destroy_contents(instance);
476 0 free(instance);
477
478 0 exit:
479
480 0 GlobusSoapMessageDebugExit();
481 0 }
482 /* xsd_NMTOKENS_destroy() */
483
484
485
486 /**
487 * Destroy the contents of a xsd_NMTOKENS
488 * @ingroup xsd_NMTOKENS
489 *
490 * Destroy the the given xsd_NMTOKENS.
491 *
492 * @param instance
493 * Pointer to a xsd_NMTOKENS instance to destroy.
494 */
495 void
496 xsd_NMTOKENS_destroy_contents(
497 xsd_NMTOKENS * instance)
498 0 {
499 GlobusFuncName(xsd_NMTOKENS_destroy_contents);
500 0 GlobusSoapMessageDebugEnter();
501
502 0 free(*instance);
503 0 *instance = NULL;
504
505 0 GlobusSoapMessageDebugExit();
506 0 }
507 /* xsd_NMTOKENS_destroy_contents() */
508
509
510
511
512 /**
513 * Copy a xsd_NMTOKENS
514 * @ingroup xsd_NMTOKENS
515 *
516 * Perform a copy of a xsd_NMTOKENS.
517 * The @a dest_obj will be allocated, and then a copy of the contents
518 * of @a src to it. The caller is responsible for destroying @a dest_objb
519 *
520 * @param dest_obj
521 * The xsd_NMTOKENS to be initialized with a copy of the
522 * contents of the @a src_obj structure.
523 * @param src_obj
524 * Source xsd_NMTOKENS to be copied.
525 */
526 globus_result_t
527 xsd_NMTOKENS_copy(
528 xsd_NMTOKENS ** dest_obj,
529 const xsd_NMTOKENS * src_obj)
530 0 {
531 0 globus_result_t result = GLOBUS_SUCCESS;
532 xsd_NMTOKENS * instance;
533 GlobusFuncName(xsd_NMTOKENS_copy);
534
535 0 GlobusSoapMessageDebugEnter();
536
537 0 instance = malloc(sizeof(xsd_NMTOKENS));
538 0 if (instance == NULL)
539 {
540 0 GlobusSoapMessageDebugExit();
541 0 return GlobusSoapMessageErrorOutOfMemory;
542 }
543
544 0 result = xsd_NMTOKENS_copy_contents(instance, src_obj);
545 0 if(result != GLOBUS_SUCCESS)
546 {
547 0 free(instance);
548 0 instance = NULL;
549 0 result = GlobusSoapMessageErrorOutOfMemory;
550 }
551
552 0 *dest_obj = instance;
553 0 GlobusSoapMessageDebugExit();
554 0 return result;
555 }
556 /* xsd_NMTOKENS_copy() */
557
558
559
560 /**
561 * Copy the contents of a xsd_NMTOKENS
562 * @ingroup xsd_NMTOKENS
563 *
564 * Perform a copy of the contents of a xsd_NMTOKENS.
565 * The @a dest_obj value must point to a previously-allocated xsd_NMTOKENS.
566 * A copy of value @ src_obj will be made to
567 * @a dest_obj.
568 *
569 * @param dest_obj
570 * Structure to be initialized with copies of the contents of @a src_obj.
571 * @param src_obj
572 * Source xsd_NMTOKENS to be copied.
573 */
574 globus_result_t
575 xsd_NMTOKENS_copy_contents(
576 xsd_NMTOKENS * dest_obj,
577 const xsd_NMTOKENS * src_obj)
578 0 {
579 0 globus_result_t result = GLOBUS_SUCCESS;
580 GlobusFuncName(xsd_NMTOKENS_copy_contents);
581
582 0 GlobusSoapMessageDebugEnter();
583
584
585 0 *dest_obj = globus_libc_strdup(*src_obj);
586 0 if (*dest_obj == NULL)
587 {
588 0 result = GlobusSoapMessageErrorOutOfMemory;
589 }
590
591
592 0 GlobusSoapMessageDebugExit();
593 0 return result;
594 }
595 /* xsd_NMTOKENS_copy_contents() */
596
597
598 /**
599 * @fn globus_result_t xsd_NMTOKENS_serialize_contents(const xsd_QName *element_qname, const xsd_NMTOKENS * inst, globus_soap_message_handle_t message_handle, globus_xsd_element_options_t options)
600 * Serialize the contents of a xsd_NMTOKENS
601 * @ingroup xsd_NMTOKENS
602 * Serialize a xsd_NMTOKENS without an enclosing element.
603 *
604 * @param element_qname
605 * Ignored parameter.
606 * @param inst
607 * The xsd_NMTOKENS to serialize.
608 * @param message_handle
609 * The handle to serialize the contents on.
610 * @param options
611 * Serialization options.
612 */
613
614 globus_result_t
615 xsd_NMTOKENS_serialize_contents(
616 const xsd_QName * element_qname, /* ignored */
617 const xsd_NMTOKENS * inst,
618 globus_soap_message_handle_t message_handle,
619 globus_xsd_element_options_t options)
620 0 {
621 0 globus_result_t result = GLOBUS_SUCCESS;
622 GlobusFuncName(xsd_NMTOKENS_serialize_contents);
623 0 GlobusSoapMessageDebugEnter();
624
625
626 0 result = globus_soap_message_serialize_string(
627 message_handle,
628 inst);
629 0 if(result != GLOBUS_SUCCESS)
630 {
631 0 result = GlobusSoapMessageErrorSerializeFailed(
632 result, NULL, element_qname);
633 }
634
635
636 0 GlobusSoapMessageDebugExit();
637 0 return result;
638 }
639 /* xsd_NMTOKENS_serialize_contents() */
640
641
642
643 globus_result_t
644 xsd_NMTOKENS_serialize(
645 const xsd_QName * element_qname,
646 const xsd_NMTOKENS * instance,
647 globus_soap_message_handle_t message_handle,
648 globus_xsd_element_options_t options)
649 0 {
650 0 globus_result_t result = GLOBUS_SUCCESS;
651 GlobusFuncName(xsd_NMTOKENS_serialize);
652 0 GlobusSoapMessageDebugEnter();
653
654 0 result = globus_xsd_generic_serialize(
655 element_qname,
656 &xsd_NMTOKENS_info,
657 instance,
658 message_handle,
659 options);
660
661 0 return result;
662 }
663 /* xsd_NMTOKENS_serialize() */
664
665
666
667 globus_result_t
668 xsd_NMTOKENS_deserialize_contents(
669 const xsd_QName * element_qname, /* ignored */
670 xsd_NMTOKENS * inst,
671 globus_soap_message_handle_t message_handle,
672 globus_xsd_element_options_t options)
673 0 {
674 0 globus_result_t result = GLOBUS_SUCCESS;
675 GlobusFuncName(xsd_NMTOKENS_deserialize_contents);
676 0 GlobusSoapMessageDebugEnter();
677
678
679 0 if (options & GLOBUS_XSD_ELEMENT_ATTRIBUTE)
680 {
681 0 result = globus_soap_message_deserialize_string_attribute(
682 message_handle, element_qname, inst);
683 }
684 else
685 {
686 0 result = globus_soap_message_deserialize_string(
687 message_handle, inst);
688 }
689
690
691 0 GlobusSoapMessageDebugExit();
692 0 return result;
693 }
694 /* xsd_NMTOKENS_deserialize_contents() */
695
696
697
698 globus_result_t
699 xsd_NMTOKENS_deserialize(
700 const xsd_QName * element_qname,
701 xsd_NMTOKENS * instance,
702 globus_soap_message_handle_t message_handle,
703 globus_xsd_element_options_t options)
704 0 {
705 0 globus_result_t result = GLOBUS_SUCCESS;
706 GlobusFuncName(xsd_NMTOKENS_deserialize);
707 0 GlobusSoapMessageDebugEnter();
708
709 0 result = globus_xsd_generic_deserialize(
710 element_qname,
711 &xsd_NMTOKENS_info,
712 (void **) &instance,
713 message_handle,
714 options);
715
716 0 GlobusSoapMessageDebugExit();
717 0 return result;
718 }
719 /* xsd_NMTOKENS_deserialize() */
720
721 globus_result_t
722 xsd_NMTOKENS_deserialize_pointer(
723 const xsd_QName * element_qname,
724 xsd_NMTOKENS ** ip,
725 globus_soap_message_handle_t message_handle,
726 globus_xsd_element_options_t options)
727 0 {
728 0 globus_result_t result = GLOBUS_SUCCESS;
729 GlobusFuncName(xsd_NMTOKENS_deserialize_pointer);
730 0 GlobusSoapMessageDebugEnter();
731
732 0 result = globus_xsd_generic_deserialize_pointer(
733 element_qname,
734 &xsd_NMTOKENS_info,
735 (void **)ip,
736 message_handle,
737 options);
738
739 0 return result;
740 }
741 /* xsd_NMTOKENS_deserialize_pointer() */
742
743
744
745 globus_result_t
746 xsd_NMTOKENS_array_init_contents(
747 xsd_NMTOKENS_array * array)
748 0 {
749 GlobusFuncName(xsd_NMTOKENS_array_init_contents);
750 0 GlobusSoapMessageDebugEnter();
751
752 0 array->elements = NULL;
753 0 array->length = 0;
754 0 array->type_info = &xsd_NMTOKENS_info;
755
756 0 GlobusSoapMessageDebugExit();
757 0 return GLOBUS_SUCCESS;
758 }
759 /* xsd_NMTOKENS_array_init_contents() */
760
761
762
763 globus_result_t
764 xsd_NMTOKENS_array_init(
765 xsd_NMTOKENS_array ** arr)
766 0 {
767 0 return globus_xsd_generic_array_init(
768 (globus_xsd_generic_array_t **) arr,
769 &xsd_NMTOKENS_info);
770 }
771 /* xsd_NMTOKENS_array_init() */
772
773
774
775 void
776 xsd_NMTOKENS_array_destroy_contents(
777 xsd_NMTOKENS_array * array)
778 0 {
779 0 globus_xsd_generic_array_destroy_contents(
780 (globus_xsd_generic_array_t *) array);
781 0 }
782 /* xsd_NMTOKENS_array_destroy_contents() */
783
784
785
786 void
787 xsd_NMTOKENS_array_destroy(
788 xsd_NMTOKENS_array * array)
789 0 {
790
791 0 globus_xsd_generic_array_destroy(
792 (globus_xsd_generic_array_t *) array);
793 0 }
794 /* xsd_NMTOKENS_array_destroy() */
795
796
797
798
799 globus_result_t
800 xsd_NMTOKENS_array_copy(
801 xsd_NMTOKENS_array ** dest_arr,
802 const xsd_NMTOKENS_array * src_arr)
803 0 {
804 0 return globus_xsd_generic_array_copy(
805 (globus_xsd_generic_array_t **) dest_arr,
806 (const globus_xsd_generic_array_t *) src_arr);
807 }
808 /* xsd_NMTOKENS_array_copy() */
809
810
811
812 globus_result_t
813 xsd_NMTOKENS_array_copy_contents(
814 xsd_NMTOKENS_array * dest_arr,
815 const xsd_NMTOKENS_array * src_arr)
816 0 {
817 0 return globus_xsd_generic_array_copy_contents(
818 (globus_xsd_generic_array_t *) dest_arr,
819 (const globus_xsd_generic_array_t *) src_arr);
820 }
821 /* xsd_NMTOKENS_array_copy_contents() */
822
823
824
825 xsd_NMTOKENS *
826 xsd_NMTOKENS_array_push(
827 xsd_NMTOKENS_array * array)
828 0 {
829 /* Some contents initializers don't initialize subelments but to set their
830 * values to be NULL
831 */
832 0 if (array->type_info == NULL)
833 {
834 0 array->type_info = &xsd_NMTOKENS_info;
835 }
836 0 return globus_xsd_generic_array_push(
837 (globus_xsd_generic_array_t *) array);
838 }
839 /* xsd_NMTOKENS_array_push() */
840
841
842
843 globus_result_t
844 xsd_NMTOKENS_array_serialize(
845 const xsd_QName * element_qname,
846 const xsd_NMTOKENS_array * array,
847 globus_soap_message_handle_t message,
848 globus_xsd_element_options_t options)
849 0 {
850 0 return globus_xsd_generic_array_serialize(
851 element_qname,
852 (const globus_xsd_generic_array_t *) array,
853 message,
854 options);
855 }
856 /* xsd_NMTOKENS_array_serialize() */
857
858
859
860
861 globus_result_t
862 xsd_NMTOKENS_array_deserialize(
863 const xsd_QName * element_qname,
864 xsd_NMTOKENS_array * array,
865 globus_soap_message_handle_t message,
866 globus_xsd_element_options_t options)
867 0 {
868 /* Some initializers set the array contents to NULL */
869 0 if (array->type_info == NULL)
870 {
871 0 array->type_info = &xsd_NMTOKENS_info;
872 }
873
874 0 return globus_xsd_generic_array_deserialize(
875 element_qname,
876 (globus_xsd_generic_array_t *) array,
877 message,
878 options);
879 }
880 /* xsd_NMTOKENS_array_deserialize() */
881
882
883
884 globus_result_t
885 xsd_NMTOKENS_serialize_attribute(
886 const xsd_QName * attr_qname,
887 const xsd_NMTOKENS * val,
888 globus_soap_message_handle_t handle,
889 globus_xsd_element_options_t options)
890 0 {
891 0 globus_result_t result = GLOBUS_SUCCESS;
892 GlobusFuncName(xsd_NMTOKENS_serialize_attribute);
893 0 GlobusSoapMessageDebugEnter();
894
895 0 result = globus_soap_message_serialize_string_attribute(
896 handle, attr_qname, val);
897 0 if(result != GLOBUS_SUCCESS)
898 {
899 0 result = GlobusSoapMessageErrorSerializeFailed(
900 result, NULL, attr_qname);
901 0 goto exit;
902 }
903 0 exit:
904
905 0 GlobusSoapMessageDebugExit();
906 0 return result;
907 }
908 /* xsd_NMTOKENS_serialize_attribute() */
909
910
911
912
913 globus_result_t
914 xsd_NMTOKENS_deserialize_attribute(
915 const xsd_QName * attr_qname,
916 xsd_NMTOKENS * instance,
917 globus_soap_message_handle_t message,
918 globus_xsd_element_options_t options)
919 0 {
920 0 globus_result_t result = GLOBUS_SUCCESS;
921 GlobusFuncName(xsd_NMTOKENS_deserialize_attribute);
922 0 GlobusSoapMessageDebugEnter();
923
924 0 result = globus_soap_message_deserialize_string_attribute(
925 message, attr_qname, instance);
926
927 0 if(result != GLOBUS_SUCCESS)
928 {
929 0 result = GlobusSoapMessageErrorDeserializeFailed(
930 result, attr_qname);
931 }
932
933 0 GlobusSoapMessageDebugExit();
934 0 return result;
935 }
936 /* xsd_NMTOKENS_deserialize_attribute() */
937
938
939
940 globus_result_t
941 xsd_NMTOKENS_deserialize_attribute_pointer(
942 const xsd_QName * attr_qname,
943 xsd_NMTOKENS ** ip,
944 globus_soap_message_handle_t message,
945 globus_xsd_element_options_t options)
946 0 {
947 0 xsd_NMTOKENS * instance = NULL;
948 0 globus_result_t result = GLOBUS_SUCCESS;
949 GlobusFuncName(xsd_NMTOKENS_deserialize_attribute_pointer);
950 0 GlobusSoapMessageDebugEnter();
951
952
953 0 result = xsd_NMTOKENS_init(&instance);
954
955 0 if (result != GLOBUS_SUCCESS)
956 {
957 0 goto exit;
958 }
959
960 0 result = globus_soap_message_deserialize_string_attribute(
961 message,
962 attr_qname,
963 instance);
964
965 0 if(GlobusSoapMessageStatusAttributeNotFoundCheck(result))
966 {
967 0 result = GLOBUS_SUCCESS;
968 0 xsd_NMTOKENS_destroy(instance);
969 0 instance = NULL;
970 goto exit;
971 }
972
973 0 exit:
974 0 *ip = instance;
975
976 0 GlobusSoapMessageDebugExit();
977 0 return result;
978 }
979 /* xsd_NMTOKENS_deserialize_attribute_pointer() */
980
981
982
983 globus_result_t
984 xsd_NMTOKENS_list_serialize(
985 const xsd_QName * element_qname,
986 const xsd_NMTOKENS_array * inst,
987 globus_soap_message_handle_t message_handle,
988 globus_xsd_element_options_t options)
989 0 {
990 0 globus_result_t result = GLOBUS_SUCCESS;
991 GlobusFuncName(xsd_NMTOKENS_list_serialize);
992 0 GlobusSoapMessageDebugEnter();
993
994 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
995 {
996 /* add begin element */
997 0 result = globus_soap_message_element_ns_set(
998 message_handle,
999 element_qname,
1000 element_qname->Namespace,
1001 &options);
1002 0 if(result != GLOBUS_SUCCESS)
1003 {
1004 0 result = GlobusSoapMessageErrorSerializeFailed(
1005 result, NULL, element_qname);
1006 0 goto exit;
1007 }
1008
1009 0 result = globus_soap_message_serialize_element(
1010 message_handle,
1011 element_qname,
1012 options,
1013 &xsd_NMTOKENS_qname);
1014 0 if(result != GLOBUS_SUCCESS)
1015 {
1016 0 result = GlobusSoapMessageErrorSerializeFailed(
1017 result, NULL, element_qname);
1018 0 goto exit;
1019 }
1020
1021 0 if(options & GLOBUS_XSD_ELEMENT_TYPE_ATTR &&
1022 !globus_soap_message_serialize_is_c14n_subset(message_handle))
1023 {
1024 xsd_QName type_attr;
1025 0 type_attr.local = "type";
1026 0 type_attr.Namespace =
1027 "http://www.w3.org/2001/XMLSchema-instance";
1028 0 result = globus_soap_message_serialize_QName_attribute(
1029 message_handle,
1030 &type_attr,
1031 &xsd_NMTOKENS_qname);
1032 0 if(result != GLOBUS_SUCCESS)
1033 {
1034 0 result = GlobusSoapMessageErrorSerializeFailed(
1035 result, NULL, element_qname);
1036 0 goto exit;
1037 }
1038 }
1039
1040 0 result = globus_soap_message_serialize_element_begin_close(
1041 message_handle, element_qname);
1042 0 if(result != GLOBUS_SUCCESS)
1043 {
1044 0 result = GlobusSoapMessageErrorSerializeFailed(
1045 result, NULL, element_qname);
1046 0 goto exit;
1047 }
1048 }
1049
1050 0 result = xsd_NMTOKENS_list_serialize_contents(
1051 inst,
1052 message_handle,
1053 options);
1054 0 if(result != GLOBUS_SUCCESS)
1055 {
1056 0 result = GlobusSoapMessageErrorSerializeFailed(
1057 result, NULL, element_qname);
1058 0 goto exit;
1059 }
1060
1061 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
1062 {
1063 /* add end element */
1064 0 result = globus_soap_message_serialize_element_end(
1065 message_handle,
1066 element_qname,
1067 options,
1068 &xsd_NMTOKENS_qname);
1069 0 if(result != GLOBUS_SUCCESS)
1070 {
1071 0 result = GlobusSoapMessageErrorSerializeFailed(
1072 result, NULL, element_qname);
1073 0 goto exit;
1074 }
1075
1076 0 globus_soap_message_element_ns_remove(
1077 message_handle,
1078 element_qname->Namespace,
1079 &options);
1080 }
1081
1082 0 exit:
1083
1084 0 GlobusSoapMessageDebugExit();
1085 0 return result;
1086 }
1087
1088
1089
1090
1091 globus_result_t
1092 xsd_NMTOKENS_list_serialize_contents(
1093 const xsd_NMTOKENS_array * inst,
1094 globus_soap_message_handle_t message_handle,
1095 globus_xsd_element_options_t options)
1096 0 {
1097 0 globus_result_t result = GLOBUS_SUCCESS;
1098 GlobusFuncName(xsd_NMTOKENS_list_serialize_contents);
1099 0 GlobusSoapMessageDebugEnter();
1100
1101 0 result = globus_soap_message_serialize_string_list(
1102 message_handle,
1103 (xsd_string_array *) inst);
1104 0 if(result != GLOBUS_SUCCESS)
1105 {
1106 0 result = GlobusSoapMessageErrorSerializeFailed(
1107 result, "could not serialize as list", &xsd_NMTOKENS_qname);
1108 0 goto exit;
1109 }
1110
1111 0 exit:
1112
1113 0 GlobusSoapMessageDebugExit();
1114 0 return result;
1115 }
1116 /* xsd_NMTOKENS_list_serialize_contents() */
1117
1118
1119
1120 globus_result_t
1121 xsd_NMTOKENS_list_serialize_attribute(
1122 const xsd_QName * attr_qname,
1123 const xsd_NMTOKENS_array * inst,
1124 globus_soap_message_handle_t message_handle,
1125 globus_xsd_element_options_t options)
1126 0 {
1127 0 globus_result_t result = GLOBUS_SUCCESS;
1128 GlobusFuncName(xsd_NMTOKENS_list_serialize_attribute);
1129 0 GlobusSoapMessageDebugEnter();
1130
1131 0 result = globus_soap_message_serialize_string_attribute_list(
1132 message_handle,
1133 attr_qname,
1134 (xsd_string_array *) inst);
1135 0 if(result != GLOBUS_SUCCESS)
1136 {
1137 0 result = GlobusSoapMessageErrorSerializeFailed(
1138 result, NULL, attr_qname);
1139 0 goto exit;
1140 }
1141
1142 0 exit:
1143
1144 0 GlobusSoapMessageDebugExit();
1145 0 return result;
1146 }
1147 /* xsd_NMTOKENS_list_serialize_attribute() */
1148
1149
1150
1151 globus_result_t
1152 xsd_NMTOKENS_list_deserialize_attribute(
1153 const xsd_QName * attr_qname,
1154 xsd_NMTOKENS_array * ip,
1155 globus_soap_message_handle_t message_handle,
1156 globus_xsd_element_options_t options)
1157 0 {
1158 0 globus_result_t result = GLOBUS_SUCCESS;
1159 GlobusFuncName(xsd_NMTOKENS_list_deserialize_attribute);
1160 0 GlobusSoapMessageDebugEnter();
1161
1162 0 result =
1163 globus_soap_message_deserialize_string_attribute_list(
1164 message_handle, attr_qname, (xsd_string_array *) ip);
1165 0 if(result != GLOBUS_SUCCESS)
1166 {
1167 0 result = GlobusSoapMessageErrorDeserializeFailed(
1168 result, attr_qname);
1169 }
1170
1171 0 return result;
1172 }
1173 /* xsd_NMTOKENS_list_deserialize_attribute() */
1174
1175
1176
1177 globus_result_t
1178 xsd_NMTOKENS_list_deserialize(
1179 const xsd_QName * element_qname,
1180 xsd_NMTOKENS_array * ip,
1181 globus_soap_message_handle_t message_handle,
1182 globus_xsd_element_options_t options)
1183 0 {
1184 0 globus_result_t result = GLOBUS_SUCCESS;
1185 GlobusFuncName(xsd_NMTOKENS_list_deserialize);
1186 0 GlobusSoapMessageDebugEnter();
1187
1188 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
1189 {
1190 0 result = globus_soap_message_deserialize_element(
1191 message_handle, element_qname);
1192 0 if(result != GLOBUS_SUCCESS)
1193 {
1194 0 goto error_exit;
1195 }
1196
1197 0 result =
1198 globus_soap_message_deserialize_element_begin_close(
1199 message_handle);
1200 0 if(result != GLOBUS_SUCCESS)
1201 {
1202 0 goto error_exit;
1203 }
1204 }
1205
1206 0 result =
1207 xsd_NMTOKENS_list_deserialize_contents(
1208 ip, message_handle, options);
1209 0 if(result != GLOBUS_SUCCESS)
1210 {
1211 0 goto error_exit;
1212 }
1213
1214 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
1215 {
1216 0 result =
1217 globus_soap_message_deserialize_element_end(
1218 message_handle,
1219 element_qname);
1220 0 if(result != GLOBUS_SUCCESS)
1221 {
1222 0 goto error_exit;
1223 }
1224 }
1225
1226 0 goto exit;
1227
1228 0 error_exit:
1229
1230 0 if(!GlobusSoapMessageStatusCheck(result))
1231 {
1232 0 result = GlobusSoapMessageErrorDeserializeFailed(
1233 result, element_qname);
1234 }
1235
1236 0 exit:
1237
1238 0 GlobusSoapMessageDebugExit();
1239 0 return result;
1240 }
1241 /* xsd_NMTOKENS_list_deserialize() */
1242
1243
1244
1245 globus_result_t
1246 xsd_NMTOKENS_list_deserialize_contents(
1247 xsd_NMTOKENS_array * ip,
1248 globus_soap_message_handle_t message_handle,
1249 globus_xsd_element_options_t options)
1250 0 {
1251 0 globus_result_t result = GLOBUS_SUCCESS;
1252 GlobusFuncName(xsd_NMTOKENS_list_deserialize_contents);
1253 0 GlobusSoapMessageDebugEnter();
1254
1255 0 result =
1256 globus_soap_message_deserialize_string_list(
1257 message_handle, (xsd_string_array *) ip);
1258 if(result != GLOBUS_SUCCESS)
1259 {
1260 0 goto exit;
1261 }
1262
1263 0 exit:
1264
1265 0 result = GlobusSoapMessageErrorDeserializeFailed(
1266 result, &xsd_NMTOKENS_qname);
1267 0 return result;
1268 }