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 "globus_soap_message.h"
23 #include "globus_handler.h"
24 #include "globus_xio.h"
25 #include "WS_ResourceLifetimeService_client.h"
26 #include "globus_xsd_type_registry.h"
27 #include "globus_soap_message_fault.h"
28 #include "globus_soap_message_attrs.h"
29 #include "globus_soap_message_markers.h"
30 #include "globus_ws_addressing.h"
31
32 static globus_list_t *                  WS_ResourceLifetimeService_l_extensions = NULL;
33 static globus_mutex_t                   WS_ResourceLifetimeService_l_extensions_mutex;
34
35 globus_xsd_type_registry_t              WS_ResourceLifetimeService_l_registry = NULL;
36
37 static
38 int
39 WS_ResourceLifetimeService_l_client_module_activate();
40
41 static
42 int
43 WS_ResourceLifetimeService_l_client_module_deactivate();
44
45 globus_module_descriptor_t
46 WS_ResourceLifetimeService_i_module = 
47 {
48     "WS_ResourceLifetimeService",
49     WS_ResourceLifetimeService_l_client_module_activate,
50     WS_ResourceLifetimeService_l_client_module_deactivate
51 };
52
53
54 static
55 void
56 ScheduledResourceTermination_l_SetTerminationTime_deserialize_fault(
57     globus_soap_message_handle_t        handle,
58     const xsd_QName *                   fault_qname,
59     int *                               fault_type,
60     void *                              args);
61
62
63 static
64 globus_soap_client_operation_t ScheduledResourceTermination_l_SetTerminationTime_operation =
65 {
66     { "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "SetTerminationTime" } ,
67     &wsrl_SetTerminationTimeType_info,
68
69     { "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "SetTerminationTimeResponse" },
70     &wsrl_SetTerminationTimeResponseType_info,
71
72     NULL,
73     "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/SetTerminationTime",
74     "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/SetTerminationTimeResponse",
75
76     ScheduledResourceTermination_l_SetTerminationTime_deserialize_fault
77
78 };
79
80
81 static
82 void
83 ImmediateResourceTermination_l_Destroy_deserialize_fault(
84     globus_soap_message_handle_t        handle,
85     const xsd_QName *                   fault_qname,
86     int *                               fault_type,
87     void *                              args);
88
89
90 static
91 globus_soap_client_operation_t ImmediateResourceTermination_l_Destroy_operation =
92 {
93     { "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "Destroy" } ,
94     &wsrl_DestroyType_info,
95
96     { "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "DestroyResponse" },
97     &wsrl_DestroyResponseType_info,
98
99     NULL,
100     "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/Destroy",
101     "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/DestroyResponse",
102
103     ImmediateResourceTermination_l_Destroy_deserialize_fault
104
105 };
106
107
108 static
109 int
110 WS_ResourceLifetimeService_l_client_module_activate()
111 0 {
112 0     int res = 0;        
113 0     globus_result_t result = GLOBUS_SUCCESS;
114 0     res = globus_module_activate(GLOBUS_SOAP_MESSAGE_MODULE);
115 0     if(res != GLOBUS_SUCCESS)
116     {
117 0         return res;
118     }
119
120 0     if(!WS_ResourceLifetimeService_l_registry)
121     {
122 0         result = globus_xsd_type_registry_init(&WS_ResourceLifetimeService_l_registry);
123 0         if(result != GLOBUS_SUCCESS)
124         {
125 0             return (int) result;
126         }
127
128 0         result = WS_ResourceLifetimeService_registry_add_types(WS_ResourceLifetimeService_l_registry);
129 0         if(result != GLOBUS_SUCCESS)
130         {
131 0             return (int) result;
132         }
133     }
134
135 0     if(GLOBUS_GLOBAL_TYPE_REGISTRY == NULL)
136     {
137 0         result = GLOBUS_FAILURE;
138 0         return GLOBUS_FAILURE;
139     }
140
141 0     result = WS_ResourceLifetimeService_registry_add_types(GLOBUS_GLOBAL_TYPE_REGISTRY);
142 0     if(result != GLOBUS_SUCCESS)
143     {
144 0         result = GlobusSoapMessageErrorFailedClientInit(
145             result, "WS_ResourceLifetimeService");
146     }
147
148 0     ScheduledResourceTermination_l_SetTerminationTime_operation.registry = WS_ResourceLifetimeService_l_registry;
149
150 0     ImmediateResourceTermination_l_Destroy_operation.registry = WS_ResourceLifetimeService_l_registry;
151
152
153 0     globus_mutex_init(&WS_ResourceLifetimeService_l_extensions_mutex, NULL);
154
155 0     return res;
156 }
157
158 static
159 void
160 WS_ResourceLifetimeService_l_extension_destroy(
161     void *                              sym)
162 0 {
163 0     char *                              symbol = (char *) sym;
164
165 0     globus_extension_deactivate(symbol);
166 0     globus_free(symbol);
167 }
168
169 static
170 int
171 WS_ResourceLifetimeService_l_client_module_deactivate()
172 0 {
173 0     int res = 0;
174
175 0     globus_xsd_type_registry_destroy(WS_ResourceLifetimeService_l_registry);
176 0     WS_ResourceLifetimeService_l_registry = NULL;
177
178 0     globus_module_deactivate(GLOBUS_SOAP_MESSAGE_MODULE);
179
180 0     globus_mutex_lock(&WS_ResourceLifetimeService_l_extensions_mutex);
181 0     globus_list_destroy_all(
182         WS_ResourceLifetimeService_l_extensions,
183         WS_ResourceLifetimeService_l_extension_destroy);
184 0     WS_ResourceLifetimeService_l_extensions = NULL;
185 0     globus_mutex_unlock(&WS_ResourceLifetimeService_l_extensions_mutex);
186 0     globus_mutex_destroy(&WS_ResourceLifetimeService_l_extensions_mutex);
187
188 0     return res;
189 }
190
191 globus_result_t
192 WS_ResourceLifetimeService_client_init(
193     WS_ResourceLifetimeService_client_handle_t * handle,
194     globus_soap_message_attr_t attrs,
195     globus_handler_chain_t chain)
196 0 {
197 0     WS_ResourceLifetimeService_client_handle_t             client_handle = NULL;
198 0     globus_result_t                     result = GLOBUS_SUCCESS;
199 0     globus_handler_chain_t              tmp_chain = NULL;
200 0     GlobusFuncName(WS_ResourceLifetimeService_client_init);
201 0     GlobusSoapMessageDebugEnter();
202         
203 0     if (chain == NULL)
204     {
205 0         globus_handler_chain_init(&tmp_chain);
206
207 0         if(attrs &&
208            ((int)globus_soap_message_attr_get(
209                attrs,
210                GLOBUS_SOAP_MESSAGE_AUTHENTICATION_METHOD_KEY)) ==
211            GLOBUS_SOAP_MESSAGE_AUTH_SECURE_MESSAGE)
212         {
213 0             result = globus_extension_activate(
214                 "globus_handler_ws_secure_message");
215 0             if(result != GLOBUS_SUCCESS)
216             {
217 0                 result = GlobusSoapMessageErrorFailedClientInit(
218                     result, "ImmediateResourceTermination_Destroy");
219 0                 goto error;
220             }
221
222 0             globus_mutex_lock(&WS_ResourceLifetimeService_l_extensions_mutex);
223 0             globus_list_insert(
224                 &WS_ResourceLifetimeService_l_extensions,
225                 strdup("globus_handler_ws_secure_message"));
226 0             globus_mutex_unlock(&WS_ResourceLifetimeService_l_extensions_mutex);
227
228 0             result = globus_handler_chain_push(
229                 tmp_chain,
230                 GLOBUS_HANDLER_TYPE_ALL,
231                 "globus_handler_ws_secure_message_client");
232 0             if(result != GLOBUS_SUCCESS)
233             {
234 0                 result = GlobusSoapMessageErrorFailedClientInit(
235                     result, "ImmediateResourceTermination_Destroy");
236 0                 goto error;
237             }
238         }
239
240 0         result = globus_extension_activate(GLOBUS_HANDLER_WS_ADDRESSING_LIB);
241 0         if(result != GLOBUS_SUCCESS)
242         {
243 0             result = GlobusSoapMessageErrorFailedClientInit(
244                 result, "ImmediateResourceTermination_Destroy");
245 0             goto error;
246         }
247
248 0         globus_mutex_lock(&WS_ResourceLifetimeService_l_extensions_mutex);
249 0         globus_list_insert(
250             &WS_ResourceLifetimeService_l_extensions,
251             strdup(GLOBUS_HANDLER_WS_ADDRESSING_LIB));
252 0         globus_mutex_unlock(&WS_ResourceLifetimeService_l_extensions_mutex);
253
254 0         result = globus_handler_chain_push(
255             tmp_chain,
256             GLOBUS_HANDLER_TYPE_REQUEST_ALL,
257             GLOBUS_HANDLER_WS_ADDRESSING_CLIENT);
258 0         if(result != GLOBUS_SUCCESS)
259         {
260 0             result = GlobusSoapMessageErrorFailedClientInit(
261                 result, "ImmediateResourceTermination_Destroy");
262 0             goto error;
263         }
264
265 0         result = globus_handler_chain_push(
266             tmp_chain,
267             GLOBUS_HANDLER_TYPE_RESPONSE_ALL,
268             GLOBUS_HANDLER_WS_ADDRESSING_CLIENT);
269 0         if(result != GLOBUS_SUCCESS)
270         {
271 0             result = GlobusSoapMessageErrorFailedClientInit(
272                 result, "ImmediateResourceTermination_Destroy");
273 0             goto error;
274         }
275
276 0         chain = tmp_chain;
277     }
278
279 0     result = globus_soap_client_handle_init(
280             handle,
281             attrs,
282             chain);
283
284 0     GlobusSoapMessageDebugExit();
285 0     return result;
286     
287 error:
288 0     if (tmp_chain != NULL)
289     {
290 0         globus_handler_chain_destroy(tmp_chain);
291     }
292 0     if (client_handle != NULL)
293     {
294 0         globus_free(client_handle);
295     }
296 0     GlobusSoapMessageDebugExit();
297 0     return result;
298 }
299 /* WS_ResourceLifetimeService_client_init() */
300
301 void
302 WS_ResourceLifetimeService_client_destroy(
303     WS_ResourceLifetimeService_client_handle_t             handle)
304 0 {
305 0     globus_soap_client_handle_destroy(handle);
306 }
307
308 globus_result_t
309 WS_ResourceLifetimeService_client_operation_cancel(
310     WS_ResourceLifetimeService_client_handle_t handle)
311 0 {
312 0     globus_result_t result = GLOBUS_SUCCESS;
313 0     GlobusFuncName(WS_ResourceLifetimeService_client_message_cancel);
314 0     GlobusSoapMessageDebugEnter();
315
316 0     result = globus_soap_client_operation_cancel(handle);
317
318 0     return result;
319 }
320     
321 globus_result_t
322 WS_ResourceLifetimeService_client_get_registry(
323     WS_ResourceLifetimeService_client_handle_t handle,
324     globus_xsd_type_registry_t * registry)
325 0 {
326 0     globus_result_t                     result = GLOBUS_SUCCESS;
327 0     GlobusFuncName(WS_ResourceLifetimeService_client_get_registry);
328 0     GlobusSoapMessageDebugEnter();
329
330 0     *registry = WS_ResourceLifetimeService_l_registry;
331
332 0     GlobusSoapMessageDebugExit();
333 0     return result;
334 }
335
336 globus_result_t
337 WS_ResourceLifetimeService_client_get_handler_chain(
338     WS_ResourceLifetimeService_client_handle_t handle,
339     globus_handler_chain_t * handlers)
340 0 {
341 0     globus_result_t                     result = GLOBUS_SUCCESS;
342 0     GlobusFuncName(WS_ResourceLifetimeService_client_get_handle_chain);
343 0     GlobusSoapMessageDebugEnter();
344
345 0     result = globus_soap_client_handle_get_handler_chain(handle, handlers);
346     
347 0     GlobusSoapMessageDebugExit();
348 0     return result;
349 }
350
351 globus_result_t
352 WS_ResourceLifetimeService_client_attr_set(
353     WS_ResourceLifetimeService_client_handle_t handle,
354     const char * prop_name,
355     globus_soap_message_attr_copy_func_t copy,
356     globus_soap_message_attr_destroy_func_t destroy,
357     void * value)
358 0 {
359 0     return globus_soap_client_handle_attr_set(
360         handle,
361         prop_name,
362         copy,
363         destroy,
364         value);
365 }
366
367 void *
368 WS_ResourceLifetimeService_client_attr_remove(
369     WS_ResourceLifetimeService_client_handle_t handle,
370     const char * prop_name)
371 0 {
372 0     return globus_soap_client_handle_attr_remove(
373         handle,
374         prop_name);
375 }
376
377 void *
378 WS_ResourceLifetimeService_client_attr_get(
379     WS_ResourceLifetimeService_client_handle_t handle,
380     const char * prop_name)
381 0 {
382 0     return globus_soap_client_handle_attr_get(
383         handle,
384         prop_name);
385 }
386
387
388
389 globus_result_t
390 ScheduledResourceTermination_SetTerminationTime_epr_register_request(
391     WS_ResourceLifetimeService_client_handle_t client_handle,
392     const wsa_EndpointReferenceType * epr,
393     const wsrl_SetTerminationTimeType * SetTerminationTime,
394     ScheduledResourceTermination_SetTerminationTime_request_callback_func_t callback,
395     void * user_args)
396 0 {
397 0     globus_result_t                     result = GLOBUS_SUCCESS;
398
399 0     globus_assert_string(epr, "NULL EndpointReference");
400 0     globus_assert_string(epr->Address.base_value,
401             "NULL EndpointReference Address");
402
403 0     result = globus_soap_client_handle_attr_set(
404         client_handle,
405         WSADDR_EPR_KEY,
406         wsa_EndpointReferenceType_copy_wrapper,
407         wsa_EndpointReferenceType_destroy_wrapper,
408         (void *) epr);
409
410 0     if (result != GLOBUS_SUCCESS)
411     {
412 0         goto out;
413     }
414
415 0     result = globus_soap_client_register_request(
416             client_handle,
417             epr->Address.base_value,
418             &ScheduledResourceTermination_l_SetTerminationTime_operation,
419             (void *) SetTerminationTime,
420             callback,
421             user_args);
422     
423 out:
424 0     return result;
425 }
426
427 globus_result_t
428 ScheduledResourceTermination_SetTerminationTime_register_request(
429     WS_ResourceLifetimeService_client_handle_t client_handle,
430     const char * endpoint,
431     const wsrl_SetTerminationTimeType * SetTerminationTime,
432     ScheduledResourceTermination_SetTerminationTime_request_callback_func_t callback,
433     void * user_args)
434 0 {
435 0     return globus_soap_client_register_request(
436             client_handle,
437             endpoint,
438             &ScheduledResourceTermination_l_SetTerminationTime_operation,
439             (void *) SetTerminationTime,
440             callback,
441             user_args);
442 }
443
444
445
446 static
447 void
448 ScheduledResourceTermination_l_SetTerminationTime_deserialize_fault(
449     globus_soap_message_handle_t        handle,
450     const xsd_QName *                   fault_qname,
451     int *                               fault_type,
452     void *                              args)
453 0 {
454 0     *fault_type = SCHEDULEDRESOURCETERMINATION_SETTERMINATIONTIME_NOFAULT;
455
456 0     if(fault_qname)
457     {
458 0        if(fault_qname == (&wsrl_TerminationTimeChangeRejectedFaultType_qname) ||
459            fault_qname == (&wsrl_TerminationTimeChangeRejectedFault_qname))
460          {
461 0              *fault_type = SCHEDULEDRESOURCETERMINATION_SETTERMINATIONTIME_TERMINATIONTIMECHANGEREJECTEDFAULT;
462          }
463 0         else if(fault_qname == (&wsrl_ResourceUnknownFaultType_qname) ||
464            fault_qname == (&wsrl_ResourceUnknownFault_qname))
465          {
466 0              *fault_type = SCHEDULEDRESOURCETERMINATION_SETTERMINATIONTIME_RESOURCEUNKNOWNFAULT;
467          }
468 0         else if(fault_qname == (&wsrl_UnableToSetTerminationTimeFaultType_qname) ||
469            fault_qname == (&wsrl_UnableToSetTerminationTimeFault_qname))
470          {
471 0              *fault_type = SCHEDULEDRESOURCETERMINATION_SETTERMINATIONTIME_UNABLETOSETTERMINATIONTIMEFAULT;
472          }
473         else
474         {
475 0              *fault_type = SCHEDULEDRESOURCETERMINATION_SETTERMINATIONTIME_UNKNOWN_FAULT;
476         }
477     }
478 }
479 /* ScheduledResourceTermination_l_SetTerminationTime_deserialize_fault() */
480
481 globus_result_t
482 ScheduledResourceTermination_SetTerminationTime_register_response(
483     WS_ResourceLifetimeService_client_handle_t             client_handle,
484     ScheduledResourceTermination_SetTerminationTime_response_callback_func_t callback,
485     void * user_args)
486 0 {
487 0     return globus_soap_client_register_response(
488             client_handle,
489             (globus_soap_client_response_callback_func_t) callback,
490             user_args);
491 }
492
493 globus_result_t
494 ScheduledResourceTermination_SetTerminationTime_epr_register(
495     WS_ResourceLifetimeService_client_handle_t handle,
496     const wsa_EndpointReferenceType * epr,
497     const wsrl_SetTerminationTimeType * SetTerminationTime,
498     ScheduledResourceTermination_SetTerminationTime_response_callback_func_t callback,
499     void * user_args)
500 0 {
501 0     globus_result_t                     result;
502
503 0     result = globus_soap_client_handle_attr_set(
504         handle,
505         WSADDR_EPR_KEY,
506         wsa_EndpointReferenceType_copy_wrapper,
507         wsa_EndpointReferenceType_destroy_wrapper,
508         (void *) epr);
509
510 0     if (result != GLOBUS_SUCCESS)
511     {
512 0         goto out;
513     }
514
515 0     result = globus_soap_client_operation_register(
516             handle,
517             epr->Address.base_value,
518             &ScheduledResourceTermination_l_SetTerminationTime_operation,
519             (void *) SetTerminationTime,
520             (globus_soap_client_response_callback_func_t) callback,
521             user_args);
522 out:
523 0     return result;
524 }
525
526 globus_result_t
527 ScheduledResourceTermination_SetTerminationTime_register(
528     WS_ResourceLifetimeService_client_handle_t handle,
529     const char * endpoint,
530     const wsrl_SetTerminationTimeType * SetTerminationTime,
531     ScheduledResourceTermination_SetTerminationTime_response_callback_func_t callback,
532     void * user_args)
533 0 {
534 0     return globus_soap_client_operation_register(
535             handle,
536             endpoint,
537             &ScheduledResourceTermination_l_SetTerminationTime_operation,
538             (void *) SetTerminationTime,
539             (globus_soap_client_response_callback_func_t) callback,
540             user_args);
541 }
542
543
544
545 globus_result_t
546 ScheduledResourceTermination_SetTerminationTime_epr(
547     WS_ResourceLifetimeService_client_handle_t handle,
548     const wsa_EndpointReferenceType * epr,
549     const wsrl_SetTerminationTimeType * SetTerminationTime,
550     wsrl_SetTerminationTimeResponseType * * SetTerminationTimeResponse,
551     ScheduledResourceTermination_SetTerminationTime_fault_t * fault_type,
552     xsd_any * * fault)
553 0 {
554 0     globus_result_t                     result;
555
556 0     result = globus_soap_client_handle_attr_set(
557         handle,
558         WSADDR_EPR_KEY,
559         wsa_EndpointReferenceType_copy_wrapper,
560         wsa_EndpointReferenceType_destroy_wrapper,
561         (void *) epr);
562
563 0     if (result != GLOBUS_SUCCESS)
564     {
565 0         goto out;
566     }
567 0     result = globus_soap_client_operation(
568         handle, 
569         epr->Address.base_value,
570         &ScheduledResourceTermination_l_SetTerminationTime_operation,
571         (void *) SetTerminationTime,
572
573         (void **) SetTerminationTimeResponse,
574         (int *) fault_type,
575         fault
576 );
577 out:
578 0     return result;
579 }
580         
581 globus_result_t
582 ScheduledResourceTermination_SetTerminationTime(
583     WS_ResourceLifetimeService_client_handle_t handle,
584     const char * endpoint,
585     const wsrl_SetTerminationTimeType * SetTerminationTime,
586     wsrl_SetTerminationTimeResponseType * * SetTerminationTimeResponse,
587     ScheduledResourceTermination_SetTerminationTime_fault_t * fault_type,
588     xsd_any * * fault)
589 0 {
590 0     return globus_soap_client_operation(
591             handle,
592             endpoint,
593             &ScheduledResourceTermination_l_SetTerminationTime_operation,
594             (void *) SetTerminationTime,
595
596         (void *) SetTerminationTimeResponse,
597         (int *) fault_type,
598         fault
599 );
600 }
601
602
603 globus_result_t
604 ImmediateResourceTermination_Destroy_epr_register_request(
605     WS_ResourceLifetimeService_client_handle_t client_handle,
606     const wsa_EndpointReferenceType * epr,
607     const wsrl_DestroyType * Destroy,
608     ImmediateResourceTermination_Destroy_request_callback_func_t callback,
609     void * user_args)
610 0 {
611 0     globus_result_t                     result = GLOBUS_SUCCESS;
612
613 0     globus_assert_string(epr, "NULL EndpointReference");
614 0     globus_assert_string(epr->Address.base_value,
615             "NULL EndpointReference Address");
616
617 0     result = globus_soap_client_handle_attr_set(
618         client_handle,
619         WSADDR_EPR_KEY,
620         wsa_EndpointReferenceType_copy_wrapper,
621         wsa_EndpointReferenceType_destroy_wrapper,
622         (void *) epr);
623
624 0     if (result != GLOBUS_SUCCESS)
625     {
626 0         goto out;
627     }
628
629 0     result = globus_soap_client_register_request(
630             client_handle,
631             epr->Address.base_value,
632             &ImmediateResourceTermination_l_Destroy_operation,
633             (void *) Destroy,
634             callback,
635             user_args);
636     
637 out:
638 0     return result;
639 }
640
641 globus_result_t
642 ImmediateResourceTermination_Destroy_register_request(
643     WS_ResourceLifetimeService_client_handle_t client_handle,
644     const char * endpoint,
645     const wsrl_DestroyType * Destroy,
646     ImmediateResourceTermination_Destroy_request_callback_func_t callback,
647     void * user_args)
648 0 {
649 0     return globus_soap_client_register_request(
650             client_handle,
651             endpoint,
652             &ImmediateResourceTermination_l_Destroy_operation,
653             (void *) Destroy,
654             callback,
655             user_args);
656 }
657
658
659
660 static
661 void
662 ImmediateResourceTermination_l_Destroy_deserialize_fault(
663     globus_soap_message_handle_t        handle,
664     const xsd_QName *                   fault_qname,
665     int *                               fault_type,
666     void *                              args)
667 0 {
668 0     *fault_type = IMMEDIATERESOURCETERMINATION_DESTROY_NOFAULT;
669
670 0     if(fault_qname)
671     {
672 0        if(fault_qname == (&wsrl_ResourceUnknownFaultType_qname) ||
673            fault_qname == (&wsrl_ResourceUnknownFault_qname))
674          {
675 0              *fault_type = IMMEDIATERESOURCETERMINATION_DESTROY_RESOURCEUNKNOWNFAULT;
676          }
677 0         else if(fault_qname == (&wsrl_ResourceNotDestroyedFaultType_qname) ||
678            fault_qname == (&wsrl_ResourceNotDestroyedFault_qname))
679          {
680 0              *fault_type = IMMEDIATERESOURCETERMINATION_DESTROY_RESOURCENOTDESTROYEDFAULT;
681          }
682         else
683         {
684 0              *fault_type = IMMEDIATERESOURCETERMINATION_DESTROY_UNKNOWN_FAULT;
685         }
686     }
687 }
688 /* ImmediateResourceTermination_l_Destroy_deserialize_fault() */
689
690 globus_result_t
691 ImmediateResourceTermination_Destroy_register_response(
692     WS_ResourceLifetimeService_client_handle_t             client_handle,
693     ImmediateResourceTermination_Destroy_response_callback_func_t callback,
694     void * user_args)
695 0 {
696 0     return globus_soap_client_register_response(
697             client_handle,
698             (globus_soap_client_response_callback_func_t) callback,
699             user_args);
700 }
701
702 globus_result_t
703 ImmediateResourceTermination_Destroy_epr_register(
704     WS_ResourceLifetimeService_client_handle_t handle,
705     const wsa_EndpointReferenceType * epr,
706     const wsrl_DestroyType * Destroy,
707     ImmediateResourceTermination_Destroy_response_callback_func_t callback,
708     void * user_args)
709 0 {
710 0     globus_result_t                     result;
711
712 0     result = globus_soap_client_handle_attr_set(
713         handle,
714         WSADDR_EPR_KEY,
715         wsa_EndpointReferenceType_copy_wrapper,
716         wsa_EndpointReferenceType_destroy_wrapper,
717         (void *) epr);
718
719 0     if (result != GLOBUS_SUCCESS)
720     {
721 0         goto out;
722     }
723
724 0     result = globus_soap_client_operation_register(
725             handle,
726             epr->Address.base_value,
727             &ImmediateResourceTermination_l_Destroy_operation,
728             (void *) Destroy,
729             (globus_soap_client_response_callback_func_t) callback,
730             user_args);
731 out:
732 0     return result;
733 }
734
735 globus_result_t
736 ImmediateResourceTermination_Destroy_register(
737     WS_ResourceLifetimeService_client_handle_t handle,
738     const char * endpoint,
739     const wsrl_DestroyType * Destroy,
740     ImmediateResourceTermination_Destroy_response_callback_func_t callback,
741     void * user_args)
742 0 {
743 0     return globus_soap_client_operation_register(
744             handle,
745             endpoint,
746             &ImmediateResourceTermination_l_Destroy_operation,
747             (void *) Destroy,
748             (globus_soap_client_response_callback_func_t) callback,
749             user_args);
750 }
751
752
753
754 globus_result_t
755 ImmediateResourceTermination_Destroy_epr(
756     WS_ResourceLifetimeService_client_handle_t handle,
757     const wsa_EndpointReferenceType * epr,
758     const wsrl_DestroyType * Destroy,
759     wsrl_DestroyResponseType * * DestroyResponse,
760     ImmediateResourceTermination_Destroy_fault_t * fault_type,
761     xsd_any * * fault)
762 0 {
763 0     globus_result_t                     result;
764
765 0     result = globus_soap_client_handle_attr_set(
766         handle,
767         WSADDR_EPR_KEY,
768         wsa_EndpointReferenceType_copy_wrapper,
769         wsa_EndpointReferenceType_destroy_wrapper,
770         (void *) epr);
771
772 0     if (result != GLOBUS_SUCCESS)
773     {
774 0         goto out;
775     }
776 0     result = globus_soap_client_operation(
777         handle, 
778         epr->Address.base_value,
779         &ImmediateResourceTermination_l_Destroy_operation,
780         (void *) Destroy,
781
782         (void **) DestroyResponse,
783         (int *) fault_type,
784         fault
785 );
786 out:
787 0     return result;
788 }
789         
790 globus_result_t
791 ImmediateResourceTermination_Destroy(
792     WS_ResourceLifetimeService_client_handle_t handle,
793     const char * endpoint,
794     const wsrl_DestroyType * Destroy,
795     wsrl_DestroyResponseType * * DestroyResponse,
796     ImmediateResourceTermination_Destroy_fault_t * fault_type,
797     xsd_any * * fault)
798 0 {
799 0     return globus_soap_client_operation(
800             handle,
801             endpoint,
802             &ImmediateResourceTermination_l_Destroy_operation,
803             (void *) Destroy,
804
805         (void *) DestroyResponse,
806         (int *) fault_type,
807         fault
808 );