1 /*
2 * Copyright 1999-2006 University of Chicago
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18 /*
19 * This file is automatically generated by the Globus WSDLtoC converter
20 */
21
22 #include "xsd_QName.h"
23 #include "globus_soap_message.h"
24 #include "globus_xsd_type_info.h"
25 #include "wsrp_InsertResourcePropertiesType.h"
26 #include "globus_xsd_generic_array.h"
27
28 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
29 xsd_QName wsrp_InsertResourcePropertiesType_qname =
30 {
31 WSRP_INSERTRESOURCEPROPERTIESTYPE_NS,
32 WSRP_INSERTRESOURCEPROPERTIESTYPE_LOCAL
33 };
34 #endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */
35
36 static
37 globus_result_t
38 wsrp_InsertResourcePropertiesType_serialize_wrapper(
39 const xsd_QName * element_qname,
40 const void * instance,
41 globus_soap_message_handle_t message_handle,
42 globus_xsd_element_options_t options)
43 0 {
44 0 return wsrp_InsertResourcePropertiesType_serialize(
45 element_qname,
46 (const wsrp_InsertResourcePropertiesType *) instance,
47 message_handle, options);
48 }
49
50 static
51 globus_result_t
52 wsrp_InsertResourcePropertiesType_deserialize_pointer_wrapper(
53 const xsd_QName * element_qname,
54 void ** ip,
55 globus_soap_message_handle_t message_handle,
56 globus_xsd_element_options_t options)
57 0 {
58 0 return wsrp_InsertResourcePropertiesType_deserialize_pointer(
59 element_qname,
60 (wsrp_InsertResourcePropertiesType **) ip,
61 message_handle, options);
62 }
63
64 static
65 globus_result_t
66 wsrp_InsertResourcePropertiesType_init_wrapper(void **object)
67 0 {
68 0 return wsrp_InsertResourcePropertiesType_init(
69 (wsrp_InsertResourcePropertiesType **) object);
70 }
71
72 static
73 void
74 wsrp_InsertResourcePropertiesType_destroy_wrapper(
75 void * object)
76 0 {
77 0 wsrp_InsertResourcePropertiesType_destroy(
78 (wsrp_InsertResourcePropertiesType *) object);
79 0 }
80
81 static
82 globus_result_t
83 wsrp_InsertResourcePropertiesType_copy_wrapper(
84 void ** dest_obj,
85 const void * src_obj)
86 0 {
87 0 return wsrp_InsertResourcePropertiesType_copy(
88 (wsrp_InsertResourcePropertiesType **) dest_obj,
89 (wsrp_InsertResourcePropertiesType *) src_obj);
90 }
91
92 static
93 globus_result_t
94 wsrp_InsertResourcePropertiesType_init_contents_wrapper(void *object)
95 0 {
96 0 return wsrp_InsertResourcePropertiesType_init_contents(
97 (wsrp_InsertResourcePropertiesType *) object);
98 }
99
100 static
101 void
102 wsrp_InsertResourcePropertiesType_destroy_contents_wrapper(
103 void * object)
104 0 {
105 0 wsrp_InsertResourcePropertiesType_destroy_contents(
106 (wsrp_InsertResourcePropertiesType *) object);
107 0 }
108
109 static
110 globus_result_t
111 wsrp_InsertResourcePropertiesType_copy_contents_wrapper(
112 void * dest_obj,
113 const void * src_obj)
114 0 {
115 0 return wsrp_InsertResourcePropertiesType_copy_contents(
116 (wsrp_InsertResourcePropertiesType *) dest_obj,
117 (const wsrp_InsertResourcePropertiesType *) src_obj);
118 }
119
120 static
121 globus_result_t
122 wsrp_InsertResourcePropertiesType_serialize_contents_wrapper(
123 const xsd_QName * element_qname,
124 const void * instance,
125 globus_soap_message_handle_t message_handle,
126 globus_xsd_element_options_t options)
127 0 {
128 0 return wsrp_InsertResourcePropertiesType_serialize_contents(
129 element_qname,
130 (wsrp_InsertResourcePropertiesType *) instance,
131 message_handle, options);
132 }
133
134 static
135 globus_result_t
136 wsrp_InsertResourcePropertiesType_deserialize_contents_wrapper(
137 const xsd_QName * element_qname,
138 void ** instance,
139 globus_soap_message_handle_t message_handle,
140 globus_xsd_element_options_t options)
141 0 {
142 globus_result_t result;
143 GlobusFuncName(wsrp_InsertResourcePropertiesType_deserialize_contents_wrapper);
144 0 GlobusSoapMessageDebugEnter();
145
146 0 if(!*instance)
147 {
148 0 result = wsrp_InsertResourcePropertiesType_init(
149 (wsrp_InsertResourcePropertiesType **)instance);
150 0 if(result != GLOBUS_SUCCESS)
151 {
152 0 goto error;
153 }
154 }
155
156 0 result = wsrp_InsertResourcePropertiesType_deserialize_contents(
157 element_qname,
158 *(wsrp_InsertResourcePropertiesType **)instance,
159 message_handle, options);
160 0 error:
161 0 GlobusSoapMessageDebugExit();
162 0 return result;
163 }
164
165 static
166 globus_result_t
167 wsrp_InsertResourcePropertiesType_array_serialize_wrapper(
168 const xsd_QName * element,
169 const void * instance,
170 globus_soap_message_handle_t message,
171 globus_xsd_element_options_t options)
172 0 {
173 0 return wsrp_InsertResourcePropertiesType_array_serialize(
174 element,
175 (wsrp_InsertResourcePropertiesType_array *) instance,
176 message, options);
177 }
178
179 static
180 globus_result_t
181 wsrp_InsertResourcePropertiesType_array_deserialize_wrapper(
182 const xsd_QName * element_qname,
183 void ** inst,
184 globus_soap_message_handle_t message,
185 globus_xsd_element_options_t options)
186 0 {
187 0 if(!*inst)
188 {
189 globus_result_t result;
190
191 0 result = wsrp_InsertResourcePropertiesType_array_init(
192 (wsrp_InsertResourcePropertiesType_array **)inst);
193 0 if(result != GLOBUS_SUCCESS)
194 {
195 0 return result;
196 }
197 }
198
199 0 return wsrp_InsertResourcePropertiesType_array_deserialize(
200 element_qname,
201 *(wsrp_InsertResourcePropertiesType_array **) inst,
202 message, options);
203 }
204
205 static
206 globus_result_t
207 wsrp_InsertResourcePropertiesType_array_init_wrapper(
208 void ** arr)
209 0 {
210 0 return wsrp_InsertResourcePropertiesType_array_init(
211 (wsrp_InsertResourcePropertiesType_array **) arr);
212 }
213
214 static
215 void
216 wsrp_InsertResourcePropertiesType_array_destroy_wrapper(
217 void * arr)
218 0 {
219 0 wsrp_InsertResourcePropertiesType_array_destroy(
220 (wsrp_InsertResourcePropertiesType_array *) arr);
221 0 }
222
223 static
224 globus_result_t
225 wsrp_InsertResourcePropertiesType_array_copy_wrapper(
226 void ** dest_arr,
227 const void * src_arr)
228 0 {
229 0 return wsrp_InsertResourcePropertiesType_array_copy(
230 (wsrp_InsertResourcePropertiesType_array **) dest_arr,
231 (const wsrp_InsertResourcePropertiesType_array *) src_arr);
232 }
233
234 static
235 globus_result_t
236 wsrp_InsertResourcePropertiesType_array_init_contents_wrapper(
237 void * arr)
238 0 {
239 0 return wsrp_InsertResourcePropertiesType_array_init_contents(
240 (wsrp_InsertResourcePropertiesType_array *) arr);
241 }
242
243 static
244 void
245 wsrp_InsertResourcePropertiesType_array_destroy_contents_wrapper(
246 void * arr)
247 0 {
248 0 wsrp_InsertResourcePropertiesType_array_destroy_contents(
249 (wsrp_InsertResourcePropertiesType_array *) arr);
250 0 }
251
252 static
253 globus_result_t
254 wsrp_InsertResourcePropertiesType_array_copy_contents_wrapper(
255 void * dest_arr,
256 const void * src_arr)
257 0 {
258 0 return wsrp_InsertResourcePropertiesType_array_copy_contents(
259 (wsrp_InsertResourcePropertiesType_array *) dest_arr,
260 (const wsrp_InsertResourcePropertiesType_array *) src_arr);
261 }
262
263 static
264 void *
265 wsrp_InsertResourcePropertiesType_array_push_wrapper(
266 void * array)
267 0 {
268 0 return (void *) wsrp_InsertResourcePropertiesType_array_push((wsrp_InsertResourcePropertiesType_array *) array);
269 }
270
271 struct globus_xsd_type_info_s wsrp_InsertResourcePropertiesType_contents_info =
272 {
273 &wsrp_InsertResourcePropertiesType_qname,
274 wsrp_InsertResourcePropertiesType_serialize_contents_wrapper,
275 wsrp_InsertResourcePropertiesType_deserialize_contents_wrapper,
276 wsrp_InsertResourcePropertiesType_init_wrapper,
277 wsrp_InsertResourcePropertiesType_destroy_wrapper,
278 wsrp_InsertResourcePropertiesType_copy_wrapper,
279 wsrp_InsertResourcePropertiesType_init_contents_wrapper,
280 wsrp_InsertResourcePropertiesType_destroy_contents_wrapper,
281 wsrp_InsertResourcePropertiesType_copy_contents_wrapper,
282 sizeof(wsrp_InsertResourcePropertiesType),
283 NULL,
284 NULL,
285 NULL
286 };
287
288 struct globus_xsd_type_info_s wsrp_InsertResourcePropertiesType_array_info =
289 {
290 &wsrp_InsertResourcePropertiesType_qname,
291 wsrp_InsertResourcePropertiesType_array_serialize_wrapper,
292 wsrp_InsertResourcePropertiesType_array_deserialize_wrapper,
293 wsrp_InsertResourcePropertiesType_array_init_wrapper,
294 wsrp_InsertResourcePropertiesType_array_destroy_wrapper,
295 wsrp_InsertResourcePropertiesType_array_copy_wrapper,
296 wsrp_InsertResourcePropertiesType_array_init_contents_wrapper,
297 wsrp_InsertResourcePropertiesType_array_destroy_contents_wrapper,
298 wsrp_InsertResourcePropertiesType_array_copy_contents_wrapper,
299 sizeof(wsrp_InsertResourcePropertiesType),
300 wsrp_InsertResourcePropertiesType_array_push_wrapper,
301 NULL,
302 NULL
303 };
304
305 struct globus_xsd_type_info_s wsrp_InsertResourcePropertiesType_info =
306 {
307 &wsrp_InsertResourcePropertiesType_qname,
308 wsrp_InsertResourcePropertiesType_serialize_wrapper,
309 wsrp_InsertResourcePropertiesType_deserialize_pointer_wrapper,
310 wsrp_InsertResourcePropertiesType_init_wrapper,
311 wsrp_InsertResourcePropertiesType_destroy_wrapper,
312 wsrp_InsertResourcePropertiesType_copy_wrapper,
313 wsrp_InsertResourcePropertiesType_init_contents_wrapper,
314 wsrp_InsertResourcePropertiesType_destroy_contents_wrapper,
315 wsrp_InsertResourcePropertiesType_copy_contents_wrapper,
316 sizeof(wsrp_InsertResourcePropertiesType),
317 NULL,
318 &wsrp_InsertResourcePropertiesType_contents_info,
319 &wsrp_InsertResourcePropertiesType_array_info
320 };
321
322 globus_result_t
323 wsrp_InsertResourcePropertiesType_init_contents(
324 wsrp_InsertResourcePropertiesType * instance)
325 0 {
326 0 globus_result_t result = GLOBUS_SUCCESS;
327 GlobusFuncName(wsrp_InsertResourcePropertiesType_init_contents);
328 0 GlobusSoapMessageDebugEnter();
329
330 0 memset(instance, 0, sizeof(wsrp_InsertResourcePropertiesType));
331
332 0 GlobusSoapMessageDebugExit();
333 0 return result;
334 }
335
336 globus_result_t
337 wsrp_InsertResourcePropertiesType_init(
338 wsrp_InsertResourcePropertiesType ** object)
339 0 {
340 wsrp_InsertResourcePropertiesType * instance;
341 0 globus_result_t result = GLOBUS_SUCCESS;
342 GlobusFuncName(wsrp_InsertResourcePropertiesType_init);
343 0 GlobusSoapMessageDebugEnter();
344
345 0 instance = globus_malloc(sizeof(wsrp_InsertResourcePropertiesType));
346 0 if(!instance)
347 {
348 0 result = GlobusSoapMessageErrorOutOfMemory;
349 0 goto exit;
350 }
351
352 0 memset(instance, 0, sizeof(wsrp_InsertResourcePropertiesType));
353
354 0 *object = instance;
355
356 0 exit:
357 0 GlobusSoapMessageDebugExit();
358 0 return result;
359 }
360
361 void
362 wsrp_InsertResourcePropertiesType_destroy(
363 wsrp_InsertResourcePropertiesType * instance)
364 0 {
365 GlobusFuncName(wsrp_InsertResourcePropertiesType_destroy);
366 0 GlobusSoapMessageDebugEnter();
367
368 0 if(!instance)
369 {
370 0 goto exit;
371 }
372
373 0 wsrp_InsertResourcePropertiesType_destroy_contents(instance);
374 0 globus_free(instance);
375
376 0 exit:
377
378 0 GlobusSoapMessageDebugExit();
379 0 }
380
381
382 void
383 wsrp_InsertResourcePropertiesType_destroy_contents(
384 wsrp_InsertResourcePropertiesType * instance)
385 0 {
386 GlobusFuncName(wsrp_InsertResourcePropertiesType_destroy_contents);
387 0 GlobusSoapMessageDebugEnter();
388
389 0 if(instance)
390 {
391
392
393 0 wsrp_InsertType_destroy_contents(
394 &instance->Insert);
395
396 }
397
398 0 GlobusSoapMessageDebugExit();
399 0 }
400
401
402 globus_result_t
403 wsrp_InsertResourcePropertiesType_copy(
404 wsrp_InsertResourcePropertiesType ** dest_obj,
405 const wsrp_InsertResourcePropertiesType * src_obj)
406 0 {
407 0 globus_result_t result = GLOBUS_SUCCESS;
408 wsrp_InsertResourcePropertiesType * instance;
409 GlobusFuncName(wsrp_InsertResourcePropertiesType_copy);
410
411 0 GlobusSoapMessageDebugEnter();
412
413 0 instance = calloc(1, sizeof(wsrp_InsertResourcePropertiesType));
414 0 if (instance == NULL)
415 {
416 0 GlobusSoapMessageDebugExit();
417 0 return GlobusSoapMessageErrorOutOfMemory;
418 }
419
420 0 result = wsrp_InsertResourcePropertiesType_copy_contents(instance, src_obj);
421 0 if(result != GLOBUS_SUCCESS)
422 {
423 0 globus_free(instance);
424 0 GlobusSoapMessageDebugExit();
425 0 return GlobusSoapMessageErrorOutOfMemory;
426 }
427
428 0 *dest_obj = instance;
429 0 GlobusSoapMessageDebugExit();
430 0 return result;
431 }
432
433 globus_result_t
434 wsrp_InsertResourcePropertiesType_copy_contents(
435 wsrp_InsertResourcePropertiesType * instance,
436 const wsrp_InsertResourcePropertiesType * src_obj)
437 0 {
438 0 globus_result_t result = GLOBUS_SUCCESS;
439 GlobusFuncName(wsrp_InsertResourcePropertiesType_copy_contents);
440
441 0 GlobusSoapMessageDebugEnter();
442
443 0 result = wsrp_InsertType_copy_contents(
444 &instance->Insert,
445 &src_obj->Insert);
446 0 if(result != GLOBUS_SUCCESS)
447 {
448 0 result = GlobusSoapMessageErrorCopyFailed(
449 result, NULL, &wsrp_InsertType_qname);
450 0 goto Insert_destroy;
451 }
452
453 0 goto exit;
454
455 fail_deserialize:
456 wsrp_InsertType_destroy_contents(
457 &instance->Insert);
458
459 0 Insert_destroy:
460
461
462 0 exit:
463
464 0 GlobusSoapMessageDebugExit();
465 0 return result;
466 }
467
468
469
470 globus_result_t
471 wsrp_InsertResourcePropertiesType_serialize_contents(
472 const xsd_QName * element_qname, /* ignored */
473 const wsrp_InsertResourcePropertiesType * inst,
474 globus_soap_message_handle_t message_handle,
475 globus_xsd_element_options_t options)
476 0 {
477 0 globus_result_t result = GLOBUS_SUCCESS;
478 GlobusFuncName(wsrp_InsertResourcePropertiesType_serialize_contents);
479 0 GlobusSoapMessageDebugEnter();
480
481 0 result = wsrp_InsertResourcePropertiesType_serialize(
482 NULL,
483 inst,
484 message_handle,
485 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
486 0 if(result != GLOBUS_SUCCESS)
487 {
488 0 result = GlobusSoapMessageErrorSerializeFailed(
489 result, NULL, element_qname);
490 0 goto exit;
491 }
492
493 0 exit:
494
495 0 GlobusSoapMessageDebugExit();
496 0 return result;
497 }
498
499
500
501 globus_result_t
502 wsrp_InsertResourcePropertiesType_serialize(
503 const xsd_QName * element_qname,
504 const wsrp_InsertResourcePropertiesType * instance,
505 globus_soap_message_handle_t message_handle,
506 globus_xsd_element_options_t options)
507 0 {
508 0 globus_result_t result = GLOBUS_SUCCESS;
509 xsd_QName subelement;
510 0 globus_list_t * any_attr_keys = NULL;
511 0 globus_list_t * any_attr_keys_iterator = NULL;
512 0 xsd_QName * type_attr = NULL;
513
514 0 char * prefix = NULL;
515 int prefix_created;
516 0 int define_prefix = 0;
517 0 int save_options = options;
518
519 GlobusFuncName(wsrp_InsertResourcePropertiesType_serialize);
520 0 GlobusSoapMessageDebugEnter();
521
522
523 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
524 {
525 /* serialize wsrp_InsertResourcePropertiesType element */
526 0 result = globus_soap_message_element_ns_set(
527 message_handle,
528 element_qname,
529 element_qname->Namespace,
530 &options);
531 0 if(result != GLOBUS_SUCCESS)
532 {
533 0 result = GlobusSoapMessageErrorSerializeFailed(
534 result, NULL, element_qname);
535 0 goto exit;
536 }
537
538 0 if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
539 !globus_soap_message_serialize_is_c14n_subset(message_handle)))
540 {
541 0 result = globus_soap_message_attribute_ns_set(
542 message_handle,
543 element_qname,
544 "http://www.w3.org/2001/XMLSchema-instance",
545 &options);
546 0 if(result != GLOBUS_SUCCESS)
547 {
548 0 result = GlobusSoapMessageErrorSerializeFailed(
549 result, NULL, element_qname);
550 0 goto exit;
551 }
552 }
553
554 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
555 !globus_soap_message_serialize_is_c14n_subset(message_handle))
556 {
557
558 0 result = globus_soap_message_attribute_ns_set(
559 message_handle,
560 element_qname,
561 wsrp_InsertResourcePropertiesType_qname.Namespace,
562 &options);
563 0 if(result != GLOBUS_SUCCESS)
564 {
565 0 result = GlobusSoapMessageErrorSerializeFailed(
566 result, NULL, element_qname);
567 0 goto exit;
568 }
569 }
570
571 0 result = globus_soap_message_serialize_element(
572 message_handle,
573 element_qname,
574 options,
575 &wsrp_InsertResourcePropertiesType_qname);
576 0 if(result != GLOBUS_SUCCESS)
577 {
578 0 result = GlobusSoapMessageErrorSerializeFailed(
579 result, NULL, element_qname);
580 0 goto exit;
581 }
582
583 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
584 !globus_soap_message_serialize_is_c14n_subset(message_handle))
585 {
586 0 xsd_QName_init(&type_attr);
587
588 0 type_attr->local = globus_libc_strdup("type");
589 0 type_attr->Namespace = globus_libc_strdup(XSI_NS);
590 }
591
592
593 /* serialize namespaces */
594 0 result = globus_soap_message_element_ns_add(
595 message_handle,
596 element_qname,
597 element_qname->Namespace,
598 &options);
599 0 if(result != GLOBUS_SUCCESS)
600 {
601 0 result = GlobusSoapMessageErrorSerializeFailed(
602 result, NULL, element_qname);
603 0 goto exit;
604 }
605
606 0 if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
607 !globus_soap_message_serialize_is_c14n_subset(message_handle)))
608 {
609 0 result = globus_soap_message_attribute_ns_add(
610 message_handle,
611 element_qname,
612 "http://www.w3.org/2001/XMLSchema-instance",
613 &options);
614 0 if(result != GLOBUS_SUCCESS)
615 {
616 0 result = GlobusSoapMessageErrorSerializeFailed(
617 result, NULL, element_qname);
618 0 goto exit;
619 }
620 }
621 0 if ((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
622 !globus_soap_message_serialize_is_c14n_subset(message_handle))
623 {
624
625 0 result = globus_soap_message_attribute_ns_add(
626 message_handle,
627 element_qname,
628 wsrp_InsertResourcePropertiesType_qname.Namespace,
629 &options);
630 0 if(result != GLOBUS_SUCCESS)
631 {
632 0 result = GlobusSoapMessageErrorSerializeFailed(
633 result, NULL, element_qname);
634 0 goto exit;
635 }
636 }
637
638 /* serialize attributes */
639
640 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
641 !globus_soap_message_serialize_is_c14n_subset(message_handle))
642 {
643 0 result = globus_soap_message_serialize_QName_attribute(
644 message_handle,
645 type_attr,
646 &wsrp_InsertResourcePropertiesType_qname);
647 0 if(result != GLOBUS_SUCCESS)
648 {
649 0 result = GlobusSoapMessageErrorSerializeFailed(
650 result, NULL, element_qname);
651 0 goto exit;
652 }
653 }
654
655
656 }
657
658 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
659 {
660 0 result = globus_soap_message_serialize_element_begin_close(
661 message_handle, element_qname);
662 0 if(result != GLOBUS_SUCCESS)
663 {
664 0 result = GlobusSoapMessageErrorSerializeFailed(
665 result, NULL, element_qname);
666 0 goto exit;
667 }
668 }
669 0 options &= ~GLOBUS_XSD_ELEMENT_CONTENTS_ONLY;
670
671
672 /* serialize contents of type */
673
674 0 subelement.local = "Insert";
675 0 subelement.Namespace = "http://docs.oasis-open.org/wsrf/rp-2";
676
677 0 result = wsrp_InsertType_serialize(
678 &subelement,
679 &instance->Insert,
680 message_handle,
681 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
682 0 if(result != GLOBUS_SUCCESS)
683 {
684 0 result = GlobusSoapMessageErrorSerializeFailed(
685 result, NULL, &wsrp_InsertType_qname);
686 0 goto exit;
687 }
688
689 0 options = save_options;
690
691 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
692 {
693 /* add end element */
694 0 result = globus_soap_message_serialize_element_end(
695 message_handle,
696 element_qname,
697 options,
698 &wsrp_InsertResourcePropertiesType_qname);
699 0 if(result != GLOBUS_SUCCESS)
700 {
701 0 result = GlobusSoapMessageErrorSerializeFailed(
702 result, NULL, element_qname);
703 0 goto exit;
704 }
705
706 0 globus_soap_message_element_ns_remove(
707 message_handle,
708 element_qname->Namespace,
709 &options);
710
711 /* remove namespace/prefix mappings for these types */
712
713 0 if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
714 !globus_soap_message_serialize_is_c14n_subset(message_handle)))
715 {
716 0 globus_soap_message_attribute_ns_remove(
717 message_handle,
718 "http://www.w3.org/2001/XMLSchema-instance",
719 &options);
720 }
721 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
722 !globus_soap_message_serialize_is_c14n_subset(message_handle))
723 {
724 0 globus_soap_message_attribute_ns_remove(
725 message_handle,
726 wsrp_InsertResourcePropertiesType_qname.Namespace,
727 &options);
728 }
729
730 }
731
732 0 exit:
733 0 if (type_attr)
734 {
735 0 xsd_QName_destroy(type_attr);
736 }
737
738
739 0 if(any_attr_keys)
740 {
741 0 globus_list_free(any_attr_keys);
742 }
743
744 0 GlobusSoapMessageDebugExit();
745 0 return result;
746 }
747
748
749
750 globus_result_t
751 wsrp_InsertResourcePropertiesType_deserialize_contents(
752 const xsd_QName * element_qname, /* ignored */
753 wsrp_InsertResourcePropertiesType * inst,
754 globus_soap_message_handle_t message_handle,
755 globus_xsd_element_options_t options)
756 0 {
757 0 globus_result_t result = GLOBUS_SUCCESS;
758 GlobusFuncName(wsrp_InsertResourcePropertiesType_deserialize_contents);
759 0 GlobusSoapMessageDebugEnter();
760
761 0 result = wsrp_InsertResourcePropertiesType_deserialize(
762 NULL,
763 inst,
764 message_handle,
765 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
766 0 if(result != GLOBUS_SUCCESS)
767 {
768 0 result = GlobusSoapMessageErrorDeserializeFailed(
769 result, element_qname);
770 0 goto exit;
771 }
772
773 0 exit:
774
775 0 GlobusSoapMessageDebugExit();
776 0 return result;
777 }
778
779
780
781 globus_result_t
782 wsrp_InsertResourcePropertiesType_deserialize(
783 const xsd_QName * element_qname,
784 wsrp_InsertResourcePropertiesType * instance,
785 globus_soap_message_handle_t message_handle,
786 globus_xsd_element_options_t options)
787 0 {
788 0 globus_result_t result = GLOBUS_SUCCESS;
789 xsd_QName subelement;
790 GlobusFuncName(wsrp_InsertResourcePropertiesType_deserialize);
791 0 GlobusSoapMessageDebugEnter();
792
793
794 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
795 {
796 0 result = globus_soap_message_deserialize_element(
797 message_handle, element_qname);
798 0 if(result != GLOBUS_SUCCESS)
799 {
800 0 result = GlobusSoapMessageErrorDeserializeFailed(
801 result, element_qname);
802 0 goto exit;
803 }
804
805
806 0 result = globus_soap_message_deserialize_element_begin_close(
807 message_handle);
808 0 if(result != GLOBUS_SUCCESS)
809 {
810 0 result = GlobusSoapMessageErrorDeserializeFailed(
811 result, element_qname);
812 0 goto fail_deserialize;
813 }
814 }
815
816 0 subelement.local = "Insert";
817 0 subelement.Namespace = "http://docs.oasis-open.org/wsrf/rp-2";
818
819 0 result = wsrp_InsertType_deserialize(
820 &subelement,
821 &instance->Insert,
822 message_handle,
823 0);
824 0 if(result != GLOBUS_SUCCESS)
825 {
826 0 result = GlobusSoapMessageErrorDeserializeFailed(
827 result,
828 &wsrp_InsertType_qname);
829 0 goto Insert_destroy;
830 }
831
832 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
833 {
834 0 result = globus_soap_message_deserialize_element_end(
835 message_handle,
836 element_qname);
837 0 if(result != GLOBUS_SUCCESS)
838 {
839 0 result = GlobusSoapMessageErrorDeserializeFailed(
840 result, element_qname);
841 0 goto fail_deserialize;
842 }
843 }
844
845 0 goto exit;
846
847 0 fail_deserialize:
848 0 wsrp_InsertType_destroy_contents(
849 &instance->Insert);
850
851 0 Insert_destroy:
852
853
854 0 exit:
855
856 0 GlobusSoapMessageDebugExit();
857 0 return result;
858 }
859
860
861
862 globus_result_t
863 wsrp_InsertResourcePropertiesType_deserialize_pointer(
864 const xsd_QName * element_qname,
865 wsrp_InsertResourcePropertiesType ** ip,
866 globus_soap_message_handle_t message_handle,
867 globus_xsd_element_options_t options)
868 0 {
869 0 wsrp_InsertResourcePropertiesType * instance = NULL;
870 0 globus_result_t result = GLOBUS_SUCCESS;
871 xsd_QName subelement;
872 0 int found_attrs = 0;
873 0 int empty_element = 0;
874 GlobusFuncName(wsrp_InsertResourcePropertiesType_deserialize_pointer);
875 0 GlobusSoapMessageDebugEnter();
876
877 0 *ip = NULL;
878
879 0 result = globus_soap_message_deserialize_element(
880 message_handle, element_qname);
881 0 if(result != GLOBUS_SUCCESS &&
882 (GlobusSoapMessageStatusElementNotFoundCheck(result) ||
883 GlobusSoapMessageStatusFailedElementCheck(result) ||
884 GlobusSoapMessageStatusFailedWithTextCheck(result)))
885 {
886 0 result = GLOBUS_SUCCESS;
887 0 goto exit;
888 }
889
890 0 if(result != GLOBUS_SUCCESS)
891 {
892 0 result = GlobusSoapMessageErrorDeserializeFailed(
893 result, element_qname);
894 0 goto exit;
895 }
896
897 0 if(globus_soap_message_deserialize_element_is_empty(
898 message_handle))
899 {
900 0 empty_element = 1;
901 }
902
903 0 result = wsrp_InsertResourcePropertiesType_init(&instance);
904 0 if(result != GLOBUS_SUCCESS)
905 {
906 0 result = GlobusSoapMessageErrorDeserializeFailed(
907 result, element_qname);
908 0 goto exit;
909 }
910
911
912 0 if(found_attrs == 0 &&
913 globus_soap_message_deserialize_element_is_nil(message_handle))
914 {
915 0 wsrp_InsertResourcePropertiesType_destroy(instance);
916
917 0 result = globus_soap_message_deserialize_element_end(
918 message_handle,
919 element_qname);
920 0 if(result != GLOBUS_SUCCESS)
921 {
922 0 result = GlobusSoapMessageErrorDeserializeFailed(
923 result, element_qname);
924 0 goto exit;
925 }
926
927 0 *ip = NULL;
928 0 globus_object_free(globus_error_get(result));
929 0 result = GLOBUS_SUCCESS;
930 0 goto exit;
931 }
932
933 0 if(empty_element)
934 {
935 0 result = globus_soap_message_deserialize_element_end(
936 message_handle,
937 element_qname);
938 0 if(result != GLOBUS_SUCCESS)
939 {
940 0 result = GlobusSoapMessageErrorDeserializeFailed(
941 result, element_qname);
942 0 goto fail_deserialize;
943 }
944
945 0 *ip = instance;
946 0 goto exit;
947 }
948
949 0 result = globus_soap_message_deserialize_element_begin_close(
950 message_handle);
951 0 if(result != GLOBUS_SUCCESS)
952 {
953 0 result = GlobusSoapMessageErrorDeserializeFailed(
954 result, element_qname);
955 0 goto exit;
956 }
957
958 0 result = wsrp_InsertResourcePropertiesType_deserialize(
959 element_qname,
960 instance,
961 message_handle,
962 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
963 0 if(result != GLOBUS_SUCCESS)
964 {
965 0 result = GlobusSoapMessageErrorDeserializeFailed(
966 result, element_qname);
967 0 goto exit;
968 }
969
970 0 result = globus_soap_message_deserialize_element_end(
971 message_handle,
972 element_qname);
973 0 if(result != GLOBUS_SUCCESS)
974 {
975 0 result = GlobusSoapMessageErrorDeserializeFailed(
976 result, element_qname);
977 0 goto fail_deserialize;
978 }
979
980 0 *ip = instance;
981
982 0 goto exit;
983
984 0 fail_deserialize:
985 0 wsrp_InsertType_destroy_contents(
986 &instance->Insert);
987
988 0 Insert_destroy:
989
990 0 exit:
991
992 0 GlobusSoapMessageDebugExit();
993 0 return result;
994 }
995
996
997 globus_result_t
998 wsrp_InsertResourcePropertiesType_array_init_contents(
999 wsrp_InsertResourcePropertiesType_array * array)
1000 0 {
1001 0 return globus_xsd_generic_array_init_contents(
1002 (globus_xsd_generic_array_t *) array,
1003 &wsrp_InsertResourcePropertiesType_info);
1004 }
1005 /* wsrp_InsertResourcePropertiesType_array_init_contents() */
1006
1007 globus_result_t
1008 wsrp_InsertResourcePropertiesType_array_init(
1009 wsrp_InsertResourcePropertiesType_array ** arr)
1010 0 {
1011 0 return globus_xsd_generic_array_init(
1012 (globus_xsd_generic_array_t **) arr,
1013 &wsrp_InsertResourcePropertiesType_info);
1014 }
1015 /* wsrp_InsertResourcePropertiesType_array_init() */
1016
1017 void
1018 wsrp_InsertResourcePropertiesType_array_destroy_contents(
1019 wsrp_InsertResourcePropertiesType_array * array)
1020 0 {
1021 0 globus_xsd_generic_array_destroy_contents(
1022 (globus_xsd_generic_array_t *) array);
1023 0 }
1024 /* wsrp_InsertResourcePropertiesType_array_destroy_contents() */
1025
1026 void
1027 wsrp_InsertResourcePropertiesType_array_destroy(
1028 wsrp_InsertResourcePropertiesType_array * array)
1029 0 {
1030 0 globus_xsd_generic_array_destroy(
1031 (globus_xsd_generic_array_t *) array);
1032 0 }
1033 /* wsrp_InsertResourcePropertiesType_array_destroy() */
1034
1035 globus_result_t
1036 wsrp_InsertResourcePropertiesType_array_copy(
1037 wsrp_InsertResourcePropertiesType_array ** dest_arr,
1038 const wsrp_InsertResourcePropertiesType_array * src_arr)
1039 0 {
1040 0 return globus_xsd_generic_array_copy(
1041 (globus_xsd_generic_array_t **) dest_arr,
1042 (globus_xsd_generic_array_t *) src_arr);
1043 }
1044 /* wsrp_InsertResourcePropertiesType_array_copy() */
1045
1046 globus_result_t
1047 wsrp_InsertResourcePropertiesType_array_copy_contents(
1048 wsrp_InsertResourcePropertiesType_array * dest_arr,
1049 const wsrp_InsertResourcePropertiesType_array * src_arr)
1050 0 {
1051 0 return globus_xsd_generic_array_copy_contents(
1052 (globus_xsd_generic_array_t *) dest_arr,
1053 (globus_xsd_generic_array_t *) src_arr);
1054 }
1055 /* wsrp_InsertResourcePropertiesType_array_copy_contents() */
1056
1057 wsrp_InsertResourcePropertiesType *
1058 wsrp_InsertResourcePropertiesType_array_push(
1059 wsrp_InsertResourcePropertiesType_array * array)
1060 0 {
1061 /* Some contents initializers don't initialize subelments but to set their
1062 * values to be NULL
1063 */
1064 0 if (array->type_info == NULL)
1065 {
1066 0 array->type_info = &wsrp_InsertResourcePropertiesType_info;
1067 }
1068
1069 0 return globus_xsd_generic_array_push(
1070 (globus_xsd_generic_array_t *) array);
1071 }
1072 /* wsrp_InsertResourcePropertiesType_array_push() */
1073
1074 globus_result_t
1075 wsrp_InsertResourcePropertiesType_array_serialize(
1076 const xsd_QName * element_qname,
1077 const wsrp_InsertResourcePropertiesType_array * array,
1078 globus_soap_message_handle_t message,
1079 globus_xsd_element_options_t options)
1080 0 {
1081 0 return globus_xsd_generic_array_serialize(
1082 element_qname,
1083 (const globus_xsd_generic_array_t *) array,
1084 message,
1085 options);
1086 }
1087 /* wsrp_InsertResourcePropertiesType_array_serialize() */
1088
1089 globus_result_t
1090 wsrp_InsertResourcePropertiesType_array_deserialize(
1091 const xsd_QName * element_qname,
1092 wsrp_InsertResourcePropertiesType_array * array,
1093 globus_soap_message_handle_t message,
1094 globus_xsd_element_options_t options)
1095 0 {
1096 /* Some initializers set the array's contents to NULL */
1097 0 if (array->type_info == NULL)
1098 {
1099 0 array->type_info = &wsrp_InsertResourcePropertiesType_info;
1100 }
1101 0 return globus_xsd_generic_array_deserialize(
1102 element_qname,
1103 (globus_xsd_generic_array_t *) array,
1104 message,
1105 options);