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_normalizedString.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_normalizedString builtin type
36 * @ingroup xsd_normalizedString
37 */
38 xsd_QName xsd_normalizedString_qname =
39 {
40 "http://www.w3.org/2001/XMLSchema",
41 "normalizedString"
42
43 };
44
45 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
46 static
47 globus_result_t
48 xsd_normalizedString_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_normalizedString_serialize(
55 element_qname,
56 (xsd_normalizedString *) instance,
57 message_handle, options);
58 }
59 /* xsd_normalizedString_serialize_wrapper() */
60
61 static
62 globus_result_t
63 xsd_normalizedString_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_normalizedString_deserialize_pointer(
70 element_qname,
71 (xsd_normalizedString **) ip,
72 message_handle, options);
73 }
74 /* xsd_normalizedString_deserialize_pointer_wrapper() */
75
76 static
77 globus_result_t
78 xsd_normalizedString_init_wrapper(void **object)
79 0 {
80 0 return xsd_normalizedString_init(
81 (xsd_normalizedString **) object);
82 }
83 /* xsd_normalizedString_init_wrapper() */
84
85 static
86 void
87 xsd_normalizedString_destroy_wrapper(
88 void * object)
89 0 {
90 0 xsd_normalizedString_destroy(
91 (xsd_normalizedString *) object);
92 0 }
93 /* xsd_normalizedString_destroy_wrapper() */
94
95 static
96 globus_result_t
97 xsd_normalizedString_copy_wrapper(
98 void ** dest_obj,
99 const void * src_obj)
100 0 {
101 0 return xsd_normalizedString_copy(
102 (xsd_normalizedString **) dest_obj,
103 (const xsd_normalizedString *) src_obj);
104 }
105 /* xsd_normalizedString_copy_wrapper() */
106
107 static
108 globus_result_t
109 xsd_normalizedString_init_contents_wrapper(void *object)
110 0 {
111 0 return xsd_normalizedString_init_contents(
112 (xsd_normalizedString *) object);
113 }
114 /* xsd_normalizedString_init_contents_wrapper() */
115
116 static
117 void
118 xsd_normalizedString_destroy_contents_wrapper(
119 void * object)
120 0 {
121 0 xsd_normalizedString_destroy_contents(
122 (xsd_normalizedString *) object);
123 0 }
124 /* xsd_normalizedString_destroy_contents_wrapper() */
125
126 static
127 globus_result_t
128 xsd_normalizedString_copy_contents_wrapper(
129 void * dest_obj,
130 const void * src_obj)
131 0 {
132 0 return xsd_normalizedString_copy_contents(
133 (xsd_normalizedString *) dest_obj,
134 (const xsd_normalizedString *) src_obj);
135 }
136 /* xsd_normalizedString_copy_contents_wrapper() */
137
138 static
139 globus_result_t
140 xsd_normalizedString_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_normalizedString_serialize_contents(
147 element_qname,
148 (xsd_normalizedString *) instance,
149 message_handle, options);
150 }
151 /* xsd_normalizedString_serialize_contents_wrapper() */
152
153 static
154 globus_result_t
155 xsd_normalizedString_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_normalizedString_deserialize_contents_wrapper);
164 0 GlobusSoapMessageDebugEnter();
165
166 0 if(!*instance)
167 {
168 0 result = xsd_normalizedString_init(
169 (xsd_normalizedString **)instance);
170 0 if(result != GLOBUS_SUCCESS)
171 {
172 0 goto error;
173 }
174 0 allocated = GLOBUS_TRUE;
175 }
176
177 0 result = xsd_normalizedString_deserialize_contents(
178 element_qname,
179 *(xsd_normalizedString **)instance,
180 message_handle, options);
181 0 error:
182 0 if (result != GLOBUS_SUCCESS && allocated)
183 {
184 0 xsd_normalizedString_destroy(*(xsd_normalizedString **)instance);
185 0 *instance = NULL;
186 }
187 0 GlobusSoapMessageDebugExit();
188 0 return result;
189 }
190 /* xsd_normalizedString_deserialize_contents_wrapper() */
191
192 static
193 globus_result_t
194 xsd_normalizedString_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_normalizedString_array_serialize(
201 element,
202 (xsd_normalizedString_array *) instance,
203 message, options);
204 }
205 /* xsd_normalizedString_array_serialize_wrapper() */
206
207 static
208 globus_result_t
209 xsd_normalizedString_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_normalizedString_array_init(
221 (xsd_normalizedString_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_normalizedString_array_deserialize(
230 element_qname,
231 *(xsd_normalizedString_array **) inst,
232 message, options);
233 0 if (result != GLOBUS_SUCCESS && allocated)
234 {
235 0 xsd_normalizedString_array_destroy(*(xsd_normalizedString_array **) inst);
236 0 *inst = NULL;
237 }
238 0 return result;
239 }
240 /* xsd_normalizedString_array_deserialize_wrapper() */
241
242 static
243 globus_result_t
244 xsd_normalizedString_array_init_wrapper(
245 void ** arr)
246 0 {
247 0 return xsd_normalizedString_array_init(
248 (xsd_normalizedString_array **) arr);
249 }
250 /* xsd_normalizedString_array_init_wrapper() */
251
252 static
253 void
254 xsd_normalizedString_array_destroy_wrapper(
255 void * arr)
256 0 {
257 0 xsd_normalizedString_array_destroy(
258 (xsd_normalizedString_array *) arr);
259 0 }
260 /* xsd_normalizedString_array_destroy_wrapper() */
261
262 static
263 globus_result_t
264 xsd_normalizedString_array_copy_wrapper(
265 void ** dest_arr,
266 const void * src_arr)
267 0 {
268 0 return xsd_normalizedString_array_copy(
269 (xsd_normalizedString_array **) dest_arr,
270 (const xsd_normalizedString_array *) src_arr);
271 }
272 /* xsd_normalizedString_array_copy_wrapper() */
273
274 static
275 globus_result_t
276 xsd_normalizedString_array_init_contents_wrapper(
277 void * arr)
278 0 {
279 0 return xsd_normalizedString_array_init_contents(
280 (xsd_normalizedString_array *) arr);
281 }
282 /* xsd_normalizedString_array_init_contents_wrapper() */
283
284 static
285 void
286 xsd_normalizedString_array_destroy_contents_wrapper(
287 void * arr)
288 0 {
289 0 xsd_normalizedString_array_destroy_contents(
290 (xsd_normalizedString_array *) arr);
291 0 }
292 /* xsd_normalizedString_array_destroy_contents_wrapper() */
293
294 static
295 globus_result_t
296 xsd_normalizedString_array_copy_contents_wrapper(
297 void * dest_arr,
298 const void * src_arr)
299 0 {
300 0 return xsd_normalizedString_array_copy_contents(
301 (xsd_normalizedString_array *) dest_arr,
302 (const xsd_normalizedString_array *) src_arr);
303 }
304 /* xsd_normalizedString_array_copy_contents_wrapper() */
305
306 static
307 void *
308 xsd_normalizedString_array_push_wrapper(
309 void * array)
310 0 {
311 0 return (void *) xsd_normalizedString_array_push((xsd_normalizedString_array *) array);
312 }
313 /* xsd_normalizedString_array_push_wrapper() */
314 #endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */
315
316 /**
317 * Type info for xsd_normalizedString
318 * @ingroup xsd_normalizedString
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_normalizedString_array_info =
323 {
324 &xsd_normalizedString_qname,
325 xsd_normalizedString_array_serialize_wrapper,
326 xsd_normalizedString_array_deserialize_wrapper,
327 xsd_normalizedString_array_init_wrapper,
328 xsd_normalizedString_array_destroy_wrapper,
329 xsd_normalizedString_array_copy_wrapper,
330 xsd_normalizedString_array_init_contents_wrapper,
331 xsd_normalizedString_array_destroy_contents_wrapper,
332 xsd_normalizedString_array_copy_contents_wrapper,
333 sizeof(xsd_normalizedString),
334 xsd_normalizedString_array_push_wrapper,
335 NULL,
336 NULL
337 };
338
339 /**
340 * Type info for xsd_normalizedString
341 * @ingroup xsd_normalizedString
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_normalizedString_contents_info =
346 {
347 &xsd_normalizedString_qname,
348 xsd_normalizedString_serialize_contents_wrapper,
349 xsd_normalizedString_deserialize_contents_wrapper,
350 xsd_normalizedString_init_wrapper,
351 xsd_normalizedString_destroy_wrapper,
352 xsd_normalizedString_copy_wrapper,
353 xsd_normalizedString_init_contents_wrapper,
354 xsd_normalizedString_destroy_contents_wrapper,
355 xsd_normalizedString_copy_contents_wrapper,
356 sizeof(xsd_normalizedString),
357 NULL,
358 NULL,
359 NULL
360 };
361
362 /**
363 * Type info for xsd_normalizedString
364 * @ingroup xsd_normalizedString
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_normalizedString_info =
369 {
370 &xsd_normalizedString_qname,
371 xsd_normalizedString_serialize_wrapper,
372 xsd_normalizedString_deserialize_pointer_wrapper,
373 xsd_normalizedString_init_wrapper,
374 xsd_normalizedString_destroy_wrapper,
375 xsd_normalizedString_copy_wrapper,
376 xsd_normalizedString_init_contents_wrapper,
377 xsd_normalizedString_destroy_contents_wrapper,
378 xsd_normalizedString_copy_contents_wrapper,
379 sizeof(xsd_normalizedString),
380 NULL,
381 &xsd_normalizedString_contents_info,
382 &xsd_normalizedString_array_info
383 };
384
385
386 /**
387 * Initialize the contents of a xsd_normalizedString
388 * @ingroup xsd_normalizedString
389 *
390 * Initialize the contents of a xsd_normalizedString. This should be used
391 * when the structure is allocated on the stack or by a some allocator besides
392 * xsd_normalizedString_init(). The contents may be freed
393 * by calling xsd_normalizedString_destroy_contents().
394 *
395 * @param instance
396 * Pointer to an allocated but uninitialized xsd_normalizedString.
397 */
398 globus_result_t
399 xsd_normalizedString_init_contents(
400 xsd_normalizedString * instance)
401 0 {
402 0 globus_result_t result = GLOBUS_SUCCESS;
403 GlobusFuncName(xsd_normalizedString_init_contents);
404 0 GlobusSoapMessageDebugEnter();
405
406 0 memset(instance, 0, sizeof(xsd_normalizedString));
407
408 0 GlobusSoapMessageDebugExit();
409 0 return result;
410 }
411
412
413
414 /**
415 * Initialize a xsd_normalizedString
416 * @ingroup xsd_normalizedString
417 *
418 * Allocates a new xsd_normalizedString and initializes its contents. When the
419 * structure is no longer needed, it should be freed by calling
420 * xsd_normalizedString_destroy().
421 *
422 * @param object
423 * Pointer to set to a newly allocated instance.
424 */
425 globus_result_t
426 xsd_normalizedString_init(
427 xsd_normalizedString ** object)
428 0 {
429 0 globus_result_t result = GLOBUS_SUCCESS;
430 GlobusFuncName(xsd_normalizedString_init);
431 0 GlobusSoapMessageDebugEnter();
432
433 0 *object = malloc(sizeof(xsd_normalizedString));
434 0 if (*object == NULL)
435 {
436 0 result = GlobusSoapMessageErrorOutOfMemory;
437
438 0 goto exit;
439 }
440 0 result = xsd_normalizedString_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_normalizedString_init() */
451
452
453
454 /**
455 * Destroy a xsd_normalizedString
456 * @ingroup xsd_normalizedString
457 *
458 * Frees a xsd_normalizedString.
459 *
460 * @param instance
461 * Pointer to the instance to destroy.
462 */
463 void
464 xsd_normalizedString_destroy(
465 xsd_normalizedString * instance)
466 0 {
467 GlobusFuncName(xsd_normalizedString_destroy);
468 0 GlobusSoapMessageDebugEnter();
469
470 0 if(!instance)
471 {
472 0 goto exit;
473 }
474
475 0 xsd_normalizedString_destroy_contents(instance);
476 0 free(instance);
477
478 0 exit:
479
480 0 GlobusSoapMessageDebugExit();
481 0 }
482 /* xsd_normalizedString_destroy() */
483
484
485
486 /**
487 * Destroy the contents of a xsd_normalizedString
488 * @ingroup xsd_normalizedString
489 *
490 * Destroy the the given xsd_normalizedString.
491 *
492 * @param instance
493 * Pointer to a xsd_normalizedString instance to destroy.
494 */
495 void
496 xsd_normalizedString_destroy_contents(
497 xsd_normalizedString * instance)
498 0 {
499 GlobusFuncName(xsd_normalizedString_destroy_contents);
500 0 GlobusSoapMessageDebugEnter();
501
502 0 free(*instance);
503 0 *instance = NULL;
504
505 0 GlobusSoapMessageDebugExit();
506 0 }
507 /* xsd_normalizedString_destroy_contents() */
508
509
510
511
512 /**
513 * Copy a xsd_normalizedString
514 * @ingroup xsd_normalizedString
515 *
516 * Perform a copy of a xsd_normalizedString.
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_normalizedString to be initialized with a copy of the
522 * contents of the @a src_obj structure.
523 * @param src_obj
524 * Source xsd_normalizedString to be copied.
525 */
526 globus_result_t
527 xsd_normalizedString_copy(
528 xsd_normalizedString ** dest_obj,
529 const xsd_normalizedString * src_obj)
530 0 {
531 0 globus_result_t result = GLOBUS_SUCCESS;
532 xsd_normalizedString * instance;
533 GlobusFuncName(xsd_normalizedString_copy);
534
535 0 GlobusSoapMessageDebugEnter();
536
537 0 instance = malloc(sizeof(xsd_normalizedString));
538 0 if (instance == NULL)
539 {
540 0 GlobusSoapMessageDebugExit();
541 0 return GlobusSoapMessageErrorOutOfMemory;
542 }
543
544 0 result = xsd_normalizedString_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_normalizedString_copy() */
557
558
559
560 /**
561 * Copy the contents of a xsd_normalizedString
562 * @ingroup xsd_normalizedString
563 *
564 * Perform a copy of the contents of a xsd_normalizedString.
565 * The @a dest_obj value must point to a previously-allocated xsd_normalizedString.
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_normalizedString to be copied.
573 */
574 globus_result_t
575 xsd_normalizedString_copy_contents(
576 xsd_normalizedString * dest_obj,
577 const xsd_normalizedString * src_obj)
578 0 {
579 0 globus_result_t result = GLOBUS_SUCCESS;
580 GlobusFuncName(xsd_normalizedString_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_normalizedString_copy_contents() */
596
597
598 /**
599 * @fn globus_result_t xsd_normalizedString_serialize_contents(const xsd_QName *element_qname, const xsd_normalizedString * inst, globus_soap_message_handle_t message_handle, globus_xsd_element_options_t options)
600 * Serialize the contents of a xsd_normalizedString
601 * @ingroup xsd_normalizedString
602 * Serialize a xsd_normalizedString without an enclosing element.
603 *
604 * @param element_qname
605 * Ignored parameter.
606 * @param inst
607 * The xsd_normalizedString 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_normalizedString_serialize_contents(
616 const xsd_QName * element_qname, /* ignored */
617 const xsd_normalizedString * 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_normalizedString_serialize_contents);
623 0 GlobusSoapMessageDebugEnter();
624
625
626 0 result = globus_soap_message_serialize_normalizedString(
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_normalizedString_serialize_contents() */
640
641
642
643 globus_result_t
644 xsd_normalizedString_serialize(
645 const xsd_QName * element_qname,
646 const xsd_normalizedString * 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_normalizedString_serialize);
652 0 GlobusSoapMessageDebugEnter();
653
654 0 result = globus_xsd_generic_serialize(
655 element_qname,
656 &xsd_normalizedString_info,
657 instance,
658 message_handle,
659 options);
660
661 0 return result;
662 }
663 /* xsd_normalizedString_serialize() */
664
665
666
667 globus_result_t
668 xsd_normalizedString_deserialize_contents(
669 const xsd_QName * element_qname, /* ignored */
670 xsd_normalizedString * 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_normalizedString_deserialize_contents);
676 0 GlobusSoapMessageDebugEnter();
677
678
679 0 if (options & GLOBUS_XSD_ELEMENT_ATTRIBUTE)
680 {
681 0 result = globus_soap_message_deserialize_normalizedString_attribute(
682 message_handle, element_qname, inst);
683 }
684 else
685 {
686 0 result = globus_soap_message_deserialize_normalizedString(
687 message_handle, inst);
688 }
689
690
691 0 GlobusSoapMessageDebugExit();
692 0 return result;
693 }
694 /* xsd_normalizedString_deserialize_contents() */
695
696
697
698 globus_result_t
699 xsd_normalizedString_deserialize(
700 const xsd_QName * element_qname,
701 xsd_normalizedString * 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_normalizedString_deserialize);
707 0 GlobusSoapMessageDebugEnter();
708
709 0 result = globus_xsd_generic_deserialize(
710 element_qname,
711 &xsd_normalizedString_info,
712 (void **) &instance,
713 message_handle,
714 options);
715
716 0 GlobusSoapMessageDebugExit();
717 0 return result;
718 }
719 /* xsd_normalizedString_deserialize() */
720
721 globus_result_t
722 xsd_normalizedString_deserialize_pointer(
723 const xsd_QName * element_qname,
724 xsd_normalizedString ** 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_normalizedString_deserialize_pointer);
730 0 GlobusSoapMessageDebugEnter();
731
732 0 result = globus_xsd_generic_deserialize_pointer(
733 element_qname,
734 &xsd_normalizedString_info,
735 (void **)ip,
736 message_handle,
737 options);
738
739 0 return result;
740 }
741 /* xsd_normalizedString_deserialize_pointer() */
742
743
744
745 globus_result_t
746 xsd_normalizedString_array_init_contents(
747 xsd_normalizedString_array * array)
748 0 {
749 GlobusFuncName(xsd_normalizedString_array_init_contents);
750 0 GlobusSoapMessageDebugEnter();
751
752 0 array->elements = NULL;
753 0 array->length = 0;
754 0 array->type_info = &xsd_normalizedString_info;
755
756 0 GlobusSoapMessageDebugExit();
757 0 return GLOBUS_SUCCESS;
758 }
759 /* xsd_normalizedString_array_init_contents() */
760
761
762
763 globus_result_t
764 xsd_normalizedString_array_init(
765 xsd_normalizedString_array ** arr)
766 0 {
767 0 return globus_xsd_generic_array_init(
768 (globus_xsd_generic_array_t **) arr,
769 &xsd_normalizedString_info);
770 }
771 /* xsd_normalizedString_array_init() */
772
773
774
775 void
776 xsd_normalizedString_array_destroy_contents(
777 xsd_normalizedString_array * array)
778 0 {
779 0 globus_xsd_generic_array_destroy_contents(
780 (globus_xsd_generic_array_t *) array);
781 0 }
782 /* xsd_normalizedString_array_destroy_contents() */
783
784
785
786 void
787 xsd_normalizedString_array_destroy(
788 xsd_normalizedString_array * array)
789 0 {
790
791 0 globus_xsd_generic_array_destroy(
792 (globus_xsd_generic_array_t *) array);
793 0 }
794 /* xsd_normalizedString_array_destroy() */
795
796
797
798
799 globus_result_t
800 xsd_normalizedString_array_copy(
801 xsd_normalizedString_array ** dest_arr,
802 const xsd_normalizedString_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_normalizedString_array_copy() */
809
810
811
812 globus_result_t
813 xsd_normalizedString_array_copy_contents(
814 xsd_normalizedString_array * dest_arr,
815 const xsd_normalizedString_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_normalizedString_array_copy_contents() */
822
823
824
825 xsd_normalizedString *
826 xsd_normalizedString_array_push(
827 xsd_normalizedString_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_normalizedString_info;
835 }
836 0 return globus_xsd_generic_array_push(
837 (globus_xsd_generic_array_t *) array);
838 }
839 /* xsd_normalizedString_array_push() */
840
841
842
843 globus_result_t
844 xsd_normalizedString_array_serialize(
845 const xsd_QName * element_qname,
846 const xsd_normalizedString_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_normalizedString_array_serialize() */
857
858
859
860
861 globus_result_t
862 xsd_normalizedString_array_deserialize(
863 const xsd_QName * element_qname,
864 xsd_normalizedString_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_normalizedString_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_normalizedString_array_deserialize() */
881
882
883
884 globus_result_t
885 xsd_normalizedString_serialize_attribute(
886 const xsd_QName * attr_qname,
887 const xsd_normalizedString * 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_normalizedString_serialize_attribute);
893 0 GlobusSoapMessageDebugEnter();
894
895 0 result = globus_soap_message_serialize_normalizedString_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_normalizedString_serialize_attribute() */
909
910
911
912
913 globus_result_t
914 xsd_normalizedString_deserialize_attribute(
915 const xsd_QName * attr_qname,
916 xsd_normalizedString * 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_normalizedString_deserialize_attribute);
922 0 GlobusSoapMessageDebugEnter();
923
924 0 result = globus_soap_message_deserialize_normalizedString_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_normalizedString_deserialize_attribute() */
937
938
939
940 globus_result_t
941 xsd_normalizedString_deserialize_attribute_pointer(
942 const xsd_QName * attr_qname,
943 xsd_normalizedString ** ip,
944 globus_soap_message_handle_t message,
945 globus_xsd_element_options_t options)
946 0 {
947 0 xsd_normalizedString * instance = NULL;
948 0 globus_result_t result = GLOBUS_SUCCESS;
949 GlobusFuncName(xsd_normalizedString_deserialize_attribute_pointer);
950 0 GlobusSoapMessageDebugEnter();
951
952
953 0 result = xsd_normalizedString_init(&instance);
954
955 0 if (result != GLOBUS_SUCCESS)
956 {
957 0 goto exit;
958 }
959
960 0 result = globus_soap_message_deserialize_normalizedString_attribute(
961 message,
962 attr_qname,
963 instance);
964
965 0 if(GlobusSoapMessageStatusAttributeNotFoundCheck(result))
966 {
967 0 result = GLOBUS_SUCCESS;
968 0 xsd_normalizedString_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_normalizedString_deserialize_attribute_pointer() */
980
981
982
983 globus_result_t
984 xsd_normalizedString_list_serialize(
985 const xsd_QName * element_qname,
986 const xsd_normalizedString_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_normalizedString_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_normalizedString_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_normalizedString_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_normalizedString_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_normalizedString_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_normalizedString_list_serialize_contents(
1093 const xsd_normalizedString_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_normalizedString_list_serialize_contents);
1099 0 GlobusSoapMessageDebugEnter();
1100
1101 0 result = globus_soap_message_serialize_normalizedString_list(
1102 message_handle,
1103 inst);
1104 0 if(result != GLOBUS_SUCCESS)
1105 {
1106 0 result = GlobusSoapMessageErrorSerializeFailed(
1107 result, "could not serialize as list", &xsd_normalizedString_qname);
1108 0 goto exit;
1109 }
1110
1111 0 exit:
1112
1113 0 GlobusSoapMessageDebugExit();
1114 0 return result;
1115 }
1116 /* xsd_normalizedString_list_serialize_contents() */
1117
1118
1119
1120 globus_result_t
1121 xsd_normalizedString_list_serialize_attribute(
1122 const xsd_QName * attr_qname,
1123 const xsd_normalizedString_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_normalizedString_list_serialize_attribute);
1129 0 GlobusSoapMessageDebugEnter();
1130
1131 0 result = globus_soap_message_serialize_normalizedString_attribute_list(
1132 message_handle,
1133 attr_qname,
1134 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_normalizedString_list_serialize_attribute() */
1148
1149
1150
1151 globus_result_t
1152 xsd_normalizedString_list_deserialize_attribute(
1153 const xsd_QName * attr_qname,
1154 xsd_normalizedString_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_normalizedString_list_deserialize_attribute);
1160 0 GlobusSoapMessageDebugEnter();
1161
1162 0 result =
1163 globus_soap_message_deserialize_normalizedString_attribute_list(
1164 message_handle, attr_qname, 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_normalizedString_list_deserialize_attribute() */
1174
1175
1176
1177 globus_result_t
1178 xsd_normalizedString_list_deserialize(
1179 const xsd_QName * element_qname,
1180 xsd_normalizedString_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_normalizedString_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_normalizedString_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_normalizedString_list_deserialize() */
1242
1243
1244
1245 globus_result_t
1246 xsd_normalizedString_list_deserialize_contents(
1247 xsd_normalizedString_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_normalizedString_list_deserialize_contents);
1253 0 GlobusSoapMessageDebugEnter();
1254
1255 0 result =
1256 globus_soap_message_deserialize_normalizedString_list(
1257 message_handle, ip);
1258 if(result != GLOBUS_SUCCESS)
1259 {
1260 0 goto exit;
1261 }
1262
1263 0 exit:
1264
1265 0 result = GlobusSoapMessageErrorDeserializeFailed(
1266 result, &xsd_normalizedString_qname);
1267 0 return result;
1268 }
1269 /* xsd_normalizedString_list_deserialize_contents() */
1270
1271
1272
1273 globus_result_t
1274 globus_soap_message_serialize_normalizedString(
1275 globus_soap_message_handle_t handle,
1276 const xsd_normalizedString * val)
1277 96621 {
1278 96621 int res = 0;
1279 96621 globus_result_t result = GLOBUS_SUCCESS;
1280 GlobusFuncName(globus_soap_message_serialize_normalizedString);
1281 96621 GlobusSoapMessageDebugEnter();
1282
1283
1284 96621 res = xmlTextWriterWriteString(
1285 handle->writer,
1286 (xmlChar *) *val);
1287 96621 if(res < 0)
1288 {
1289 0 xmlErrorPtr err = xmlGetLastError();
1290 0 GlobusSoapMessageErrorSerializeFailed(
1291 GLOBUS_SUCCESS, (err ? err->message : ""),
1292 &xsd_normalizedString_qname);
1293 0 goto exit;
1294 }
1295
1296
1297 96621 exit:
1298
1299 96621 GlobusSoapMessageDebugExit();
1300 96621 return result;
1301 }
1302 /* globus_soap_message_serialize_normalizedString() */
1303
1304 globus_result_t
1305 globus_soap_message_deserialize_normalizedString(
1306 globus_soap_message_handle_t handle,
1307 xsd_normalizedString * val)
1308 97525 {
1309 97525 globus_result_t result = GLOBUS_SUCCESS;
1310 const xmlChar * content;
1311 const xmlChar * content_save;
1312 GlobusFuncName(globus_soap_message_deserialize_normalizedString);
1313 97525 GlobusSoapMessageDebugEnter();
1314
1315 97525 result = globus_i_soap_message_deserialize_next_content(handle);
1316 97525 if(result != GLOBUS_SUCCESS)
1317 {
1318 0 result = GlobusSoapMessageErrorDeserializeFailed(
1319 result, &xsd_normalizedString_qname);
1320 0 goto exit;
1321 }
1322
1323 97525 content = xmlTextReaderConstValue(handle->reader);
1324 97525 if (!content)
1325 {
1326 0 result = GlobusSoapMessageErrorDeserializeFailed(
1327 GLOBUS_SUCCESS, &xsd_normalizedString_qname);
1328 }
1329 97525 content_save = content;
1330 {
1331
1332 97525 *val = globus_soap_message_normalize_string((char *) content);
1333
1334 }
1335
1336 97525 exit:
1337 97525 GlobusSoapMessageDebugExit();
1338 97525 return result;
1339 }
1340 /* globus_soap_message_deserialize_normalizedString() */
1341
1342 globus_result_t
1343 globus_soap_message_serialize_normalizedString_list(
1344 globus_soap_message_handle_t handle,
1345 const xsd_normalizedString_array * inst)
1346 0 {
1347 0 int i = 0;
1348 0 globus_result_t result = GLOBUS_SUCCESS;
1349 int res;
1350 GlobusFuncName(globus_soap_message_serialize_string_list);
1351 0 GlobusSoapMessageDebugEnter();
1352
1353 0 for(i = 0; i < inst->length; ++i)
1354 {
1355 0 result = globus_soap_message_serialize_normalizedString(
1356 handle,
1357 &inst->elements[i]);
1358
1359 0 if (result != GLOBUS_SUCCESS)
1360 {
1361 0 goto exit;
1362 }
1363
1364 0 if (i != (inst->length-1))
1365 {
1366 0 res = xmlTextWriterWriteString(handle->writer, (xmlChar *) " ");
1367 0 if(res < 0)
1368 {
1369 0 xmlErrorPtr err = xmlGetLastError();
1370 0 result = GlobusSoapMessageErrorSerializeFailed(
1371 (handle->result ? handle->result : GLOBUS_SUCCESS),
1372 (err ? err->message : ""),
1373 &xsd_normalizedString_qname);
1374 0 goto exit;
1375 }
1376 }
1377 }
1378
1379 0 exit:
1380
1381 0 GlobusSoapMessageDebugExit();
1382 0 return result;
1383 }
1384 /* globus_soap_message_serialize_normalizedString_list() */
1385
1386 globus_result_t
1387 globus_soap_message_deserialize_normalizedString_list(
1388 globus_soap_message_handle_t handle,
1389 xsd_normalizedString_array * array_val)
1390 0 {
1391 0 globus_result_t result = GLOBUS_SUCCESS;
1392 0 xmlChar * content_value = NULL;
1393 0 xmlChar * content = NULL;
1394 char * saveptr;
1395 xsd_normalizedString * val;
1396 GlobusFuncName(globus_soap_message_deserialize_normalizedString_list);
1397 0 GlobusSoapMessageDebugEnter();
1398
1399 0 result = globus_i_soap_message_deserialize_next_content(handle);
1400 0 if(result != GLOBUS_SUCCESS)
1401 {
1402 0 result = GlobusSoapMessageErrorDeserializeFailed(
1403 result, &xsd_normalizedString_qname);
1404 0 goto exit;
1405 }
1406
1407 0 content_value = xmlTextReaderValue(handle->reader);
1408 0 if (!content_value)
1409 {
1410 0 result = GlobusSoapMessageErrorDeserializeFailed(
1411 GLOBUS_SUCCESS, &xsd_normalizedString_qname);
1412 0 goto exit;
1413 }
1414
1415 0 for (content = (xmlChar *) strtok_r((char *) content_value, " \t\r\n", &saveptr);
1416 0 content != NULL;
1417 0 content = (xmlChar *) strtok_r(NULL, " \t\r\n", &saveptr))
1418 {
1419 0 val = xsd_normalizedString_array_push(array_val);
1420 {
1421
1422 0 *val = globus_soap_message_normalize_string((char *) content);
1423
1424 }
1425 }
1426
1427 0 exit:
1428 0 if (content_value != NULL)
1429 {
1430 0 xmlFree(content_value);
1431 }
1432 0 if (result != GLOBUS_SUCCESS)
1433 {
1434 0 xsd_normalizedString_array_destroy_contents(array_val);
1435 }
1436 0 GlobusSoapMessageDebugExit();
1437 0 return result;
1438 }
1439 /* globus_soap_message_deserialize_normalizedString_list() */
1440
1441 globus_result_t
1442 globus_soap_message_serialize_normalizedString_attribute(
1443 globus_soap_message_handle_t handle,
1444 const xsd_QName * attr_name,
1445 const xsd_normalizedString * val)
1446 690 {
1447 690 globus_result_t result = GLOBUS_SUCCESS;
1448 GlobusFuncName(globus_soap_message_serialize_normalizedString_attribute);
1449 690 GlobusSoapMessageDebugEnter();
1450
1451 690 if (val == NULL)
1452 {
1453 0 result = GlobusSoapMessageErrorNullParam;
1454
1455 0 goto exit;
1456 }
1457
1458 690 result = globus_soap_message_serialize_attribute(
1459 handle,
1460 attr_name);
1461 690 if (result != GLOBUS_SUCCESS)
1462 {
1463 0 goto exit;
1464 }
1465
1466 690 result = globus_soap_message_serialize_normalizedString(
1467 handle,
1468 val);
1469 690 if(result != GLOBUS_SUCCESS)
1470 {
1471 0 goto exit;
1472 }
1473
1474 690 result = globus_soap_message_serialize_attribute_end(
1475 handle,
1476 attr_name);
1477
1478 690 exit:
1479
1480 690 GlobusSoapMessageDebugExit();
1481 690 return result;
1482 }
1483 /* globus_soap_message_serialize_normalizedString_attribute() */
1484
1485 globus_result_t
1486 globus_soap_message_deserialize_normalizedString_attribute(
1487 globus_soap_message_handle_t handle,
1488 const xsd_QName * attr_qname,
1489 xsd_normalizedString * val)
1490 22218 {
1491 22218 globus_result_t result = GLOBUS_SUCCESS;
1492 22218 xmlChar * content = NULL;
1493 22218 xmlChar * content_save = NULL;
1494 GlobusFuncName(globus_soap_message_deserialize_normalizedString_attribute);
1495 22218 GlobusSoapMessageDebugEnter();
1496
1497 22218 if (val == NULL || attr_qname == NULL || attr_qname->local == NULL)
1498 {
1499 0 result = GlobusSoapMessageErrorNullParam;
1500
1501 0 goto exit;
1502 }
1503
1504 22218 result = globus_soap_message_deserialize_attribute(
1505 handle,
1506 attr_qname,
1507 &content);
1508 22218 if (result != GLOBUS_SUCCESS)
1509 {
1510 19206 goto exit;
1511 }
1512 3012 content_save = content;
1513
1514 {
1515
1516 3012 *val = globus_soap_message_normalize_string((char *) content);
1517
1518 }
1519 22218 exit:
1520 22218 if (content_save != NULL)
1521 {
1522 3012 xmlFree(content_save);
1523 }
1524
1525 22218 GlobusSoapMessageDebugExit();
1526 22218 return result;
1527 }
1528 /* globus_soap_message_deserialize_normalizedString_attribute() */
1529
1530 globus_result_t
1531 globus_soap_message_serialize_normalizedString_attribute_list(
1532 globus_soap_message_handle_t handle,
1533 const xsd_QName * attr_name,
1534 const xsd_normalizedString_array * val)
1535 0 {
1536 0 globus_result_t result = GLOBUS_SUCCESS;
1537 GlobusFuncName(globus_soap_message_serialize_normalizedString_attribute_list);
1538 0 GlobusSoapMessageDebugEnter();
1539
1540 0 if (val == NULL)
1541 {
1542 0 result = GlobusSoapMessageErrorNullParam;
1543
1544 0 goto exit;
1545 }
1546
1547 0 result = globus_soap_message_serialize_attribute(
1548 handle,
1549 attr_name);
1550 0 if (result != GLOBUS_SUCCESS)
1551 {
1552 0 goto exit;
1553 }
1554
1555 0 result = globus_soap_message_serialize_normalizedString_list(
1556 handle,
1557 val);
1558
1559 0 if(result != GLOBUS_SUCCESS)
1560 {
1561 0 goto exit;
1562 }
1563
1564 0 result = globus_soap_message_serialize_attribute_end(
1565 handle,
1566 attr_name);
1567
1568 0 exit:
1569
1570 0 GlobusSoapMessageDebugExit();
1571 0 return result;
1572 }
1573 /* globus_soap_message_serialize_normalizedString_attribute_list() */
1574
1575 globus_result_t
1576 globus_soap_message_deserialize_normalizedString_attribute_list(
1577 globus_soap_message_handle_t handle,
1578 const xsd_QName * attr_qname,
1579 xsd_normalizedString_array * list_val)
1580 0 {
1581 0 globus_result_t result = GLOBUS_SUCCESS;
1582 0 xmlChar * content_value = NULL;
1583 0 xmlChar * content = NULL;
1584 char * saveptr;
1585 xsd_normalizedString * val;
1586 GlobusFuncName(globus_soap_message_deserialize_normalizedString_attribute_list);
1587 0 GlobusSoapMessageDebugEnter();
1588
1589 0 if (list_val == NULL || attr_qname == NULL || attr_qname->local == NULL)
1590 {
1591 0 result = GlobusSoapMessageErrorNullParam;
1592
1593 0 goto exit;
1594 }
1595
1596 0 result = globus_soap_message_deserialize_attribute(
1597 handle,
1598 attr_qname,
1599 &content_value);
1600 0 if (result != GLOBUS_SUCCESS)
1601 {
1602 0 goto exit;
1603 }
1604
1605 for (content = (xmlChar *) strtok_r((char *) content_value, " \t\r\n",
1606 0 &saveptr);
1607 0 content != NULL;
1608 0 content = (xmlChar *) strtok_r(NULL, " \t\r\n", &saveptr))
1609 {
1610 0 val = xsd_normalizedString_array_push(list_val);
1611 {
1612
1613 0 *val = globus_soap_message_normalize_string((char *) content);
1614
1615 }
1616 }
1617 0 exit:
1618 0 if (content_value != NULL)
1619 {
1620 0 xmlFree(content_value);
1621 }
1622 0 if (result != GLOBUS_SUCCESS)
1623 {
1624 0 xsd_normalizedString_array_destroy_contents(list_val);
1625 }
1626
1627 0 GlobusSoapMessageDebugExit();
1628 0 return result;
1629 }