1 /*
2 * Portions of this file Copyright 1999-2005 University of Chicago
3 * Portions of this file Copyright 1999-2005 The University of Southern California.
4 *
5 * This file or a portion of this file is licensed under the
6 * terms of the Globus Toolkit Public License, found at
7 * http://www.globus.org/toolkit/download/license.html.
8 * If you redistribute this file, with or without
9 * modifications, you must include this notice in the file.
10 */
11
12
13 /*
14 * This file is automatically generated by the Globus WSDLtoC converter
15 */
16
17 #include "xsd_QName.h"
18 #include "globus_soap_message.h"
19 #include "globus_xsd_type_info.h"
20 #include "rptest_ResourcePropertyDefinitionType.h"
21
22 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
23 xsd_QName rptest_ResourcePropertyDefinitionType_qname =
24 {
25 RPTEST_RESOURCEPROPERTYDEFINITIONTYPE_NS,
26 RPTEST_RESOURCEPROPERTYDEFINITIONTYPE_LOCAL
27 };
28 #endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */
29
30 globus_result_t
31 rptest_ResourcePropertyDefinitionType_serialize_wrapper(
32 xsd_QName * element_qname,
33 void * instance,
34 globus_soap_message_handle_t message_handle,
35 globus_xsd_element_options_t options)
36 0 {
37 0 return rptest_ResourcePropertyDefinitionType_serialize(
38 element_qname,
39 (rptest_ResourcePropertyDefinitionType *) instance,
40 message_handle, options);
41 }
42
43 globus_result_t
44 rptest_ResourcePropertyDefinitionType_deserialize_pointer_wrapper(
45 xsd_QName * element_qname,
46 void ** ip,
47 globus_soap_message_handle_t message_handle,
48 globus_xsd_element_options_t options)
49 0 {
50 0 return rptest_ResourcePropertyDefinitionType_deserialize_pointer(
51 element_qname,
52 (rptest_ResourcePropertyDefinitionType **) ip,
53 message_handle, options);
54 }
55
56 globus_result_t
57 rptest_ResourcePropertyDefinitionType_init_wrapper(void **object)
58 0 {
59 0 return rptest_ResourcePropertyDefinitionType_init(
60 (rptest_ResourcePropertyDefinitionType **) object);
61 }
62
63 void
64 rptest_ResourcePropertyDefinitionType_destroy_wrapper(
65 void * object)
66 0 {
67 0 rptest_ResourcePropertyDefinitionType_destroy(
68 (rptest_ResourcePropertyDefinitionType *) object);
69 }
70
71 globus_result_t
72 rptest_ResourcePropertyDefinitionType_copy_wrapper(
73 void ** dest_obj,
74 void * src_obj)
75 0 {
76 0 return rptest_ResourcePropertyDefinitionType_copy(
77 (rptest_ResourcePropertyDefinitionType **) dest_obj,
78 (rptest_ResourcePropertyDefinitionType *) src_obj);
79 }
80
81 globus_result_t
82 rptest_ResourcePropertyDefinitionType_init_contents_wrapper(void *object)
83 0 {
84 0 return rptest_ResourcePropertyDefinitionType_init_contents(
85 (rptest_ResourcePropertyDefinitionType *) object);
86 }
87
88 void
89 rptest_ResourcePropertyDefinitionType_destroy_contents_wrapper(
90 void * object)
91 0 {
92 0 rptest_ResourcePropertyDefinitionType_destroy_contents(
93 (rptest_ResourcePropertyDefinitionType *) object);
94 }
95
96 globus_result_t
97 rptest_ResourcePropertyDefinitionType_copy_contents_wrapper(
98 void * dest_obj,
99 void * src_obj)
100 0 {
101 0 return rptest_ResourcePropertyDefinitionType_copy_contents(
102 (rptest_ResourcePropertyDefinitionType *) dest_obj,
103 (rptest_ResourcePropertyDefinitionType *) src_obj);
104 }
105
106 globus_result_t
107 rptest_ResourcePropertyDefinitionType_serialize_contents_wrapper(
108 xsd_QName * element_qname,
109 void * instance,
110 globus_soap_message_handle_t message_handle,
111 globus_xsd_element_options_t options)
112 0 {
113 0 return rptest_ResourcePropertyDefinitionType_serialize_contents(
114 element_qname,
115 (rptest_ResourcePropertyDefinitionType *) instance,
116 message_handle, options);
117 }
118
119 globus_result_t
120 rptest_ResourcePropertyDefinitionType_deserialize_contents_wrapper(
121 xsd_QName * element_qname,
122 void ** instance,
123 globus_soap_message_handle_t message_handle,
124 globus_xsd_element_options_t options)
125 0 {
126 globus_result_t result;
127 GlobusFuncName(rptest_ResourcePropertyDefinitionType_deserialize_contents_wrapper);
128 0 GlobusSoapMessageDebugEnter();
129
130 0 if(!*instance)
131 {
132 0 result = rptest_ResourcePropertyDefinitionType_init(
133 (rptest_ResourcePropertyDefinitionType **)instance);
134 0 if(result != GLOBUS_SUCCESS)
135 {
136 0 goto error;
137 }
138 }
139
140 0 result = rptest_ResourcePropertyDefinitionType_deserialize_contents(
141 element_qname,
142 *(rptest_ResourcePropertyDefinitionType **)instance,
143 message_handle, options);
144 0 error:
145 0 GlobusSoapMessageDebugExit();
146 0 return result;
147 }
148
149 globus_result_t
150 rptest_ResourcePropertyDefinitionType_array_serialize_wrapper(
151 xsd_QName * element,
152 void * instance,
153 globus_soap_message_handle_t message,
154 globus_xsd_element_options_t options)
155 0 {
156 0 return rptest_ResourcePropertyDefinitionType_array_serialize(
157 element,
158 (rptest_ResourcePropertyDefinitionType_array *) instance,
159 message, options);
160 }
161
162 globus_result_t
163 rptest_ResourcePropertyDefinitionType_array_deserialize_wrapper(
164 xsd_QName * element_qname,
165 void ** inst,
166 globus_soap_message_handle_t message,
167 globus_xsd_element_options_t options)
168 0 {
169 0 if(!*inst)
170 {
171 globus_result_t result;
172
173 0 result = rptest_ResourcePropertyDefinitionType_array_init(
174 (rptest_ResourcePropertyDefinitionType_array **)inst);
175 0 if(result != GLOBUS_SUCCESS)
176 {
177 0 return result;
178 }
179 }
180
181 0 return rptest_ResourcePropertyDefinitionType_array_deserialize(
182 element_qname,
183 *(rptest_ResourcePropertyDefinitionType_array **) inst,
184 message, options);
185 }
186
187 globus_result_t
188 rptest_ResourcePropertyDefinitionType_array_init_wrapper(
189 void ** arr)
190 0 {
191 0 return rptest_ResourcePropertyDefinitionType_array_init(
192 (rptest_ResourcePropertyDefinitionType_array **) arr);
193 }
194
195 void
196 rptest_ResourcePropertyDefinitionType_array_destroy_wrapper(
197 void * arr)
198 0 {
199 0 rptest_ResourcePropertyDefinitionType_array_destroy(
200 (rptest_ResourcePropertyDefinitionType_array *) arr);
201 }
202
203 globus_result_t
204 rptest_ResourcePropertyDefinitionType_array_copy_wrapper(
205 void ** dest_arr,
206 void * src_arr)
207 0 {
208 0 return rptest_ResourcePropertyDefinitionType_array_copy(
209 (rptest_ResourcePropertyDefinitionType_array **) dest_arr,
210 (rptest_ResourcePropertyDefinitionType_array *) src_arr);
211 }
212
213 globus_result_t
214 rptest_ResourcePropertyDefinitionType_array_init_contents_wrapper(
215 void * arr)
216 0 {
217 0 return rptest_ResourcePropertyDefinitionType_array_init_contents(
218 (rptest_ResourcePropertyDefinitionType_array *) arr);
219 }
220
221 void
222 rptest_ResourcePropertyDefinitionType_array_destroy_contents_wrapper(
223 void * arr)
224 0 {
225 0 rptest_ResourcePropertyDefinitionType_array_destroy_contents(
226 (rptest_ResourcePropertyDefinitionType_array *) arr);
227 }
228
229 globus_result_t
230 rptest_ResourcePropertyDefinitionType_array_copy_contents_wrapper(
231 void * dest_arr,
232 void * src_arr)
233 0 {
234 0 return rptest_ResourcePropertyDefinitionType_array_copy_contents(
235 (rptest_ResourcePropertyDefinitionType_array *) dest_arr,
236 (rptest_ResourcePropertyDefinitionType_array *) src_arr);
237 }
238
239 struct globus_xsd_type_info_s rptest_ResourcePropertyDefinitionType_contents_info =
240 {
241 &rptest_ResourcePropertyDefinitionType_qname,
242 rptest_ResourcePropertyDefinitionType_serialize_contents_wrapper,
243 rptest_ResourcePropertyDefinitionType_deserialize_contents_wrapper,
244 rptest_ResourcePropertyDefinitionType_init_wrapper,
245 rptest_ResourcePropertyDefinitionType_destroy_wrapper,
246 rptest_ResourcePropertyDefinitionType_copy_wrapper,
247 rptest_ResourcePropertyDefinitionType_init_contents_wrapper,
248 rptest_ResourcePropertyDefinitionType_destroy_contents_wrapper,
249 rptest_ResourcePropertyDefinitionType_copy_contents_wrapper,
250 sizeof(rptest_ResourcePropertyDefinitionType),
251 NULL,
252 NULL,
253 NULL
254 };
255
256 struct globus_xsd_type_info_s rptest_ResourcePropertyDefinitionType_array_info =
257 {
258 &rptest_ResourcePropertyDefinitionType_qname,
259 rptest_ResourcePropertyDefinitionType_array_serialize_wrapper,
260 rptest_ResourcePropertyDefinitionType_array_deserialize_wrapper,
261 rptest_ResourcePropertyDefinitionType_array_init_wrapper,
262 rptest_ResourcePropertyDefinitionType_array_destroy_wrapper,
263 rptest_ResourcePropertyDefinitionType_array_copy_wrapper,
264 rptest_ResourcePropertyDefinitionType_array_init_contents_wrapper,
265 rptest_ResourcePropertyDefinitionType_array_destroy_contents_wrapper,
266 rptest_ResourcePropertyDefinitionType_array_copy_contents_wrapper,
267 sizeof(rptest_ResourcePropertyDefinitionType),
268 rptest_ResourcePropertyDefinitionType_array_push_wrapper,
269 NULL,
270 NULL
271 };
272
273 struct globus_xsd_type_info_s rptest_ResourcePropertyDefinitionType_info =
274 {
275 &rptest_ResourcePropertyDefinitionType_qname,
276 rptest_ResourcePropertyDefinitionType_serialize_wrapper,
277 rptest_ResourcePropertyDefinitionType_deserialize_pointer_wrapper,
278 rptest_ResourcePropertyDefinitionType_init_wrapper,
279 rptest_ResourcePropertyDefinitionType_destroy_wrapper,
280 rptest_ResourcePropertyDefinitionType_copy_wrapper,
281 rptest_ResourcePropertyDefinitionType_init_contents_wrapper,
282 rptest_ResourcePropertyDefinitionType_destroy_contents_wrapper,
283 rptest_ResourcePropertyDefinitionType_copy_contents_wrapper,
284 sizeof(rptest_ResourcePropertyDefinitionType),
285 NULL,
286 &rptest_ResourcePropertyDefinitionType_contents_info,
287 &rptest_ResourcePropertyDefinitionType_array_info
288 };
289
290 globus_result_t
291 rptest_ResourcePropertyDefinitionType_init_contents(
292 rptest_ResourcePropertyDefinitionType * instance)
293 0 {
294 0 globus_result_t result = GLOBUS_SUCCESS;
295 GlobusFuncName(rptest_ResourcePropertyDefinitionType_init_contents);
296 0 GlobusSoapMessageDebugEnter();
297
298 0 memset(instance, 0, sizeof(rptest_ResourcePropertyDefinitionType));
299
300 0 GlobusSoapMessageDebugExit();
301 0 return result;
302 }
303
304 globus_result_t
305 rptest_ResourcePropertyDefinitionType_init(
306 rptest_ResourcePropertyDefinitionType ** object)
307 0 {
308 rptest_ResourcePropertyDefinitionType * instance;
309 0 globus_result_t result = GLOBUS_SUCCESS;
310 GlobusFuncName(rptest_ResourcePropertyDefinitionType_init);
311 0 GlobusSoapMessageDebugEnter();
312
313 0 instance = globus_malloc(sizeof(rptest_ResourcePropertyDefinitionType));
314 0 if(!instance)
315 {
316 0 result = GlobusSoapMessageErrorOutOfMemory;
317 0 goto exit;
318 }
319
320 0 memset(instance, 0, sizeof(rptest_ResourcePropertyDefinitionType));
321
322 0 *object = instance;
323
324 0 exit:
325 0 GlobusSoapMessageDebugExit();
326 0 return result;
327 }
328
329 void
330 rptest_ResourcePropertyDefinitionType_destroy(
331 rptest_ResourcePropertyDefinitionType * instance)
332 0 {
333 GlobusFuncName(rptest_ResourcePropertyDefinitionType_destroy);
334 0 GlobusSoapMessageDebugEnter();
335
336 0 if(!instance)
337 {
338 0 goto exit;
339 }
340
341 0 rptest_ResourcePropertyDefinitionType_destroy_contents(instance);
342 0 globus_free(instance);
343
344 0 exit:
345
346 0 GlobusSoapMessageDebugExit();
347 }
348
349 void
350 rptest_ResourcePropertyDefinitionType_destroy_contents(
351 rptest_ResourcePropertyDefinitionType * instance)
352 120 {
353 GlobusFuncName(rptest_ResourcePropertyDefinitionType_destroy_contents);
354 120 GlobusSoapMessageDebugEnter();
355
356 120 if(instance)
357 {
358
359
360 120 xsd_QName_destroy_contents(
361 &instance->QName);
362
363 120 xsd_QName_destroy_contents(
364 &instance->TypeQName);
365
366 120 if(instance->_array)
367 {
368 72 xsd_boolean_destroy(
369 instance->_array);
370 72 instance->_array = NULL;
371 }
372
373 }
374
375 120 GlobusSoapMessageDebugExit();
376 }
377
378 globus_result_t
379 rptest_ResourcePropertyDefinitionType_copy(
380 rptest_ResourcePropertyDefinitionType ** dest_obj,
381 const rptest_ResourcePropertyDefinitionType * src_obj)
382 0 {
383 0 globus_result_t result = GLOBUS_SUCCESS;
384 rptest_ResourcePropertyDefinitionType * instance;
385 GlobusFuncName(rptest_ResourcePropertyDefinitionType_copy);
386
387 0 GlobusSoapMessageDebugEnter();
388
389 0 instance = malloc(sizeof(rptest_ResourcePropertyDefinitionType));
390 0 if (instance == NULL)
391 {
392 0 GlobusSoapMessageDebugExit();
393 0 return GlobusSoapMessageErrorOutOfMemory;
394 }
395
396 0 result = rptest_ResourcePropertyDefinitionType_copy_contents(instance, src_obj);
397 0 if(result != GLOBUS_SUCCESS)
398 {
399 0 globus_free(instance);
400 0 GlobusSoapMessageDebugExit();
401 0 return GlobusSoapMessageErrorOutOfMemory;
402 }
403
404 0 *dest_obj = instance;
405 0 GlobusSoapMessageDebugExit();
406 0 return result;
407 }
408
409 globus_result_t
410 rptest_ResourcePropertyDefinitionType_copy_contents(
411 rptest_ResourcePropertyDefinitionType * instance,
412 const rptest_ResourcePropertyDefinitionType * src_obj)
413 60 {
414 60 globus_result_t result = GLOBUS_SUCCESS;
415 GlobusFuncName(rptest_ResourcePropertyDefinitionType_copy_contents);
416
417 60 GlobusSoapMessageDebugEnter();
418
419
420 60 if(src_obj->_array)
421 {
422 36 result = xsd_boolean_copy(
423 &instance->_array,
424 src_obj->_array);
425 36 if(result != GLOBUS_SUCCESS)
426 {
427 0 result = GlobusSoapMessageErrorCopyFailed(
428 result, NULL, &xsd_boolean_qname);
429 0 goto _array_destroy;
430 }
431 }
432 else
433 {
434 24 instance->_array = NULL;
435 }
436
437 60 result = xsd_QName_copy_contents(
438 &instance->QName,
439 &src_obj->QName);
440 60 if(result != GLOBUS_SUCCESS)
441 {
442 0 result = GlobusSoapMessageErrorCopyFailed(
443 result, NULL, &xsd_QName_qname);
444 0 goto QName_destroy;
445 }
446
447 60 result = xsd_QName_copy_contents(
448 &instance->TypeQName,
449 &src_obj->TypeQName);
450 60 if(result != GLOBUS_SUCCESS)
451 {
452 0 result = GlobusSoapMessageErrorCopyFailed(
453 result, NULL, &xsd_QName_qname);
454 0 goto TypeQName_destroy;
455 }
456
457 goto exit;
458
459 0 fail_deserialize:
460
461 0 _array_destroy:
462
463 0 if(instance->_array)
464 {
465 0 xsd_boolean_destroy(
466 instance->_array);
467 0 instance->_array = NULL;
468 }
469 0 xsd_QName_destroy_contents(
470 &instance->TypeQName);
471
472 0 TypeQName_destroy:
473 0 xsd_QName_destroy_contents(
474 &instance->QName);
475
476 0 QName_destroy:
477
478
479 60 exit:
480
481 60 GlobusSoapMessageDebugExit();
482 60 return result;
483 }
484
485
486
487 globus_result_t
488 rptest_ResourcePropertyDefinitionType_serialize_contents(
489 xsd_QName * element_qname, /* ignored */
490 rptest_ResourcePropertyDefinitionType * inst,
491 globus_soap_message_handle_t message_handle,
492 globus_xsd_element_options_t options)
493 0 {
494 0 globus_result_t result = GLOBUS_SUCCESS;
495 GlobusFuncName(rptest_ResourcePropertyDefinitionType_serialize_contents);
496 0 GlobusSoapMessageDebugEnter();
497
498 0 result = rptest_ResourcePropertyDefinitionType_serialize(
499 NULL,
500 inst,
501 message_handle,
502 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
503 0 if(result != GLOBUS_SUCCESS)
504 {
505 0 result = GlobusSoapMessageErrorSerializeFailed(
506 result, NULL, element_qname);
507 goto exit;
508 }
509
510 0 exit:
511
512 0 GlobusSoapMessageDebugExit();
513 0 return result;
514 }
515
516
517
518 globus_result_t
519 rptest_ResourcePropertyDefinitionType_serialize(
520 xsd_QName * element_qname,
521 rptest_ResourcePropertyDefinitionType * instance,
522 globus_soap_message_handle_t message_handle,
523 globus_xsd_element_options_t options)
524 30 {
525 30 globus_result_t result = GLOBUS_SUCCESS;
526 xsd_QName subelement;
527 30 globus_list_t * any_attr_keys = NULL;
528 30 globus_list_t * any_attr_keys_iterator = NULL;
529 30 xsd_QName * type_attr = NULL;
530 30 char * prefix = NULL;
531 int prefix_created;
532 30 int define_prefix = 0;
533 30 int save_options = options;
534
535 GlobusFuncName(rptest_ResourcePropertyDefinitionType_serialize);
536 30 GlobusSoapMessageDebugEnter();
537
538
539 30 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
540 {
541 /* serialize rptest_ResourcePropertyDefinitionType element */
542
543 30 result = globus_soap_message_invoke_ns_callouts(
544 message_handle,
545 element_qname,
546 GLOBUS_SOAP_MESSAGE_CALLOUT_NS_SET,
547 &options);
548 30 if(result != GLOBUS_SUCCESS)
549 {
550 0 result = GlobusSoapMessageErrorSerializeFailed(
551 result, NULL, element_qname);
552 0 goto exit;
553 }
554
555 30 result = globus_soap_message_element_ns_set(
556 message_handle,
557 element_qname->Namespace,
558 &options);
559 30 if(result != GLOBUS_SUCCESS)
560 {
561 0 result = GlobusSoapMessageErrorSerializeFailed(
562 result, NULL, element_qname);
563 0 goto exit;
564 }
565
566 30 if(instance->_array)
567 {
568
569 18 result = globus_soap_message_attribute_ns_set(
570 message_handle,
571 NULL,
572 &options);
573
574 18 if(result != GLOBUS_SUCCESS)
575 {
576 xsd_QName error_qname;
577 0 error_qname.local = prefix;
578 0 error_qname.Namespace = "";
579 0 result = GlobusSoapMessageErrorSerializeFailed(result,
580 NULL,
581 &error_qname);
582 0 goto exit;
583 }
584
585
586 }
587
588 30 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
589 !globus_soap_message_serialize_is_c14n_subset(message_handle))
590 {
591 0 result = globus_soap_message_attribute_ns_set(
592 message_handle,
593 "http://www.w3.org/2001/XMLSchema-instance",
594 &options);
595 0 if(result != GLOBUS_SUCCESS)
596 {
597 0 result = GlobusSoapMessageErrorSerializeFailed(
598 result, NULL, element_qname);
599 0 goto exit;
600 }
601
602 0 result = globus_soap_message_attribute_ns_set(
603 message_handle,
604 rptest_ResourcePropertyDefinitionType_qname.Namespace,
605 &options);
606 0 if(result != GLOBUS_SUCCESS)
607 {
608 0 result = GlobusSoapMessageErrorSerializeFailed(
609 result, NULL, element_qname);
610 0 goto exit;
611 }
612 }
613
614 30 result = globus_soap_message_invoke_callouts(
615 message_handle,
616 element_qname,
617 GLOBUS_SOAP_MESSAGE_CALLOUT_BEGIN);
618 30 if(result != GLOBUS_SUCCESS)
619 {
620 0 result = GlobusSoapMessageErrorSerializeFailed(
621 result, NULL, element_qname);
622 0 goto exit;
623 }
624
625 30 result = globus_soap_message_serialize_element(
626 message_handle,
627 element_qname,
628 options,
629 &rptest_ResourcePropertyDefinitionType_qname);
630 30 if(result != GLOBUS_SUCCESS)
631 {
632 0 result = GlobusSoapMessageErrorSerializeFailed(
633 result, NULL, element_qname);
634 0 goto exit;
635 }
636
637 30 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
638 !globus_soap_message_serialize_is_c14n_subset(message_handle))
639 {
640 0 xsd_QName_init(&type_attr);
641
642 0 type_attr->local = globus_libc_strdup("type");
643 0 type_attr->Namespace = globus_libc_strdup(XSI_NS);
644 }
645
646 /* serialize namespaces */
647
648 30 result = globus_soap_message_invoke_ns_callouts(
649 message_handle,
650 element_qname,
651 GLOBUS_SOAP_MESSAGE_CALLOUT_NS_ADD,
652 &options);
653 30 if(result != GLOBUS_SUCCESS)
654 {
655 0 result = GlobusSoapMessageErrorSerializeFailed(
656 result, NULL, element_qname);
657 0 goto exit;
658 }
659
660 30 result = globus_soap_message_element_ns_add(
661 message_handle,
662 element_qname->Namespace,
663 &options);
664 30 if(result != GLOBUS_SUCCESS)
665 {
666 0 result = GlobusSoapMessageErrorSerializeFailed(
667 result, NULL, element_qname);
668 0 goto exit;
669 }
670
671 30 if(instance->_array)
672 {
673
674 18 result = globus_soap_message_attribute_ns_add(
675 message_handle,
676 NULL,
677 &options);
678
679 18 if(result != GLOBUS_SUCCESS)
680 {
681 xsd_QName error_qname;
682 0 error_qname.local = prefix;
683 0 error_qname.Namespace = "";
684 0 result = GlobusSoapMessageErrorSerializeFailed(result,
685 NULL,
686 &error_qname);
687 0 goto exit;
688 }
689
690
691 }
692
693 30 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
694 !globus_soap_message_serialize_is_c14n_subset(message_handle))
695 {
696 0 result = globus_soap_message_attribute_ns_add(
697 message_handle,
698 "http://www.w3.org/2001/XMLSchema-instance",
699 &options);
700 0 if(result != GLOBUS_SUCCESS)
701 {
702 0 result = GlobusSoapMessageErrorSerializeFailed(
703 result, NULL, element_qname);
704 0 goto exit;
705 }
706
707 0 result = globus_soap_message_attribute_ns_add(
708 message_handle,
709 rptest_ResourcePropertyDefinitionType_qname.Namespace,
710 &options);
711 0 if(result != GLOBUS_SUCCESS)
712 {
713 0 result = GlobusSoapMessageErrorSerializeFailed(
714 result, NULL, element_qname);
715 0 goto exit;
716 }
717 }
718
719 /* serialize attributes */
720
721 30 subelement.Namespace = "";
722 30 subelement.local = "array";
723
724 30 if(instance->_array)
725 {
726
727 18 result = xsd_boolean_serialize_attribute(
728 &subelement,
729 instance->_array,
730 message_handle,
731 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
732 18 if(result != GLOBUS_SUCCESS)
733 {
734 0 result = GlobusSoapMessageErrorSerializeFailed(result,
735 NULL,
736 element_qname);
737 0 goto exit;
738 }
739
740 }
741
742 30 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
743 !globus_soap_message_serialize_is_c14n_subset(message_handle))
744 {
745 0 result = globus_soap_message_serialize_QName_attribute(
746 message_handle,
747 type_attr,
748 &rptest_ResourcePropertyDefinitionType_qname);
749 0 if(result != GLOBUS_SUCCESS)
750 {
751 0 result = GlobusSoapMessageErrorSerializeFailed(
752 result, NULL, element_qname);
753 0 goto exit;
754 }
755 }
756
757
758 30 result = globus_soap_message_invoke_callouts(
759 message_handle,
760 element_qname,
761 GLOBUS_SOAP_MESSAGE_CALLOUT_ATTR);
762 30 if(result != GLOBUS_SUCCESS)
763 {
764 0 result = GlobusSoapMessageErrorSerializeFailed(
765 result, NULL, element_qname);
766 0 goto exit;
767 }
768 }
769
770 30 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
771 {
772 30 result = globus_soap_message_serialize_element_begin_close(
773 message_handle);
774 30 if(result != GLOBUS_SUCCESS)
775 {
776 0 result = GlobusSoapMessageErrorSerializeFailed(
777 result, NULL, element_qname);
778 0 goto exit;
779 }
780 }
781 30 options &= ~GLOBUS_XSD_ELEMENT_CONTENTS_ONLY;
782
783 /* serialize contents of type */
784
785 30 subelement.local = "QName";
786 30 subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
787
788 30 result = xsd_QName_serialize(
789 &subelement,
790 &instance->QName,
791 message_handle,
792 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
793 30 if(result != GLOBUS_SUCCESS)
794 {
795 0 result = GlobusSoapMessageErrorSerializeFailed(
796 result, NULL, &xsd_QName_qname);
797 0 goto exit;
798 }
799
800 30 subelement.local = "TypeQName";
801 30 subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
802
803 30 result = xsd_QName_serialize(
804 &subelement,
805 &instance->TypeQName,
806 message_handle,
807 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
808 30 if(result != GLOBUS_SUCCESS)
809 {
810 0 result = GlobusSoapMessageErrorSerializeFailed(
811 result, NULL, &xsd_QName_qname);
812 0 goto exit;
813 }
814
815 30 options = save_options;
816
817 30 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
818 {
819 /* add end element */
820 30 result = globus_soap_message_serialize_element_end(
821 message_handle,
822 element_qname,
823 options,
824 &rptest_ResourcePropertyDefinitionType_qname);
825 30 if(result != GLOBUS_SUCCESS)
826 {
827 0 result = GlobusSoapMessageErrorSerializeFailed(
828 result, NULL, element_qname);
829 0 goto exit;
830 }
831
832 30 globus_soap_message_element_ns_remove(
833 message_handle,
834 element_qname->Namespace,
835 &options);
836
837 /* remove namespace/prefix mappings for these types */
838
839 30 if(instance->_array)
840 {
841
842 18 globus_soap_message_attribute_ns_remove(
843 message_handle,
844 NULL,
845 &options);
846
847 }
848
849 30 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
850 !globus_soap_message_serialize_is_c14n_subset(message_handle))
851 {
852 0 globus_soap_message_attribute_ns_remove(
853 message_handle,
854 "http://www.w3.org/2001/XMLSchema-instance",
855 &options);
856
857 0 globus_soap_message_attribute_ns_remove(
858 message_handle,
859 rptest_ResourcePropertyDefinitionType_qname.Namespace,
860 &options);
861 }
862
863 30 result = globus_soap_message_invoke_ns_callouts(
864 message_handle,
865 element_qname,
866 GLOBUS_SOAP_MESSAGE_CALLOUT_NS_REMOVE,
867 &options);
868 30 if(result != GLOBUS_SUCCESS)
869 {
870 0 result = GlobusSoapMessageErrorSerializeFailed(
871 result, NULL, element_qname);
872 0 goto exit;
873 }
874
875 30 result = globus_soap_message_invoke_callouts(
876 message_handle,
877 element_qname,
878 GLOBUS_SOAP_MESSAGE_CALLOUT_END);
879 30 if(result != GLOBUS_SUCCESS)
880 {
881 0 result = GlobusSoapMessageErrorSerializeFailed(
882 result, NULL, element_qname);
883 goto exit;
884 }
885 }
886
887 30 exit:
888 30 if (type_attr)
889 {
890 0 xsd_QName_destroy(type_attr);
891 }
892
893 30 if(any_attr_keys)
894 {
895 0 globus_list_free(any_attr_keys);
896 }
897
898 30 GlobusSoapMessageDebugExit();
899 30 return result;
900 }
901
902
903
904 globus_result_t
905 rptest_ResourcePropertyDefinitionType_deserialize_contents(
906 xsd_QName * element_qname, /* ignored */
907 rptest_ResourcePropertyDefinitionType * inst,
908 globus_soap_message_handle_t message_handle,
909 globus_xsd_element_options_t options)
910 0 {
911 0 globus_result_t result = GLOBUS_SUCCESS;
912 GlobusFuncName(rptest_ResourcePropertyDefinitionType_deserialize_contents);
913 0 GlobusSoapMessageDebugEnter();
914
915 0 result = rptest_ResourcePropertyDefinitionType_deserialize(
916 NULL,
917 inst,
918 message_handle,
919 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
920 0 if(result != GLOBUS_SUCCESS)
921 {
922 0 result = GlobusSoapMessageErrorDeserializeFailed(
923 result, element_qname);
924 goto exit;
925 }
926
927 0 exit:
928
929 0 GlobusSoapMessageDebugExit();
930 0 return result;
931 }
932
933
934
935 globus_result_t
936 rptest_ResourcePropertyDefinitionType_deserialize(
937 xsd_QName * element_qname,
938 rptest_ResourcePropertyDefinitionType * instance,
939 globus_soap_message_handle_t message_handle,
940 globus_xsd_element_options_t options)
941 104 {
942 104 globus_result_t result = GLOBUS_SUCCESS;
943 xsd_QName subelement;
944 GlobusFuncName(rptest_ResourcePropertyDefinitionType_deserialize);
945 104 GlobusSoapMessageDebugEnter();
946
947
948 104 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
949 {
950 104 result = globus_soap_message_deserialize_element(
951 message_handle, element_qname);
952 104 if(result != GLOBUS_SUCCESS)
953 {
954 44 result = GlobusSoapMessageErrorDeserializeFailed(
955 result, element_qname);
956 44 goto exit;
957 }
958
959 60 subelement.Namespace = "";
960 60 subelement.local = "array";
961
962 60 result = xsd_boolean_deserialize_attribute_pointer(
963 &subelement,
964 &instance->_array,
965 message_handle,
966 0);
967 60 if(result != GLOBUS_SUCCESS)
968 {
969 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
970 0 goto _array_destroy;
971 }
972
973
974
975 60 result = globus_soap_message_deserialize_element_begin_close(
976 message_handle);
977 60 if(result != GLOBUS_SUCCESS)
978 {
979 0 result = GlobusSoapMessageErrorDeserializeFailed(
980 result, element_qname);
981 0 goto fail_deserialize;
982 }
983 }
984
985 60 subelement.local = "QName";
986 60 subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
987
988 60 result = xsd_QName_deserialize(
989 &subelement,
990 &instance->QName,
991 message_handle,
992 0);
993 60 if(result != GLOBUS_SUCCESS)
994 {
995 0 result = GlobusSoapMessageErrorDeserializeFailed(
996 result,
997 &xsd_QName_qname);
998 0 goto QName_destroy;
999 }
1000
1001 60 subelement.local = "TypeQName";
1002 60 subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
1003
1004 60 result = xsd_QName_deserialize(
1005 &subelement,
1006 &instance->TypeQName,
1007 message_handle,
1008 0);
1009 60 if(result != GLOBUS_SUCCESS)
1010 {
1011 0 result = GlobusSoapMessageErrorDeserializeFailed(
1012 result,
1013 &xsd_QName_qname);
1014 0 goto TypeQName_destroy;
1015 }
1016
1017 60 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
1018 {
1019 60 result = globus_soap_message_deserialize_element_end(
1020 message_handle,
1021 element_qname);
1022 60 if(result != GLOBUS_SUCCESS)
1023 {
1024 0 result = GlobusSoapMessageErrorDeserializeFailed(
1025 result, element_qname);
1026 goto fail_deserialize;
1027 }
1028 }
1029
1030 goto exit;
1031
1032 0 fail_deserialize:
1033
1034 0 _array_destroy:
1035
1036 0 if(instance->_array)
1037 {
1038 0 xsd_boolean_destroy(
1039 instance->_array);
1040 0 instance->_array = NULL;
1041 }
1042 0 xsd_QName_destroy_contents(
1043 &instance->TypeQName);
1044
1045 0 TypeQName_destroy:
1046 0 xsd_QName_destroy_contents(
1047 &instance->QName);
1048
1049 0 QName_destroy:
1050
1051
1052 104 exit:
1053
1054 104 GlobusSoapMessageDebugExit();
1055 104 return result;
1056 }
1057
1058
1059
1060 globus_result_t
1061 rptest_ResourcePropertyDefinitionType_deserialize_pointer(
1062 xsd_QName * element_qname,
1063 rptest_ResourcePropertyDefinitionType ** ip,
1064 globus_soap_message_handle_t message_handle,
1065 globus_xsd_element_options_t options)
1066 0 {
1067 0 rptest_ResourcePropertyDefinitionType * instance = NULL;
1068 0 globus_result_t result = GLOBUS_SUCCESS;
1069 xsd_QName subelement;
1070 0 int found_attrs = 0;
1071 0 int empty_element = 0;
1072 GlobusFuncName(rptest_ResourcePropertyDefinitionType_deserialize_pointer);
1073 0 GlobusSoapMessageDebugEnter();
1074
1075 0 *ip = NULL;
1076
1077 0 result = globus_soap_message_deserialize_element(
1078 message_handle, element_qname);
1079 0 if(result != GLOBUS_SUCCESS &&
1080 (GlobusSoapMessageStatusElementNotFoundCheck(result) ||
1081 GlobusSoapMessageStatusFailedElementCheck(result) ||
1082 GlobusSoapMessageStatusFailedWithTextCheck(result)))
1083 {
1084 0 *ip = NULL;
1085 0 result = GLOBUS_SUCCESS;
1086 0 goto exit;
1087 }
1088
1089 0 if(result != GLOBUS_SUCCESS)
1090 {
1091 0 result = GlobusSoapMessageErrorDeserializeFailed(
1092 result, element_qname);
1093 0 goto exit;
1094 }
1095
1096 0 if(globus_soap_message_deserialize_element_is_empty(
1097 message_handle))
1098 {
1099 0 empty_element = 1;
1100 }
1101
1102
1103
1104 0 result = rptest_ResourcePropertyDefinitionType_init(&instance);
1105 0 if(result != GLOBUS_SUCCESS)
1106 {
1107 0 result = GlobusSoapMessageErrorDeserializeFailed(
1108 result, element_qname);
1109 0 goto exit;
1110 }
1111
1112
1113 0 subelement.Namespace = "";
1114 0 subelement.local = "array";
1115
1116 0 result = xsd_boolean_deserialize_attribute_pointer(
1117 &subelement,
1118 &instance->_array,
1119 message_handle,
1120 0);
1121 0 if(result != GLOBUS_SUCCESS)
1122 {
1123 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1124 0 goto _array_destroy;
1125 }
1126
1127
1128 0 if(instance->_array)
1129 {
1130 0 found_attrs++;
1131 }
1132
1133 0 if(found_attrs == 0 &&
1134 globus_soap_message_deserialize_element_is_nil(message_handle))
1135 {
1136 0 rptest_ResourcePropertyDefinitionType_destroy(instance);
1137
1138 0 result = globus_soap_message_deserialize_element_end(
1139 message_handle,
1140 element_qname);
1141 0 if(result != GLOBUS_SUCCESS)
1142 {
1143 0 result = GlobusSoapMessageErrorDeserializeFailed(
1144 result, element_qname);
1145 0 goto exit;
1146 }
1147
1148 0 *ip = NULL;
1149 0 globus_object_free(globus_error_get(result));
1150 0 result = GLOBUS_SUCCESS;
1151 0 goto exit;
1152 }
1153
1154
1155 0 if(empty_element)
1156 {
1157 0 result = globus_soap_message_deserialize_element_end(
1158 message_handle,
1159 element_qname);
1160 0 if(result != GLOBUS_SUCCESS)
1161 {
1162 0 result = GlobusSoapMessageErrorDeserializeFailed(
1163 result, element_qname);
1164 0 goto fail_deserialize;
1165 }
1166
1167 0 *ip = instance;
1168 0 goto exit;
1169 }
1170
1171 0 result = globus_soap_message_deserialize_element_begin_close(
1172 message_handle);
1173 0 if(result != GLOBUS_SUCCESS)
1174 {
1175 0 result = GlobusSoapMessageErrorDeserializeFailed(
1176 result, element_qname);
1177 0 goto exit;
1178 }
1179
1180
1181 0 subelement.local = "QName";
1182 0 subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
1183
1184 0 result = xsd_QName_deserialize(
1185 &subelement,
1186 &instance->QName,
1187 message_handle,
1188 0);
1189 0 if(result != GLOBUS_SUCCESS)
1190 {
1191 0 result = GlobusSoapMessageErrorDeserializeFailed(
1192 result,
1193 &xsd_QName_qname);
1194 0 goto QName_destroy;
1195 }
1196
1197 0 subelement.local = "TypeQName";
1198 0 subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
1199
1200 0 result = xsd_QName_deserialize(
1201 &subelement,
1202 &instance->TypeQName,
1203 message_handle,
1204 0);
1205 0 if(result != GLOBUS_SUCCESS)
1206 {
1207 0 result = GlobusSoapMessageErrorDeserializeFailed(
1208 result,
1209 &xsd_QName_qname);
1210 0 goto TypeQName_destroy;
1211 }
1212
1213
1214 0 result = globus_soap_message_deserialize_element_end(
1215 message_handle,
1216 element_qname);
1217 0 if(result != GLOBUS_SUCCESS)
1218 {
1219 0 result = GlobusSoapMessageErrorDeserializeFailed(
1220 result, element_qname);
1221 0 goto fail_deserialize;
1222 }
1223
1224 0 *ip = instance;
1225
1226 0 goto exit;
1227
1228 0 fail_deserialize:
1229
1230 0 _array_destroy:
1231
1232 0 if(instance->_array)
1233 {
1234 0 xsd_boolean_destroy(
1235 instance->_array);
1236 0 instance->_array = NULL;
1237 }
1238 0 xsd_QName_destroy_contents(
1239 &instance->TypeQName);
1240
1241 0 TypeQName_destroy:
1242 0 xsd_QName_destroy_contents(
1243 &instance->QName);
1244
1245 0 QName_destroy:
1246
1247 0 exit:
1248
1249 0 GlobusSoapMessageDebugExit();
1250 0 return result;
1251 }
1252
1253
1254 globus_result_t
1255 rptest_ResourcePropertyDefinitionType_array_init_contents(
1256 rptest_ResourcePropertyDefinitionType_array * array)
1257 0 {
1258 GlobusFuncName(rptest_ResourcePropertyDefinitionType_array_init_contents);
1259 0 GlobusSoapMessageDebugEnter();
1260
1261 0 memset(array, 0, sizeof(rptest_ResourcePropertyDefinitionType_array));
1262
1263 0 GlobusSoapMessageDebugExit();
1264 0 return GLOBUS_SUCCESS;
1265 }
1266
1267 globus_result_t
1268 rptest_ResourcePropertyDefinitionType_array_init(
1269 rptest_ResourcePropertyDefinitionType_array ** arr)
1270 0 {
1271 rptest_ResourcePropertyDefinitionType_array * array;
1272 globus_result_t result;
1273 GlobusFuncName(rptest_ResourcePropertyDefinitionType_array_init);
1274 0 GlobusSoapMessageDebugEnter();
1275
1276 0 array = (rptest_ResourcePropertyDefinitionType_array *)
1277 globus_malloc(sizeof(rptest_ResourcePropertyDefinitionType_array));
1278 0 if(!array)
1279 {
1280 0 result = GlobusSoapMessageErrorOutOfMemory;
1281 0 goto exit;
1282 }
1283
1284 0 result = rptest_ResourcePropertyDefinitionType_array_init_contents(array);
1285 0 if(result != GLOBUS_SUCCESS)
1286 {
1287 0 globus_free(array);
1288 0 array = NULL;
1289
1290 }
1291
1292 0 *arr = array;
1293
1294 0 exit:
1295 0 GlobusSoapMessageDebugExit();
1296 0 return result;
1297 }
1298
1299 void
1300 rptest_ResourcePropertyDefinitionType_array_destroy_contents(
1301 rptest_ResourcePropertyDefinitionType_array * array)
1302 88 {
1303 88 int i = 0;
1304 GlobusFuncName(rptest_ResourcePropertyDefinitionType_array_destroy_contents);
1305 88 GlobusSoapMessageDebugEnter();
1306
1307 120 for(; i < array->length; ++i)
1308 {
1309 120 rptest_ResourcePropertyDefinitionType_destroy_contents(&array->elements[i]);
1310 }
1311
1312 88 if(array->elements)
1313 {
1314 88 globus_free(array->elements);
1315 88 array->elements = NULL;
1316 }
1317 88 array->length = 0;
1318
1319 88 GlobusSoapMessageDebugExit();
1320 }
1321
1322 void
1323 rptest_ResourcePropertyDefinitionType_array_destroy(
1324 rptest_ResourcePropertyDefinitionType_array * array)
1325 0 {
1326 GlobusFuncName(rptest_ResourcePropertyDefinitionType_array_destroy);
1327 0 GlobusSoapMessageDebugEnter();
1328
1329 0 rptest_ResourcePropertyDefinitionType_array_destroy_contents(array);
1330 0 globus_free(array);
1331
1332 0 GlobusSoapMessageDebugExit();
1333 }
1334
1335 globus_result_t
1336 rptest_ResourcePropertyDefinitionType_array_copy(
1337 rptest_ResourcePropertyDefinitionType_array ** dest_arr,
1338 const rptest_ResourcePropertyDefinitionType_array * src_arr)
1339 0 {
1340 rptest_ResourcePropertyDefinitionType_array * array;
1341 globus_result_t result;
1342 GlobusFuncName(rptest_ResourcePropertyDefinitionType_array_copy);
1343 0 GlobusSoapMessageDebugEnter();
1344
1345 0 array = (rptest_ResourcePropertyDefinitionType_array *) globus_malloc(
1346 sizeof(rptest_ResourcePropertyDefinitionType_array));
1347 0 if(!array)
1348 {
1349 0 result = GlobusSoapMessageErrorOutOfMemory;
1350 0 GlobusSoapMessageDebugExit();
1351 0 return result;
1352 }
1353
1354 0 result = rptest_ResourcePropertyDefinitionType_array_copy_contents(array, src_arr);
1355 0 if(result != GLOBUS_SUCCESS)
1356 {
1357 0 globus_free(array);
1358 0 GlobusSoapMessageDebugExit();
1359 0 return result;
1360 }
1361
1362 0 *dest_arr = array;
1363
1364 0 GlobusSoapMessageDebugExit();
1365 0 return GLOBUS_SUCCESS;
1366 }
1367
1368 globus_result_t
1369 rptest_ResourcePropertyDefinitionType_array_copy_contents(
1370 rptest_ResourcePropertyDefinitionType_array * dest_arr,
1371 const rptest_ResourcePropertyDefinitionType_array * src_arr)
1372 44 {
1373 int i;
1374 44 globus_result_t result = GLOBUS_SUCCESS;
1375 GlobusFuncName(rptest_ResourcePropertyDefinitionType_array_copy_contents);
1376 44 GlobusSoapMessageDebugEnter();
1377
1378 44 dest_arr->length = src_arr->length;
1379 44 if(dest_arr->length > 0)
1380 {
1381 44 dest_arr->elements = (rptest_ResourcePropertyDefinitionType *) malloc(
1382 sizeof(rptest_ResourcePropertyDefinitionType) * dest_arr->length);
1383 44 if(!dest_arr->elements)
1384 {
1385 0 result = GlobusSoapMessageErrorOutOfMemory;
1386 0 GlobusSoapMessageDebugExit();
1387 0 return result;
1388 }
1389 }
1390 else
1391 {
1392 0 dest_arr->elements = NULL;
1393 }
1394
1395 104 for(i = 0; i < dest_arr->length; i++)
1396 {
1397 60 result = rptest_ResourcePropertyDefinitionType_copy_contents(
1398 &dest_arr->elements[i], &src_arr->elements[i]);
1399 60 if(result != GLOBUS_SUCCESS)
1400 {
1401 0 while(i--)
1402 {
1403 0 rptest_ResourcePropertyDefinitionType_destroy_contents(&dest_arr->elements[i]);
1404 }
1405
1406 0 globus_free(dest_arr->elements);
1407 0 dest_arr->elements = NULL;
1408 0 dest_arr->length = 0;
1409 0 break;
1410 }
1411 }
1412
1413 44 GlobusSoapMessageDebugExit();
1414 44 return result;
1415 }
1416
1417 rptest_ResourcePropertyDefinitionType *
1418 rptest_ResourcePropertyDefinitionType_array_push(
1419 rptest_ResourcePropertyDefinitionType_array * array)
1420 0 {
1421 GlobusFuncName(rptest_ResourcePropertyDefinitionType_array_push);
1422 0 GlobusSoapMessageDebugEnter();
1423
1424 0 array->elements = realloc(array->elements,
1425 sizeof(rptest_ResourcePropertyDefinitionType) *
1426 (array->length + 1));
1427 0 memset(&array->elements[array->length], 0, sizeof(rptest_ResourcePropertyDefinitionType));
1428 0 array->length++;
1429
1430 0 GlobusSoapMessageDebugExit();
1431 0 return (&array->elements[array->length - 1]);
1432 }
1433
1434 void *
1435 rptest_ResourcePropertyDefinitionType_array_push_wrapper(
1436 void * array)
1437 0 {
1438 0 return (void *) rptest_ResourcePropertyDefinitionType_array_push((rptest_ResourcePropertyDefinitionType_array *) array);
1439 }
1440
1441 globus_result_t
1442 rptest_ResourcePropertyDefinitionType_array_serialize(
1443 xsd_QName * element_qname,
1444 rptest_ResourcePropertyDefinitionType_array * array,
1445 globus_soap_message_handle_t message,
1446 globus_xsd_element_options_t options)
1447 22 {
1448 22 globus_result_t result = GLOBUS_SUCCESS;
1449 22 int i = 0;
1450 GlobusFuncName(rptest_ResourcePropertyDefinitionType_array_serialize);
1451 22 GlobusSoapMessageDebugEnter();
1452
1453 30 for(; i < array->length; ++i)
1454 {
1455 30 result = rptest_ResourcePropertyDefinitionType_serialize(
1456 element_qname,
1457 &array->elements[i],
1458 message,
1459 options);
1460 30 if(result != GLOBUS_SUCCESS)
1461 {
1462 30 goto exit;
1463 }
1464 }
1465
1466 22 exit:
1467
1468 22 GlobusSoapMessageDebugExit();
1469 22 return result;
1470 }
1471
1472 globus_result_t
1473 rptest_ResourcePropertyDefinitionType_array_deserialize(
1474 xsd_QName * element_qname,
1475 rptest_ResourcePropertyDefinitionType_array * array,
1476 globus_soap_message_handle_t message,
1477 globus_xsd_element_options_t options)
1478 44 {
1479 44 globus_result_t result = GLOBUS_SUCCESS;
1480 44 int i = 0;
1481 int pre_length;
1482 GlobusFuncName(rptest_ResourcePropertyDefinitionType_array_deserialize);
1483 44 GlobusSoapMessageDebugEnter();
1484
1485 44 pre_length = array->length;
1486
1487 44 for(i = 0; i < pre_length; ++i)
1488 {
1489 0 result = rptest_ResourcePropertyDefinitionType_deserialize(
1490 element_qname,
1491 &array->elements[i],
1492 message,
1493 options);
1494 0 if(result != GLOBUS_SUCCESS)
1495 {
1496 0 if(GlobusSoapMessageStatusFailedElementCheck(result) ||
1497 GlobusSoapMessageStatusElementNotFoundCheck(result) ||
1498 GlobusSoapMessageStatusFailedWithTextCheck(result))
1499 {
1500 0 result = GLOBUS_SUCCESS;
1501 0 break;
1502 }
1503
1504 0 result = GlobusSoapMessageErrorDeserializeFailed(
1505 result, element_qname);
1506 0 goto exit;
1507 }
1508 }
1509
1510 104 while(result == GLOBUS_SUCCESS)
1511 {
1512 rptest_ResourcePropertyDefinitionType next;
1513 104 memset(&next, 0, sizeof(rptest_ResourcePropertyDefinitionType));
1514
1515 104 result = rptest_ResourcePropertyDefinitionType_deserialize(
1516 element_qname,
1517 &next,
1518 message,
1519 options);
1520 104 if(result != GLOBUS_SUCCESS)
1521 {
1522 44 if(GlobusSoapMessageStatusFailedElementCheck(result) ||
1523 GlobusSoapMessageStatusElementNotFoundCheck(result) ||
1524 GlobusSoapMessageStatusFailedWithTextCheck(result))
1525 {
1526 44 result = GLOBUS_SUCCESS;
1527 44 break;
1528 }
1529
1530 0 result = GlobusSoapMessageErrorDeserializeFailed(
1531 result, element_qname);
1532 0 goto exit;
1533 }
1534
1535 60 array->elements = realloc(
1536 array->elements,
1537 (array->length + 1) * sizeof(rptest_ResourcePropertyDefinitionType));
1538 60 if(!array->elements)
1539 {
1540 0 result = GlobusSoapMessageErrorOutOfMemory;
1541 0 goto exit;
1542 }
1543 60 array->elements[array->length] = next;
1544 60 array->length++;
1545 60 ++i;
1546 }
1547
1548 44 exit:
1549
1550 44 if(result != GLOBUS_SUCCESS)
1551 {
1552 0 int di = 0;
1553 0 for(; di < i; ++di)
1554 {
1555 0 rptest_ResourcePropertyDefinitionType_destroy_contents(
1556 &array->elements[di]);
1557 0 memset(&array->elements[di], 0, sizeof(rptest_ResourcePropertyDefinitionType));
1558 }
1559 }
1560
1561 44 GlobusSoapMessageDebugExit();
1562 44 return result;