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