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