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 "wsc_DerivedKeyTokenType.h"
26 #include "globus_xsd_generic_array.h"
27
28 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
29 xsd_QName wsc_DerivedKeyTokenType_qname =
30 {
31 WSC_DERIVEDKEYTOKENTYPE_NS,
32 WSC_DERIVEDKEYTOKENTYPE_LOCAL
33 };
34 #endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */
35
36 static
37 globus_result_t
38 wsc_DerivedKeyTokenType_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 wsc_DerivedKeyTokenType_serialize(
45 element_qname,
46 (const wsc_DerivedKeyTokenType *) instance,
47 message_handle, options);
48 }
49
50 static
51 globus_result_t
52 wsc_DerivedKeyTokenType_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 wsc_DerivedKeyTokenType_deserialize_pointer(
59 element_qname,
60 (wsc_DerivedKeyTokenType **) ip,
61 message_handle, options);
62 }
63
64 static
65 globus_result_t
66 wsc_DerivedKeyTokenType_init_wrapper(void **object)
67 0 {
68 0 return wsc_DerivedKeyTokenType_init(
69 (wsc_DerivedKeyTokenType **) object);
70 }
71
72 static
73 void
74 wsc_DerivedKeyTokenType_destroy_wrapper(
75 void * object)
76 0 {
77 0 wsc_DerivedKeyTokenType_destroy(
78 (wsc_DerivedKeyTokenType *) object);
79 0 }
80
81 static
82 globus_result_t
83 wsc_DerivedKeyTokenType_copy_wrapper(
84 void ** dest_obj,
85 const void * src_obj)
86 0 {
87 0 return wsc_DerivedKeyTokenType_copy(
88 (wsc_DerivedKeyTokenType **) dest_obj,
89 (wsc_DerivedKeyTokenType *) src_obj);
90 }
91
92 static
93 globus_result_t
94 wsc_DerivedKeyTokenType_init_contents_wrapper(void *object)
95 0 {
96 0 return wsc_DerivedKeyTokenType_init_contents(
97 (wsc_DerivedKeyTokenType *) object);
98 }
99
100 static
101 void
102 wsc_DerivedKeyTokenType_destroy_contents_wrapper(
103 void * object)
104 0 {
105 0 wsc_DerivedKeyTokenType_destroy_contents(
106 (wsc_DerivedKeyTokenType *) object);
107 0 }
108
109 static
110 globus_result_t
111 wsc_DerivedKeyTokenType_copy_contents_wrapper(
112 void * dest_obj,
113 const void * src_obj)
114 0 {
115 0 return wsc_DerivedKeyTokenType_copy_contents(
116 (wsc_DerivedKeyTokenType *) dest_obj,
117 (const wsc_DerivedKeyTokenType *) src_obj);
118 }
119
120 static
121 globus_result_t
122 wsc_DerivedKeyTokenType_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 wsc_DerivedKeyTokenType_serialize_contents(
129 element_qname,
130 (wsc_DerivedKeyTokenType *) instance,
131 message_handle, options);
132 }
133
134 static
135 globus_result_t
136 wsc_DerivedKeyTokenType_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(wsc_DerivedKeyTokenType_deserialize_contents_wrapper);
144 0 GlobusSoapMessageDebugEnter();
145
146 0 if(!*instance)
147 {
148 0 result = wsc_DerivedKeyTokenType_init(
149 (wsc_DerivedKeyTokenType **)instance);
150 0 if(result != GLOBUS_SUCCESS)
151 {
152 0 goto error;
153 }
154 }
155
156 0 result = wsc_DerivedKeyTokenType_deserialize_contents(
157 element_qname,
158 *(wsc_DerivedKeyTokenType **)instance,
159 message_handle, options);
160 0 error:
161 0 GlobusSoapMessageDebugExit();
162 0 return result;
163 }
164
165 static
166 globus_result_t
167 wsc_DerivedKeyTokenType_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 wsc_DerivedKeyTokenType_array_serialize(
174 element,
175 (wsc_DerivedKeyTokenType_array *) instance,
176 message, options);
177 }
178
179 static
180 globus_result_t
181 wsc_DerivedKeyTokenType_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 = wsc_DerivedKeyTokenType_array_init(
192 (wsc_DerivedKeyTokenType_array **)inst);
193 0 if(result != GLOBUS_SUCCESS)
194 {
195 0 return result;
196 }
197 }
198
199 0 return wsc_DerivedKeyTokenType_array_deserialize(
200 element_qname,
201 *(wsc_DerivedKeyTokenType_array **) inst,
202 message, options);
203 }
204
205 static
206 globus_result_t
207 wsc_DerivedKeyTokenType_array_init_wrapper(
208 void ** arr)
209 0 {
210 0 return wsc_DerivedKeyTokenType_array_init(
211 (wsc_DerivedKeyTokenType_array **) arr);
212 }
213
214 static
215 void
216 wsc_DerivedKeyTokenType_array_destroy_wrapper(
217 void * arr)
218 0 {
219 0 wsc_DerivedKeyTokenType_array_destroy(
220 (wsc_DerivedKeyTokenType_array *) arr);
221 0 }
222
223 static
224 globus_result_t
225 wsc_DerivedKeyTokenType_array_copy_wrapper(
226 void ** dest_arr,
227 const void * src_arr)
228 0 {
229 0 return wsc_DerivedKeyTokenType_array_copy(
230 (wsc_DerivedKeyTokenType_array **) dest_arr,
231 (const wsc_DerivedKeyTokenType_array *) src_arr);
232 }
233
234 static
235 globus_result_t
236 wsc_DerivedKeyTokenType_array_init_contents_wrapper(
237 void * arr)
238 0 {
239 0 return wsc_DerivedKeyTokenType_array_init_contents(
240 (wsc_DerivedKeyTokenType_array *) arr);
241 }
242
243 static
244 void
245 wsc_DerivedKeyTokenType_array_destroy_contents_wrapper(
246 void * arr)
247 0 {
248 0 wsc_DerivedKeyTokenType_array_destroy_contents(
249 (wsc_DerivedKeyTokenType_array *) arr);
250 0 }
251
252 static
253 globus_result_t
254 wsc_DerivedKeyTokenType_array_copy_contents_wrapper(
255 void * dest_arr,
256 const void * src_arr)
257 0 {
258 0 return wsc_DerivedKeyTokenType_array_copy_contents(
259 (wsc_DerivedKeyTokenType_array *) dest_arr,
260 (const wsc_DerivedKeyTokenType_array *) src_arr);
261 }
262
263 static
264 void *
265 wsc_DerivedKeyTokenType_array_push_wrapper(
266 void * array)
267 0 {
268 0 return (void *) wsc_DerivedKeyTokenType_array_push((wsc_DerivedKeyTokenType_array *) array);
269 }
270
271 struct globus_xsd_type_info_s wsc_DerivedKeyTokenType_contents_info =
272 {
273 &wsc_DerivedKeyTokenType_qname,
274 wsc_DerivedKeyTokenType_serialize_contents_wrapper,
275 wsc_DerivedKeyTokenType_deserialize_contents_wrapper,
276 wsc_DerivedKeyTokenType_init_wrapper,
277 wsc_DerivedKeyTokenType_destroy_wrapper,
278 wsc_DerivedKeyTokenType_copy_wrapper,
279 wsc_DerivedKeyTokenType_init_contents_wrapper,
280 wsc_DerivedKeyTokenType_destroy_contents_wrapper,
281 wsc_DerivedKeyTokenType_copy_contents_wrapper,
282 sizeof(wsc_DerivedKeyTokenType),
283 NULL,
284 NULL,
285 NULL
286 };
287
288 struct globus_xsd_type_info_s wsc_DerivedKeyTokenType_array_info =
289 {
290 &wsc_DerivedKeyTokenType_qname,
291 wsc_DerivedKeyTokenType_array_serialize_wrapper,
292 wsc_DerivedKeyTokenType_array_deserialize_wrapper,
293 wsc_DerivedKeyTokenType_array_init_wrapper,
294 wsc_DerivedKeyTokenType_array_destroy_wrapper,
295 wsc_DerivedKeyTokenType_array_copy_wrapper,
296 wsc_DerivedKeyTokenType_array_init_contents_wrapper,
297 wsc_DerivedKeyTokenType_array_destroy_contents_wrapper,
298 wsc_DerivedKeyTokenType_array_copy_contents_wrapper,
299 sizeof(wsc_DerivedKeyTokenType),
300 wsc_DerivedKeyTokenType_array_push_wrapper,
301 NULL,
302 NULL
303 };
304
305 struct globus_xsd_type_info_s wsc_DerivedKeyTokenType_info =
306 {
307 &wsc_DerivedKeyTokenType_qname,
308 wsc_DerivedKeyTokenType_serialize_wrapper,
309 wsc_DerivedKeyTokenType_deserialize_pointer_wrapper,
310 wsc_DerivedKeyTokenType_init_wrapper,
311 wsc_DerivedKeyTokenType_destroy_wrapper,
312 wsc_DerivedKeyTokenType_copy_wrapper,
313 wsc_DerivedKeyTokenType_init_contents_wrapper,
314 wsc_DerivedKeyTokenType_destroy_contents_wrapper,
315 wsc_DerivedKeyTokenType_copy_contents_wrapper,
316 sizeof(wsc_DerivedKeyTokenType),
317 NULL,
318 &wsc_DerivedKeyTokenType_contents_info,
319 &wsc_DerivedKeyTokenType_array_info
320 };
321
322 globus_result_t
323 wsc_DerivedKeyTokenType_init_contents(
324 wsc_DerivedKeyTokenType * instance)
325 0 {
326 0 globus_result_t result = GLOBUS_SUCCESS;
327 GlobusFuncName(wsc_DerivedKeyTokenType_init_contents);
328 0 GlobusSoapMessageDebugEnter();
329
330 0 memset(instance, 0, sizeof(wsc_DerivedKeyTokenType));
331
332 0 GlobusSoapMessageDebugExit();
333 0 return result;
334 }
335
336 globus_result_t
337 wsc_DerivedKeyTokenType_init(
338 wsc_DerivedKeyTokenType ** object)
339 0 {
340 wsc_DerivedKeyTokenType * instance;
341 0 globus_result_t result = GLOBUS_SUCCESS;
342 GlobusFuncName(wsc_DerivedKeyTokenType_init);
343 0 GlobusSoapMessageDebugEnter();
344
345 0 instance = globus_malloc(sizeof(wsc_DerivedKeyTokenType));
346 0 if(!instance)
347 {
348 0 result = GlobusSoapMessageErrorOutOfMemory;
349 0 goto exit;
350 }
351
352 0 memset(instance, 0, sizeof(wsc_DerivedKeyTokenType));
353
354 0 *object = instance;
355
356 0 exit:
357 0 GlobusSoapMessageDebugExit();
358 0 return result;
359 }
360
361 void
362 wsc_DerivedKeyTokenType_destroy(
363 wsc_DerivedKeyTokenType * instance)
364 0 {
365 GlobusFuncName(wsc_DerivedKeyTokenType_destroy);
366 0 GlobusSoapMessageDebugEnter();
367
368 0 if(!instance)
369 {
370 0 goto exit;
371 }
372
373 0 wsc_DerivedKeyTokenType_destroy_contents(instance);
374 0 globus_free(instance);
375
376 0 exit:
377
378 0 GlobusSoapMessageDebugExit();
379 0 }
380
381
382 void
383 wsc_DerivedKeyTokenType_destroy_contents(
384 wsc_DerivedKeyTokenType * instance)
385 0 {
386 GlobusFuncName(wsc_DerivedKeyTokenType_destroy_contents);
387 0 GlobusSoapMessageDebugEnter();
388
389 0 if(instance)
390 {
391
392
393 0 wsse_SecurityTokenReferenceType_destroy(instance->SecurityTokenReference);
394 0 instance->SecurityTokenReference = NULL;
395
396 0 wsc_PropertiesType_destroy(instance->Properties);
397 0 instance->Properties = NULL;
398
399 0 wsc_DerivedKeyTokenType_choice_destroy_contents(
400 &instance->choice_value);
401
402 0 xsd_unsignedLong_destroy(instance->Length);
403 0 instance->Length = NULL;
404
405 0 xsd_string_destroy(instance->Label);
406 0 instance->Label = NULL;
407
408 0 xsd_base64Binary_destroy(instance->Nonce);
409 0 instance->Nonce = NULL;
410
411 0 if(instance->_Algorithm)
412 {
413 0 xsd_anyURI_destroy(
414 instance->_Algorithm);
415 0 instance->_Algorithm = NULL;
416 }
417
418 0 if(instance->_Id)
419 {
420 0 xsd_ID_destroy(
421 instance->_Id);
422 0 instance->_Id = NULL;
423 }
424
425 }
426
427 0 GlobusSoapMessageDebugExit();
428 0 }
429
430
431 globus_result_t
432 wsc_DerivedKeyTokenType_copy(
433 wsc_DerivedKeyTokenType ** dest_obj,
434 const wsc_DerivedKeyTokenType * src_obj)
435 0 {
436 0 globus_result_t result = GLOBUS_SUCCESS;
437 wsc_DerivedKeyTokenType * instance;
438 GlobusFuncName(wsc_DerivedKeyTokenType_copy);
439
440 0 GlobusSoapMessageDebugEnter();
441
442 0 instance = calloc(1, sizeof(wsc_DerivedKeyTokenType));
443 0 if (instance == NULL)
444 {
445 0 GlobusSoapMessageDebugExit();
446 0 return GlobusSoapMessageErrorOutOfMemory;
447 }
448
449 0 result = wsc_DerivedKeyTokenType_copy_contents(instance, src_obj);
450 0 if(result != GLOBUS_SUCCESS)
451 {
452 0 globus_free(instance);
453 0 GlobusSoapMessageDebugExit();
454 0 return GlobusSoapMessageErrorOutOfMemory;
455 }
456
457 0 *dest_obj = instance;
458 0 GlobusSoapMessageDebugExit();
459 0 return result;
460 }
461
462 globus_result_t
463 wsc_DerivedKeyTokenType_copy_contents(
464 wsc_DerivedKeyTokenType * instance,
465 const wsc_DerivedKeyTokenType * src_obj)
466 0 {
467 0 globus_result_t result = GLOBUS_SUCCESS;
468 GlobusFuncName(wsc_DerivedKeyTokenType_copy_contents);
469
470 0 GlobusSoapMessageDebugEnter();
471
472 0 if(src_obj->_Algorithm)
473 {
474 0 result = xsd_anyURI_copy(
475 &instance->_Algorithm,
476 src_obj->_Algorithm);
477 0 if(result != GLOBUS_SUCCESS)
478 {
479 0 result = GlobusSoapMessageErrorCopyFailed(
480 result, NULL, &xsd_anyURI_qname);
481 0 goto _Algorithm_destroy;
482 }
483 }
484 else
485 {
486 0 instance->_Algorithm = NULL;
487 }
488
489 0 if(src_obj->_Id)
490 {
491 0 result = xsd_ID_copy(
492 &instance->_Id,
493 src_obj->_Id);
494 0 if(result != GLOBUS_SUCCESS)
495 {
496 0 result = GlobusSoapMessageErrorCopyFailed(
497 result, NULL, &xsd_ID_qname);
498 0 goto _Id_destroy;
499 }
500 }
501 else
502 {
503 0 instance->_Id = NULL;
504 }
505
506 0 if(src_obj->SecurityTokenReference)
507 {
508 0 result = wsse_SecurityTokenReferenceType_copy(
509 &instance->SecurityTokenReference,
510 src_obj->SecurityTokenReference);
511 0 if(result != GLOBUS_SUCCESS)
512 {
513 0 result = GlobusSoapMessageErrorCopyFailed(
514 result, NULL, &wsse_SecurityTokenReferenceType_qname);
515 0 goto SecurityTokenReference_destroy_pointer;
516 }
517 }
518 else
519 {
520 0 instance->SecurityTokenReference = NULL;
521 }
522
523 0 if(src_obj->Properties)
524 {
525 0 result = wsc_PropertiesType_copy(
526 &instance->Properties,
527 src_obj->Properties);
528 0 if(result != GLOBUS_SUCCESS)
529 {
530 0 result = GlobusSoapMessageErrorCopyFailed(
531 result, NULL, &wsc_PropertiesType_qname);
532 0 goto Properties_destroy_pointer;
533 }
534 }
535 else
536 {
537 0 instance->Properties = NULL;
538 }
539
540 0 result = wsc_DerivedKeyTokenType_choice_copy_contents(
541 &instance->choice_value,
542 &src_obj->choice_value);
543 0 if(result != GLOBUS_SUCCESS)
544 {
545 0 result = GlobusSoapMessageErrorCopyFailed(
546 result, NULL, &wsc_DerivedKeyTokenType_choice_qname);
547 0 goto choice_value_destroy;
548 }
549
550 0 if(src_obj->Length)
551 {
552 0 result = xsd_unsignedLong_copy(
553 &instance->Length,
554 src_obj->Length);
555 0 if(result != GLOBUS_SUCCESS)
556 {
557 0 result = GlobusSoapMessageErrorCopyFailed(
558 result, NULL, &xsd_unsignedLong_qname);
559 0 goto Length_destroy_pointer;
560 }
561 }
562 else
563 {
564 0 instance->Length = NULL;
565 }
566
567 0 if(src_obj->Label)
568 {
569 0 result = xsd_string_copy(
570 &instance->Label,
571 src_obj->Label);
572 0 if(result != GLOBUS_SUCCESS)
573 {
574 0 result = GlobusSoapMessageErrorCopyFailed(
575 result, NULL, &xsd_string_qname);
576 0 goto Label_destroy_pointer;
577 }
578 }
579 else
580 {
581 0 instance->Label = NULL;
582 }
583
584 0 if(src_obj->Nonce)
585 {
586 0 result = xsd_base64Binary_copy(
587 &instance->Nonce,
588 src_obj->Nonce);
589 0 if(result != GLOBUS_SUCCESS)
590 {
591 0 result = GlobusSoapMessageErrorCopyFailed(
592 result, NULL, &xsd_base64Binary_qname);
593 0 goto Nonce_destroy_pointer;
594 }
595 }
596 else
597 {
598 0 instance->Nonce = NULL;
599 }
600
601 0 goto exit;
602
603 0 fail_deserialize:
604
605 0 _Id_destroy:
606
607 0 if(instance->_Id)
608 {
609 0 xsd_ID_destroy(
610 instance->_Id);
611 0 instance->_Id = NULL;
612 }
613
614 0 _Algorithm_destroy:
615
616 0 if(instance->_Algorithm)
617 {
618 0 xsd_anyURI_destroy(
619 instance->_Algorithm);
620 0 instance->_Algorithm = NULL;
621 }
622 0 xsd_base64Binary_destroy(
623 instance->Nonce);
624 0 instance->Nonce = NULL;
625
626 0 Nonce_destroy_pointer:
627 0 xsd_string_destroy(
628 instance->Label);
629 0 instance->Label = NULL;
630
631 0 Label_destroy_pointer:
632 0 xsd_unsignedLong_destroy(
633 instance->Length);
634 0 instance->Length = NULL;
635
636 0 Length_destroy_pointer:
637 0 wsc_DerivedKeyTokenType_choice_destroy_contents(
638 &instance->choice_value);
639
640 0 choice_value_destroy:
641 0 wsc_PropertiesType_destroy(
642 instance->Properties);
643 0 instance->Properties = NULL;
644
645 0 Properties_destroy_pointer:
646 0 wsse_SecurityTokenReferenceType_destroy(
647 instance->SecurityTokenReference);
648 0 instance->SecurityTokenReference = NULL;
649
650 0 SecurityTokenReference_destroy_pointer:
651
652
653 0 exit:
654
655 0 GlobusSoapMessageDebugExit();
656 0 return result;
657 }
658
659
660
661 globus_result_t
662 wsc_DerivedKeyTokenType_serialize_contents(
663 const xsd_QName * element_qname, /* ignored */
664 const wsc_DerivedKeyTokenType * inst,
665 globus_soap_message_handle_t message_handle,
666 globus_xsd_element_options_t options)
667 0 {
668 0 globus_result_t result = GLOBUS_SUCCESS;
669 GlobusFuncName(wsc_DerivedKeyTokenType_serialize_contents);
670 0 GlobusSoapMessageDebugEnter();
671
672 0 result = wsc_DerivedKeyTokenType_serialize(
673 NULL,
674 inst,
675 message_handle,
676 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
677 0 if(result != GLOBUS_SUCCESS)
678 {
679 0 result = GlobusSoapMessageErrorSerializeFailed(
680 result, NULL, element_qname);
681 0 goto exit;
682 }
683
684 0 exit:
685
686 0 GlobusSoapMessageDebugExit();
687 0 return result;
688 }
689
690
691
692 globus_result_t
693 wsc_DerivedKeyTokenType_serialize(
694 const xsd_QName * element_qname,
695 const wsc_DerivedKeyTokenType * instance,
696 globus_soap_message_handle_t message_handle,
697 globus_xsd_element_options_t options)
698 0 {
699 0 globus_result_t result = GLOBUS_SUCCESS;
700 xsd_QName subelement;
701 0 globus_list_t * any_attr_keys = NULL;
702 0 globus_list_t * any_attr_keys_iterator = NULL;
703 0 xsd_QName * type_attr = NULL;
704
705 0 char * prefix = NULL;
706 int prefix_created;
707 0 int define_prefix = 0;
708 0 int save_options = options;
709
710 GlobusFuncName(wsc_DerivedKeyTokenType_serialize);
711 0 GlobusSoapMessageDebugEnter();
712
713
714 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
715 {
716 /* serialize wsc_DerivedKeyTokenType element */
717 0 result = globus_soap_message_element_ns_set(
718 message_handle,
719 element_qname,
720 element_qname->Namespace,
721 &options);
722 0 if(result != GLOBUS_SUCCESS)
723 {
724 0 result = GlobusSoapMessageErrorSerializeFailed(
725 result, NULL, element_qname);
726 0 goto exit;
727 }
728
729 0 if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
730 !globus_soap_message_serialize_is_c14n_subset(message_handle)))
731 {
732 0 result = globus_soap_message_attribute_ns_set(
733 message_handle,
734 element_qname,
735 "http://www.w3.org/2001/XMLSchema-instance",
736 &options);
737 0 if(result != GLOBUS_SUCCESS)
738 {
739 0 result = GlobusSoapMessageErrorSerializeFailed(
740 result, NULL, element_qname);
741 0 goto exit;
742 }
743 }
744
745 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
746 !globus_soap_message_serialize_is_c14n_subset(message_handle))
747 {
748
749 0 result = globus_soap_message_attribute_ns_set(
750 message_handle,
751 element_qname,
752 wsc_DerivedKeyTokenType_qname.Namespace,
753 &options);
754 0 if(result != GLOBUS_SUCCESS)
755 {
756 0 result = GlobusSoapMessageErrorSerializeFailed(
757 result, NULL, element_qname);
758 0 goto exit;
759 }
760 }
761
762 0 if(instance->_Algorithm)
763 {
764
765 0 if(result != GLOBUS_SUCCESS)
766 {
767 xsd_QName error_qname;
768 0 error_qname.local = prefix;
769 0 error_qname.Namespace = "";
770 0 result = GlobusSoapMessageErrorSerializeFailed(result,
771 NULL,
772 &error_qname);
773 0 goto exit;
774 }
775
776
777 }
778
779 0 if(instance->_Id)
780 {
781
782 0 result = globus_soap_message_attribute_ns_set(
783 message_handle,
784 element_qname,
785 "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd",
786 &options);
787
788 0 if(result != GLOBUS_SUCCESS)
789 {
790 xsd_QName error_qname;
791 0 error_qname.local = prefix;
792 0 error_qname.Namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
793 0 result = GlobusSoapMessageErrorSerializeFailed(result,
794 NULL,
795 &error_qname);
796 0 goto exit;
797 }
798
799
800 }
801
802 0 result = globus_soap_message_serialize_element(
803 message_handle,
804 element_qname,
805 options,
806 &wsc_DerivedKeyTokenType_qname);
807 0 if(result != GLOBUS_SUCCESS)
808 {
809 0 result = GlobusSoapMessageErrorSerializeFailed(
810 result, NULL, element_qname);
811 0 goto exit;
812 }
813
814 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
815 !globus_soap_message_serialize_is_c14n_subset(message_handle))
816 {
817 0 xsd_QName_init(&type_attr);
818
819 0 type_attr->local = globus_libc_strdup("type");
820 0 type_attr->Namespace = globus_libc_strdup(XSI_NS);
821 }
822
823
824 /* serialize namespaces */
825 0 result = globus_soap_message_element_ns_add(
826 message_handle,
827 element_qname,
828 element_qname->Namespace,
829 &options);
830 0 if(result != GLOBUS_SUCCESS)
831 {
832 0 result = GlobusSoapMessageErrorSerializeFailed(
833 result, NULL, element_qname);
834 0 goto exit;
835 }
836
837 0 if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
838 !globus_soap_message_serialize_is_c14n_subset(message_handle)))
839 {
840 0 result = globus_soap_message_attribute_ns_add(
841 message_handle,
842 element_qname,
843 "http://www.w3.org/2001/XMLSchema-instance",
844 &options);
845 0 if(result != GLOBUS_SUCCESS)
846 {
847 0 result = GlobusSoapMessageErrorSerializeFailed(
848 result, NULL, element_qname);
849 0 goto exit;
850 }
851 }
852 0 if ((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
853 !globus_soap_message_serialize_is_c14n_subset(message_handle))
854 {
855
856 0 result = globus_soap_message_attribute_ns_add(
857 message_handle,
858 element_qname,
859 wsc_DerivedKeyTokenType_qname.Namespace,
860 &options);
861 0 if(result != GLOBUS_SUCCESS)
862 {
863 0 result = GlobusSoapMessageErrorSerializeFailed(
864 result, NULL, element_qname);
865 0 goto exit;
866 }
867 }
868
869 0 if(instance->_Algorithm)
870 {
871
872 }
873
874 0 if(instance->_Id)
875 {
876
877 0 result = globus_soap_message_attribute_ns_add(
878 message_handle,
879 element_qname,
880 "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd",
881 &options);
882 0 if(result != GLOBUS_SUCCESS)
883 {
884 xsd_QName error_qname;
885 0 error_qname.local = prefix;
886 0 error_qname.Namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
887 0 result = GlobusSoapMessageErrorSerializeFailed(result,
888 NULL,
889 &error_qname);
890 0 goto exit;
891 }
892
893 }
894
895 /* serialize attributes */
896
897 0 subelement.Namespace = "";
898 0 subelement.local = "Algorithm";
899
900 0 if(instance->_Algorithm)
901 {
902
903 0 result = xsd_anyURI_serialize_attribute(
904 &subelement,
905 instance->_Algorithm,
906 message_handle,
907 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
908 0 if(result != GLOBUS_SUCCESS)
909 {
910 0 result = GlobusSoapMessageErrorSerializeFailed(result,
911 NULL,
912 element_qname);
913 0 goto exit;
914 }
915
916 }
917
918 0 subelement.Namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
919 0 subelement.local = "Id";
920
921 0 if(instance->_Id)
922 {
923
924 0 result = xsd_ID_serialize_attribute(
925 &subelement,
926 instance->_Id,
927 message_handle,
928 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
929 0 if(result != GLOBUS_SUCCESS)
930 {
931 0 result = GlobusSoapMessageErrorSerializeFailed(result,
932 NULL,
933 element_qname);
934 0 goto exit;
935 }
936
937 }
938
939 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
940 !globus_soap_message_serialize_is_c14n_subset(message_handle))
941 {
942 0 result = globus_soap_message_serialize_QName_attribute(
943 message_handle,
944 type_attr,
945 &wsc_DerivedKeyTokenType_qname);
946 0 if(result != GLOBUS_SUCCESS)
947 {
948 0 result = GlobusSoapMessageErrorSerializeFailed(
949 result, NULL, element_qname);
950 0 goto exit;
951 }
952 }
953
954
955 }
956
957 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
958 {
959 0 result = globus_soap_message_serialize_element_begin_close(
960 message_handle, element_qname);
961 0 if(result != GLOBUS_SUCCESS)
962 {
963 0 result = GlobusSoapMessageErrorSerializeFailed(
964 result, NULL, element_qname);
965 0 goto exit;
966 }
967 }
968 0 options &= ~GLOBUS_XSD_ELEMENT_CONTENTS_ONLY;
969
970
971 /* serialize contents of type */
972
973 0 subelement.local = "SecurityTokenReference";
974 0 subelement.Namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
975
976 0 if(instance->SecurityTokenReference)
977 {
978 0 result = wsse_SecurityTokenReferenceType_serialize(
979 &subelement,
980 instance->SecurityTokenReference,
981 message_handle,
982 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
983 0 if(result != GLOBUS_SUCCESS)
984 {
985 0 result = GlobusSoapMessageErrorSerializeFailed(
986 result, NULL, &wsse_SecurityTokenReferenceType_qname);
987 0 goto exit;
988 }
989 }
990
991 0 subelement.local = "Properties";
992 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2004/04/sc";
993
994 0 if(instance->Properties)
995 {
996 0 result = wsc_PropertiesType_serialize(
997 &subelement,
998 instance->Properties,
999 message_handle,
1000 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
1001 0 if(result != GLOBUS_SUCCESS)
1002 {
1003 0 result = GlobusSoapMessageErrorSerializeFailed(
1004 result, NULL, &wsc_PropertiesType_qname);
1005 0 goto exit;
1006 }
1007 }
1008
1009 0 subelement.local = "choice_value";
1010 0 subelement.Namespace = NULL;
1011
1012 0 result = wsc_DerivedKeyTokenType_choice_serialize(
1013 &subelement,
1014 &instance->choice_value,
1015 message_handle,
1016 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
1017 0 if(result != GLOBUS_SUCCESS)
1018 {
1019 0 result = GlobusSoapMessageErrorSerializeFailed(
1020 result, NULL, &wsc_DerivedKeyTokenType_choice_qname);
1021 0 goto exit;
1022 }
1023
1024 0 subelement.local = "Length";
1025 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2004/04/sc";
1026
1027 0 if(instance->Length)
1028 {
1029 0 result = xsd_unsignedLong_serialize(
1030 &subelement,
1031 instance->Length,
1032 message_handle,
1033 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
1034 0 if(result != GLOBUS_SUCCESS)
1035 {
1036 0 result = GlobusSoapMessageErrorSerializeFailed(
1037 result, NULL, &xsd_unsignedLong_qname);
1038 0 goto exit;
1039 }
1040 }
1041
1042 0 subelement.local = "Label";
1043 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2004/04/sc";
1044
1045 0 if(instance->Label)
1046 {
1047 0 result = xsd_string_serialize(
1048 &subelement,
1049 instance->Label,
1050 message_handle,
1051 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
1052 0 if(result != GLOBUS_SUCCESS)
1053 {
1054 0 result = GlobusSoapMessageErrorSerializeFailed(
1055 result, NULL, &xsd_string_qname);
1056 0 goto exit;
1057 }
1058 }
1059
1060 0 subelement.local = "Nonce";
1061 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2004/04/sc";
1062
1063 0 if(instance->Nonce)
1064 {
1065 0 result = xsd_base64Binary_serialize(
1066 &subelement,
1067 instance->Nonce,
1068 message_handle,
1069 options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
1070 0 if(result != GLOBUS_SUCCESS)
1071 {
1072 0 result = GlobusSoapMessageErrorSerializeFailed(
1073 result, NULL, &xsd_base64Binary_qname);
1074 0 goto exit;
1075 }
1076 }
1077
1078 0 options = save_options;
1079
1080 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
1081 {
1082 /* add end element */
1083 0 result = globus_soap_message_serialize_element_end(
1084 message_handle,
1085 element_qname,
1086 options,
1087 &wsc_DerivedKeyTokenType_qname);
1088 0 if(result != GLOBUS_SUCCESS)
1089 {
1090 0 result = GlobusSoapMessageErrorSerializeFailed(
1091 result, NULL, element_qname);
1092 0 goto exit;
1093 }
1094
1095 0 globus_soap_message_element_ns_remove(
1096 message_handle,
1097 element_qname->Namespace,
1098 &options);
1099
1100 /* remove namespace/prefix mappings for these types */
1101
1102 0 if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
1103 !globus_soap_message_serialize_is_c14n_subset(message_handle)))
1104 {
1105 0 globus_soap_message_attribute_ns_remove(
1106 message_handle,
1107 "http://www.w3.org/2001/XMLSchema-instance",
1108 &options);
1109 }
1110 0 if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
1111 !globus_soap_message_serialize_is_c14n_subset(message_handle))
1112 {
1113 0 globus_soap_message_attribute_ns_remove(
1114 message_handle,
1115 wsc_DerivedKeyTokenType_qname.Namespace,
1116 &options);
1117 }
1118
1119 0 if(instance->_Algorithm)
1120 {
1121
1122 0 globus_soap_message_attribute_ns_remove(
1123 message_handle,
1124 NULL,
1125 &options);
1126
1127 }
1128
1129 0 if(instance->_Id)
1130 {
1131
1132 0 globus_soap_message_attribute_ns_remove(
1133 message_handle,
1134 "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd",
1135 &options);
1136
1137 }
1138
1139 }
1140
1141 0 exit:
1142 0 if (type_attr)
1143 {
1144 0 xsd_QName_destroy(type_attr);
1145 }
1146
1147
1148 0 if(any_attr_keys)
1149 {
1150 0 globus_list_free(any_attr_keys);
1151 }
1152
1153 0 GlobusSoapMessageDebugExit();
1154 0 return result;
1155 }
1156
1157
1158
1159 globus_result_t
1160 wsc_DerivedKeyTokenType_deserialize_contents(
1161 const xsd_QName * element_qname, /* ignored */
1162 wsc_DerivedKeyTokenType * inst,
1163 globus_soap_message_handle_t message_handle,
1164 globus_xsd_element_options_t options)
1165 0 {
1166 0 globus_result_t result = GLOBUS_SUCCESS;
1167 GlobusFuncName(wsc_DerivedKeyTokenType_deserialize_contents);
1168 0 GlobusSoapMessageDebugEnter();
1169
1170 0 result = wsc_DerivedKeyTokenType_deserialize(
1171 NULL,
1172 inst,
1173 message_handle,
1174 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
1175 0 if(result != GLOBUS_SUCCESS)
1176 {
1177 0 result = GlobusSoapMessageErrorDeserializeFailed(
1178 result, element_qname);
1179 0 goto exit;
1180 }
1181
1182 0 exit:
1183
1184 0 GlobusSoapMessageDebugExit();
1185 0 return result;
1186 }
1187
1188
1189
1190 globus_result_t
1191 wsc_DerivedKeyTokenType_deserialize(
1192 const xsd_QName * element_qname,
1193 wsc_DerivedKeyTokenType * instance,
1194 globus_soap_message_handle_t message_handle,
1195 globus_xsd_element_options_t options)
1196 0 {
1197 0 globus_result_t result = GLOBUS_SUCCESS;
1198 xsd_QName subelement;
1199 GlobusFuncName(wsc_DerivedKeyTokenType_deserialize);
1200 0 GlobusSoapMessageDebugEnter();
1201
1202
1203 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
1204 {
1205 0 result = globus_soap_message_deserialize_element(
1206 message_handle, element_qname);
1207 0 if(result != GLOBUS_SUCCESS)
1208 {
1209 0 result = GlobusSoapMessageErrorDeserializeFailed(
1210 result, element_qname);
1211 0 goto exit;
1212 }
1213
1214 0 subelement.Namespace = "";
1215 0 subelement.local = "Algorithm";
1216
1217 0 result = xsd_anyURI_deserialize_attribute_pointer(
1218 &subelement,
1219 &instance->_Algorithm,
1220 message_handle,
1221 0);
1222 0 if(result != GLOBUS_SUCCESS)
1223 {
1224 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1225 0 goto _Algorithm_destroy;
1226 }
1227
1228
1229 0 subelement.Namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
1230 0 subelement.local = "Id";
1231
1232 0 result = xsd_ID_deserialize_attribute_pointer(
1233 &subelement,
1234 &instance->_Id,
1235 message_handle,
1236 0);
1237 0 if(result != GLOBUS_SUCCESS)
1238 {
1239 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1240 0 goto _Id_destroy;
1241 }
1242
1243
1244
1245 0 result = globus_soap_message_deserialize_element_begin_close(
1246 message_handle);
1247 0 if(result != GLOBUS_SUCCESS)
1248 {
1249 0 result = GlobusSoapMessageErrorDeserializeFailed(
1250 result, element_qname);
1251 0 goto fail_deserialize;
1252 }
1253 }
1254
1255 0 subelement.local = "SecurityTokenReference";
1256 0 subelement.Namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
1257
1258 0 result = wsse_SecurityTokenReferenceType_deserialize_pointer(
1259 &subelement,
1260 &instance->SecurityTokenReference,
1261 message_handle,
1262 0);
1263 0 if(result != GLOBUS_SUCCESS)
1264 {
1265 0 result = GlobusSoapMessageErrorDeserializeFailed(
1266 result,
1267 (&subelement));
1268 0 goto SecurityTokenReference_destroy_pointer;
1269 }
1270
1271 0 subelement.local = "Properties";
1272 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2004/04/sc";
1273
1274 0 result = wsc_PropertiesType_deserialize_pointer(
1275 &subelement,
1276 &instance->Properties,
1277 message_handle,
1278 0);
1279 0 if(result != GLOBUS_SUCCESS)
1280 {
1281 0 result = GlobusSoapMessageErrorDeserializeFailed(
1282 result,
1283 (&subelement));
1284 0 goto Properties_destroy_pointer;
1285 }
1286
1287 0 subelement.local = "choice_value";
1288 0 subelement.Namespace = NULL;
1289
1290 0 result = wsc_DerivedKeyTokenType_choice_deserialize(
1291 &subelement,
1292 &instance->choice_value,
1293 message_handle,
1294 0);
1295 0 if(result != GLOBUS_SUCCESS)
1296 {
1297 0 result = GlobusSoapMessageErrorDeserializeFailed(
1298 result,
1299 &wsc_DerivedKeyTokenType_choice_qname);
1300 0 goto choice_value_destroy;
1301 }
1302
1303 0 subelement.local = "Length";
1304 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2004/04/sc";
1305
1306 0 result = xsd_unsignedLong_deserialize_pointer(
1307 &subelement,
1308 &instance->Length,
1309 message_handle,
1310 0);
1311 0 if(result != GLOBUS_SUCCESS)
1312 {
1313 0 result = GlobusSoapMessageErrorDeserializeFailed(
1314 result,
1315 (&subelement));
1316 0 goto Length_destroy_pointer;
1317 }
1318
1319 0 subelement.local = "Label";
1320 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2004/04/sc";
1321
1322 0 result = xsd_string_deserialize_pointer(
1323 &subelement,
1324 &instance->Label,
1325 message_handle,
1326 0);
1327 0 if(result != GLOBUS_SUCCESS)
1328 {
1329 0 result = GlobusSoapMessageErrorDeserializeFailed(
1330 result,
1331 (&subelement));
1332 0 goto Label_destroy_pointer;
1333 }
1334
1335 0 subelement.local = "Nonce";
1336 0 subelement.Namespace = "http://schemas.xmlsoap.org/ws/2004/04/sc";
1337
1338 0 result = xsd_base64Binary_deserialize_pointer(
1339 &subelement,
1340 &instance->Nonce,
1341 message_handle,
1342 0);
1343 0 if(result != GLOBUS_SUCCESS)
1344 {
1345 0 result = GlobusSoapMessageErrorDeserializeFailed(
1346 result,
1347 (&subelement));
1348 0 goto Nonce_destroy_pointer;
1349 }
1350
1351 0 if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
1352 {
1353 0 result = globus_soap_message_deserialize_element_end(
1354 message_handle,
1355 element_qname);
1356 0 if(result != GLOBUS_SUCCESS)
1357 {
1358 0 result = GlobusSoapMessageErrorDeserializeFailed(
1359 result, element_qname);
1360 0 goto fail_deserialize;
1361 }
1362 }
1363
1364 0 goto exit;
1365
1366 0 fail_deserialize:
1367
1368 0 _Id_destroy:
1369 /* output_fail_destroy_attribute() */
1370
1371 0 if(instance->_Id)
1372 {
1373 0 xsd_ID_destroy(
1374 instance->_Id);
1375 0 instance->_Id = NULL;
1376 }
1377
1378 0 _Algorithm_destroy:
1379 /* output_fail_destroy_attribute() */
1380
1381 0 if(instance->_Algorithm)
1382 {
1383 0 xsd_anyURI_destroy(
1384 instance->_Algorithm);
1385 0 instance->_Algorithm = NULL;
1386 }
1387 0 xsd_base64Binary_destroy(
1388 instance->Nonce);
1389 0 instance->Nonce = NULL;
1390
1391 0 Nonce_destroy_pointer:
1392 0 xsd_string_destroy(
1393 instance->Label);
1394 0 instance->Label = NULL;
1395
1396 0 Label_destroy_pointer:
1397 0 xsd_unsignedLong_destroy(
1398 instance->Length);
1399 0 instance->Length = NULL;
1400
1401 0 Length_destroy_pointer:
1402 0 wsc_DerivedKeyTokenType_choice_destroy_contents(
1403 &instance->choice_value);
1404
1405 0 choice_value_destroy:
1406 0 wsc_PropertiesType_destroy(
1407 instance->Properties);
1408 0 instance->Properties = NULL;
1409
1410 0 Properties_destroy_pointer:
1411 0 wsse_SecurityTokenReferenceType_destroy(
1412 instance->SecurityTokenReference);
1413 0 instance->SecurityTokenReference = NULL;
1414
1415 0 SecurityTokenReference_destroy_pointer:
1416
1417
1418 0 exit:
1419
1420 0 GlobusSoapMessageDebugExit();
1421 0 return result;
1422 }
1423
1424
1425
1426 globus_result_t
1427 wsc_DerivedKeyTokenType_deserialize_pointer(
1428 const xsd_QName * element_qname,
1429 wsc_DerivedKeyTokenType ** ip,
1430 globus_soap_message_handle_t message_handle,
1431 globus_xsd_element_options_t options)
1432 0 {
1433 0 wsc_DerivedKeyTokenType * instance = NULL;
1434 0 globus_result_t result = GLOBUS_SUCCESS;
1435 xsd_QName subelement;
1436 0 int found_attrs = 0;
1437 0 int empty_element = 0;
1438 GlobusFuncName(wsc_DerivedKeyTokenType_deserialize_pointer);
1439 0 GlobusSoapMessageDebugEnter();
1440
1441 0 *ip = NULL;
1442
1443 0 result = globus_soap_message_deserialize_element(
1444 message_handle, element_qname);
1445 0 if(result != GLOBUS_SUCCESS &&
1446 (GlobusSoapMessageStatusElementNotFoundCheck(result) ||
1447 GlobusSoapMessageStatusFailedElementCheck(result) ||
1448 GlobusSoapMessageStatusFailedWithTextCheck(result)))
1449 {
1450 0 result = GLOBUS_SUCCESS;
1451 0 goto exit;
1452 }
1453
1454 0 if(result != GLOBUS_SUCCESS)
1455 {
1456 0 result = GlobusSoapMessageErrorDeserializeFailed(
1457 result, element_qname);
1458 0 goto exit;
1459 }
1460
1461 0 if(globus_soap_message_deserialize_element_is_empty(
1462 message_handle))
1463 {
1464 0 empty_element = 1;
1465 }
1466
1467 0 result = wsc_DerivedKeyTokenType_init(&instance);
1468 0 if(result != GLOBUS_SUCCESS)
1469 {
1470 0 result = GlobusSoapMessageErrorDeserializeFailed(
1471 result, element_qname);
1472 0 goto exit;
1473 }
1474
1475
1476 0 subelement.Namespace = "";
1477 0 subelement.local = "Algorithm";
1478
1479 0 result = xsd_anyURI_deserialize_attribute_pointer(
1480 &subelement,
1481 &instance->_Algorithm,
1482 message_handle,
1483 0);
1484 0 if(result != GLOBUS_SUCCESS)
1485 {
1486 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1487 0 goto _Algorithm_destroy;
1488 }
1489
1490
1491 0 if(instance->_Algorithm)
1492 {
1493 0 found_attrs++;
1494 }
1495
1496 0 subelement.Namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
1497 0 subelement.local = "Id";
1498
1499 0 result = xsd_ID_deserialize_attribute_pointer(
1500 &subelement,
1501 &instance->_Id,
1502 message_handle,
1503 0);
1504 0 if(result != GLOBUS_SUCCESS)
1505 {
1506 0 result = GlobusSoapMessageErrorDeserializeFailed(result, &subelement);
1507 0 goto _Id_destroy;
1508 }
1509
1510
1511 0 if(instance->_Id)
1512 {
1513 0 found_attrs++;
1514 }
1515
1516 0 if(found_attrs == 0 &&
1517 globus_soap_message_deserialize_element_is_nil(message_handle))
1518 {
1519 0 wsc_DerivedKeyTokenType_destroy(instance);
1520
1521 0 result = globus_soap_message_deserialize_element_end(
1522 message_handle,
1523 element_qname);
1524 0 if(result != GLOBUS_SUCCESS)
1525 {
1526 0 result = GlobusSoapMessageErrorDeserializeFailed(
1527 result, element_qname);
1528 0 goto exit;
1529 }
1530
1531 0 *ip = NULL;
1532 0 globus_object_free(globus_error_get(result));
1533 0 result = GLOBUS_SUCCESS;
1534 0 goto exit;
1535 }
1536
1537 0 if(empty_element)
1538 {
1539 0 result = globus_soap_message_deserialize_element_end(
1540 message_handle,
1541 element_qname);
1542 0 if(result != GLOBUS_SUCCESS)
1543 {
1544 0 result = GlobusSoapMessageErrorDeserializeFailed(
1545 result, element_qname);
1546 0 goto fail_deserialize;
1547 }
1548
1549 0 *ip = instance;
1550 0 goto exit;
1551 }
1552
1553 0 result = globus_soap_message_deserialize_element_begin_close(
1554 message_handle);
1555 0 if(result != GLOBUS_SUCCESS)
1556 {
1557 0 result = GlobusSoapMessageErrorDeserializeFailed(
1558 result, element_qname);
1559 0 goto exit;
1560 }
1561
1562 0 result = wsc_DerivedKeyTokenType_deserialize(
1563 element_qname,
1564 instance,
1565 message_handle,
1566 options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY);
1567 0 if(result != GLOBUS_SUCCESS)
1568 {
1569 0 result = GlobusSoapMessageErrorDeserializeFailed(
1570 result, element_qname);
1571 0 goto exit;
1572 }
1573
1574 0 result = globus_soap_message_deserialize_element_end(
1575 message_handle,
1576 element_qname);
1577 0 if(result != GLOBUS_SUCCESS)
1578 {
1579 0 result = GlobusSoapMessageErrorDeserializeFailed(
1580 result, element_qname);
1581 0 goto fail_deserialize;
1582 }
1583
1584 0 *ip = instance;
1585
1586 0 goto exit;
1587
1588 0 fail_deserialize:
1589
1590 0 _Id_destroy:
1591 /* output_fail_destroy_attribute() */
1592
1593 0 if(instance->_Id)
1594 {
1595 0 xsd_ID_destroy(
1596 instance->_Id);
1597 0 instance->_Id = NULL;
1598 }
1599
1600 0 _Algorithm_destroy:
1601 /* output_fail_destroy_attribute() */
1602
1603 0 if(instance->_Algorithm)
1604 {
1605 0 xsd_anyURI_destroy(
1606 instance->_Algorithm);
1607 0 instance->_Algorithm = NULL;
1608 }
1609 0 xsd_base64Binary_destroy(
1610 instance->Nonce);
1611 0 instance->Nonce = NULL;
1612
1613 0 Nonce_destroy_pointer:
1614 0 xsd_string_destroy(
1615 instance->Label);
1616 0 instance->Label = NULL;
1617
1618 0 Label_destroy_pointer:
1619 0 xsd_unsignedLong_destroy(
1620 instance->Length);
1621 0 instance->Length = NULL;
1622
1623 0 Length_destroy_pointer:
1624 0 wsc_DerivedKeyTokenType_choice_destroy_contents(
1625 &instance->choice_value);
1626
1627 0 choice_value_destroy:
1628 0 wsc_PropertiesType_destroy(
1629 instance->Properties);
1630 0 instance->Properties = NULL;
1631
1632 0 Properties_destroy_pointer:
1633 0 wsse_SecurityTokenReferenceType_destroy(
1634 instance->SecurityTokenReference);
1635 0 instance->SecurityTokenReference = NULL;
1636
1637 0 SecurityTokenReference_destroy_pointer:
1638
1639 0 exit:
1640
1641 0 GlobusSoapMessageDebugExit();
1642 0 return result;
1643 }
1644
1645
1646 globus_result_t
1647 wsc_DerivedKeyTokenType_array_init_contents(
1648 wsc_DerivedKeyTokenType_array * array)
1649 0 {
1650 0 return globus_xsd_generic_array_init_contents(
1651 (globus_xsd_generic_array_t *) array,
1652 &wsc_DerivedKeyTokenType_info);
1653 }
1654 /* wsc_DerivedKeyTokenType_array_init_contents() */
1655
1656 globus_result_t
1657 wsc_DerivedKeyTokenType_array_init(
1658 wsc_DerivedKeyTokenType_array ** arr)
1659 0 {
1660 0 return globus_xsd_generic_array_init(
1661 (globus_xsd_generic_array_t **) arr,
1662 &wsc_DerivedKeyTokenType_info);
1663 }
1664 /* wsc_DerivedKeyTokenType_array_init() */
1665
1666 void
1667 wsc_DerivedKeyTokenType_array_destroy_contents(
1668 wsc_DerivedKeyTokenType_array * array)
1669 0 {
1670 0 globus_xsd_generic_array_destroy_contents(
1671 (globus_xsd_generic_array_t *) array);
1672 0 }
1673 /* wsc_DerivedKeyTokenType_array_destroy_contents() */
1674
1675 void
1676 wsc_DerivedKeyTokenType_array_destroy(
1677 wsc_DerivedKeyTokenType_array * array)
1678 0 {
1679 0 globus_xsd_generic_array_destroy(
1680 (globus_xsd_generic_array_t *) array);
1681 0 }
1682 /* wsc_DerivedKeyTokenType_array_destroy() */
1683
1684 globus_result_t
1685 wsc_DerivedKeyTokenType_array_copy(
1686 wsc_DerivedKeyTokenType_array ** dest_arr,
1687 const wsc_DerivedKeyTokenType_array * src_arr)
1688 0 {
1689 0 return globus_xsd_generic_array_copy(
1690 (globus_xsd_generic_array_t **) dest_arr,
1691 (globus_xsd_generic_array_t *) src_arr);
1692 }
1693 /* wsc_DerivedKeyTokenType_array_copy() */
1694
1695 globus_result_t
1696 wsc_DerivedKeyTokenType_array_copy_contents(
1697 wsc_DerivedKeyTokenType_array * dest_arr,
1698 const wsc_DerivedKeyTokenType_array * src_arr)
1699 0 {
1700 0 return globus_xsd_generic_array_copy_contents(
1701 (globus_xsd_generic_array_t *) dest_arr,
1702 (globus_xsd_generic_array_t *) src_arr);
1703 }
1704 /* wsc_DerivedKeyTokenType_array_copy_contents() */
1705
1706 wsc_DerivedKeyTokenType *
1707 wsc_DerivedKeyTokenType_array_push(
1708 wsc_DerivedKeyTokenType_array * array)
1709 0 {
1710 /* Some contents initializers don't initialize subelments but to set their
1711 * values to be NULL
1712 */
1713 0 if (array->type_info == NULL)
1714 {
1715 0 array->type_info = &wsc_DerivedKeyTokenType_info;
1716 }
1717
1718 0 return globus_xsd_generic_array_push(
1719 (globus_xsd_generic_array_t *) array);
1720 }
1721 /* wsc_DerivedKeyTokenType_array_push() */
1722
1723 globus_result_t
1724 wsc_DerivedKeyTokenType_array_serialize(
1725 const xsd_QName * element_qname,
1726 const wsc_DerivedKeyTokenType_array * array,
1727 globus_soap_message_handle_t message,
1728 globus_xsd_element_options_t options)
1729 0 {
1730 0 return globus_xsd_generic_array_serialize(
1731 element_qname,
1732 (const globus_xsd_generic_array_t *) array,
1733 message,
1734 options);
1735 }
1736 /* wsc_DerivedKeyTokenType_array_serialize() */
1737
1738 globus_result_t
1739 wsc_DerivedKeyTokenType_array_deserialize(
1740 const xsd_QName * element_qname,
1741 wsc_DerivedKeyTokenType_array * array,
1742 globus_soap_message_handle_t message,
1743 globus_xsd_element_options_t options)
1744 0 {
1745 /* Some initializers set the array's contents to NULL */
1746 0 if (array->type_info == NULL)
1747 {
1748 0 array->type_info = &wsc_DerivedKeyTokenType_info;
1749 }
1750 0 return globus_xsd_generic_array_deserialize(
1751 element_qname,
1752 (globus_xsd_generic_array_t *) array,
1753 message,
1754 options);