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_CreateResourcePropertiesTestType.h"
21
22 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
23 xsd_QName rptest_CreateResourcePropertiesTestType_qname =
24 {
25 RPTEST_CREATERESOURCEPROPERTIESTESTTYPE_NS,
26 RPTEST_CREATERESOURCEPROPERTIESTESTTYPE_LOCAL
27 };
28 #endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */
29
30 globus_result_t
31 rptest_CreateResourcePropertiesTestType_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_CreateResourcePropertiesTestType_serialize(
38 element_qname,
39 (rptest_CreateResourcePropertiesTestType *) instance,
40 message_handle, options);
41 }
42
43 globus_result_t
44 rptest_CreateResourcePropertiesTestType_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_CreateResourcePropertiesTestType_deserialize_pointer(
51 element_qname,
52 (rptest_CreateResourcePropertiesTestType **) ip,
53 message_handle, options);
54 }
55
56 globus_result_t
57 rptest_CreateResourcePropertiesTestType_init_wrapper(void **object)
58 0 {
59 0 return rptest_CreateResourcePropertiesTestType_init(
60 (rptest_CreateResourcePropertiesTestType **) object);
61 }
62
63 void
64 rptest_CreateResourcePropertiesTestType_destroy_wrapper(
65 void * object)
66 22 {
67 22 rptest_CreateResourcePropertiesTestType_destroy(
68 (rptest_CreateResourcePropertiesTestType *) object);
69 }
70
71 globus_result_t
72 rptest_CreateResourcePropertiesTestType_copy_wrapper(
73 void ** dest_obj,
74 void * src_obj)
75 22 {
76 22 return rptest_CreateResourcePropertiesTestType_copy(
77 (rptest_CreateResourcePropertiesTestType **) dest_obj,
78 (rptest_CreateResourcePropertiesTestType *) src_obj);
79 }
80
81 globus_result_t
82 rptest_CreateResourcePropertiesTestType_init_contents_wrapper(void *object)
83 0 {
84 0 return rptest_CreateResourcePropertiesTestType_init_contents(
85 (rptest_CreateResourcePropertiesTestType *) object);
86 }
87
88 void
89 rptest_CreateResourcePropertiesTestType_destroy_contents_wrapper(
90 void * object)
91 0 {
92 0 rptest_CreateResourcePropertiesTestType_destroy_contents(
93 (rptest_CreateResourcePropertiesTestType *) object);
94 }
95
96 globus_result_t
97 rptest_CreateResourcePropertiesTestType_copy_contents_wrapper(
98 void * dest_obj,
99 void * src_obj)
100 0 {
101 0 return rptest_CreateResourcePropertiesTestType_copy_contents(
102 (rptest_CreateResourcePropertiesTestType *) dest_obj,
103 (rptest_CreateResourcePropertiesTestType *) src_obj);
104 }
105
106 globus_result_t
107 rptest_CreateResourcePropertiesTestType_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_CreateResourcePropertiesTestType_serialize_contents(
114 element_qname,
115 (rptest_CreateResourcePropertiesTestType *) instance,
116 message_handle, options);
117 }
118
119 globus_result_t
120 rptest_CreateResourcePropertiesTestType_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_CreateResourcePropertiesTestType_deserialize_contents_wrapper);
128 0 GlobusSoapMessageDebugEnter();
129
130 0 if(!*instance)
131 {
132 0 result = rptest_CreateResourcePropertiesTestType_init(
133 (rptest_CreateResourcePropertiesTestType **)instance);
134 0 if(result != GLOBUS_SUCCESS)
135 {
136 0 goto error;
137 }
138 }
139
140 0 result = rptest_CreateResourcePropertiesTestType_deserialize_contents(
141 element_qname,
142 *(rptest_CreateResourcePropertiesTestType **)instance,
143 message_handle, options);
144 0 error:
145 0 GlobusSoapMessageDebugExit();
146 0 return result;
147 }
148
149 globus_result_t
150 rptest_CreateResourcePropertiesTestType_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_CreateResourcePropertiesTestType_array_serialize(
157 element,
158 (rptest_CreateResourcePropertiesTestType_array *) instance,
159 message, options);
160 }
161
162 globus_result_t
163 rptest_CreateResourcePropertiesTestType_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_CreateResourcePropertiesTestType_array_init(
174 (rptest_CreateResourcePropertiesTestType_array **)inst);
175 0 if(result != GLOBUS_SUCCESS)
176 {
177 0 return result;
178 }
179 }
180
181 0 return rptest_CreateResourcePropertiesTestType_array_deserialize(
182 element_qname,
183 *(rptest_CreateResourcePropertiesTestType_array **) inst,
184 message, options);
185 }
186
187 globus_result_t
188 rptest_CreateResourcePropertiesTestType_array_init_wrapper(
189 void ** arr)
190 0 {
191 0 return rptest_CreateResourcePropertiesTestType_array_init(
192 (rptest_CreateResourcePropertiesTestType_array **) arr);
193 }
194
195 void
196 rptest_CreateResourcePropertiesTestType_array_destroy_wrapper(
197 void * arr)
198 0 {
199 0 rptest_CreateResourcePropertiesTestType_array_destroy(
200 (rptest_CreateResourcePropertiesTestType_array *) arr);
201 }
202
203 globus_result_t
204 rptest_CreateResourcePropertiesTestType_array_copy_wrapper(
205 void ** dest_arr,
206 void * src_arr)
207 0 {
208 0 return rptest_CreateResourcePropertiesTestType_array_copy(
209 (rptest_CreateResourcePropertiesTestType_array **) dest_arr,
210 (rptest_CreateResourcePropertiesTestType_array *) src_arr);
211 }
212
213 globus_result_t
214 rptest_CreateResourcePropertiesTestType_array_init_contents_wrapper(
215 void * arr)
216 0 {
217 0 return rptest_CreateResourcePropertiesTestType_array_init_contents(
218 (rptest_CreateResourcePropertiesTestType_array *) arr);
219 }
220
221 void
222 rptest_CreateResourcePropertiesTestType_array_destroy_contents_wrapper(
223 void * arr)
224 0 {
225 0 rptest_CreateResourcePropertiesTestType_array_destroy_contents(
226 (rptest_CreateResourcePropertiesTestType_array *) arr);
227 }
228
229 globus_result_t
230 rptest_CreateResourcePropertiesTestType_array_copy_contents_wrapper(
231 void * dest_arr,
232 void * src_arr)
233 0 {
234 0 return rptest_CreateResourcePropertiesTestType_array_copy_contents(
235 (rptest_CreateResourcePropertiesTestType_array *) dest_arr,
236 (rptest_CreateResourcePropertiesTestType_array *) src_arr);
237 }
238
239 struct globus_xsd_type_info_s rptest_CreateResourcePropertiesTestType_contents_info =
240 {
241 &rptest_CreateResourcePropertiesTestType_qname,
242 rptest_CreateResourcePropertiesTestType_serialize_contents_wrapper,
243 rptest_CreateResourcePropertiesTestType_deserialize_contents_wrapper,
244 rptest_CreateResourcePropertiesTestType_init_wrapper,
245 rptest_CreateResourcePropertiesTestType_destroy_wrapper,
246 rptest_CreateResourcePropertiesTestType_copy_wrapper,
247 rptest_CreateResourcePropertiesTestType_init_contents_wrapper,
248 rptest_CreateResourcePropertiesTestType_destroy_contents_wrapper,
249 rptest_CreateResourcePropertiesTestType_copy_contents_wrapper,
250 sizeof(rptest_CreateResourcePropertiesTestType),
251 NULL,
252 NULL,
253 NULL
254 };
255
256 struct globus_xsd_type_info_s rptest_CreateResourcePropertiesTestType_array_info =
257 {
258 &rptest_CreateResourcePropertiesTestType_qname,
259 rptest_CreateResourcePropertiesTestType_array_serialize_wrapper,
260 rptest_CreateResourcePropertiesTestType_array_deserialize_wrapper,
261 rptest_CreateResourcePropertiesTestType_array_init_wrapper,
262 rptest_CreateResourcePropertiesTestType_array_destroy_wrapper,
263 rptest_CreateResourcePropertiesTestType_array_copy_wrapper,
264 rptest_CreateResourcePropertiesTestType_array_init_contents_wrapper,
265 rptest_CreateResourcePropertiesTestType_array_destroy_contents_wrapper,
266 rptest_CreateResourcePropertiesTestType_array_copy_contents_wrapper,
267 sizeof(rptest_CreateResourcePropertiesTestType),
268 rptest_CreateResourcePropertiesTestType_array_push_wrapper,
269 NULL,
270 NULL
271 };
272
273 struct globus_xsd_type_info_s rptest_CreateResourcePropertiesTestType_info =
274 {
275 &rptest_CreateResourcePropertiesTestType_qname,
276 rptest_CreateResourcePropertiesTestType_serialize_wrapper,
277 rptest_CreateResourcePropertiesTestType_deserialize_pointer_wrapper,
278 rptest_CreateResourcePropertiesTestType_init_wrapper,
279 rptest_CreateResourcePropertiesTestType_destroy_wrapper,
280 rptest_CreateResourcePropertiesTestType_copy_wrapper,
281 rptest_CreateResourcePropertiesTestType_init_contents_wrapper,
282 rptest_CreateResourcePropertiesTestType_destroy_contents_wrapper,
283 rptest_CreateResourcePropertiesTestType_copy_contents_wrapper,
284 sizeof(rptest_CreateResourcePropertiesTestType),
285 NULL,
286 &rptest_CreateResourcePropertiesTestType_contents_info,
287 &rptest_CreateResourcePropertiesTestType_array_info
288 };
289
290 globus_result_t
291 rptest_CreateResourcePropertiesTestType_init_contents(
292 rptest_CreateResourcePropertiesTestType * instance)
293 0 {
294 0 globus_result_t result = GLOBUS_SUCCESS;
295 GlobusFuncName(rptest_CreateResourcePropertiesTestType_init_contents);
296 0 GlobusSoapMessageDebugEnter();
297
298 0 memset(instance, 0, sizeof(rptest_CreateResourcePropertiesTestType));
299
300 0 GlobusSoapMessageDebugExit();
301 0 return result;
302 }
303
304 globus_result_t
305 rptest_CreateResourcePropertiesTestType_init(
306 rptest_CreateResourcePropertiesTestType ** object)
307 44 {
308 rptest_CreateResourcePropertiesTestType * instance;
309 44 globus_result_t result = GLOBUS_SUCCESS;
310 GlobusFuncName(rptest_CreateResourcePropertiesTestType_init);
311 44 GlobusSoapMessageDebugEnter();
312
313 44 instance = globus_malloc(sizeof(rptest_CreateResourcePropertiesTestType));
314 44 if(!instance)
315 {
316 0 result = GlobusSoapMessageErrorOutOfMemory;
317 0 goto exit;
318 }
319
320 44 memset(instance, 0, sizeof(rptest_CreateResourcePropertiesTestType));
321
322 44 *object = instance;
323
324 44 exit:
325 44 GlobusSoapMessageDebugExit();
326 44 return result;
327 }
328
329 void
330 rptest_CreateResourcePropertiesTestType_destroy(
331 rptest_CreateResourcePropertiesTestType * instance)
332 66 {
333 GlobusFuncName(rptest_CreateResourcePropertiesTestType_destroy);
334 66 GlobusSoapMessageDebugEnter();
335
336 66 if(!instance)
337 {
338 66 goto exit;
339 }
340
341 66 rptest_CreateResourcePropertiesTestType_destroy_contents(instance);
342 66 globus_free(instance);
343
344 66 exit:
345
346 66 GlobusSoapMessageDebugExit();
347 }
348
349 void
350 rptest_CreateResourcePropertiesTestType_destroy_contents(
351 rptest_CreateResourcePropertiesTestType * instance)
352 66 {
353 GlobusFuncName(rptest_CreateResourcePropertiesTestType_destroy_contents);
354 66 GlobusSoapMessageDebugEnter();
355
356 66 if(instance)
357 {
358
359
360 66 rptest_ResourcePropertyDefinitionType_array_destroy_contents(&instance->ResourcePropertyDefinition);
361
362 }
363
364 66 GlobusSoapMessageDebugExit();
365 }
366
367 globus_result_t
368 rptest_CreateResourcePropertiesTestType_copy(
369 rptest_CreateResourcePropertiesTestType ** dest_obj,
370 const rptest_CreateResourcePropertiesTestType * src_obj)
371 44 {
372 44 globus_result_t result = GLOBUS_SUCCESS;
373 rptest_CreateResourcePropertiesTestType * instance;
374 GlobusFuncName(rptest_CreateResourcePropertiesTestType_copy);
375
376 44 GlobusSoapMessageDebugEnter();
377
378 44 instance = malloc(sizeof(rptest_CreateResourcePropertiesTestType));
379 44 if (instance == NULL)
380 {
381 0 GlobusSoapMessageDebugExit();
382 0 return GlobusSoapMessageErrorOutOfMemory;
383 }
384
385 44 result = rptest_CreateResourcePropertiesTestType_copy_contents(instance, src_obj);
386 44 if(result != GLOBUS_SUCCESS)
387 {
388 0 globus_free(instance);
389 0 GlobusSoapMessageDebugExit();
390 0 return GlobusSoapMessageErrorOutOfMemory;
391 }
392
393 44 *dest_obj = instance;
394 44 GlobusSoapMessageDebugExit();
395 44 return result;
396 }
397
398 globus_result_t
399 rptest_CreateResourcePropertiesTestType_copy_contents(
400 rptest_CreateResourcePropertiesTestType * instance,
401 const rptest_CreateResourcePropertiesTestType * src_obj)
402 44 {
403 44 globus_result_t result = GLOBUS_SUCCESS;
404 GlobusFuncName(rptest_CreateResourcePropertiesTestType_copy_contents);
405
406 44 GlobusSoapMessageDebugEnter();
407
408
409 44 result = rptest_ResourcePropertyDefinitionType_array_copy_contents(
410 &instance->ResourcePropertyDefinition,
411 &src_obj->ResourcePropertyDefinition);
412 44 if(result != GLOBUS_SUCCESS)
413 {
414 0 result = GlobusSoapMessageErrorCopyFailed(
415 result, NULL, &rptest_ResourcePropertyDefinitionType_qname);
416 goto ResourcePropertyDefinition_destroy_array;
417 }
418
419 goto exit;
420
421 fail_deserialize:
422 rptest_ResourcePropertyDefinitionType_array_destroy_contents(
423 &instance->ResourcePropertyDefinition);
424
425 0 ResourcePropertyDefinition_destroy_array:
426
427
428 44 exit:
429
430 44 GlobusSoapMessageDebugExit();
431 44 return result;
432 }
433
434
435
436 globus_result_t
437 rptest_CreateResourcePropertiesTestType_serialize_contents(
438 xsd_QName * element_qname, /* ignored */
439 rptest_CreateResourcePropertiesTestType * inst,
440 globus_soap_message_handle_t message_handle,
441 globus_xsd_element_options_t options)
442 0 {
443 0 globus_result_t result = GLOBUS_SUCCESS;
444 GlobusFuncName(rptest_CreateResourcePropertiesTestType_serialize_contents);
445 0 GlobusSoapMessageDebugEnter();
446
447 0 result = rptest_CreateResourcePropertiesTestType_serialize(
448 NULL,
449 inst,
450 message_handle,
451 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
452 0 if(result != GLOBUS_SUCCESS)
453 {
454 0 result = GlobusSoapMessageErrorSerializeFailed(
455 result, NULL, element_qname);
456 goto exit;
457 }
458
459 0 exit:
460
461 0 GlobusSoapMessageDebugExit();
462 0 return result;
463 }
464
465
466
467 globus_result_t
468 rptest_CreateResourcePropertiesTestType_serialize(
469 xsd_QName * element_qname,
470 rptest_CreateResourcePropertiesTestType * instance,
471 globus_soap_message_handle_t message_handle,
472 globus_xsd_element_options_t options)
473 22 {
474 22 globus_result_t result = GLOBUS_SUCCESS;
475 xsd_QName subelement;
476 22 globus_list_t * any_attr_keys = NULL;
477 22 globus_list_t * any_attr_keys_iterator = NULL;
478 22 xsd_QName * type_attr = NULL;
479 22 char * prefix = NULL;
480 int prefix_created;
481 22 int define_prefix = 0;
482 22 int save_options = options;
483
484 GlobusFuncName(rptest_CreateResourcePropertiesTestType_serialize);
485 22 GlobusSoapMessageDebugEnter();
486
487
488 22 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
489 {
490 /* serialize rptest_CreateResourcePropertiesTestType element */
491
492 22 result = globus_soap_message_invoke_ns_callouts(
493 message_handle,
494 element_qname,
495 GLOBUS_SOAP_MESSAGE_CALLOUT_NS_SET,
496 &options);
497 22 if(result != GLOBUS_SUCCESS)
498 {
499 0 result = GlobusSoapMessageErrorSerializeFailed(
500 result, NULL, element_qname);
501 0 goto exit;
502 }
503
504 22 result = globus_soap_message_element_ns_set(
505 message_handle,
506 element_qname->Namespace,
507 &options);
508 22 if(result != GLOBUS_SUCCESS)
509 {
510 0 result = GlobusSoapMessageErrorSerializeFailed(
511 result, NULL, element_qname);
512 0 goto exit;
513 }
514
515 22 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
516 !globus_soap_message_serialize_is_c14n_subset(message_handle))
517 {
518 0 result = globus_soap_message_attribute_ns_set(
519 message_handle,
520 "http://www.w3.org/2001/XMLSchema-instance",
521 &options);
522 0 if(result != GLOBUS_SUCCESS)
523 {
524 0 result = GlobusSoapMessageErrorSerializeFailed(
525 result, NULL, element_qname);
526 0 goto exit;
527 }
528
529 0 result = globus_soap_message_attribute_ns_set(
530 message_handle,
531 rptest_CreateResourcePropertiesTestType_qname.Namespace,
532 &options);
533 0 if(result != GLOBUS_SUCCESS)
534 {
535 0 result = GlobusSoapMessageErrorSerializeFailed(
536 result, NULL, element_qname);
537 0 goto exit;
538 }
539 }
540
541 22 result = globus_soap_message_invoke_callouts(
542 message_handle,
543 element_qname,
544 GLOBUS_SOAP_MESSAGE_CALLOUT_BEGIN);
545 22 if(result != GLOBUS_SUCCESS)
546 {
547 0 result = GlobusSoapMessageErrorSerializeFailed(
548 result, NULL, element_qname);
549 0 goto exit;
550 }
551
552 22 result = globus_soap_message_serialize_element(
553 message_handle,
554 element_qname,
555 options,
556 &rptest_CreateResourcePropertiesTestType_qname);
557 22 if(result != GLOBUS_SUCCESS)
558 {
559 0 result = GlobusSoapMessageErrorSerializeFailed(
560 result, NULL, element_qname);
561 0 goto exit;
562 }
563
564 22 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
565 !globus_soap_message_serialize_is_c14n_subset(message_handle))
566 {
567 0 xsd_QName_init(&type_attr);
568
569 0 type_attr->local = globus_libc_strdup("type");
570 0 type_attr->Namespace = globus_libc_strdup(XSI_NS);
571 }
572
573 /* serialize namespaces */
574
575 22 result = globus_soap_message_invoke_ns_callouts(
576 message_handle,
577 element_qname,
578 GLOBUS_SOAP_MESSAGE_CALLOUT_NS_ADD,
579 &options);
580 22 if(result != GLOBUS_SUCCESS)
581 {
582 0 result = GlobusSoapMessageErrorSerializeFailed(
583 result, NULL, element_qname);
584 0 goto exit;
585 }
586
587 22 result = globus_soap_message_element_ns_add(
588 message_handle,
589 element_qname->Namespace,
590 &options);
591 22 if(result != GLOBUS_SUCCESS)
592 {
593 0 result = GlobusSoapMessageErrorSerializeFailed(
594 result, NULL, element_qname);
595 0 goto exit;
596 }
597
598 22 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
599 !globus_soap_message_serialize_is_c14n_subset(message_handle))
600 {
601 0 result = globus_soap_message_attribute_ns_add(
602 message_handle,
603 "http://www.w3.org/2001/XMLSchema-instance",
604 &options);
605 0 if(result != GLOBUS_SUCCESS)
606 {
607 0 result = GlobusSoapMessageErrorSerializeFailed(
608 result, NULL, element_qname);
609 0 goto exit;
610 }
611
612 0 result = globus_soap_message_attribute_ns_add(
613 message_handle,
614 rptest_CreateResourcePropertiesTestType_qname.Namespace,
615 &options);
616 0 if(result != GLOBUS_SUCCESS)
617 {
618 0 result = GlobusSoapMessageErrorSerializeFailed(
619 result, NULL, element_qname);
620 0 goto exit;
621 }
622 }
623
624 /* serialize attributes */
625
626 22 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
627 !globus_soap_message_serialize_is_c14n_subset(message_handle))
628 {
629 0 result = globus_soap_message_serialize_QName_attribute(
630 message_handle,
631 type_attr,
632 &rptest_CreateResourcePropertiesTestType_qname);
633 0 if(result != GLOBUS_SUCCESS)
634 {
635 0 result = GlobusSoapMessageErrorSerializeFailed(
636 result, NULL, element_qname);
637 0 goto exit;
638 }
639 }
640
641
642 22 result = globus_soap_message_invoke_callouts(
643 message_handle,
644 element_qname,
645 GLOBUS_SOAP_MESSAGE_CALLOUT_ATTR);
646 22 if(result != GLOBUS_SUCCESS)
647 {
648 0 result = GlobusSoapMessageErrorSerializeFailed(
649 result, NULL, element_qname);
650 0 goto exit;
651 }
652 }
653
654 22 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
655 {
656 22 result = globus_soap_message_serialize_element_begin_close(
657 message_handle);
658 22 if(result != GLOBUS_SUCCESS)
659 {
660 0 result = GlobusSoapMessageErrorSerializeFailed(
661 result, NULL, element_qname);
662 0 goto exit;
663 }
664 }
665 22 options &= ~GLOBUS_XSD_ELEMENT_CONTENTS_ONLY;
666
667 /* serialize contents of type */
668
669 22 subelement.local = "ResourcePropertyDefinition";
670 22 subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
671
672 22 result = rptest_ResourcePropertyDefinitionType_array_serialize(
673 &subelement,
674 &instance->ResourcePropertyDefinition,
675 message_handle,
676 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
677 22 if(result != GLOBUS_SUCCESS)
678 {
679 0 result = GlobusSoapMessageErrorSerializeFailed(
680 result, NULL, &rptest_ResourcePropertyDefinitionType_qname);
681 0 goto exit;
682 }
683
684 22 options = save_options;
685
686 22 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
687 {
688 /* add end element */
689 22 result = globus_soap_message_serialize_element_end(
690 message_handle,
691 element_qname,
692 options,
693 &rptest_CreateResourcePropertiesTestType_qname);
694 22 if(result != GLOBUS_SUCCESS)
695 {
696 0 result = GlobusSoapMessageErrorSerializeFailed(
697 result, NULL, element_qname);
698 0 goto exit;
699 }
700
701 22 globus_soap_message_element_ns_remove(
702 message_handle,
703 element_qname->Namespace,
704 &options);
705
706 /* remove namespace/prefix mappings for these types */
707
708 22 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
709 !globus_soap_message_serialize_is_c14n_subset(message_handle))
710 {
711 0 globus_soap_message_attribute_ns_remove(
712 message_handle,
713 "http://www.w3.org/2001/XMLSchema-instance",
714 &options);
715
716 0 globus_soap_message_attribute_ns_remove(
717 message_handle,
718 rptest_CreateResourcePropertiesTestType_qname.Namespace,
719 &options);
720 }
721
722 22 result = globus_soap_message_invoke_ns_callouts(
723 message_handle,
724 element_qname,
725 GLOBUS_SOAP_MESSAGE_CALLOUT_NS_REMOVE,
726 &options);
727 22 if(result != GLOBUS_SUCCESS)
728 {
729 0 result = GlobusSoapMessageErrorSerializeFailed(
730 result, NULL, element_qname);
731 0 goto exit;
732 }
733
734 22 result = globus_soap_message_invoke_callouts(
735 message_handle,
736 element_qname,
737 GLOBUS_SOAP_MESSAGE_CALLOUT_END);
738 22 if(result != GLOBUS_SUCCESS)
739 {
740 0 result = GlobusSoapMessageErrorSerializeFailed(
741 result, NULL, element_qname);
742 goto exit;
743 }
744 }
745
746 22 exit:
747 22 if (type_attr)
748 {
749 0 xsd_QName_destroy(type_attr);
750 }
751
752 22 if(any_attr_keys)
753 {
754 0 globus_list_free(any_attr_keys);
755 }
756
757 22 GlobusSoapMessageDebugExit();
758 22 return result;
759 }
760
761
762
763 globus_result_t
764 rptest_CreateResourcePropertiesTestType_deserialize_contents(
765 xsd_QName * element_qname, /* ignored */
766 rptest_CreateResourcePropertiesTestType * inst,
767 globus_soap_message_handle_t message_handle,
768 globus_xsd_element_options_t options)
769 0 {
770 0 globus_result_t result = GLOBUS_SUCCESS;
771 GlobusFuncName(rptest_CreateResourcePropertiesTestType_deserialize_contents);
772 0 GlobusSoapMessageDebugEnter();
773
774 0 result = rptest_CreateResourcePropertiesTestType_deserialize(
775 NULL,
776 inst,
777 message_handle,
778 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
779 0 if(result != GLOBUS_SUCCESS)
780 {
781 0 result = GlobusSoapMessageErrorDeserializeFailed(
782 result, element_qname);
783 goto exit;
784 }
785
786 0 exit:
787
788 0 GlobusSoapMessageDebugExit();
789 0 return result;
790 }
791
792
793
794 globus_result_t
795 rptest_CreateResourcePropertiesTestType_deserialize(
796 xsd_QName * element_qname,
797 rptest_CreateResourcePropertiesTestType * instance,
798 globus_soap_message_handle_t message_handle,
799 globus_xsd_element_options_t options)
800 22 {
801 22 globus_result_t result = GLOBUS_SUCCESS;
802 xsd_QName subelement;
803 GlobusFuncName(rptest_CreateResourcePropertiesTestType_deserialize);
804 22 GlobusSoapMessageDebugEnter();
805
806
807 22 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
808 {
809 22 result = globus_soap_message_deserialize_element(
810 message_handle, element_qname);
811 22 if(result != GLOBUS_SUCCESS)
812 {
813 0 result = GlobusSoapMessageErrorDeserializeFailed(
814 result, element_qname);
815 0 goto exit;
816 }
817
818
819 22 result = globus_soap_message_deserialize_element_begin_close(
820 message_handle);
821 22 if(result != GLOBUS_SUCCESS)
822 {
823 0 result = GlobusSoapMessageErrorDeserializeFailed(
824 result, element_qname);
825 0 goto fail_deserialize;
826 }
827 }
828
829 22 subelement.local = "ResourcePropertyDefinition";
830 22 subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
831
832 22 result = rptest_ResourcePropertyDefinitionType_array_deserialize(
833 &subelement,
834 &instance->ResourcePropertyDefinition,
835 message_handle,
836 0);
837 22 if(result != GLOBUS_SUCCESS)
838 {
839 0 result = GlobusSoapMessageErrorDeserializeFailed(
840 result,
841 (&subelement));
842 0 goto ResourcePropertyDefinition_destroy_array;
843 }
844
845 22 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
846 {
847 22 result = globus_soap_message_deserialize_element_end(
848 message_handle,
849 element_qname);
850 22 if(result != GLOBUS_SUCCESS)
851 {
852 0 result = GlobusSoapMessageErrorDeserializeFailed(
853 result, element_qname);
854 goto fail_deserialize;
855 }
856 }
857
858 goto exit;
859
860 0 fail_deserialize:
861 0 rptest_ResourcePropertyDefinitionType_array_destroy_contents(
862 &instance->ResourcePropertyDefinition);
863
864 0 ResourcePropertyDefinition_destroy_array:
865
866
867 22 exit:
868
869 22 GlobusSoapMessageDebugExit();
870 22 return result;
871 }
872
873
874
875 globus_result_t
876 rptest_CreateResourcePropertiesTestType_deserialize_pointer(
877 xsd_QName * element_qname,
878 rptest_CreateResourcePropertiesTestType ** ip,
879 globus_soap_message_handle_t message_handle,
880 globus_xsd_element_options_t options)
881 0 {
882 0 rptest_CreateResourcePropertiesTestType * instance = NULL;
883 0 globus_result_t result = GLOBUS_SUCCESS;
884 xsd_QName subelement;
885 0 int found_attrs = 0;
886 0 int empty_element = 0;
887 GlobusFuncName(rptest_CreateResourcePropertiesTestType_deserialize_pointer);
888 0 GlobusSoapMessageDebugEnter();
889
890 0 *ip = NULL;
891
892 0 result = globus_soap_message_deserialize_element(
893 message_handle, element_qname);
894 0 if(result != GLOBUS_SUCCESS &&
895 (GlobusSoapMessageStatusElementNotFoundCheck(result) ||
896 GlobusSoapMessageStatusFailedElementCheck(result) ||
897 GlobusSoapMessageStatusFailedWithTextCheck(result)))
898 {
899 0 *ip = NULL;
900 0 result = GLOBUS_SUCCESS;
901 0 goto exit;
902 }
903
904 0 if(result != GLOBUS_SUCCESS)
905 {
906 0 result = GlobusSoapMessageErrorDeserializeFailed(
907 result, element_qname);
908 0 goto exit;
909 }
910
911 0 if(globus_soap_message_deserialize_element_is_empty(
912 message_handle))
913 {
914 0 empty_element = 1;
915 }
916
917
918
919 0 result = rptest_CreateResourcePropertiesTestType_init(&instance);
920 0 if(result != GLOBUS_SUCCESS)
921 {
922 0 result = GlobusSoapMessageErrorDeserializeFailed(
923 result, element_qname);
924 0 goto exit;
925 }
926
927
928 0 if(found_attrs == 0 &&
929 globus_soap_message_deserialize_element_is_nil(message_handle))
930 {
931 0 rptest_CreateResourcePropertiesTestType_destroy(instance);
932
933 0 result = globus_soap_message_deserialize_element_end(
934 message_handle,
935 element_qname);
936 0 if(result != GLOBUS_SUCCESS)
937 {
938 0 result = GlobusSoapMessageErrorDeserializeFailed(
939 result, element_qname);
940 0 goto exit;
941 }
942
943 0 *ip = NULL;
944 0 globus_object_free(globus_error_get(result));
945 0 result = GLOBUS_SUCCESS;
946 0 goto exit;
947 }
948
949
950 0 if(empty_element)
951 {
952 0 result = globus_soap_message_deserialize_element_end(
953 message_handle,
954 element_qname);
955 0 if(result != GLOBUS_SUCCESS)
956 {
957 0 result = GlobusSoapMessageErrorDeserializeFailed(
958 result, element_qname);
959 0 goto fail_deserialize;
960 }
961
962 0 *ip = instance;
963 0 goto exit;
964 }
965
966 0 result = globus_soap_message_deserialize_element_begin_close(
967 message_handle);
968 0 if(result != GLOBUS_SUCCESS)
969 {
970 0 result = GlobusSoapMessageErrorDeserializeFailed(
971 result, element_qname);
972 0 goto exit;
973 }
974
975
976 0 subelement.local = "ResourcePropertyDefinition";
977 0 subelement.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest";
978
979 0 result = rptest_ResourcePropertyDefinitionType_array_deserialize(
980 &subelement,
981 &instance->ResourcePropertyDefinition,
982 message_handle,
983 0);
984 0 if(result != GLOBUS_SUCCESS)
985 {
986 0 result = GlobusSoapMessageErrorDeserializeFailed(
987 result,
988 (&subelement));
989 0 goto ResourcePropertyDefinition_destroy_array;
990 }
991
992
993 0 result = globus_soap_message_deserialize_element_end(
994 message_handle,
995 element_qname);
996 0 if(result != GLOBUS_SUCCESS)
997 {
998 0 result = GlobusSoapMessageErrorDeserializeFailed(
999 result, element_qname);
1000 0 goto fail_deserialize;
1001 }
1002
1003 0 *ip = instance;
1004
1005 0 goto exit;
1006
1007 0 fail_deserialize:
1008 0 rptest_ResourcePropertyDefinitionType_array_destroy_contents(
1009 &instance->ResourcePropertyDefinition);
1010
1011 0 ResourcePropertyDefinition_destroy_array:
1012
1013 0 exit:
1014
1015 0 GlobusSoapMessageDebugExit();
1016 0 return result;
1017 }
1018
1019
1020 globus_result_t
1021 rptest_CreateResourcePropertiesTestType_array_init_contents(
1022 rptest_CreateResourcePropertiesTestType_array * array)
1023 0 {
1024 GlobusFuncName(rptest_CreateResourcePropertiesTestType_array_init_contents);
1025 0 GlobusSoapMessageDebugEnter();
1026
1027 0 memset(array, 0, sizeof(rptest_CreateResourcePropertiesTestType_array));
1028
1029 0 GlobusSoapMessageDebugExit();
1030 0 return GLOBUS_SUCCESS;
1031 }
1032
1033 globus_result_t
1034 rptest_CreateResourcePropertiesTestType_array_init(
1035 rptest_CreateResourcePropertiesTestType_array ** arr)
1036 0 {
1037 rptest_CreateResourcePropertiesTestType_array * array;
1038 globus_result_t result;
1039 GlobusFuncName(rptest_CreateResourcePropertiesTestType_array_init);
1040 0 GlobusSoapMessageDebugEnter();
1041
1042 0 array = (rptest_CreateResourcePropertiesTestType_array *)
1043 globus_malloc(sizeof(rptest_CreateResourcePropertiesTestType_array));
1044 0 if(!array)
1045 {
1046 0 result = GlobusSoapMessageErrorOutOfMemory;
1047 0 goto exit;
1048 }
1049
1050 0 result = rptest_CreateResourcePropertiesTestType_array_init_contents(array);
1051 0 if(result != GLOBUS_SUCCESS)
1052 {
1053 0 globus_free(array);
1054 0 array = NULL;
1055
1056 }
1057
1058 0 *arr = array;
1059
1060 0 exit:
1061 0 GlobusSoapMessageDebugExit();
1062 0 return result;
1063 }
1064
1065 void
1066 rptest_CreateResourcePropertiesTestType_array_destroy_contents(
1067 rptest_CreateResourcePropertiesTestType_array * array)
1068 0 {
1069 0 int i = 0;
1070 GlobusFuncName(rptest_CreateResourcePropertiesTestType_array_destroy_contents);
1071 0 GlobusSoapMessageDebugEnter();
1072
1073 0 for(; i < array->length; ++i)
1074 {
1075 0 rptest_CreateResourcePropertiesTestType_destroy_contents(&array->elements[i]);
1076 }
1077
1078 0 if(array->elements)
1079 {
1080 0 globus_free(array->elements);
1081 0 array->elements = NULL;
1082 }
1083 0 array->length = 0;
1084
1085 0 GlobusSoapMessageDebugExit();
1086 }
1087
1088 void
1089 rptest_CreateResourcePropertiesTestType_array_destroy(
1090 rptest_CreateResourcePropertiesTestType_array * array)
1091 0 {
1092 GlobusFuncName(rptest_CreateResourcePropertiesTestType_array_destroy);
1093 0 GlobusSoapMessageDebugEnter();
1094
1095 0 rptest_CreateResourcePropertiesTestType_array_destroy_contents(array);
1096 0 globus_free(array);
1097
1098 0 GlobusSoapMessageDebugExit();
1099 }
1100
1101 globus_result_t
1102 rptest_CreateResourcePropertiesTestType_array_copy(
1103 rptest_CreateResourcePropertiesTestType_array ** dest_arr,
1104 const rptest_CreateResourcePropertiesTestType_array * src_arr)
1105 0 {
1106 rptest_CreateResourcePropertiesTestType_array * array;
1107 globus_result_t result;
1108 GlobusFuncName(rptest_CreateResourcePropertiesTestType_array_copy);
1109 0 GlobusSoapMessageDebugEnter();
1110
1111 0 array = (rptest_CreateResourcePropertiesTestType_array *) globus_malloc(
1112 sizeof(rptest_CreateResourcePropertiesTestType_array));
1113 0 if(!array)
1114 {
1115 0 result = GlobusSoapMessageErrorOutOfMemory;
1116 0 GlobusSoapMessageDebugExit();
1117 0 return result;
1118 }
1119
1120 0 result = rptest_CreateResourcePropertiesTestType_array_copy_contents(array, src_arr);
1121 0 if(result != GLOBUS_SUCCESS)
1122 {
1123 0 globus_free(array);
1124 0 GlobusSoapMessageDebugExit();
1125 0 return result;
1126 }
1127
1128 0 *dest_arr = array;
1129
1130 0 GlobusSoapMessageDebugExit();
1131 0 return GLOBUS_SUCCESS;
1132 }
1133
1134 globus_result_t
1135 rptest_CreateResourcePropertiesTestType_array_copy_contents(
1136 rptest_CreateResourcePropertiesTestType_array * dest_arr,
1137 const rptest_CreateResourcePropertiesTestType_array * src_arr)
1138 0 {
1139 int i;
1140 0 globus_result_t result = GLOBUS_SUCCESS;
1141 GlobusFuncName(rptest_CreateResourcePropertiesTestType_array_copy_contents);
1142 0 GlobusSoapMessageDebugEnter();
1143
1144 0 dest_arr->length = src_arr->length;
1145 0 if(dest_arr->length > 0)
1146 {
1147 0 dest_arr->elements = (rptest_CreateResourcePropertiesTestType *) malloc(
1148 sizeof(rptest_CreateResourcePropertiesTestType) * dest_arr->length);
1149 0 if(!dest_arr->elements)
1150 {
1151 0 result = GlobusSoapMessageErrorOutOfMemory;
1152 0 GlobusSoapMessageDebugExit();
1153 0 return result;
1154 }
1155 }
1156 else
1157 {
1158 0 dest_arr->elements = NULL;
1159 }
1160
1161 0 for(i = 0; i < dest_arr->length; i++)
1162 {
1163 0 result = rptest_CreateResourcePropertiesTestType_copy_contents(
1164 &dest_arr->elements[i], &src_arr->elements[i]);
1165 0 if(result != GLOBUS_SUCCESS)
1166 {
1167 0 while(i--)
1168 {
1169 0 rptest_CreateResourcePropertiesTestType_destroy_contents(&dest_arr->elements[i]);
1170 }
1171
1172 0 globus_free(dest_arr->elements);
1173 0 dest_arr->elements = NULL;
1174 0 dest_arr->length = 0;
1175 0 break;
1176 }
1177 }
1178
1179 0 GlobusSoapMessageDebugExit();
1180 0 return result;
1181 }
1182
1183 rptest_CreateResourcePropertiesTestType *
1184 rptest_CreateResourcePropertiesTestType_array_push(
1185 rptest_CreateResourcePropertiesTestType_array * array)
1186 0 {
1187 GlobusFuncName(rptest_CreateResourcePropertiesTestType_array_push);
1188 0 GlobusSoapMessageDebugEnter();
1189
1190 0 array->elements = realloc(array->elements,
1191 sizeof(rptest_CreateResourcePropertiesTestType) *
1192 (array->length + 1));
1193 0 memset(&array->elements[array->length], 0, sizeof(rptest_CreateResourcePropertiesTestType));
1194 0 array->length++;
1195
1196 0 GlobusSoapMessageDebugExit();
1197 0 return (&array->elements[array->length - 1]);
1198 }
1199
1200 void *
1201 rptest_CreateResourcePropertiesTestType_array_push_wrapper(
1202 void * array)
1203 0 {
1204 0 return (void *) rptest_CreateResourcePropertiesTestType_array_push((rptest_CreateResourcePropertiesTestType_array *) array);
1205 }
1206
1207 globus_result_t
1208 rptest_CreateResourcePropertiesTestType_array_serialize(
1209 xsd_QName * element_qname,
1210 rptest_CreateResourcePropertiesTestType_array * array,
1211 globus_soap_message_handle_t message,
1212 globus_xsd_element_options_t options)
1213 0 {
1214 0 globus_result_t result = GLOBUS_SUCCESS;
1215 0 int i = 0;
1216 GlobusFuncName(rptest_CreateResourcePropertiesTestType_array_serialize);
1217 0 GlobusSoapMessageDebugEnter();
1218
1219 0 for(; i < array->length; ++i)
1220 {
1221 0 result = rptest_CreateResourcePropertiesTestType_serialize(
1222 element_qname,
1223 &array->elements[i],
1224 message,
1225 options);
1226 0 if(result != GLOBUS_SUCCESS)
1227 {
1228 0 goto exit;
1229 }
1230 }
1231
1232 0 exit:
1233
1234 0 GlobusSoapMessageDebugExit();
1235 0 return result;
1236 }
1237
1238 globus_result_t
1239 rptest_CreateResourcePropertiesTestType_array_deserialize(
1240 xsd_QName * element_qname,
1241 rptest_CreateResourcePropertiesTestType_array * array,
1242 globus_soap_message_handle_t message,
1243 globus_xsd_element_options_t options)
1244 0 {
1245 0 globus_result_t result = GLOBUS_SUCCESS;
1246 0 int i = 0;
1247 int pre_length;
1248 GlobusFuncName(rptest_CreateResourcePropertiesTestType_array_deserialize);
1249 0 GlobusSoapMessageDebugEnter();
1250
1251 0 pre_length = array->length;
1252
1253 0 for(i = 0; i < pre_length; ++i)
1254 {
1255 0 result = rptest_CreateResourcePropertiesTestType_deserialize(
1256 element_qname,
1257 &array->elements[i],
1258 message,
1259 options);
1260 0 if(result != GLOBUS_SUCCESS)
1261 {
1262 0 if(GlobusSoapMessageStatusFailedElementCheck(result) ||
1263 GlobusSoapMessageStatusElementNotFoundCheck(result) ||
1264 GlobusSoapMessageStatusFailedWithTextCheck(result))
1265 {
1266 0 result = GLOBUS_SUCCESS;
1267 0 break;
1268 }
1269
1270 0 result = GlobusSoapMessageErrorDeserializeFailed(
1271 result, element_qname);
1272 0 goto exit;
1273 }
1274 }
1275
1276 0 while(result == GLOBUS_SUCCESS)
1277 {
1278 rptest_CreateResourcePropertiesTestType next;
1279 0 memset(&next, 0, sizeof(rptest_CreateResourcePropertiesTestType));
1280
1281 0 result = rptest_CreateResourcePropertiesTestType_deserialize(
1282 element_qname,
1283 &next,
1284 message,
1285 options);
1286 0 if(result != GLOBUS_SUCCESS)
1287 {
1288 0 if(GlobusSoapMessageStatusFailedElementCheck(result) ||
1289 GlobusSoapMessageStatusElementNotFoundCheck(result) ||
1290 GlobusSoapMessageStatusFailedWithTextCheck(result))
1291 {
1292 0 result = GLOBUS_SUCCESS;
1293 0 break;
1294 }
1295
1296 0 result = GlobusSoapMessageErrorDeserializeFailed(
1297 result, element_qname);
1298 0 goto exit;
1299 }
1300
1301 0 array->elements = realloc(
1302 array->elements,
1303 (array->length + 1) * sizeof(rptest_CreateResourcePropertiesTestType));
1304 0 if(!array->elements)
1305 {
1306 0 result = GlobusSoapMessageErrorOutOfMemory;
1307 0 goto exit;
1308 }
1309 0 array->elements[array->length] = next;
1310 0 array->length++;
1311 0 ++i;
1312 }
1313
1314 0 exit:
1315
1316 0 if(result != GLOBUS_SUCCESS)
1317 {
1318 0 int di = 0;
1319 0 for(; di < i; ++di)
1320 {
1321 0 rptest_CreateResourcePropertiesTestType_destroy_contents(
1322 &array->elements[di]);
1323 0 memset(&array->elements[di], 0, sizeof(rptest_CreateResourcePropertiesTestType));
1324 }
1325 }
1326
1327 0 GlobusSoapMessageDebugExit();
1328 0 return result;