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