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