| 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 "WidgetService.h" | |
| 24 | #include "WidgetService_skeleton.h" | |
| 25 | #include "WidgetService_internal_skeleton.h" | |
| 26 | #include "version.h" | |
| 27 | #include "globus_soap_message_fault.h" | |
| 28 | #include "globus_ws_addressing.h" | |
| 29 | #include "globus_wsrf_resource.h" | |
| 30 | #include "globus_wsrf_core_tools.h" | |
| 31 | ||
| 32 | static | |
| 33 | int | |
| 34 | WidgetService_activate(void); | |
| 35 | ||
| 36 | static | |
| 37 | int | |
| 38 | WidgetService_deactivate(void); | |
| 39 | ||
| 40 | GlobusExtensionDefineModule(WidgetService) = | |
| 41 | { | |
| 42 | "WidgetService", | |
| 43 | WidgetService_activate, | |
| 44 | WidgetService_deactivate, | |
| 45 | NULL, | |
| 46 | NULL, | |
| 47 | &local_version | |
| 48 | }; | |
| 49 | ||
| 50 | 0 | GlobusDebugDefine(WIDGETSERVICE); |
| 51 | ||
| 52 | xsd_QName WidgetService_service_qname = | |
| 53 | { | |
| 54 | "http://widgets.com/service", | |
| 55 | "WidgetService" | |
| 56 | }; | |
| 57 | ||
| 58 | globus_service_descriptor_t WidgetService_descriptor = | |
| 59 | { | |
| 60 | &WidgetService_service_qname, | |
| 61 | GLOBUS_SERVICE_ENGINE_MODULE_PATH_PREFIX "/" WIDGETSERVICE_BASE_PATH, | |
| 62 | NULL, | |
| 63 | NULL, | |
| 64 | NULL, | |
| 65 | globus_resource_id_get_as_string | |
| 66 | }; | |
| 67 | ||
| 68 | ||
| 69 | xsd_QName WidgetPortType_SetTerminationTime_op_qname = | |
| 70 | { | |
| 71 | "http://localhost:8080/wsrf/services/WidgetService" | |
| 72 | "SetTerminationTime" | |
| 73 | }; | |
| 74 | ||
| 75 | xsd_QName WidgetPortType_SetTerminationTime_input_qname = | |
| 76 | { | |
| 77 | "http://docs.oasis-open.org/wsrf/rl-2", | |
| 78 | "SetTerminationTime" | |
| 79 | }; | |
| 80 | ||
| 81 | typedef globus_result_t (* SetTerminationTime_invoke_func_t) ( | |
| 82 | globus_service_engine_t engine, | |
| 83 | globus_soap_message_handle_t message, | |
| 84 | globus_service_descriptor_t * descriptor, | |
| 85 | wsrl_SetTerminationTimeType * input, | |
| 86 | wsrl_SetTerminationTimeResponseType * output, | |
| 87 | xsd_any * fault); | |
| 88 | ||
| 89 | typedef struct SetTerminationTime_callback_handle_s | |
| 90 | { | |
| 91 | globus_service_engine_t engine; | |
| 92 | globus_soap_message_handle_t message; | |
| 93 | globus_operation_invoke_callback_func_t callback; | |
| 94 | void * args; | |
| 95 | } SetTerminationTime_callback_handle_t; | |
| 96 | ||
| 97 | static | |
| 98 | void | |
| 99 | SetTerminationTime_deserialize_callback( | |
| 100 | void * handle) | |
| 101 | 66 | { |
| 102 | SetTerminationTime_callback_handle_t * callback_handle; | |
| 103 | 66 | globus_result_t result = GLOBUS_SUCCESS; |
| 104 | struct globus_soap_message_fault_s soap_fault; | |
| 105 | SetTerminationTime_invoke_func_t invoke_function; | |
| 106 | 66 | wsrl_SetTerminationTimeType * input = NULL; |
| 107 | GlobusFuncName(SetTerminationTime_deserialize_callback); | |
| 108 | 66 | WidgetServiceDebugEnter(); |
| 109 | ||
| 110 | 66 | callback_handle = (SetTerminationTime_callback_handle_t *) handle; |
| 111 | ||
| 112 | 66 | result = globus_operation_table_get_operation( |
| 113 | WidgetService_descriptor.operations, | |
| 114 | "SetTerminationTime", | |
| 115 | (void **)&invoke_function); | |
| 116 | 66 | if(result != GLOBUS_SUCCESS) |
| 117 | { | |
| 118 | 0 | goto exit; |
| 119 | } | |
| 120 | ||
| 121 | 66 | result = wsrl_SetTerminationTimeType_init( |
| 122 | &input); | |
| 123 | 66 | if(result != GLOBUS_SUCCESS) |
| 124 | { | |
| 125 | 0 | goto exit; |
| 126 | } | |
| 127 | ||
| 128 | 66 | result = wsrl_SetTerminationTimeType_deserialize( |
| 129 | &WidgetPortType_SetTerminationTime_input_qname, | |
| 130 | input, | |
| 131 | callback_handle->message, | |
| 132 | 0); | |
| 133 | 66 | if(result != GLOBUS_SUCCESS) |
| 134 | { | |
| 135 | 0 | goto free_exit; |
| 136 | } | |
| 137 | ||
| 138 | 66 | result = globus_soap_message_handle_set_attr( |
| 139 | callback_handle->message, | |
| 140 | "SetTerminationTimeOperationInputParameter", | |
| 141 | wsrl_SetTerminationTimeType_info.copy, | |
| 142 | wsrl_SetTerminationTimeType_info.destroy, | |
| 143 | (void *)input); | |
| 144 | if(result != GLOBUS_SUCCESS) | |
| 145 | { | |
| 146 | 66 | goto free_exit; |
| 147 | } | |
| 148 | ||
| 149 | 66 | free_exit: |
| 150 | 66 | wsrl_SetTerminationTimeType_destroy(input); |
| 151 | ||
| 152 | 66 | exit: |
| 153 | 66 | callback_handle->callback( |
| 154 | result, | |
| 155 | callback_handle->args); | |
| 156 | ||
| 157 | 66 | free(callback_handle); |
| 158 | 66 | WidgetServiceDebugExit(); |
| 159 | 66 | } |
| 160 | /* SetTerminationTime_deserialize_callback() */ | |
| 161 | ||
| 162 | static | |
| 163 | globus_result_t | |
| 164 | SetTerminationTime_deserialize( | |
| 165 | globus_service_engine_t engine, | |
| 166 | globus_soap_message_handle_t message, | |
| 167 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 168 | void * args) | |
| 169 | 66 | { |
| 170 | SetTerminationTime_callback_handle_t * callback_handle; | |
| 171 | 66 | globus_result_t result = GLOBUS_SUCCESS; |
| 172 | GlobusFuncName(SetTerminationTime_deserialize); | |
| 173 | 66 | WidgetServiceDebugEnter(); |
| 174 | ||
| 175 | 66 | callback_handle = malloc(sizeof(SetTerminationTime_callback_handle_t)); |
| 176 | 66 | globus_assert_string(callback_handle, |
| 177 | "Memory allocation failed " | |
| 178 | "for SetTerminationTime callback handle"); | |
| 179 | ||
| 180 | 66 | callback_handle->engine = engine; |
| 181 | 66 | callback_handle->message = message; |
| 182 | 66 | callback_handle->callback = invoke_callback; |
| 183 | 66 | callback_handle->args = args; |
| 184 | ||
| 185 | 66 | result = globus_callback_register_oneshot( |
| 186 | NULL, | |
| 187 | &globus_i_reltime_zero, | |
| 188 | SetTerminationTime_deserialize_callback, | |
| 189 | callback_handle); | |
| 190 | ||
| 191 | 66 | WidgetServiceDebugExit(); |
| 192 | 66 | return result; |
| 193 | } | |
| 194 | ||
| 195 | static | |
| 196 | void | |
| 197 | SetTerminationTime_invoke_callback( | |
| 198 | void * handle) | |
| 199 | 66 | { |
| 200 | SetTerminationTime_callback_handle_t * callback_handle; | |
| 201 | 66 | globus_result_t result = GLOBUS_SUCCESS; |
| 202 | struct globus_soap_message_fault_s soap_fault; | |
| 203 | SetTerminationTime_invoke_func_t invoke_function; | |
| 204 | wsrl_SetTerminationTimeType * input; | |
| 205 | wsrl_SetTerminationTimeResponseType output; | |
| 206 | xsd_QName element_qname; | |
| 207 | xsd_any fault; | |
| 208 | ||
| 209 | GlobusFuncName(SetTerminationTime_invoke_callback); | |
| 210 | 66 | WidgetServiceDebugEnter(); |
| 211 | ||
| 212 | 66 | callback_handle = (SetTerminationTime_callback_handle_t *) handle; |
| 213 | ||
| 214 | 66 | input = globus_soap_message_handle_get_attr( |
| 215 | callback_handle->message, | |
| 216 | "SetTerminationTimeOperationInputParameter"); | |
| 217 | 66 | globus_assert(input); |
| 218 | ||
| 219 | 66 | result = globus_operation_table_get_operation( |
| 220 | WidgetService_descriptor.operations, | |
| 221 | "SetTerminationTime", | |
| 222 | (void **)&invoke_function); | |
| 223 | 66 | if(result != GLOBUS_SUCCESS) |
| 224 | { | |
| 225 | 0 | goto fault_exit; |
| 226 | } | |
| 227 | ||
| 228 | ||
| 229 | 66 | result = wsrl_SetTerminationTimeResponseType_init_contents( |
| 230 | &output); | |
| 231 | 66 | if(result != GLOBUS_SUCCESS) |
| 232 | { | |
| 233 | 0 | goto fault_exit; |
| 234 | } | |
| 235 | 66 | result = xsd_any_init_contents(&fault); |
| 236 | 66 | if(result != GLOBUS_SUCCESS) |
| 237 | { | |
| 238 | 0 | goto fault_exit; |
| 239 | } | |
| 240 | 66 | result = invoke_function( |
| 241 | callback_handle->engine, | |
| 242 | callback_handle->message, | |
| 243 | &WidgetService_descriptor, | |
| 244 | input, | |
| 245 | &output, | |
| 246 | &fault); | |
| 247 | ||
| 248 | ||
| 249 | 66 | fault_exit: |
| 250 | ||
| 251 | 66 | if(fault.value && fault.element) |
| 252 | { | |
| 253 | 0 | result = globus_service_session_begin_response( |
| 254 | callback_handle->message); | |
| 255 | 0 | if(result != GLOBUS_SUCCESS) |
| 256 | { | |
| 257 | 0 | goto exit; |
| 258 | } | |
| 259 | ||
| 260 | 0 | soap_fault.faultcode = "Server"; |
| 261 | 0 | soap_fault.faultstring = |
| 262 | "An error occurred while processing the message"; | |
| 263 | 0 | soap_fault.faultactor = NULL; |
| 264 | 0 | soap_fault.detail = &fault; |
| 265 | ||
| 266 | 0 | result = globus_service_session_serialize_fault_response( |
| 267 | callback_handle->message, &soap_fault); | |
| 268 | 0 | if(result != GLOBUS_SUCCESS) |
| 269 | { | |
| 270 | 0 | goto exit; |
| 271 | } | |
| 272 | ||
| 273 | 0 | xsd_any_destroy_contents(soap_fault.detail); |
| 274 | ||
| 275 | 0 | globus_soap_message_handle_set_attr( |
| 276 | callback_handle->message, | |
| 277 | WSADDR_ACTION_RESPONSE_KEY, | |
| 278 | globus_soap_message_attr_copy_string, | |
| 279 | globus_libc_free, | |
| 280 | WSADDRESSING_FAULT_NS); | |
| 281 | } | |
| 282 | 66 | else if(result != GLOBUS_SUCCESS) |
| 283 | { | |
| 284 | globus_result_t local_result; | |
| 285 | 0 | local_result = globus_service_session_begin_response( |
| 286 | callback_handle->message); | |
| 287 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 288 | { | |
| 289 | 0 | result = local_result; |
| 290 | 0 | goto exit; |
| 291 | } | |
| 292 | ||
| 293 | 0 | soap_fault.faultcode = "Server"; |
| 294 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 295 | globus_error_get(result)); | |
| 296 | 0 | result = GLOBUS_SUCCESS; |
| 297 | 0 | soap_fault.faultactor = NULL; |
| 298 | 0 | soap_fault.detail = NULL; |
| 299 | 0 | result = globus_service_session_serialize_fault_response( |
| 300 | callback_handle->message, &soap_fault); | |
| 301 | 0 | if(result != GLOBUS_SUCCESS) |
| 302 | { | |
| 303 | 0 | goto exit; |
| 304 | } | |
| 305 | ||
| 306 | 0 | globus_soap_message_handle_set_attr( |
| 307 | callback_handle->message, | |
| 308 | WSADDR_ACTION_RESPONSE_KEY, | |
| 309 | globus_soap_message_attr_copy_string, | |
| 310 | globus_libc_free, | |
| 311 | WSADDRESSING_FAULT_NS); | |
| 312 | } | |
| 313 | else | |
| 314 | { | |
| 315 | 66 | result = globus_service_session_begin_response( |
| 316 | callback_handle->message); | |
| 317 | 66 | if(result != GLOBUS_SUCCESS) |
| 318 | { | |
| 319 | 0 | goto exit; |
| 320 | } | |
| 321 | ||
| 322 | 66 | element_qname.local = "SetTerminationTimeResponse"; |
| 323 | 66 | element_qname.Namespace = "http://docs.oasis-open.org/wsrf/rl-2"; |
| 324 | ||
| 325 | 66 | result = wsrl_SetTerminationTimeResponseType_serialize( |
| 326 | &element_qname, | |
| 327 | &output, | |
| 328 | callback_handle->message, | |
| 329 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 330 | 66 | if(result != GLOBUS_SUCCESS) |
| 331 | { | |
| 332 | 0 | goto exit; |
| 333 | } | |
| 334 | ||
| 335 | 66 | result = globus_service_session_end_response( |
| 336 | callback_handle->message); | |
| 337 | 66 | if(result != GLOBUS_SUCCESS) |
| 338 | { | |
| 339 | 0 | goto exit; |
| 340 | } | |
| 341 | ||
| 342 | 66 | wsrl_SetTerminationTimeResponseType_destroy_contents( |
| 343 | &output); | |
| 344 | ||
| 345 | 66 | globus_soap_message_handle_set_attr( |
| 346 | callback_handle->message, | |
| 347 | WSADDR_ACTION_RESPONSE_KEY, | |
| 348 | globus_soap_message_attr_copy_string, | |
| 349 | globus_libc_free, | |
| 350 | "http://docs.oasis-open.org/wsrf/rlw-2/ScheduledResourceTermination/SetTerminationTimeResponse"); | |
| 351 | } | |
| 352 | ||
| 353 | 66 | exit: |
| 354 | ||
| 355 | 66 | callback_handle->callback( |
| 356 | result, | |
| 357 | callback_handle->args); | |
| 358 | ||
| 359 | 66 | globus_libc_free(callback_handle); |
| 360 | ||
| 361 | 66 | WidgetServiceDebugExit(); |
| 362 | 66 | } |
| 363 | ||
| 364 | static | |
| 365 | globus_result_t | |
| 366 | SetTerminationTime_invoke( | |
| 367 | globus_service_engine_t engine, | |
| 368 | globus_soap_message_handle_t message, | |
| 369 | globus_service_response_t * response, | |
| 370 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 371 | void * args) | |
| 372 | 66 | { |
| 373 | SetTerminationTime_callback_handle_t * callback_handle; | |
| 374 | 66 | globus_result_t result = GLOBUS_SUCCESS; |
| 375 | GlobusFuncName(WidgetPortType_SetTerminationTime); | |
| 376 | 66 | WidgetServiceDebugEnter(); |
| 377 | ||
| 378 | 66 | callback_handle = malloc(sizeof(SetTerminationTime_callback_handle_t)); |
| 379 | 66 | if(!callback_handle) |
| 380 | { | |
| 381 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 382 | 0 | goto exit; |
| 383 | } | |
| 384 | 66 | callback_handle->engine = engine; |
| 385 | 66 | callback_handle->message = message; |
| 386 | 66 | callback_handle->callback = invoke_callback; |
| 387 | 66 | callback_handle->args = args; |
| 388 | ||
| 389 | 66 | result = globus_callback_register_oneshot( |
| 390 | NULL, | |
| 391 | &globus_i_reltime_zero, | |
| 392 | SetTerminationTime_invoke_callback, | |
| 393 | callback_handle); | |
| 394 | ||
| 395 | 66 | exit: |
| 396 | 66 | WidgetServiceDebugExit(); |
| 397 | 66 | return result; |
| 398 | } | |
| 399 | ||
| 400 | static | |
| 401 | globus_service_operation_descriptor_t | |
| 402 | SetTerminationTime_operation_descriptor = | |
| 403 | { | |
| 404 | SetTerminationTime_deserialize, | |
| 405 | SetTerminationTime_invoke, | |
| 406 | }; | |
| 407 | ||
| 408 | static | |
| 409 | globus_operation_provider_descriptor_t SetTerminationTime_descriptor = | |
| 410 | { | |
| 411 | &WidgetPortType_SetTerminationTime_op_qname, | |
| 412 | "SetTerminationTime", | |
| 413 | (void *)WidgetPortType_SetTerminationTime_impl, | |
| 414 | NULL | |
| 415 | }; | |
| 416 | ||
| 417 | ||
| 418 | xsd_QName WidgetPortType_Destroy_op_qname = | |
| 419 | { | |
| 420 | "http://localhost:8080/wsrf/services/WidgetService" | |
| 421 | "Destroy" | |
| 422 | }; | |
| 423 | ||
| 424 | xsd_QName WidgetPortType_Destroy_input_qname = | |
| 425 | { | |
| 426 | "http://docs.oasis-open.org/wsrf/rl-2", | |
| 427 | "Destroy" | |
| 428 | }; | |
| 429 | ||
| 430 | typedef globus_result_t (* Destroy_invoke_func_t) ( | |
| 431 | globus_service_engine_t engine, | |
| 432 | globus_soap_message_handle_t message, | |
| 433 | globus_service_descriptor_t * descriptor, | |
| 434 | wsrl_DestroyType * input, | |
| 435 | wsrl_DestroyResponseType * output, | |
| 436 | xsd_any * fault); | |
| 437 | ||
| 438 | typedef struct Destroy_callback_handle_s | |
| 439 | { | |
| 440 | globus_service_engine_t engine; | |
| 441 | globus_soap_message_handle_t message; | |
| 442 | globus_operation_invoke_callback_func_t callback; | |
| 443 | void * args; | |
| 444 | } Destroy_callback_handle_t; | |
| 445 | ||
| 446 | static | |
| 447 | void | |
| 448 | Destroy_deserialize_callback( | |
| 449 | void * handle) | |
| 450 | 59 | { |
| 451 | Destroy_callback_handle_t * callback_handle; | |
| 452 | 59 | globus_result_t result = GLOBUS_SUCCESS; |
| 453 | struct globus_soap_message_fault_s soap_fault; | |
| 454 | Destroy_invoke_func_t invoke_function; | |
| 455 | 59 | wsrl_DestroyType * input = NULL; |
| 456 | GlobusFuncName(Destroy_deserialize_callback); | |
| 457 | 59 | WidgetServiceDebugEnter(); |
| 458 | ||
| 459 | 59 | callback_handle = (Destroy_callback_handle_t *) handle; |
| 460 | ||
| 461 | 59 | result = globus_operation_table_get_operation( |
| 462 | WidgetService_descriptor.operations, | |
| 463 | "Destroy", | |
| 464 | (void **)&invoke_function); | |
| 465 | 59 | if(result != GLOBUS_SUCCESS) |
| 466 | { | |
| 467 | 0 | goto exit; |
| 468 | } | |
| 469 | ||
| 470 | 59 | result = wsrl_DestroyType_init( |
| 471 | &input); | |
| 472 | 59 | if(result != GLOBUS_SUCCESS) |
| 473 | { | |
| 474 | 0 | goto exit; |
| 475 | } | |
| 476 | ||
| 477 | 59 | result = wsrl_DestroyType_deserialize( |
| 478 | &WidgetPortType_Destroy_input_qname, | |
| 479 | input, | |
| 480 | callback_handle->message, | |
| 481 | 0); | |
| 482 | 59 | if(result != GLOBUS_SUCCESS) |
| 483 | { | |
| 484 | 0 | goto free_exit; |
| 485 | } | |
| 486 | ||
| 487 | 59 | result = globus_soap_message_handle_set_attr( |
| 488 | callback_handle->message, | |
| 489 | "DestroyOperationInputParameter", | |
| 490 | wsrl_DestroyType_info.copy, | |
| 491 | wsrl_DestroyType_info.destroy, | |
| 492 | (void *)input); | |
| 493 | if(result != GLOBUS_SUCCESS) | |
| 494 | { | |
| 495 | 59 | goto free_exit; |
| 496 | } | |
| 497 | ||
| 498 | 59 | free_exit: |
| 499 | 59 | wsrl_DestroyType_destroy(input); |
| 500 | ||
| 501 | 59 | exit: |
| 502 | 59 | callback_handle->callback( |
| 503 | result, | |
| 504 | callback_handle->args); | |
| 505 | ||
| 506 | 59 | free(callback_handle); |
| 507 | 59 | WidgetServiceDebugExit(); |
| 508 | 59 | } |
| 509 | /* Destroy_deserialize_callback() */ | |
| 510 | ||
| 511 | static | |
| 512 | globus_result_t | |
| 513 | Destroy_deserialize( | |
| 514 | globus_service_engine_t engine, | |
| 515 | globus_soap_message_handle_t message, | |
| 516 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 517 | void * args) | |
| 518 | 59 | { |
| 519 | Destroy_callback_handle_t * callback_handle; | |
| 520 | 59 | globus_result_t result = GLOBUS_SUCCESS; |
| 521 | GlobusFuncName(Destroy_deserialize); | |
| 522 | 59 | WidgetServiceDebugEnter(); |
| 523 | ||
| 524 | 59 | callback_handle = malloc(sizeof(Destroy_callback_handle_t)); |
| 525 | 59 | globus_assert_string(callback_handle, |
| 526 | "Memory allocation failed " | |
| 527 | "for Destroy callback handle"); | |
| 528 | ||
| 529 | 59 | callback_handle->engine = engine; |
| 530 | 59 | callback_handle->message = message; |
| 531 | 59 | callback_handle->callback = invoke_callback; |
| 532 | 59 | callback_handle->args = args; |
| 533 | ||
| 534 | 59 | result = globus_callback_register_oneshot( |
| 535 | NULL, | |
| 536 | &globus_i_reltime_zero, | |
| 537 | Destroy_deserialize_callback, | |
| 538 | callback_handle); | |
| 539 | ||
| 540 | 59 | WidgetServiceDebugExit(); |
| 541 | 59 | return result; |
| 542 | } | |
| 543 | ||
| 544 | static | |
| 545 | void | |
| 546 | Destroy_invoke_callback( | |
| 547 | void * handle) | |
| 548 | 59 | { |
| 549 | Destroy_callback_handle_t * callback_handle; | |
| 550 | 59 | globus_result_t result = GLOBUS_SUCCESS; |
| 551 | struct globus_soap_message_fault_s soap_fault; | |
| 552 | Destroy_invoke_func_t invoke_function; | |
| 553 | wsrl_DestroyType * input; | |
| 554 | wsrl_DestroyResponseType output; | |
| 555 | xsd_QName element_qname; | |
| 556 | xsd_any fault; | |
| 557 | ||
| 558 | GlobusFuncName(Destroy_invoke_callback); | |
| 559 | 59 | WidgetServiceDebugEnter(); |
| 560 | ||
| 561 | 59 | callback_handle = (Destroy_callback_handle_t *) handle; |
| 562 | ||
| 563 | 59 | input = globus_soap_message_handle_get_attr( |
| 564 | callback_handle->message, | |
| 565 | "DestroyOperationInputParameter"); | |
| 566 | 59 | globus_assert(input); |
| 567 | ||
| 568 | 59 | result = globus_operation_table_get_operation( |
| 569 | WidgetService_descriptor.operations, | |
| 570 | "Destroy", | |
| 571 | (void **)&invoke_function); | |
| 572 | 59 | if(result != GLOBUS_SUCCESS) |
| 573 | { | |
| 574 | 0 | goto fault_exit; |
| 575 | } | |
| 576 | ||
| 577 | ||
| 578 | 59 | result = wsrl_DestroyResponseType_init_contents( |
| 579 | &output); | |
| 580 | 59 | if(result != GLOBUS_SUCCESS) |
| 581 | { | |
| 582 | 0 | goto fault_exit; |
| 583 | } | |
| 584 | 59 | result = xsd_any_init_contents(&fault); |
| 585 | 59 | if(result != GLOBUS_SUCCESS) |
| 586 | { | |
| 587 | 0 | goto fault_exit; |
| 588 | } | |
| 589 | 59 | result = invoke_function( |
| 590 | callback_handle->engine, | |
| 591 | callback_handle->message, | |
| 592 | &WidgetService_descriptor, | |
| 593 | input, | |
| 594 | &output, | |
| 595 | &fault); | |
| 596 | ||
| 597 | ||
| 598 | 59 | fault_exit: |
| 599 | ||
| 600 | 59 | if(fault.value && fault.element) |
| 601 | { | |
| 602 | 0 | result = globus_service_session_begin_response( |
| 603 | callback_handle->message); | |
| 604 | 0 | if(result != GLOBUS_SUCCESS) |
| 605 | { | |
| 606 | 0 | goto exit; |
| 607 | } | |
| 608 | ||
| 609 | 0 | soap_fault.faultcode = "Server"; |
| 610 | 0 | soap_fault.faultstring = |
| 611 | "An error occurred while processing the message"; | |
| 612 | 0 | soap_fault.faultactor = NULL; |
| 613 | 0 | soap_fault.detail = &fault; |
| 614 | ||
| 615 | 0 | result = globus_service_session_serialize_fault_response( |
| 616 | callback_handle->message, &soap_fault); | |
| 617 | 0 | if(result != GLOBUS_SUCCESS) |
| 618 | { | |
| 619 | 0 | goto exit; |
| 620 | } | |
| 621 | ||
| 622 | 0 | xsd_any_destroy_contents(soap_fault.detail); |
| 623 | ||
| 624 | 0 | globus_soap_message_handle_set_attr( |
| 625 | callback_handle->message, | |
| 626 | WSADDR_ACTION_RESPONSE_KEY, | |
| 627 | globus_soap_message_attr_copy_string, | |
| 628 | globus_libc_free, | |
| 629 | WSADDRESSING_FAULT_NS); | |
| 630 | } | |
| 631 | 59 | else if(result != GLOBUS_SUCCESS) |
| 632 | { | |
| 633 | globus_result_t local_result; | |
| 634 | 0 | local_result = globus_service_session_begin_response( |
| 635 | callback_handle->message); | |
| 636 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 637 | { | |
| 638 | 0 | result = local_result; |
| 639 | 0 | goto exit; |
| 640 | } | |
| 641 | ||
| 642 | 0 | soap_fault.faultcode = "Server"; |
| 643 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 644 | globus_error_get(result)); | |
| 645 | 0 | result = GLOBUS_SUCCESS; |
| 646 | 0 | soap_fault.faultactor = NULL; |
| 647 | 0 | soap_fault.detail = NULL; |
| 648 | 0 | result = globus_service_session_serialize_fault_response( |
| 649 | callback_handle->message, &soap_fault); | |
| 650 | 0 | if(result != GLOBUS_SUCCESS) |
| 651 | { | |
| 652 | 0 | goto exit; |
| 653 | } | |
| 654 | ||
| 655 | 0 | globus_soap_message_handle_set_attr( |
| 656 | callback_handle->message, | |
| 657 | WSADDR_ACTION_RESPONSE_KEY, | |
| 658 | globus_soap_message_attr_copy_string, | |
| 659 | globus_libc_free, | |
| 660 | WSADDRESSING_FAULT_NS); | |
| 661 | } | |
| 662 | else | |
| 663 | { | |
| 664 | 59 | result = globus_service_session_begin_response( |
| 665 | callback_handle->message); | |
| 666 | 59 | if(result != GLOBUS_SUCCESS) |
| 667 | { | |
| 668 | 0 | goto exit; |
| 669 | } | |
| 670 | ||
| 671 | 59 | element_qname.local = "DestroyResponse"; |
| 672 | 59 | element_qname.Namespace = "http://docs.oasis-open.org/wsrf/rl-2"; |
| 673 | ||
| 674 | 59 | result = wsrl_DestroyResponseType_serialize( |
| 675 | &element_qname, | |
| 676 | &output, | |
| 677 | callback_handle->message, | |
| 678 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 679 | 59 | if(result != GLOBUS_SUCCESS) |
| 680 | { | |
| 681 | 0 | goto exit; |
| 682 | } | |
| 683 | ||
| 684 | 59 | result = globus_service_session_end_response( |
| 685 | callback_handle->message); | |
| 686 | 59 | if(result != GLOBUS_SUCCESS) |
| 687 | { | |
| 688 | 0 | goto exit; |
| 689 | } | |
| 690 | ||
| 691 | 59 | wsrl_DestroyResponseType_destroy_contents( |
| 692 | &output); | |
| 693 | ||
| 694 | 59 | globus_soap_message_handle_set_attr( |
| 695 | callback_handle->message, | |
| 696 | WSADDR_ACTION_RESPONSE_KEY, | |
| 697 | globus_soap_message_attr_copy_string, | |
| 698 | globus_libc_free, | |
| 699 | "http://docs.oasis-open.org/wsrf/rlw-2/ImmediateResourceTermination/DestroyResponse"); | |
| 700 | } | |
| 701 | ||
| 702 | 59 | exit: |
| 703 | ||
| 704 | 59 | callback_handle->callback( |
| 705 | result, | |
| 706 | callback_handle->args); | |
| 707 | ||
| 708 | 59 | globus_libc_free(callback_handle); |
| 709 | ||
| 710 | 59 | WidgetServiceDebugExit(); |
| 711 | 59 | } |
| 712 | ||
| 713 | static | |
| 714 | globus_result_t | |
| 715 | Destroy_invoke( | |
| 716 | globus_service_engine_t engine, | |
| 717 | globus_soap_message_handle_t message, | |
| 718 | globus_service_response_t * response, | |
| 719 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 720 | void * args) | |
| 721 | 59 | { |
| 722 | Destroy_callback_handle_t * callback_handle; | |
| 723 | 59 | globus_result_t result = GLOBUS_SUCCESS; |
| 724 | GlobusFuncName(WidgetPortType_Destroy); | |
| 725 | 59 | WidgetServiceDebugEnter(); |
| 726 | ||
| 727 | 59 | callback_handle = malloc(sizeof(Destroy_callback_handle_t)); |
| 728 | 59 | if(!callback_handle) |
| 729 | { | |
| 730 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 731 | 0 | goto exit; |
| 732 | } | |
| 733 | 59 | callback_handle->engine = engine; |
| 734 | 59 | callback_handle->message = message; |
| 735 | 59 | callback_handle->callback = invoke_callback; |
| 736 | 59 | callback_handle->args = args; |
| 737 | ||
| 738 | 59 | result = globus_callback_register_oneshot( |
| 739 | NULL, | |
| 740 | &globus_i_reltime_zero, | |
| 741 | Destroy_invoke_callback, | |
| 742 | callback_handle); | |
| 743 | ||
| 744 | 59 | exit: |
| 745 | 59 | WidgetServiceDebugExit(); |
| 746 | 59 | return result; |
| 747 | } | |
| 748 | ||
| 749 | static | |
| 750 | globus_service_operation_descriptor_t | |
| 751 | Destroy_operation_descriptor = | |
| 752 | { | |
| 753 | Destroy_deserialize, | |
| 754 | Destroy_invoke, | |
| 755 | }; | |
| 756 | ||
| 757 | static | |
| 758 | globus_operation_provider_descriptor_t Destroy_descriptor = | |
| 759 | { | |
| 760 | &WidgetPortType_Destroy_op_qname, | |
| 761 | "Destroy", | |
| 762 | (void *)WidgetPortType_Destroy_impl, | |
| 763 | NULL | |
| 764 | }; | |
| 765 | ||
| 766 | ||
| 767 | xsd_QName WidgetPortType_SetResourceProperties_op_qname = | |
| 768 | { | |
| 769 | "http://localhost:8080/wsrf/services/WidgetService" | |
| 770 | "SetResourceProperties" | |
| 771 | }; | |
| 772 | ||
| 773 | xsd_QName WidgetPortType_SetResourceProperties_input_qname = | |
| 774 | { | |
| 775 | "http://docs.oasis-open.org/wsrf/rp-2", | |
| 776 | "SetResourceProperties" | |
| 777 | }; | |
| 778 | ||
| 779 | typedef globus_result_t (* SetResourceProperties_invoke_func_t) ( | |
| 780 | globus_service_engine_t engine, | |
| 781 | globus_soap_message_handle_t message, | |
| 782 | globus_service_descriptor_t * descriptor, | |
| 783 | wsrp_SetResourcePropertiesType * input, | |
| 784 | wsrp_SetResourcePropertiesResponseType * output, | |
| 785 | xsd_any * fault); | |
| 786 | ||
| 787 | typedef struct SetResourceProperties_callback_handle_s | |
| 788 | { | |
| 789 | globus_service_engine_t engine; | |
| 790 | globus_soap_message_handle_t message; | |
| 791 | globus_operation_invoke_callback_func_t callback; | |
| 792 | void * args; | |
| 793 | } SetResourceProperties_callback_handle_t; | |
| 794 | ||
| 795 | static | |
| 796 | void | |
| 797 | SetResourceProperties_deserialize_callback( | |
| 798 | void * handle) | |
| 799 | 4 | { |
| 800 | SetResourceProperties_callback_handle_t * callback_handle; | |
| 801 | 4 | globus_result_t result = GLOBUS_SUCCESS; |
| 802 | struct globus_soap_message_fault_s soap_fault; | |
| 803 | SetResourceProperties_invoke_func_t invoke_function; | |
| 804 | 4 | wsrp_SetResourcePropertiesType * input = NULL; |
| 805 | GlobusFuncName(SetResourceProperties_deserialize_callback); | |
| 806 | 4 | WidgetServiceDebugEnter(); |
| 807 | ||
| 808 | 4 | callback_handle = (SetResourceProperties_callback_handle_t *) handle; |
| 809 | ||
| 810 | 4 | result = globus_operation_table_get_operation( |
| 811 | WidgetService_descriptor.operations, | |
| 812 | "SetResourceProperties", | |
| 813 | (void **)&invoke_function); | |
| 814 | 4 | if(result != GLOBUS_SUCCESS) |
| 815 | { | |
| 816 | 0 | goto exit; |
| 817 | } | |
| 818 | ||
| 819 | 4 | result = wsrp_SetResourcePropertiesType_init( |
| 820 | &input); | |
| 821 | 4 | if(result != GLOBUS_SUCCESS) |
| 822 | { | |
| 823 | 0 | goto exit; |
| 824 | } | |
| 825 | ||
| 826 | 4 | result = wsrp_SetResourcePropertiesType_deserialize( |
| 827 | &WidgetPortType_SetResourceProperties_input_qname, | |
| 828 | input, | |
| 829 | callback_handle->message, | |
| 830 | 0); | |
| 831 | 4 | if(result != GLOBUS_SUCCESS) |
| 832 | { | |
| 833 | 0 | goto free_exit; |
| 834 | } | |
| 835 | ||
| 836 | 4 | result = globus_soap_message_handle_set_attr( |
| 837 | callback_handle->message, | |
| 838 | "SetResourcePropertiesOperationInputParameter", | |
| 839 | wsrp_SetResourcePropertiesType_info.copy, | |
| 840 | wsrp_SetResourcePropertiesType_info.destroy, | |
| 841 | (void *)input); | |
| 842 | if(result != GLOBUS_SUCCESS) | |
| 843 | { | |
| 844 | 4 | goto free_exit; |
| 845 | } | |
| 846 | ||
| 847 | 4 | free_exit: |
| 848 | 4 | wsrp_SetResourcePropertiesType_destroy(input); |
| 849 | ||
| 850 | 4 | exit: |
| 851 | 4 | callback_handle->callback( |
| 852 | result, | |
| 853 | callback_handle->args); | |
| 854 | ||
| 855 | 4 | free(callback_handle); |
| 856 | 4 | WidgetServiceDebugExit(); |
| 857 | 4 | } |
| 858 | /* SetResourceProperties_deserialize_callback() */ | |
| 859 | ||
| 860 | static | |
| 861 | globus_result_t | |
| 862 | SetResourceProperties_deserialize( | |
| 863 | globus_service_engine_t engine, | |
| 864 | globus_soap_message_handle_t message, | |
| 865 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 866 | void * args) | |
| 867 | 4 | { |
| 868 | SetResourceProperties_callback_handle_t * callback_handle; | |
| 869 | 4 | globus_result_t result = GLOBUS_SUCCESS; |
| 870 | GlobusFuncName(SetResourceProperties_deserialize); | |
| 871 | 4 | WidgetServiceDebugEnter(); |
| 872 | ||
| 873 | 4 | callback_handle = malloc(sizeof(SetResourceProperties_callback_handle_t)); |
| 874 | 4 | globus_assert_string(callback_handle, |
| 875 | "Memory allocation failed " | |
| 876 | "for SetResourceProperties callback handle"); | |
| 877 | ||
| 878 | 4 | callback_handle->engine = engine; |
| 879 | 4 | callback_handle->message = message; |
| 880 | 4 | callback_handle->callback = invoke_callback; |
| 881 | 4 | callback_handle->args = args; |
| 882 | ||
| 883 | 4 | result = globus_callback_register_oneshot( |
| 884 | NULL, | |
| 885 | &globus_i_reltime_zero, | |
| 886 | SetResourceProperties_deserialize_callback, | |
| 887 | callback_handle); | |
| 888 | ||
| 889 | 4 | WidgetServiceDebugExit(); |
| 890 | 4 | return result; |
| 891 | } | |
| 892 | ||
| 893 | static | |
| 894 | void | |
| 895 | SetResourceProperties_invoke_callback( | |
| 896 | void * handle) | |
| 897 | 4 | { |
| 898 | SetResourceProperties_callback_handle_t * callback_handle; | |
| 899 | 4 | globus_result_t result = GLOBUS_SUCCESS; |
| 900 | struct globus_soap_message_fault_s soap_fault; | |
| 901 | SetResourceProperties_invoke_func_t invoke_function; | |
| 902 | wsrp_SetResourcePropertiesType * input; | |
| 903 | wsrp_SetResourcePropertiesResponseType output; | |
| 904 | xsd_QName element_qname; | |
| 905 | xsd_any fault; | |
| 906 | ||
| 907 | GlobusFuncName(SetResourceProperties_invoke_callback); | |
| 908 | 4 | WidgetServiceDebugEnter(); |
| 909 | ||
| 910 | 4 | callback_handle = (SetResourceProperties_callback_handle_t *) handle; |
| 911 | ||
| 912 | 4 | input = globus_soap_message_handle_get_attr( |
| 913 | callback_handle->message, | |
| 914 | "SetResourcePropertiesOperationInputParameter"); | |
| 915 | 4 | globus_assert(input); |
| 916 | ||
| 917 | 4 | result = globus_operation_table_get_operation( |
| 918 | WidgetService_descriptor.operations, | |
| 919 | "SetResourceProperties", | |
| 920 | (void **)&invoke_function); | |
| 921 | 4 | if(result != GLOBUS_SUCCESS) |
| 922 | { | |
| 923 | 0 | goto fault_exit; |
| 924 | } | |
| 925 | ||
| 926 | ||
| 927 | 4 | result = wsrp_SetResourcePropertiesResponseType_init_contents( |
| 928 | &output); | |
| 929 | 4 | if(result != GLOBUS_SUCCESS) |
| 930 | { | |
| 931 | 0 | goto fault_exit; |
| 932 | } | |
| 933 | 4 | result = xsd_any_init_contents(&fault); |
| 934 | 4 | if(result != GLOBUS_SUCCESS) |
| 935 | { | |
| 936 | 0 | goto fault_exit; |
| 937 | } | |
| 938 | 4 | result = invoke_function( |
| 939 | callback_handle->engine, | |
| 940 | callback_handle->message, | |
| 941 | &WidgetService_descriptor, | |
| 942 | input, | |
| 943 | &output, | |
| 944 | &fault); | |
| 945 | ||
| 946 | ||
| 947 | 4 | fault_exit: |
| 948 | ||
| 949 | 4 | if(fault.value && fault.element) |
| 950 | { | |
| 951 | 0 | result = globus_service_session_begin_response( |
| 952 | callback_handle->message); | |
| 953 | 0 | if(result != GLOBUS_SUCCESS) |
| 954 | { | |
| 955 | 0 | goto exit; |
| 956 | } | |
| 957 | ||
| 958 | 0 | soap_fault.faultcode = "Server"; |
| 959 | 0 | soap_fault.faultstring = |
| 960 | "An error occurred while processing the message"; | |
| 961 | 0 | soap_fault.faultactor = NULL; |
| 962 | 0 | soap_fault.detail = &fault; |
| 963 | ||
| 964 | 0 | result = globus_service_session_serialize_fault_response( |
| 965 | callback_handle->message, &soap_fault); | |
| 966 | 0 | if(result != GLOBUS_SUCCESS) |
| 967 | { | |
| 968 | 0 | goto exit; |
| 969 | } | |
| 970 | ||
| 971 | 0 | xsd_any_destroy_contents(soap_fault.detail); |
| 972 | ||
| 973 | 0 | globus_soap_message_handle_set_attr( |
| 974 | callback_handle->message, | |
| 975 | WSADDR_ACTION_RESPONSE_KEY, | |
| 976 | globus_soap_message_attr_copy_string, | |
| 977 | globus_libc_free, | |
| 978 | WSADDRESSING_FAULT_NS); | |
| 979 | } | |
| 980 | 4 | else if(result != GLOBUS_SUCCESS) |
| 981 | { | |
| 982 | globus_result_t local_result; | |
| 983 | 0 | local_result = globus_service_session_begin_response( |
| 984 | callback_handle->message); | |
| 985 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 986 | { | |
| 987 | 0 | result = local_result; |
| 988 | 0 | goto exit; |
| 989 | } | |
| 990 | ||
| 991 | 0 | soap_fault.faultcode = "Server"; |
| 992 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 993 | globus_error_get(result)); | |
| 994 | 0 | result = GLOBUS_SUCCESS; |
| 995 | 0 | soap_fault.faultactor = NULL; |
| 996 | 0 | soap_fault.detail = NULL; |
| 997 | 0 | result = globus_service_session_serialize_fault_response( |
| 998 | callback_handle->message, &soap_fault); | |
| 999 | 0 | if(result != GLOBUS_SUCCESS) |
| 1000 | { | |
| 1001 | 0 | goto exit; |
| 1002 | } | |
| 1003 | ||
| 1004 | 0 | globus_soap_message_handle_set_attr( |
| 1005 | callback_handle->message, | |
| 1006 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1007 | globus_soap_message_attr_copy_string, | |
| 1008 | globus_libc_free, | |
| 1009 | WSADDRESSING_FAULT_NS); | |
| 1010 | } | |
| 1011 | else | |
| 1012 | { | |
| 1013 | 4 | result = globus_service_session_begin_response( |
| 1014 | callback_handle->message); | |
| 1015 | 4 | if(result != GLOBUS_SUCCESS) |
| 1016 | { | |
| 1017 | 0 | goto exit; |
| 1018 | } | |
| 1019 | ||
| 1020 | 4 | element_qname.local = "SetResourcePropertiesResponse"; |
| 1021 | 4 | element_qname.Namespace = "http://docs.oasis-open.org/wsrf/rp-2"; |
| 1022 | ||
| 1023 | 4 | result = wsrp_SetResourcePropertiesResponseType_serialize( |
| 1024 | &element_qname, | |
| 1025 | &output, | |
| 1026 | callback_handle->message, | |
| 1027 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 1028 | 4 | if(result != GLOBUS_SUCCESS) |
| 1029 | { | |
| 1030 | 0 | goto exit; |
| 1031 | } | |
| 1032 | ||
| 1033 | 4 | result = globus_service_session_end_response( |
| 1034 | callback_handle->message); | |
| 1035 | 4 | if(result != GLOBUS_SUCCESS) |
| 1036 | { | |
| 1037 | 0 | goto exit; |
| 1038 | } | |
| 1039 | ||
| 1040 | 4 | wsrp_SetResourcePropertiesResponseType_destroy_contents( |
| 1041 | &output); | |
| 1042 | ||
| 1043 | 4 | globus_soap_message_handle_set_attr( |
| 1044 | callback_handle->message, | |
| 1045 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1046 | globus_soap_message_attr_copy_string, | |
| 1047 | globus_libc_free, | |
| 1048 | "http://docs.oasis-open.org/wsrf/rpw-2/SetResourceProperties/SetResourcePropertiesResponse"); | |
| 1049 | } | |
| 1050 | ||
| 1051 | 4 | exit: |
| 1052 | ||
| 1053 | 4 | callback_handle->callback( |
| 1054 | result, | |
| 1055 | callback_handle->args); | |
| 1056 | ||
| 1057 | 4 | globus_libc_free(callback_handle); |
| 1058 | ||
| 1059 | 4 | WidgetServiceDebugExit(); |
| 1060 | 4 | } |
| 1061 | ||
| 1062 | static | |
| 1063 | globus_result_t | |
| 1064 | SetResourceProperties_invoke( | |
| 1065 | globus_service_engine_t engine, | |
| 1066 | globus_soap_message_handle_t message, | |
| 1067 | globus_service_response_t * response, | |
| 1068 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 1069 | void * args) | |
| 1070 | 4 | { |
| 1071 | SetResourceProperties_callback_handle_t * callback_handle; | |
| 1072 | 4 | globus_result_t result = GLOBUS_SUCCESS; |
| 1073 | GlobusFuncName(WidgetPortType_SetResourceProperties); | |
| 1074 | 4 | WidgetServiceDebugEnter(); |
| 1075 | ||
| 1076 | 4 | callback_handle = malloc(sizeof(SetResourceProperties_callback_handle_t)); |
| 1077 | 4 | if(!callback_handle) |
| 1078 | { | |
| 1079 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 1080 | 0 | goto exit; |
| 1081 | } | |
| 1082 | 4 | callback_handle->engine = engine; |
| 1083 | 4 | callback_handle->message = message; |
| 1084 | 4 | callback_handle->callback = invoke_callback; |
| 1085 | 4 | callback_handle->args = args; |
| 1086 | ||
| 1087 | 4 | result = globus_callback_register_oneshot( |
| 1088 | NULL, | |
| 1089 | &globus_i_reltime_zero, | |
| 1090 | SetResourceProperties_invoke_callback, | |
| 1091 | callback_handle); | |
| 1092 | ||
| 1093 | 4 | exit: |
| 1094 | 4 | WidgetServiceDebugExit(); |
| 1095 | 4 | return result; |
| 1096 | } | |
| 1097 | ||
| 1098 | static | |
| 1099 | globus_service_operation_descriptor_t | |
| 1100 | SetResourceProperties_operation_descriptor = | |
| 1101 | { | |
| 1102 | SetResourceProperties_deserialize, | |
| 1103 | SetResourceProperties_invoke, | |
| 1104 | }; | |
| 1105 | ||
| 1106 | static | |
| 1107 | globus_operation_provider_descriptor_t SetResourceProperties_descriptor = | |
| 1108 | { | |
| 1109 | &WidgetPortType_SetResourceProperties_op_qname, | |
| 1110 | "SetResourceProperties", | |
| 1111 | (void *)WidgetPortType_SetResourceProperties_impl, | |
| 1112 | NULL | |
| 1113 | }; | |
| 1114 | ||
| 1115 | ||
| 1116 | xsd_QName WidgetPortType_GetMultipleResourceProperties_op_qname = | |
| 1117 | { | |
| 1118 | "http://localhost:8080/wsrf/services/WidgetService" | |
| 1119 | "GetMultipleResourceProperties" | |
| 1120 | }; | |
| 1121 | ||
| 1122 | xsd_QName WidgetPortType_GetMultipleResourceProperties_input_qname = | |
| 1123 | { | |
| 1124 | "http://docs.oasis-open.org/wsrf/rp-2", | |
| 1125 | "GetMultipleResourceProperties" | |
| 1126 | }; | |
| 1127 | ||
| 1128 | typedef globus_result_t (* GetMultipleResourceProperties_invoke_func_t) ( | |
| 1129 | globus_service_engine_t engine, | |
| 1130 | globus_soap_message_handle_t message, | |
| 1131 | globus_service_descriptor_t * descriptor, | |
| 1132 | wsrp_GetMultipleResourcePropertiesType * input, | |
| 1133 | wsrp_GetMultipleResourcePropertiesResponseType * output, | |
| 1134 | xsd_any * fault); | |
| 1135 | ||
| 1136 | typedef struct GetMultipleResourceProperties_callback_handle_s | |
| 1137 | { | |
| 1138 | globus_service_engine_t engine; | |
| 1139 | globus_soap_message_handle_t message; | |
| 1140 | globus_operation_invoke_callback_func_t callback; | |
| 1141 | void * args; | |
| 1142 | } GetMultipleResourceProperties_callback_handle_t; | |
| 1143 | ||
| 1144 | static | |
| 1145 | void | |
| 1146 | GetMultipleResourceProperties_deserialize_callback( | |
| 1147 | void * handle) | |
| 1148 | 8016 | { |
| 1149 | GetMultipleResourceProperties_callback_handle_t * callback_handle; | |
| 1150 | 8016 | globus_result_t result = GLOBUS_SUCCESS; |
| 1151 | struct globus_soap_message_fault_s soap_fault; | |
| 1152 | GetMultipleResourceProperties_invoke_func_t invoke_function; | |
| 1153 | 8016 | wsrp_GetMultipleResourcePropertiesType * input = NULL; |
| 1154 | GlobusFuncName(GetMultipleResourceProperties_deserialize_callback); | |
| 1155 | 8016 | WidgetServiceDebugEnter(); |
| 1156 | ||
| 1157 | 8016 | callback_handle = (GetMultipleResourceProperties_callback_handle_t *) handle; |
| 1158 | ||
| 1159 | 8016 | result = globus_operation_table_get_operation( |
| 1160 | WidgetService_descriptor.operations, | |
| 1161 | "GetMultipleResourceProperties", | |
| 1162 | (void **)&invoke_function); | |
| 1163 | 8016 | if(result != GLOBUS_SUCCESS) |
| 1164 | { | |
| 1165 | 0 | goto exit; |
| 1166 | } | |
| 1167 | ||
| 1168 | 8016 | result = wsrp_GetMultipleResourcePropertiesType_init( |
| 1169 | &input); | |
| 1170 | 8016 | if(result != GLOBUS_SUCCESS) |
| 1171 | { | |
| 1172 | 0 | goto exit; |
| 1173 | } | |
| 1174 | ||
| 1175 | 8016 | result = wsrp_GetMultipleResourcePropertiesType_deserialize( |
| 1176 | &WidgetPortType_GetMultipleResourceProperties_input_qname, | |
| 1177 | input, | |
| 1178 | callback_handle->message, | |
| 1179 | 0); | |
| 1180 | 8016 | if(result != GLOBUS_SUCCESS) |
| 1181 | { | |
| 1182 | 0 | goto free_exit; |
| 1183 | } | |
| 1184 | ||
| 1185 | 8016 | result = globus_soap_message_handle_set_attr( |
| 1186 | callback_handle->message, | |
| 1187 | "GetMultipleResourcePropertiesOperationInputParameter", | |
| 1188 | wsrp_GetMultipleResourcePropertiesType_info.copy, | |
| 1189 | wsrp_GetMultipleResourcePropertiesType_info.destroy, | |
| 1190 | (void *)input); | |
| 1191 | if(result != GLOBUS_SUCCESS) | |
| 1192 | { | |
| 1193 | 8016 | goto free_exit; |
| 1194 | } | |
| 1195 | ||
| 1196 | 8016 | free_exit: |
| 1197 | 8016 | wsrp_GetMultipleResourcePropertiesType_destroy(input); |
| 1198 | ||
| 1199 | 8016 | exit: |
| 1200 | 8016 | callback_handle->callback( |
| 1201 | result, | |
| 1202 | callback_handle->args); | |
| 1203 | ||
| 1204 | 8016 | free(callback_handle); |
| 1205 | 8016 | WidgetServiceDebugExit(); |
| 1206 | 8016 | } |
| 1207 | /* GetMultipleResourceProperties_deserialize_callback() */ | |
| 1208 | ||
| 1209 | static | |
| 1210 | globus_result_t | |
| 1211 | GetMultipleResourceProperties_deserialize( | |
| 1212 | globus_service_engine_t engine, | |
| 1213 | globus_soap_message_handle_t message, | |
| 1214 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 1215 | void * args) | |
| 1216 | 8016 | { |
| 1217 | GetMultipleResourceProperties_callback_handle_t * callback_handle; | |
| 1218 | 8016 | globus_result_t result = GLOBUS_SUCCESS; |
| 1219 | GlobusFuncName(GetMultipleResourceProperties_deserialize); | |
| 1220 | 8016 | WidgetServiceDebugEnter(); |
| 1221 | ||
| 1222 | 8016 | callback_handle = malloc(sizeof(GetMultipleResourceProperties_callback_handle_t)); |
| 1223 | 8016 | globus_assert_string(callback_handle, |
| 1224 | "Memory allocation failed " | |
| 1225 | "for GetMultipleResourceProperties callback handle"); | |
| 1226 | ||
| 1227 | 8016 | callback_handle->engine = engine; |
| 1228 | 8016 | callback_handle->message = message; |
| 1229 | 8016 | callback_handle->callback = invoke_callback; |
| 1230 | 8016 | callback_handle->args = args; |
| 1231 | ||
| 1232 | 8016 | result = globus_callback_register_oneshot( |
| 1233 | NULL, | |
| 1234 | &globus_i_reltime_zero, | |
| 1235 | GetMultipleResourceProperties_deserialize_callback, | |
| 1236 | callback_handle); | |
| 1237 | ||
| 1238 | 8016 | WidgetServiceDebugExit(); |
| 1239 | 8016 | return result; |
| 1240 | } | |
| 1241 | ||
| 1242 | static | |
| 1243 | void | |
| 1244 | GetMultipleResourceProperties_invoke_callback( | |
| 1245 | void * handle) | |
| 1246 | 8016 | { |
| 1247 | GetMultipleResourceProperties_callback_handle_t * callback_handle; | |
| 1248 | 8016 | globus_result_t result = GLOBUS_SUCCESS; |
| 1249 | struct globus_soap_message_fault_s soap_fault; | |
| 1250 | GetMultipleResourceProperties_invoke_func_t invoke_function; | |
| 1251 | wsrp_GetMultipleResourcePropertiesType * input; | |
| 1252 | wsrp_GetMultipleResourcePropertiesResponseType output; | |
| 1253 | xsd_QName element_qname; | |
| 1254 | xsd_any fault; | |
| 1255 | ||
| 1256 | GlobusFuncName(GetMultipleResourceProperties_invoke_callback); | |
| 1257 | 8016 | WidgetServiceDebugEnter(); |
| 1258 | ||
| 1259 | 8016 | callback_handle = (GetMultipleResourceProperties_callback_handle_t *) handle; |
| 1260 | ||
| 1261 | 8016 | input = globus_soap_message_handle_get_attr( |
| 1262 | callback_handle->message, | |
| 1263 | "GetMultipleResourcePropertiesOperationInputParameter"); | |
| 1264 | 8016 | globus_assert(input); |
| 1265 | ||
| 1266 | 8016 | result = globus_operation_table_get_operation( |
| 1267 | WidgetService_descriptor.operations, | |
| 1268 | "GetMultipleResourceProperties", | |
| 1269 | (void **)&invoke_function); | |
| 1270 | 8016 | if(result != GLOBUS_SUCCESS) |
| 1271 | { | |
| 1272 | 0 | goto fault_exit; |
| 1273 | } | |
| 1274 | ||
| 1275 | ||
| 1276 | 8016 | result = wsrp_GetMultipleResourcePropertiesResponseType_init_contents( |
| 1277 | &output); | |
| 1278 | 8016 | if(result != GLOBUS_SUCCESS) |
| 1279 | { | |
| 1280 | 0 | goto fault_exit; |
| 1281 | } | |
| 1282 | 8016 | result = xsd_any_init_contents(&fault); |
| 1283 | 8016 | if(result != GLOBUS_SUCCESS) |
| 1284 | { | |
| 1285 | 0 | goto fault_exit; |
| 1286 | } | |
| 1287 | 8016 | result = invoke_function( |
| 1288 | callback_handle->engine, | |
| 1289 | callback_handle->message, | |
| 1290 | &WidgetService_descriptor, | |
| 1291 | input, | |
| 1292 | &output, | |
| 1293 | &fault); | |
| 1294 | ||
| 1295 | ||
| 1296 | 8016 | fault_exit: |
| 1297 | ||
| 1298 | 8016 | if(fault.value && fault.element) |
| 1299 | { | |
| 1300 | 0 | result = globus_service_session_begin_response( |
| 1301 | callback_handle->message); | |
| 1302 | 0 | if(result != GLOBUS_SUCCESS) |
| 1303 | { | |
| 1304 | 0 | goto exit; |
| 1305 | } | |
| 1306 | ||
| 1307 | 0 | soap_fault.faultcode = "Server"; |
| 1308 | 0 | soap_fault.faultstring = |
| 1309 | "An error occurred while processing the message"; | |
| 1310 | 0 | soap_fault.faultactor = NULL; |
| 1311 | 0 | soap_fault.detail = &fault; |
| 1312 | ||
| 1313 | 0 | result = globus_service_session_serialize_fault_response( |
| 1314 | callback_handle->message, &soap_fault); | |
| 1315 | 0 | if(result != GLOBUS_SUCCESS) |
| 1316 | { | |
| 1317 | 0 | goto exit; |
| 1318 | } | |
| 1319 | ||
| 1320 | 0 | xsd_any_destroy_contents(soap_fault.detail); |
| 1321 | ||
| 1322 | 0 | globus_soap_message_handle_set_attr( |
| 1323 | callback_handle->message, | |
| 1324 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1325 | globus_soap_message_attr_copy_string, | |
| 1326 | globus_libc_free, | |
| 1327 | WSADDRESSING_FAULT_NS); | |
| 1328 | } | |
| 1329 | 8016 | else if(result != GLOBUS_SUCCESS) |
| 1330 | { | |
| 1331 | globus_result_t local_result; | |
| 1332 | 0 | local_result = globus_service_session_begin_response( |
| 1333 | callback_handle->message); | |
| 1334 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 1335 | { | |
| 1336 | 0 | result = local_result; |
| 1337 | 0 | goto exit; |
| 1338 | } | |
| 1339 | ||
| 1340 | 0 | soap_fault.faultcode = "Server"; |
| 1341 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 1342 | globus_error_get(result)); | |
| 1343 | 0 | result = GLOBUS_SUCCESS; |
| 1344 | 0 | soap_fault.faultactor = NULL; |
| 1345 | 0 | soap_fault.detail = NULL; |
| 1346 | 0 | result = globus_service_session_serialize_fault_response( |
| 1347 | callback_handle->message, &soap_fault); | |
| 1348 | 0 | if(result != GLOBUS_SUCCESS) |
| 1349 | { | |
| 1350 | 0 | goto exit; |
| 1351 | } | |
| 1352 | ||
| 1353 | 0 | globus_soap_message_handle_set_attr( |
| 1354 | callback_handle->message, | |
| 1355 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1356 | globus_soap_message_attr_copy_string, | |
| 1357 | globus_libc_free, | |
| 1358 | WSADDRESSING_FAULT_NS); | |
| 1359 | } | |
| 1360 | else | |
| 1361 | { | |
| 1362 | 8016 | result = globus_service_session_begin_response( |
| 1363 | callback_handle->message); | |
| 1364 | 8016 | if(result != GLOBUS_SUCCESS) |
| 1365 | { | |
| 1366 | 0 | goto exit; |
| 1367 | } | |
| 1368 | ||
| 1369 | 8016 | element_qname.local = "GetMultipleResourcePropertiesResponse"; |
| 1370 | 8016 | element_qname.Namespace = "http://docs.oasis-open.org/wsrf/rp-2"; |
| 1371 | ||
| 1372 | 8016 | result = wsrp_GetMultipleResourcePropertiesResponseType_serialize( |
| 1373 | &element_qname, | |
| 1374 | &output, | |
| 1375 | callback_handle->message, | |
| 1376 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 1377 | 8016 | if(result != GLOBUS_SUCCESS) |
| 1378 | { | |
| 1379 | 0 | goto exit; |
| 1380 | } | |
| 1381 | ||
| 1382 | 8016 | result = globus_service_session_end_response( |
| 1383 | callback_handle->message); | |
| 1384 | 8016 | if(result != GLOBUS_SUCCESS) |
| 1385 | { | |
| 1386 | 0 | goto exit; |
| 1387 | } | |
| 1388 | ||
| 1389 | 8016 | wsrp_GetMultipleResourcePropertiesResponseType_destroy_contents( |
| 1390 | &output); | |
| 1391 | ||
| 1392 | 8016 | globus_soap_message_handle_set_attr( |
| 1393 | callback_handle->message, | |
| 1394 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1395 | globus_soap_message_attr_copy_string, | |
| 1396 | globus_libc_free, | |
| 1397 | "http://docs.oasis-open.org/wsrf/rpw-2/GetMultipleResourceProperties/GetMultipleResourcePropertiesResponse"); | |
| 1398 | } | |
| 1399 | ||
| 1400 | 8016 | exit: |
| 1401 | ||
| 1402 | 8016 | callback_handle->callback( |
| 1403 | result, | |
| 1404 | callback_handle->args); | |
| 1405 | ||
| 1406 | 8016 | globus_libc_free(callback_handle); |
| 1407 | ||
| 1408 | 8016 | WidgetServiceDebugExit(); |
| 1409 | 8016 | } |
| 1410 | ||
| 1411 | static | |
| 1412 | globus_result_t | |
| 1413 | GetMultipleResourceProperties_invoke( | |
| 1414 | globus_service_engine_t engine, | |
| 1415 | globus_soap_message_handle_t message, | |
| 1416 | globus_service_response_t * response, | |
| 1417 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 1418 | void * args) | |
| 1419 | 8016 | { |
| 1420 | GetMultipleResourceProperties_callback_handle_t * callback_handle; | |
| 1421 | 8016 | globus_result_t result = GLOBUS_SUCCESS; |
| 1422 | GlobusFuncName(WidgetPortType_GetMultipleResourceProperties); | |
| 1423 | 8016 | WidgetServiceDebugEnter(); |
| 1424 | ||
| 1425 | 8016 | callback_handle = malloc(sizeof(GetMultipleResourceProperties_callback_handle_t)); |
| 1426 | 8016 | if(!callback_handle) |
| 1427 | { | |
| 1428 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 1429 | 0 | goto exit; |
| 1430 | } | |
| 1431 | 8016 | callback_handle->engine = engine; |
| 1432 | 8016 | callback_handle->message = message; |
| 1433 | 8016 | callback_handle->callback = invoke_callback; |
| 1434 | 8016 | callback_handle->args = args; |
| 1435 | ||
| 1436 | 8016 | result = globus_callback_register_oneshot( |
| 1437 | NULL, | |
| 1438 | &globus_i_reltime_zero, | |
| 1439 | GetMultipleResourceProperties_invoke_callback, | |
| 1440 | callback_handle); | |
| 1441 | ||
| 1442 | 8016 | exit: |
| 1443 | 8016 | WidgetServiceDebugExit(); |
| 1444 | 8016 | return result; |
| 1445 | } | |
| 1446 | ||
| 1447 | static | |
| 1448 | globus_service_operation_descriptor_t | |
| 1449 | GetMultipleResourceProperties_operation_descriptor = | |
| 1450 | { | |
| 1451 | GetMultipleResourceProperties_deserialize, | |
| 1452 | GetMultipleResourceProperties_invoke, | |
| 1453 | }; | |
| 1454 | ||
| 1455 | static | |
| 1456 | globus_operation_provider_descriptor_t GetMultipleResourceProperties_descriptor = | |
| 1457 | { | |
| 1458 | &WidgetPortType_GetMultipleResourceProperties_op_qname, | |
| 1459 | "GetMultipleResourceProperties", | |
| 1460 | (void *)WidgetPortType_GetMultipleResourceProperties_impl, | |
| 1461 | NULL | |
| 1462 | }; | |
| 1463 | ||
| 1464 | ||
| 1465 | xsd_QName WidgetPortType_QueryResourceProperties_op_qname = | |
| 1466 | { | |
| 1467 | "http://localhost:8080/wsrf/services/WidgetService" | |
| 1468 | "QueryResourceProperties" | |
| 1469 | }; | |
| 1470 | ||
| 1471 | xsd_QName WidgetPortType_QueryResourceProperties_input_qname = | |
| 1472 | { | |
| 1473 | "http://docs.oasis-open.org/wsrf/rp-2", | |
| 1474 | "QueryResourceProperties" | |
| 1475 | }; | |
| 1476 | ||
| 1477 | typedef globus_result_t (* QueryResourceProperties_invoke_func_t) ( | |
| 1478 | globus_service_engine_t engine, | |
| 1479 | globus_soap_message_handle_t message, | |
| 1480 | globus_service_descriptor_t * descriptor, | |
| 1481 | wsrp_QueryResourcePropertiesType * input, | |
| 1482 | wsrp_QueryResourcePropertiesResponseType * output, | |
| 1483 | xsd_any * fault); | |
| 1484 | ||
| 1485 | typedef struct QueryResourceProperties_callback_handle_s | |
| 1486 | { | |
| 1487 | globus_service_engine_t engine; | |
| 1488 | globus_soap_message_handle_t message; | |
| 1489 | globus_operation_invoke_callback_func_t callback; | |
| 1490 | void * args; | |
| 1491 | } QueryResourceProperties_callback_handle_t; | |
| 1492 | ||
| 1493 | static | |
| 1494 | void | |
| 1495 | QueryResourceProperties_deserialize_callback( | |
| 1496 | void * handle) | |
| 1497 | 4 | { |
| 1498 | QueryResourceProperties_callback_handle_t * callback_handle; | |
| 1499 | 4 | globus_result_t result = GLOBUS_SUCCESS; |
| 1500 | struct globus_soap_message_fault_s soap_fault; | |
| 1501 | QueryResourceProperties_invoke_func_t invoke_function; | |
| 1502 | 4 | wsrp_QueryResourcePropertiesType * input = NULL; |
| 1503 | GlobusFuncName(QueryResourceProperties_deserialize_callback); | |
| 1504 | 4 | WidgetServiceDebugEnter(); |
| 1505 | ||
| 1506 | 4 | callback_handle = (QueryResourceProperties_callback_handle_t *) handle; |
| 1507 | ||
| 1508 | 4 | result = globus_operation_table_get_operation( |
| 1509 | WidgetService_descriptor.operations, | |
| 1510 | "QueryResourceProperties", | |
| 1511 | (void **)&invoke_function); | |
| 1512 | 4 | if(result != GLOBUS_SUCCESS) |
| 1513 | { | |
| 1514 | 0 | goto exit; |
| 1515 | } | |
| 1516 | ||
| 1517 | 4 | result = wsrp_QueryResourcePropertiesType_init( |
| 1518 | &input); | |
| 1519 | 4 | if(result != GLOBUS_SUCCESS) |
| 1520 | { | |
| 1521 | 0 | goto exit; |
| 1522 | } | |
| 1523 | ||
| 1524 | 4 | result = wsrp_QueryResourcePropertiesType_deserialize( |
| 1525 | &WidgetPortType_QueryResourceProperties_input_qname, | |
| 1526 | input, | |
| 1527 | callback_handle->message, | |
| 1528 | 0); | |
| 1529 | 4 | if(result != GLOBUS_SUCCESS) |
| 1530 | { | |
| 1531 | 0 | goto free_exit; |
| 1532 | } | |
| 1533 | ||
| 1534 | 4 | result = globus_soap_message_handle_set_attr( |
| 1535 | callback_handle->message, | |
| 1536 | "QueryResourcePropertiesOperationInputParameter", | |
| 1537 | wsrp_QueryResourcePropertiesType_info.copy, | |
| 1538 | wsrp_QueryResourcePropertiesType_info.destroy, | |
| 1539 | (void *)input); | |
| 1540 | if(result != GLOBUS_SUCCESS) | |
| 1541 | { | |
| 1542 | 4 | goto free_exit; |
| 1543 | } | |
| 1544 | ||
| 1545 | 4 | free_exit: |
| 1546 | 4 | wsrp_QueryResourcePropertiesType_destroy(input); |
| 1547 | ||
| 1548 | 4 | exit: |
| 1549 | 4 | callback_handle->callback( |
| 1550 | result, | |
| 1551 | callback_handle->args); | |
| 1552 | ||
| 1553 | 4 | free(callback_handle); |
| 1554 | 4 | WidgetServiceDebugExit(); |
| 1555 | 4 | } |
| 1556 | /* QueryResourceProperties_deserialize_callback() */ | |
| 1557 | ||
| 1558 | static | |
| 1559 | globus_result_t | |
| 1560 | QueryResourceProperties_deserialize( | |
| 1561 | globus_service_engine_t engine, | |
| 1562 | globus_soap_message_handle_t message, | |
| 1563 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 1564 | void * args) | |
| 1565 | 4 | { |
| 1566 | QueryResourceProperties_callback_handle_t * callback_handle; | |
| 1567 | 4 | globus_result_t result = GLOBUS_SUCCESS; |
| 1568 | GlobusFuncName(QueryResourceProperties_deserialize); | |
| 1569 | 4 | WidgetServiceDebugEnter(); |
| 1570 | ||
| 1571 | 4 | callback_handle = malloc(sizeof(QueryResourceProperties_callback_handle_t)); |
| 1572 | 4 | globus_assert_string(callback_handle, |
| 1573 | "Memory allocation failed " | |
| 1574 | "for QueryResourceProperties callback handle"); | |
| 1575 | ||
| 1576 | 4 | callback_handle->engine = engine; |
| 1577 | 4 | callback_handle->message = message; |
| 1578 | 4 | callback_handle->callback = invoke_callback; |
| 1579 | 4 | callback_handle->args = args; |
| 1580 | ||
| 1581 | 4 | result = globus_callback_register_oneshot( |
| 1582 | NULL, | |
| 1583 | &globus_i_reltime_zero, | |
| 1584 | QueryResourceProperties_deserialize_callback, | |
| 1585 | callback_handle); | |
| 1586 | ||
| 1587 | 4 | WidgetServiceDebugExit(); |
| 1588 | 4 | return result; |
| 1589 | } | |
| 1590 | ||
| 1591 | static | |
| 1592 | void | |
| 1593 | QueryResourceProperties_invoke_callback( | |
| 1594 | void * handle) | |
| 1595 | 4 | { |
| 1596 | QueryResourceProperties_callback_handle_t * callback_handle; | |
| 1597 | 4 | globus_result_t result = GLOBUS_SUCCESS; |
| 1598 | struct globus_soap_message_fault_s soap_fault; | |
| 1599 | QueryResourceProperties_invoke_func_t invoke_function; | |
| 1600 | wsrp_QueryResourcePropertiesType * input; | |
| 1601 | wsrp_QueryResourcePropertiesResponseType output; | |
| 1602 | xsd_QName element_qname; | |
| 1603 | xsd_any fault; | |
| 1604 | ||
| 1605 | GlobusFuncName(QueryResourceProperties_invoke_callback); | |
| 1606 | 4 | WidgetServiceDebugEnter(); |
| 1607 | ||
| 1608 | 4 | callback_handle = (QueryResourceProperties_callback_handle_t *) handle; |
| 1609 | ||
| 1610 | 4 | input = globus_soap_message_handle_get_attr( |
| 1611 | callback_handle->message, | |
| 1612 | "QueryResourcePropertiesOperationInputParameter"); | |
| 1613 | 4 | globus_assert(input); |
| 1614 | ||
| 1615 | 4 | result = globus_operation_table_get_operation( |
| 1616 | WidgetService_descriptor.operations, | |
| 1617 | "QueryResourceProperties", | |
| 1618 | (void **)&invoke_function); | |
| 1619 | 4 | if(result != GLOBUS_SUCCESS) |
| 1620 | { | |
| 1621 | 0 | goto fault_exit; |
| 1622 | } | |
| 1623 | ||
| 1624 | ||
| 1625 | 4 | result = wsrp_QueryResourcePropertiesResponseType_init_contents( |
| 1626 | &output); | |
| 1627 | 4 | if(result != GLOBUS_SUCCESS) |
| 1628 | { | |
| 1629 | 0 | goto fault_exit; |
| 1630 | } | |
| 1631 | 4 | result = xsd_any_init_contents(&fault); |
| 1632 | 4 | if(result != GLOBUS_SUCCESS) |
| 1633 | { | |
| 1634 | 0 | goto fault_exit; |
| 1635 | } | |
| 1636 | 4 | result = invoke_function( |
| 1637 | callback_handle->engine, | |
| 1638 | callback_handle->message, | |
| 1639 | &WidgetService_descriptor, | |
| 1640 | input, | |
| 1641 | &output, | |
| 1642 | &fault); | |
| 1643 | ||
| 1644 | ||
| 1645 | 4 | fault_exit: |
| 1646 | ||
| 1647 | 4 | if(fault.value && fault.element) |
| 1648 | { | |
| 1649 | 0 | result = globus_service_session_begin_response( |
| 1650 | callback_handle->message); | |
| 1651 | 0 | if(result != GLOBUS_SUCCESS) |
| 1652 | { | |
| 1653 | 0 | goto exit; |
| 1654 | } | |
| 1655 | ||
| 1656 | 0 | soap_fault.faultcode = "Server"; |
| 1657 | 0 | soap_fault.faultstring = |
| 1658 | "An error occurred while processing the message"; | |
| 1659 | 0 | soap_fault.faultactor = NULL; |
| 1660 | 0 | soap_fault.detail = &fault; |
| 1661 | ||
| 1662 | 0 | result = globus_service_session_serialize_fault_response( |
| 1663 | callback_handle->message, &soap_fault); | |
| 1664 | 0 | if(result != GLOBUS_SUCCESS) |
| 1665 | { | |
| 1666 | 0 | goto exit; |
| 1667 | } | |
| 1668 | ||
| 1669 | 0 | xsd_any_destroy_contents(soap_fault.detail); |
| 1670 | ||
| 1671 | 0 | globus_soap_message_handle_set_attr( |
| 1672 | callback_handle->message, | |
| 1673 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1674 | globus_soap_message_attr_copy_string, | |
| 1675 | globus_libc_free, | |
| 1676 | WSADDRESSING_FAULT_NS); | |
| 1677 | } | |
| 1678 | 4 | else if(result != GLOBUS_SUCCESS) |
| 1679 | { | |
| 1680 | globus_result_t local_result; | |
| 1681 | 0 | local_result = globus_service_session_begin_response( |
| 1682 | callback_handle->message); | |
| 1683 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 1684 | { | |
| 1685 | 0 | result = local_result; |
| 1686 | 0 | goto exit; |
| 1687 | } | |
| 1688 | ||
| 1689 | 0 | soap_fault.faultcode = "Server"; |
| 1690 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 1691 | globus_error_get(result)); | |
| 1692 | 0 | result = GLOBUS_SUCCESS; |
| 1693 | 0 | soap_fault.faultactor = NULL; |
| 1694 | 0 | soap_fault.detail = NULL; |
| 1695 | 0 | result = globus_service_session_serialize_fault_response( |
| 1696 | callback_handle->message, &soap_fault); | |
| 1697 | 0 | if(result != GLOBUS_SUCCESS) |
| 1698 | { | |
| 1699 | 0 | goto exit; |
| 1700 | } | |
| 1701 | ||
| 1702 | 0 | globus_soap_message_handle_set_attr( |
| 1703 | callback_handle->message, | |
| 1704 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1705 | globus_soap_message_attr_copy_string, | |
| 1706 | globus_libc_free, | |
| 1707 | WSADDRESSING_FAULT_NS); | |
| 1708 | } | |
| 1709 | else | |
| 1710 | { | |
| 1711 | 4 | result = globus_service_session_begin_response( |
| 1712 | callback_handle->message); | |
| 1713 | 4 | if(result != GLOBUS_SUCCESS) |
| 1714 | { | |
| 1715 | 0 | goto exit; |
| 1716 | } | |
| 1717 | ||
| 1718 | 4 | element_qname.local = "QueryResourcePropertiesResponse"; |
| 1719 | 4 | element_qname.Namespace = "http://docs.oasis-open.org/wsrf/rp-2"; |
| 1720 | ||
| 1721 | 4 | result = wsrp_QueryResourcePropertiesResponseType_serialize( |
| 1722 | &element_qname, | |
| 1723 | &output, | |
| 1724 | callback_handle->message, | |
| 1725 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 1726 | 4 | if(result != GLOBUS_SUCCESS) |
| 1727 | { | |
| 1728 | 0 | goto exit; |
| 1729 | } | |
| 1730 | ||
| 1731 | 4 | result = globus_service_session_end_response( |
| 1732 | callback_handle->message); | |
| 1733 | 4 | if(result != GLOBUS_SUCCESS) |
| 1734 | { | |
| 1735 | 0 | goto exit; |
| 1736 | } | |
| 1737 | ||
| 1738 | 4 | wsrp_QueryResourcePropertiesResponseType_destroy_contents( |
| 1739 | &output); | |
| 1740 | ||
| 1741 | 4 | globus_soap_message_handle_set_attr( |
| 1742 | callback_handle->message, | |
| 1743 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1744 | globus_soap_message_attr_copy_string, | |
| 1745 | globus_libc_free, | |
| 1746 | "http://docs.oasis-open.org/wsrf/rpw-2/QueryResourceProperties/QueryResourcePropertiesResponse"); | |
| 1747 | } | |
| 1748 | ||
| 1749 | 4 | exit: |
| 1750 | ||
| 1751 | 4 | callback_handle->callback( |
| 1752 | result, | |
| 1753 | callback_handle->args); | |
| 1754 | ||
| 1755 | 4 | globus_libc_free(callback_handle); |
| 1756 | ||
| 1757 | 4 | WidgetServiceDebugExit(); |
| 1758 | 4 | } |
| 1759 | ||
| 1760 | static | |
| 1761 | globus_result_t | |
| 1762 | QueryResourceProperties_invoke( | |
| 1763 | globus_service_engine_t engine, | |
| 1764 | globus_soap_message_handle_t message, | |
| 1765 | globus_service_response_t * response, | |
| 1766 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 1767 | void * args) | |
| 1768 | 4 | { |
| 1769 | QueryResourceProperties_callback_handle_t * callback_handle; | |
| 1770 | 4 | globus_result_t result = GLOBUS_SUCCESS; |
| 1771 | GlobusFuncName(WidgetPortType_QueryResourceProperties); | |
| 1772 | 4 | WidgetServiceDebugEnter(); |
| 1773 | ||
| 1774 | 4 | callback_handle = malloc(sizeof(QueryResourceProperties_callback_handle_t)); |
| 1775 | 4 | if(!callback_handle) |
| 1776 | { | |
| 1777 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 1778 | 0 | goto exit; |
| 1779 | } | |
| 1780 | 4 | callback_handle->engine = engine; |
| 1781 | 4 | callback_handle->message = message; |
| 1782 | 4 | callback_handle->callback = invoke_callback; |
| 1783 | 4 | callback_handle->args = args; |
| 1784 | ||
| 1785 | 4 | result = globus_callback_register_oneshot( |
| 1786 | NULL, | |
| 1787 | &globus_i_reltime_zero, | |
| 1788 | QueryResourceProperties_invoke_callback, | |
| 1789 | callback_handle); | |
| 1790 | ||
| 1791 | 4 | exit: |
| 1792 | 4 | WidgetServiceDebugExit(); |
| 1793 | 4 | return result; |
| 1794 | } | |
| 1795 | ||
| 1796 | static | |
| 1797 | globus_service_operation_descriptor_t | |
| 1798 | QueryResourceProperties_operation_descriptor = | |
| 1799 | { | |
| 1800 | QueryResourceProperties_deserialize, | |
| 1801 | QueryResourceProperties_invoke, | |
| 1802 | }; | |
| 1803 | ||
| 1804 | static | |
| 1805 | globus_operation_provider_descriptor_t QueryResourceProperties_descriptor = | |
| 1806 | { | |
| 1807 | &WidgetPortType_QueryResourceProperties_op_qname, | |
| 1808 | "QueryResourceProperties", | |
| 1809 | (void *)WidgetPortType_QueryResourceProperties_impl, | |
| 1810 | NULL | |
| 1811 | }; | |
| 1812 | ||
| 1813 | ||
| 1814 | xsd_QName WidgetPortType_GetResourceProperty_op_qname = | |
| 1815 | { | |
| 1816 | "http://localhost:8080/wsrf/services/WidgetService" | |
| 1817 | "GetResourceProperty" | |
| 1818 | }; | |
| 1819 | ||
| 1820 | xsd_QName WidgetPortType_GetResourceProperty_input_qname = | |
| 1821 | { | |
| 1822 | "http://docs.oasis-open.org/wsrf/rp-2", | |
| 1823 | "GetResourceProperty" | |
| 1824 | }; | |
| 1825 | ||
| 1826 | typedef globus_result_t (* GetResourceProperty_invoke_func_t) ( | |
| 1827 | globus_service_engine_t engine, | |
| 1828 | globus_soap_message_handle_t message, | |
| 1829 | globus_service_descriptor_t * descriptor, | |
| 1830 | xsd_QName * input, | |
| 1831 | wsrp_GetResourcePropertyResponseType * output, | |
| 1832 | xsd_any * fault); | |
| 1833 | ||
| 1834 | typedef struct GetResourceProperty_callback_handle_s | |
| 1835 | { | |
| 1836 | globus_service_engine_t engine; | |
| 1837 | globus_soap_message_handle_t message; | |
| 1838 | globus_operation_invoke_callback_func_t callback; | |
| 1839 | void * args; | |
| 1840 | } GetResourceProperty_callback_handle_t; | |
| 1841 | ||
| 1842 | static | |
| 1843 | void | |
| 1844 | GetResourceProperty_deserialize_callback( | |
| 1845 | void * handle) | |
| 1846 | 6 | { |
| 1847 | GetResourceProperty_callback_handle_t * callback_handle; | |
| 1848 | 6 | globus_result_t result = GLOBUS_SUCCESS; |
| 1849 | struct globus_soap_message_fault_s soap_fault; | |
| 1850 | GetResourceProperty_invoke_func_t invoke_function; | |
| 1851 | 6 | xsd_QName * input = NULL; |
| 1852 | GlobusFuncName(GetResourceProperty_deserialize_callback); | |
| 1853 | 6 | WidgetServiceDebugEnter(); |
| 1854 | ||
| 1855 | 6 | callback_handle = (GetResourceProperty_callback_handle_t *) handle; |
| 1856 | ||
| 1857 | 6 | result = globus_operation_table_get_operation( |
| 1858 | WidgetService_descriptor.operations, | |
| 1859 | "GetResourceProperty", | |
| 1860 | (void **)&invoke_function); | |
| 1861 | 6 | if(result != GLOBUS_SUCCESS) |
| 1862 | { | |
| 1863 | 0 | goto exit; |
| 1864 | } | |
| 1865 | ||
| 1866 | 6 | result = xsd_QName_init( |
| 1867 | &input); | |
| 1868 | 6 | if(result != GLOBUS_SUCCESS) |
| 1869 | { | |
| 1870 | 0 | goto exit; |
| 1871 | } | |
| 1872 | ||
| 1873 | 6 | result = xsd_QName_deserialize( |
| 1874 | &WidgetPortType_GetResourceProperty_input_qname, | |
| 1875 | input, | |
| 1876 | callback_handle->message, | |
| 1877 | 0); | |
| 1878 | 6 | if(result != GLOBUS_SUCCESS) |
| 1879 | { | |
| 1880 | 0 | goto free_exit; |
| 1881 | } | |
| 1882 | ||
| 1883 | 6 | result = globus_soap_message_handle_set_attr( |
| 1884 | callback_handle->message, | |
| 1885 | "GetResourcePropertyOperationInputParameter", | |
| 1886 | xsd_QName_info.copy, | |
| 1887 | xsd_QName_info.destroy, | |
| 1888 | (void *)input); | |
| 1889 | if(result != GLOBUS_SUCCESS) | |
| 1890 | { | |
| 1891 | 6 | goto free_exit; |
| 1892 | } | |
| 1893 | ||
| 1894 | 6 | free_exit: |
| 1895 | 6 | xsd_QName_destroy(input); |
| 1896 | ||
| 1897 | 6 | exit: |
| 1898 | 6 | callback_handle->callback( |
| 1899 | result, | |
| 1900 | callback_handle->args); | |
| 1901 | ||
| 1902 | 6 | free(callback_handle); |
| 1903 | 6 | WidgetServiceDebugExit(); |
| 1904 | 6 | } |
| 1905 | /* GetResourceProperty_deserialize_callback() */ | |
| 1906 | ||
| 1907 | static | |
| 1908 | globus_result_t | |
| 1909 | GetResourceProperty_deserialize( | |
| 1910 | globus_service_engine_t engine, | |
| 1911 | globus_soap_message_handle_t message, | |
| 1912 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 1913 | void * args) | |
| 1914 | 6 | { |
| 1915 | GetResourceProperty_callback_handle_t * callback_handle; | |
| 1916 | 6 | globus_result_t result = GLOBUS_SUCCESS; |
| 1917 | GlobusFuncName(GetResourceProperty_deserialize); | |
| 1918 | 6 | WidgetServiceDebugEnter(); |
| 1919 | ||
| 1920 | 6 | callback_handle = malloc(sizeof(GetResourceProperty_callback_handle_t)); |
| 1921 | 6 | globus_assert_string(callback_handle, |
| 1922 | "Memory allocation failed " | |
| 1923 | "for GetResourceProperty callback handle"); | |
| 1924 | ||
| 1925 | 6 | callback_handle->engine = engine; |
| 1926 | 6 | callback_handle->message = message; |
| 1927 | 6 | callback_handle->callback = invoke_callback; |
| 1928 | 6 | callback_handle->args = args; |
| 1929 | ||
| 1930 | 6 | result = globus_callback_register_oneshot( |
| 1931 | NULL, | |
| 1932 | &globus_i_reltime_zero, | |
| 1933 | GetResourceProperty_deserialize_callback, | |
| 1934 | callback_handle); | |
| 1935 | ||
| 1936 | 6 | WidgetServiceDebugExit(); |
| 1937 | 6 | return result; |
| 1938 | } | |
| 1939 | ||
| 1940 | static | |
| 1941 | void | |
| 1942 | GetResourceProperty_invoke_callback( | |
| 1943 | void * handle) | |
| 1944 | 6 | { |
| 1945 | GetResourceProperty_callback_handle_t * callback_handle; | |
| 1946 | 6 | globus_result_t result = GLOBUS_SUCCESS; |
| 1947 | struct globus_soap_message_fault_s soap_fault; | |
| 1948 | GetResourceProperty_invoke_func_t invoke_function; | |
| 1949 | xsd_QName * input; | |
| 1950 | wsrp_GetResourcePropertyResponseType output; | |
| 1951 | xsd_QName element_qname; | |
| 1952 | xsd_any fault; | |
| 1953 | ||
| 1954 | GlobusFuncName(GetResourceProperty_invoke_callback); | |
| 1955 | 6 | WidgetServiceDebugEnter(); |
| 1956 | ||
| 1957 | 6 | callback_handle = (GetResourceProperty_callback_handle_t *) handle; |
| 1958 | ||
| 1959 | 6 | input = globus_soap_message_handle_get_attr( |
| 1960 | callback_handle->message, | |
| 1961 | "GetResourcePropertyOperationInputParameter"); | |
| 1962 | 6 | globus_assert(input); |
| 1963 | ||
| 1964 | 6 | result = globus_operation_table_get_operation( |
| 1965 | WidgetService_descriptor.operations, | |
| 1966 | "GetResourceProperty", | |
| 1967 | (void **)&invoke_function); | |
| 1968 | 6 | if(result != GLOBUS_SUCCESS) |
| 1969 | { | |
| 1970 | 0 | goto fault_exit; |
| 1971 | } | |
| 1972 | ||
| 1973 | ||
| 1974 | 6 | result = wsrp_GetResourcePropertyResponseType_init_contents( |
| 1975 | &output); | |
| 1976 | 6 | if(result != GLOBUS_SUCCESS) |
| 1977 | { | |
| 1978 | 0 | goto fault_exit; |
| 1979 | } | |
| 1980 | 6 | result = xsd_any_init_contents(&fault); |
| 1981 | 6 | if(result != GLOBUS_SUCCESS) |
| 1982 | { | |
| 1983 | 0 | goto fault_exit; |
| 1984 | } | |
| 1985 | 6 | result = invoke_function( |
| 1986 | callback_handle->engine, | |
| 1987 | callback_handle->message, | |
| 1988 | &WidgetService_descriptor, | |
| 1989 | input, | |
| 1990 | &output, | |
| 1991 | &fault); | |
| 1992 | ||
| 1993 | ||
| 1994 | 6 | fault_exit: |
| 1995 | ||
| 1996 | 6 | if(fault.value && fault.element) |
| 1997 | { | |
| 1998 | 0 | result = globus_service_session_begin_response( |
| 1999 | callback_handle->message); | |
| 2000 | 0 | if(result != GLOBUS_SUCCESS) |
| 2001 | { | |
| 2002 | 0 | goto exit; |
| 2003 | } | |
| 2004 | ||
| 2005 | 0 | soap_fault.faultcode = "Server"; |
| 2006 | 0 | soap_fault.faultstring = |
| 2007 | "An error occurred while processing the message"; | |
| 2008 | 0 | soap_fault.faultactor = NULL; |
| 2009 | 0 | soap_fault.detail = &fault; |
| 2010 | ||
| 2011 | 0 | result = globus_service_session_serialize_fault_response( |
| 2012 | callback_handle->message, &soap_fault); | |
| 2013 | 0 | if(result != GLOBUS_SUCCESS) |
| 2014 | { | |
| 2015 | 0 | goto exit; |
| 2016 | } | |
| 2017 | ||
| 2018 | 0 | xsd_any_destroy_contents(soap_fault.detail); |
| 2019 | ||
| 2020 | 0 | globus_soap_message_handle_set_attr( |
| 2021 | callback_handle->message, | |
| 2022 | WSADDR_ACTION_RESPONSE_KEY, | |
| 2023 | globus_soap_message_attr_copy_string, | |
| 2024 | globus_libc_free, | |
| 2025 | WSADDRESSING_FAULT_NS); | |
| 2026 | } | |
| 2027 | 6 | else if(result != GLOBUS_SUCCESS) |
| 2028 | { | |
| 2029 | globus_result_t local_result; | |
| 2030 | 0 | local_result = globus_service_session_begin_response( |
| 2031 | callback_handle->message); | |
| 2032 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 2033 | { | |
| 2034 | 0 | result = local_result; |
| 2035 | 0 | goto exit; |
| 2036 | } | |
| 2037 | ||
| 2038 | 0 | soap_fault.faultcode = "Server"; |
| 2039 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 2040 | globus_error_get(result)); | |
| 2041 | 0 | result = GLOBUS_SUCCESS; |
| 2042 | 0 | soap_fault.faultactor = NULL; |
| 2043 | 0 | soap_fault.detail = NULL; |
| 2044 | 0 | result = globus_service_session_serialize_fault_response( |
| 2045 | callback_handle->message, &soap_fault); | |
| 2046 | 0 | if(result != GLOBUS_SUCCESS) |
| 2047 | { | |
| 2048 | 0 | goto exit; |
| 2049 | } | |
| 2050 | ||
| 2051 | 0 | globus_soap_message_handle_set_attr( |
| 2052 | callback_handle->message, | |
| 2053 | WSADDR_ACTION_RESPONSE_KEY, | |
| 2054 | globus_soap_message_attr_copy_string, | |
| 2055 | globus_libc_free, | |
| 2056 | WSADDRESSING_FAULT_NS); | |
| 2057 | } | |
| 2058 | else | |
| 2059 | { | |
| 2060 | 6 | result = globus_service_session_begin_response( |
| 2061 | callback_handle->message); | |
| 2062 | 6 | if(result != GLOBUS_SUCCESS) |
| 2063 | { | |
| 2064 | 0 | goto exit; |
| 2065 | } | |
| 2066 | ||
| 2067 | 6 | element_qname.local = "GetResourcePropertyResponse"; |
| 2068 | 6 | element_qname.Namespace = "http://docs.oasis-open.org/wsrf/rp-2"; |
| 2069 | ||
| 2070 | 6 | result = wsrp_GetResourcePropertyResponseType_serialize( |
| 2071 | &element_qname, | |
| 2072 | &output, | |
| 2073 | callback_handle->message, | |
| 2074 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 2075 | 6 | if(result != GLOBUS_SUCCESS) |
| 2076 | { | |
| 2077 | 0 | goto exit; |
| 2078 | } | |
| 2079 | ||
| 2080 | 6 | result = globus_service_session_end_response( |
| 2081 | callback_handle->message); | |
| 2082 | 6 | if(result != GLOBUS_SUCCESS) |
| 2083 | { | |
| 2084 | 0 | goto exit; |
| 2085 | } | |
| 2086 | ||
| 2087 | 6 | wsrp_GetResourcePropertyResponseType_destroy_contents( |
| 2088 | &output); | |
| 2089 | ||
| 2090 | 6 | globus_soap_message_handle_set_attr( |
| 2091 | callback_handle->message, | |
| 2092 | WSADDR_ACTION_RESPONSE_KEY, | |
| 2093 | globus_soap_message_attr_copy_string, | |
| 2094 | globus_libc_free, | |
| 2095 | "http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/GetResourcePropertyResponse"); | |
| 2096 | } | |
| 2097 | ||
| 2098 | 6 | exit: |
| 2099 | ||
| 2100 | 6 | callback_handle->callback( |
| 2101 | result, | |
| 2102 | callback_handle->args); | |
| 2103 | ||
| 2104 | 6 | globus_libc_free(callback_handle); |
| 2105 | ||
| 2106 | 6 | WidgetServiceDebugExit(); |
| 2107 | 6 | } |
| 2108 | ||
| 2109 | static | |
| 2110 | globus_result_t | |
| 2111 | GetResourceProperty_invoke( | |
| 2112 | globus_service_engine_t engine, | |
| 2113 | globus_soap_message_handle_t message, | |
| 2114 | globus_service_response_t * response, | |
| 2115 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 2116 | void * args) | |
| 2117 | 6 | { |
| 2118 | GetResourceProperty_callback_handle_t * callback_handle; | |
| 2119 | 6 | globus_result_t result = GLOBUS_SUCCESS; |
| 2120 | GlobusFuncName(WidgetPortType_GetResourceProperty); | |
| 2121 | 6 | WidgetServiceDebugEnter(); |
| 2122 | ||
| 2123 | 6 | callback_handle = malloc(sizeof(GetResourceProperty_callback_handle_t)); |
| 2124 | 6 | if(!callback_handle) |
| 2125 | { | |
| 2126 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 2127 | 0 | goto exit; |
| 2128 | } | |
| 2129 | 6 | callback_handle->engine = engine; |
| 2130 | 6 | callback_handle->message = message; |
| 2131 | 6 | callback_handle->callback = invoke_callback; |
| 2132 | 6 | callback_handle->args = args; |
| 2133 | ||
| 2134 | 6 | result = globus_callback_register_oneshot( |
| 2135 | NULL, | |
| 2136 | &globus_i_reltime_zero, | |
| 2137 | GetResourceProperty_invoke_callback, | |
| 2138 | callback_handle); | |
| 2139 | ||
| 2140 | 6 | exit: |
| 2141 | 6 | WidgetServiceDebugExit(); |
| 2142 | 6 | return result; |
| 2143 | } | |
| 2144 | ||
| 2145 | static | |
| 2146 | globus_service_operation_descriptor_t | |
| 2147 | GetResourceProperty_operation_descriptor = | |
| 2148 | { | |
| 2149 | GetResourceProperty_deserialize, | |
| 2150 | GetResourceProperty_invoke, | |
| 2151 | }; | |
| 2152 | ||
| 2153 | static | |
| 2154 | globus_operation_provider_descriptor_t GetResourceProperty_descriptor = | |
| 2155 | { | |
| 2156 | &WidgetPortType_GetResourceProperty_op_qname, | |
| 2157 | "GetResourceProperty", | |
| 2158 | (void *)WidgetPortType_GetResourceProperty_impl, | |
| 2159 | NULL | |
| 2160 | }; | |
| 2161 | ||
| 2162 | ||
| 2163 | xsd_QName WidgetPortType_createWidget_op_qname = | |
| 2164 | { | |
| 2165 | "http://localhost:8080/wsrf/services/WidgetService" | |
| 2166 | "createWidget" | |
| 2167 | }; | |
| 2168 | ||
| 2169 | xsd_QName WidgetPortType_createWidget_input_qname = | |
| 2170 | { | |
| 2171 | "http://widgets.com", | |
| 2172 | "createWidget" | |
| 2173 | }; | |
| 2174 | ||
| 2175 | typedef globus_result_t (* createWidget_invoke_func_t) ( | |
| 2176 | globus_service_engine_t engine, | |
| 2177 | globus_soap_message_handle_t message, | |
| 2178 | globus_service_descriptor_t * descriptor, | |
| 2179 | widget_createWidgetType * input, | |
| 2180 | widget_createWidgetResponseType * output, | |
| 2181 | xsd_any * fault); | |
| 2182 | ||
| 2183 | typedef struct createWidget_callback_handle_s | |
| 2184 | { | |
| 2185 | globus_service_engine_t engine; | |
| 2186 | globus_soap_message_handle_t message; | |
| 2187 | globus_operation_invoke_callback_func_t callback; | |
| 2188 | void * args; | |
| 2189 | } createWidget_callback_handle_t; | |
| 2190 | ||
| 2191 | static | |
| 2192 | void | |
| 2193 | createWidget_deserialize_callback( | |
| 2194 | void * handle) | |
| 2195 | 72 | { |
| 2196 | createWidget_callback_handle_t * callback_handle; | |
| 2197 | 72 | globus_result_t result = GLOBUS_SUCCESS; |
| 2198 | struct globus_soap_message_fault_s soap_fault; | |
| 2199 | createWidget_invoke_func_t invoke_function; | |
| 2200 | 72 | widget_createWidgetType * input = NULL; |
| 2201 | GlobusFuncName(createWidget_deserialize_callback); | |
| 2202 | 72 | WidgetServiceDebugEnter(); |
| 2203 | ||
| 2204 | 72 | callback_handle = (createWidget_callback_handle_t *) handle; |
| 2205 | ||
| 2206 | 72 | result = globus_operation_table_get_operation( |
| 2207 | WidgetService_descriptor.operations, | |
| 2208 | "createWidget", | |
| 2209 | (void **)&invoke_function); | |
| 2210 | 72 | if(result != GLOBUS_SUCCESS) |
| 2211 | { | |
| 2212 | 0 | goto exit; |
| 2213 | } | |
| 2214 | ||
| 2215 | 72 | result = widget_createWidgetType_init( |
| 2216 | &input); | |
| 2217 | 72 | if(result != GLOBUS_SUCCESS) |
| 2218 | { | |
| 2219 | 0 | goto exit; |
| 2220 | } | |
| 2221 | ||
| 2222 | 72 | result = widget_createWidgetType_deserialize( |
| 2223 | &WidgetPortType_createWidget_input_qname, | |
| 2224 | input, | |
| 2225 | callback_handle->message, | |
| 2226 | 0); | |
| 2227 | 72 | if(result != GLOBUS_SUCCESS) |
| 2228 | { | |
| 2229 | 0 | goto free_exit; |
| 2230 | } | |
| 2231 | ||
| 2232 | 72 | result = globus_soap_message_handle_set_attr( |
| 2233 | callback_handle->message, | |
| 2234 | "createWidgetOperationInputParameter", | |
| 2235 | widget_createWidgetType_info.copy, | |
| 2236 | widget_createWidgetType_info.destroy, | |
| 2237 | (void *)input); | |
| 2238 | if(result != GLOBUS_SUCCESS) | |
| 2239 | { | |
| 2240 | 72 | goto free_exit; |
| 2241 | } | |
| 2242 | ||
| 2243 | 72 | free_exit: |
| 2244 | 72 | widget_createWidgetType_destroy(input); |
| 2245 | ||
| 2246 | 72 | exit: |
| 2247 | 72 | callback_handle->callback( |
| 2248 | result, | |
| 2249 | callback_handle->args); | |
| 2250 | ||
| 2251 | 72 | free(callback_handle); |
| 2252 | 72 | WidgetServiceDebugExit(); |
| 2253 | 72 | } |
| 2254 | /* createWidget_deserialize_callback() */ | |
| 2255 | ||
| 2256 | static | |
| 2257 | globus_result_t | |
| 2258 | createWidget_deserialize( | |
| 2259 | globus_service_engine_t engine, | |
| 2260 | globus_soap_message_handle_t message, | |
| 2261 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 2262 | void * args) | |
| 2263 | 72 | { |
| 2264 | createWidget_callback_handle_t * callback_handle; | |
| 2265 | 72 | globus_result_t result = GLOBUS_SUCCESS; |
| 2266 | GlobusFuncName(createWidget_deserialize); | |
| 2267 | 72 | WidgetServiceDebugEnter(); |
| 2268 | ||
| 2269 | 72 | callback_handle = malloc(sizeof(createWidget_callback_handle_t)); |
| 2270 | 72 | globus_assert_string(callback_handle, |
| 2271 | "Memory allocation failed " | |
| 2272 | "for createWidget callback handle"); | |
| 2273 | ||
| 2274 | 72 | callback_handle->engine = engine; |
| 2275 | 72 | callback_handle->message = message; |
| 2276 | 72 | callback_handle->callback = invoke_callback; |
| 2277 | 72 | callback_handle->args = args; |
| 2278 | ||
| 2279 | 72 | result = globus_callback_register_oneshot( |
| 2280 | NULL, | |
| 2281 | &globus_i_reltime_zero, | |
| 2282 | createWidget_deserialize_callback, | |
| 2283 | callback_handle); | |
| 2284 | ||
| 2285 | 72 | WidgetServiceDebugExit(); |
| 2286 | 72 | return result; |
| 2287 | } | |
| 2288 | ||
| 2289 | static | |
| 2290 | void | |
| 2291 | createWidget_invoke_callback( | |
| 2292 | void * handle) | |
| 2293 | 72 | { |
| 2294 | createWidget_callback_handle_t * callback_handle; | |
| 2295 | 72 | globus_result_t result = GLOBUS_SUCCESS; |
| 2296 | struct globus_soap_message_fault_s soap_fault; | |
| 2297 | createWidget_invoke_func_t invoke_function; | |
| 2298 | widget_createWidgetType * input; | |
| 2299 | widget_createWidgetResponseType output; | |
| 2300 | xsd_QName element_qname; | |
| 2301 | xsd_any fault; | |
| 2302 | ||
| 2303 | GlobusFuncName(createWidget_invoke_callback); | |
| 2304 | 72 | WidgetServiceDebugEnter(); |
| 2305 | ||
| 2306 | 72 | callback_handle = (createWidget_callback_handle_t *) handle; |
| 2307 | ||
| 2308 | 72 | input = globus_soap_message_handle_get_attr( |
| 2309 | callback_handle->message, | |
| 2310 | "createWidgetOperationInputParameter"); | |
| 2311 | 72 | globus_assert(input); |
| 2312 | ||
| 2313 | 72 | result = globus_operation_table_get_operation( |
| 2314 | WidgetService_descriptor.operations, | |
| 2315 | "createWidget", | |
| 2316 | (void **)&invoke_function); | |
| 2317 | 72 | if(result != GLOBUS_SUCCESS) |
| 2318 | { | |
| 2319 | 0 | goto fault_exit; |
| 2320 | } | |
| 2321 | ||
| 2322 | ||
| 2323 | 72 | result = widget_createWidgetResponseType_init_contents( |
| 2324 | &output); | |
| 2325 | 72 | if(result != GLOBUS_SUCCESS) |
| 2326 | { | |
| 2327 | 0 | goto fault_exit; |
| 2328 | } | |
| 2329 | 72 | result = xsd_any_init_contents(&fault); |
| 2330 | 72 | if(result != GLOBUS_SUCCESS) |
| 2331 | { | |
| 2332 | 0 | goto fault_exit; |
| 2333 | } | |
| 2334 | 72 | result = invoke_function( |
| 2335 | callback_handle->engine, | |
| 2336 | callback_handle->message, | |
| 2337 | &WidgetService_descriptor, | |
| 2338 | input, | |
| 2339 | &output, | |
| 2340 | &fault); | |
| 2341 | ||
| 2342 | ||
| 2343 | 72 | fault_exit: |
| 2344 | ||
| 2345 | 72 | if(fault.value && fault.element) |
| 2346 | { | |
| 2347 | 0 | result = globus_service_session_begin_response( |
| 2348 | callback_handle->message); | |
| 2349 | 0 | if(result != GLOBUS_SUCCESS) |
| 2350 | { | |
| 2351 | 0 | goto exit; |
| 2352 | } | |
| 2353 | ||
| 2354 | 0 | soap_fault.faultcode = "Server"; |
| 2355 | 0 | soap_fault.faultstring = |
| 2356 | "An error occurred while processing the message"; | |
| 2357 | 0 | soap_fault.faultactor = NULL; |
| 2358 | 0 | soap_fault.detail = &fault; |
| 2359 | ||
| 2360 | 0 | result = globus_service_session_serialize_fault_response( |
| 2361 | callback_handle->message, &soap_fault); | |
| 2362 | 0 | if(result != GLOBUS_SUCCESS) |
| 2363 | { | |
| 2364 | 0 | goto exit; |
| 2365 | } | |
| 2366 | ||
| 2367 | 0 | xsd_any_destroy_contents(soap_fault.detail); |
| 2368 | ||
| 2369 | 0 | globus_soap_message_handle_set_attr( |
| 2370 | callback_handle->message, | |
| 2371 | WSADDR_ACTION_RESPONSE_KEY, | |
| 2372 | globus_soap_message_attr_copy_string, | |
| 2373 | globus_libc_free, | |
| 2374 | WSADDRESSING_FAULT_NS); | |
| 2375 | } | |
| 2376 | 72 | else if(result != GLOBUS_SUCCESS) |
| 2377 | { | |
| 2378 | globus_result_t local_result; | |
| 2379 | 0 | local_result = globus_service_session_begin_response( |
| 2380 | callback_handle->message); | |
| 2381 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 2382 | { | |
| 2383 | 0 | result = local_result; |
| 2384 | 0 | goto exit; |
| 2385 | } | |
| 2386 | ||
| 2387 | 0 | soap_fault.faultcode = "Server"; |
| 2388 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 2389 | globus_error_get(result)); | |
| 2390 | 0 | result = GLOBUS_SUCCESS; |
| 2391 | 0 | soap_fault.faultactor = NULL; |
| 2392 | 0 | soap_fault.detail = NULL; |
| 2393 | 0 | result = globus_service_session_serialize_fault_response( |
| 2394 | callback_handle->message, &soap_fault); | |
| 2395 | 0 | if(result != GLOBUS_SUCCESS) |
| 2396 | { | |
| 2397 | 0 | goto exit; |
| 2398 | } | |
| 2399 | ||
| 2400 | 0 | globus_soap_message_handle_set_attr( |
| 2401 | callback_handle->message, | |
| 2402 | WSADDR_ACTION_RESPONSE_KEY, | |
| 2403 | globus_soap_message_attr_copy_string, | |
| 2404 | globus_libc_free, | |
| 2405 | WSADDRESSING_FAULT_NS); | |
| 2406 | } | |
| 2407 | else | |
| 2408 | { | |
| 2409 | 72 | result = globus_service_session_begin_response( |
| 2410 | callback_handle->message); | |
| 2411 | 72 | if(result != GLOBUS_SUCCESS) |
| 2412 | { | |
| 2413 | 0 | goto exit; |
| 2414 | } | |
| 2415 | ||
| 2416 | 72 | element_qname.local = "createWidgetResponse"; |
| 2417 | 72 | element_qname.Namespace = "http://widgets.com"; |
| 2418 | ||
| 2419 | 72 | result = widget_createWidgetResponseType_serialize( |
| 2420 | &element_qname, | |
| 2421 | &output, | |
| 2422 | callback_handle->message, | |
| 2423 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 2424 | 72 | if(result != GLOBUS_SUCCESS) |
| 2425 | { | |
| 2426 | 0 | goto exit; |
| 2427 | } | |
| 2428 | ||
| 2429 | 72 | result = globus_service_session_end_response( |
| 2430 | callback_handle->message); | |
| 2431 | 72 | if(result != GLOBUS_SUCCESS) |
| 2432 | { | |
| 2433 | 0 | goto exit; |
| 2434 | } | |
| 2435 | ||
| 2436 | 72 | widget_createWidgetResponseType_destroy_contents( |
| 2437 | &output); | |
| 2438 | ||
| 2439 | 72 | globus_soap_message_handle_set_attr( |
| 2440 | callback_handle->message, | |
| 2441 | WSADDR_ACTION_RESPONSE_KEY, | |
| 2442 | globus_soap_message_attr_copy_string, | |
| 2443 | globus_libc_free, | |
| 2444 | "http://widgets.com/WidgetPortType/createWidgetResponse"); | |
| 2445 | } | |
| 2446 | ||
| 2447 | 72 | exit: |
| 2448 | ||
| 2449 | 72 | callback_handle->callback( |
| 2450 | result, | |
| 2451 | callback_handle->args); | |
| 2452 | ||
| 2453 | 72 | globus_libc_free(callback_handle); |
| 2454 | ||
| 2455 | 72 | WidgetServiceDebugExit(); |
| 2456 | 72 | } |
| 2457 | ||
| 2458 | static | |
| 2459 | globus_result_t | |
| 2460 | createWidget_invoke( | |
| 2461 | globus_service_engine_t engine, | |
| 2462 | globus_soap_message_handle_t message, | |
| 2463 | globus_service_response_t * response, | |
| 2464 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 2465 | void * args) | |
| 2466 | 72 | { |
| 2467 | createWidget_callback_handle_t * callback_handle; | |
| 2468 | 72 | globus_result_t result = GLOBUS_SUCCESS; |
| 2469 | GlobusFuncName(WidgetPortType_createWidget); | |
| 2470 | 72 | WidgetServiceDebugEnter(); |
| 2471 | ||
| 2472 | 72 | callback_handle = malloc(sizeof(createWidget_callback_handle_t)); |
| 2473 | 72 | if(!callback_handle) |
| 2474 | { | |
| 2475 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 2476 | 0 | goto exit; |
| 2477 | } | |
| 2478 | 72 | callback_handle->engine = engine; |
| 2479 | 72 | callback_handle->message = message; |
| 2480 | 72 | callback_handle->callback = invoke_callback; |
| 2481 | 72 | callback_handle->args = args; |
| 2482 | ||
| 2483 | 72 | result = globus_callback_register_oneshot( |
| 2484 | NULL, | |
| 2485 | &globus_i_reltime_zero, | |
| 2486 | createWidget_invoke_callback, | |
| 2487 | callback_handle); | |
| 2488 | ||
| 2489 | 72 | exit: |
| 2490 | 72 | WidgetServiceDebugExit(); |
| 2491 | 72 | return result; |
| 2492 | } | |
| 2493 | ||
| 2494 | static | |
| 2495 | globus_service_operation_descriptor_t | |
| 2496 | createWidget_operation_descriptor = | |
| 2497 | { | |
| 2498 | createWidget_deserialize, | |
| 2499 | createWidget_invoke, | |
| 2500 | }; | |
| 2501 | ||
| 2502 | static | |
| 2503 | globus_operation_provider_descriptor_t createWidget_descriptor = | |
| 2504 | { | |
| 2505 | &WidgetPortType_createWidget_op_qname, | |
| 2506 | "createWidget", | |
| 2507 | (void *)WidgetPortType_createWidget_impl, | |
| 2508 | NULL | |
| 2509 | }; | |
| 2510 | ||
| 2511 | ||
| 2512 | ||
| 2513 | static xsd_QName WidgetService_l_wsrp_GetResourceProperty_qname; | |
| 2514 | static xsd_QName WidgetService_l_wsrp_GetMultipleResourceProperties_qname; | |
| 2515 | static xsd_QName WidgetService_l_wsrp_SetResourceProperties_qname; | |
| 2516 | static xsd_QName WidgetService_l_wsrp_QueryResourceProperties_qname; | |
| 2517 | static xsd_QName WidgetService_l_wsrl_Destroy_qname; | |
| 2518 | static xsd_QName WidgetService_l_wsrl_SetTerminationTime_qname; | |
| 2519 | static xsd_QName WidgetService_l_wsnt_Subscribe_qname; | |
| 2520 | static xsd_QName WidgetService_l_wsnt_GetCurrentMessage_qname; | |
| 2521 | ||
| 2522 | static | |
| 2523 | int | |
| 2524 | WidgetService_activate() | |
| 2525 | 12 | { |
| 2526 | 12 | globus_result_t result = GLOBUS_SUCCESS; |
| 2527 | 12 | int rc = 0; |
| 2528 | GlobusFuncName(WidgetService_activate); | |
| 2529 | ||
| 2530 | 12 | rc = globus_module_activate(GLOBUS_COMMON_MODULE); |
| 2531 | 12 | if(rc != GLOBUS_SUCCESS) |
| 2532 | { | |
| 2533 | 0 | return rc; |
| 2534 | } | |
| 2535 | ||
| 2536 | 12 | GlobusDebugInit(WIDGETSERVICE, INFO DEBUG TRACE WARN ERROR); |
| 2537 | ||
| 2538 | 12 | rc = globus_module_activate(GLOBUS_SOAP_MESSAGE_MODULE); |
| 2539 | 12 | if(rc != GLOBUS_SUCCESS) |
| 2540 | { | |
| 2541 | 0 | return rc; |
| 2542 | } | |
| 2543 | ||
| 2544 | 12 | WidgetServiceDebugEnter(); |
| 2545 | ||
| 2546 | 12 | result = globus_module_activate(GLOBUS_WSRF_RESOURCE_MODULE); |
| 2547 | 12 | if (result != GLOBUS_SUCCESS) |
| 2548 | { | |
| 2549 | 0 | rc = (int) result; |
| 2550 | 0 | goto exit; |
| 2551 | } | |
| 2552 | ||
| 2553 | 12 | result = globus_module_activate(GLOBUS_WSRF_CORE_TOOLS_MODULE); |
| 2554 | 12 | if (result != GLOBUS_SUCCESS) |
| 2555 | { | |
| 2556 | 0 | rc = (int) result; |
| 2557 | 0 | goto exit; |
| 2558 | } | |
| 2559 | ||
| 2560 | 12 | rc = globus_extension_activate( |
| 2561 | "globus_wsrp_GetResourceProperty_provider"); | |
| 2562 | 12 | if(rc != GLOBUS_SUCCESS) |
| 2563 | { | |
| 2564 | 0 | goto deactivate_resource_out; |
| 2565 | } | |
| 2566 | ||
| 2567 | 12 | rc = globus_extension_activate( |
| 2568 | "globus_wsrp_GetMultipleResourceProperties_provider"); | |
| 2569 | 12 | if (rc != GLOBUS_SUCCESS) |
| 2570 | { | |
| 2571 | 0 | goto deactivate_getrp; |
| 2572 | } | |
| 2573 | ||
| 2574 | 12 | rc = globus_extension_activate( |
| 2575 | "globus_wsrp_SetResourceProperties_provider"); | |
| 2576 | 12 | if (rc != GLOBUS_SUCCESS) |
| 2577 | { | |
| 2578 | 0 | goto deactivate_getmrp; |
| 2579 | } | |
| 2580 | ||
| 2581 | 12 | rc = globus_extension_activate( |
| 2582 | "globus_wsrp_QueryResourceProperties_provider"); | |
| 2583 | 12 | if (rc != GLOBUS_SUCCESS) |
| 2584 | { | |
| 2585 | 0 | goto deactivate_setrp; |
| 2586 | } | |
| 2587 | ||
| 2588 | 12 | rc = globus_extension_activate( |
| 2589 | "globus_wsrl_ImmediateResourceTermination_provider"); | |
| 2590 | 12 | if (rc != GLOBUS_SUCCESS) |
| 2591 | { | |
| 2592 | 0 | goto deactivate_queryrp; |
| 2593 | } | |
| 2594 | ||
| 2595 | 12 | rc = globus_extension_activate( |
| 2596 | "globus_wsrl_ScheduledResourceTermination_provider"); | |
| 2597 | 12 | if (rc != GLOBUS_SUCCESS) |
| 2598 | { | |
| 2599 | 0 | goto deactivate_irt; |
| 2600 | } | |
| 2601 | ||
| 2602 | 12 | rc = globus_extension_activate( |
| 2603 | "globus_wsnt_NotificationProducer_provider"); | |
| 2604 | 12 | if (rc != GLOBUS_SUCCESS) |
| 2605 | { | |
| 2606 | 0 | goto deactivate_srt; |
| 2607 | } | |
| 2608 | ||
| 2609 | 12 | if(GLOBUS_GLOBAL_TYPE_REGISTRY != NULL) |
| 2610 | { | |
| 2611 | 12 | result = WidgetService_registry_add_types( |
| 2612 | GLOBUS_GLOBAL_TYPE_REGISTRY); | |
| 2613 | 12 | if(result != GLOBUS_SUCCESS) |
| 2614 | { | |
| 2615 | 0 | rc = (int) result; |
| 2616 | 0 | goto deactivate_nrt; |
| 2617 | } | |
| 2618 | } | |
| 2619 | ||
| 2620 | 12 | rc = globus_hashtable_init( |
| 2621 | &WidgetService_descriptor.op_mapper, | |
| 2622 | 10, | |
| 2623 | xsd_QName_hash, | |
| 2624 | xsd_QName_keyeq); | |
| 2625 | 12 | if(rc != GLOBUS_SUCCESS) |
| 2626 | { | |
| 2627 | 0 | goto clear_global_registry; |
| 2628 | } | |
| 2629 | ||
| 2630 | 12 | globus_mutex_init(&WidgetService_descriptor.mutex, NULL); |
| 2631 | ||
| 2632 | 12 | rc = globus_hashtable_insert( |
| 2633 | &WidgetService_descriptor.op_mapper, | |
| 2634 | (void *)&WidgetPortType_SetTerminationTime_input_qname, | |
| 2635 | (void *)&SetTerminationTime_operation_descriptor); | |
| 2636 | 12 | if(rc != GLOBUS_SUCCESS) |
| 2637 | { | |
| 2638 | 0 | goto remove_SetTerminationTime_op; |
| 2639 | } | |
| 2640 | ||
| 2641 | 12 | rc = globus_hashtable_insert( |
| 2642 | &WidgetService_descriptor.op_mapper, | |
| 2643 | (void *)&WidgetPortType_Destroy_input_qname, | |
| 2644 | (void *)&Destroy_operation_descriptor); | |
| 2645 | 12 | if(rc != GLOBUS_SUCCESS) |
| 2646 | { | |
| 2647 | 0 | goto remove_Destroy_op; |
| 2648 | } | |
| 2649 | ||
| 2650 | 12 | rc = globus_hashtable_insert( |
| 2651 | &WidgetService_descriptor.op_mapper, | |
| 2652 | (void *)&WidgetPortType_SetResourceProperties_input_qname, | |
| 2653 | (void *)&SetResourceProperties_operation_descriptor); | |
| 2654 | 12 | if(rc != GLOBUS_SUCCESS) |
| 2655 | { | |
| 2656 | 0 | goto remove_SetResourceProperties_op; |
| 2657 | } | |
| 2658 | ||
| 2659 | 12 | rc = globus_hashtable_insert( |
| 2660 | &WidgetService_descriptor.op_mapper, | |
| 2661 | (void *)&WidgetPortType_GetMultipleResourceProperties_input_qname, | |
| 2662 | (void *)&GetMultipleResourceProperties_operation_descriptor); | |
| 2663 | 12 | if(rc != GLOBUS_SUCCESS) |
| 2664 | { | |
| 2665 | 0 | goto remove_GetMultipleResourceProperties_op; |
| 2666 | } | |
| 2667 | ||
| 2668 | 12 | rc = globus_hashtable_insert( |
| 2669 | &WidgetService_descriptor.op_mapper, | |
| 2670 | (void *)&WidgetPortType_QueryResourceProperties_input_qname, | |
| 2671 | (void *)&QueryResourceProperties_operation_descriptor); | |
| 2672 | 12 | if(rc != GLOBUS_SUCCESS) |
| 2673 | { | |
| 2674 | 0 | goto remove_QueryResourceProperties_op; |
| 2675 | } | |
| 2676 | ||
| 2677 | 12 | rc = globus_hashtable_insert( |
| 2678 | &WidgetService_descriptor.op_mapper, | |
| 2679 | (void *)&WidgetPortType_GetResourceProperty_input_qname, | |
| 2680 | (void *)&GetResourceProperty_operation_descriptor); | |
| 2681 | 12 | if(rc != GLOBUS_SUCCESS) |
| 2682 | { | |
| 2683 | 0 | goto remove_GetResourceProperty_op; |
| 2684 | } | |
| 2685 | ||
| 2686 | 12 | rc = globus_hashtable_insert( |
| 2687 | &WidgetService_descriptor.op_mapper, | |
| 2688 | (void *)&WidgetPortType_createWidget_input_qname, | |
| 2689 | (void *)&createWidget_operation_descriptor); | |
| 2690 | 12 | if(rc != GLOBUS_SUCCESS) |
| 2691 | { | |
| 2692 | 0 | goto remove_createWidget_op; |
| 2693 | } | |
| 2694 | ||
| 2695 | ||
| 2696 | 12 | result = globus_operation_table_init( |
| 2697 | &WidgetService_descriptor.operations, | |
| 2698 | WidgetService_service_qname.Namespace); | |
| 2699 | 12 | if(result != GLOBUS_SUCCESS) |
| 2700 | { | |
| 2701 | 0 | rc = (int) result; |
| 2702 | 0 | goto remove_all_ops; |
| 2703 | } | |
| 2704 | ||
| 2705 | ||
| 2706 | 12 | result = globus_extension_registry_add( |
| 2707 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 2708 | (void *)&WidgetPortType_SetTerminationTime_op_qname, | |
| 2709 | GlobusExtensionMyModule(WidgetService), | |
| 2710 | (void *)&SetTerminationTime_descriptor); | |
| 2711 | 12 | if(result != GLOBUS_SUCCESS) |
| 2712 | { | |
| 2713 | 0 | rc = (int) result; |
| 2714 | 0 | goto remove_SetTerminationTime_op_provider; |
| 2715 | } | |
| 2716 | ||
| 2717 | 12 | result = globus_operation_table_add_default_provider( |
| 2718 | WidgetService_descriptor.operations, | |
| 2719 | &WidgetPortType_SetTerminationTime_op_qname, | |
| 2720 | &SetTerminationTime_descriptor); | |
| 2721 | 12 | if(result != GLOBUS_SUCCESS) |
| 2722 | { | |
| 2723 | 0 | rc = (int) result; |
| 2724 | 0 | goto remove_SetTerminationTime_op_provider; |
| 2725 | } | |
| 2726 | ||
| 2727 | 12 | result = globus_extension_registry_add( |
| 2728 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 2729 | (void *)&WidgetPortType_Destroy_op_qname, | |
| 2730 | GlobusExtensionMyModule(WidgetService), | |
| 2731 | (void *)&Destroy_descriptor); | |
| 2732 | 12 | if(result != GLOBUS_SUCCESS) |
| 2733 | { | |
| 2734 | 0 | rc = (int) result; |
| 2735 | 0 | goto remove_Destroy_op_provider; |
| 2736 | } | |
| 2737 | ||
| 2738 | 12 | result = globus_operation_table_add_default_provider( |
| 2739 | WidgetService_descriptor.operations, | |
| 2740 | &WidgetPortType_Destroy_op_qname, | |
| 2741 | &Destroy_descriptor); | |
| 2742 | 12 | if(result != GLOBUS_SUCCESS) |
| 2743 | { | |
| 2744 | 0 | rc = (int) result; |
| 2745 | 0 | goto remove_Destroy_op_provider; |
| 2746 | } | |
| 2747 | ||
| 2748 | 12 | result = globus_extension_registry_add( |
| 2749 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 2750 | (void *)&WidgetPortType_SetResourceProperties_op_qname, | |
| 2751 | GlobusExtensionMyModule(WidgetService), | |
| 2752 | (void *)&SetResourceProperties_descriptor); | |
| 2753 | 12 | if(result != GLOBUS_SUCCESS) |
| 2754 | { | |
| 2755 | 0 | rc = (int) result; |
| 2756 | 0 | goto remove_SetResourceProperties_op_provider; |
| 2757 | } | |
| 2758 | ||
| 2759 | 12 | result = globus_operation_table_add_default_provider( |
| 2760 | WidgetService_descriptor.operations, | |
| 2761 | &WidgetPortType_SetResourceProperties_op_qname, | |
| 2762 | &SetResourceProperties_descriptor); | |
| 2763 | 12 | if(result != GLOBUS_SUCCESS) |
| 2764 | { | |
| 2765 | 0 | rc = (int) result; |
| 2766 | 0 | goto remove_SetResourceProperties_op_provider; |
| 2767 | } | |
| 2768 | ||
| 2769 | 12 | result = globus_extension_registry_add( |
| 2770 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 2771 | (void *)&WidgetPortType_GetMultipleResourceProperties_op_qname, | |
| 2772 | GlobusExtensionMyModule(WidgetService), | |
| 2773 | (void *)&GetMultipleResourceProperties_descriptor); | |
| 2774 | 12 | if(result != GLOBUS_SUCCESS) |
| 2775 | { | |
| 2776 | 0 | rc = (int) result; |
| 2777 | 0 | goto remove_GetMultipleResourceProperties_op_provider; |
| 2778 | } | |
| 2779 | ||
| 2780 | 12 | result = globus_operation_table_add_default_provider( |
| 2781 | WidgetService_descriptor.operations, | |
| 2782 | &WidgetPortType_GetMultipleResourceProperties_op_qname, | |
| 2783 | &GetMultipleResourceProperties_descriptor); | |
| 2784 | 12 | if(result != GLOBUS_SUCCESS) |
| 2785 | { | |
| 2786 | 0 | rc = (int) result; |
| 2787 | 0 | goto remove_GetMultipleResourceProperties_op_provider; |
| 2788 | } | |
| 2789 | ||
| 2790 | 12 | result = globus_extension_registry_add( |
| 2791 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 2792 | (void *)&WidgetPortType_QueryResourceProperties_op_qname, | |
| 2793 | GlobusExtensionMyModule(WidgetService), | |
| 2794 | (void *)&QueryResourceProperties_descriptor); | |
| 2795 | 12 | if(result != GLOBUS_SUCCESS) |
| 2796 | { | |
| 2797 | 0 | rc = (int) result; |
| 2798 | 0 | goto remove_QueryResourceProperties_op_provider; |
| 2799 | } | |
| 2800 | ||
| 2801 | 12 | result = globus_operation_table_add_default_provider( |
| 2802 | WidgetService_descriptor.operations, | |
| 2803 | &WidgetPortType_QueryResourceProperties_op_qname, | |
| 2804 | &QueryResourceProperties_descriptor); | |
| 2805 | 12 | if(result != GLOBUS_SUCCESS) |
| 2806 | { | |
| 2807 | 0 | rc = (int) result; |
| 2808 | 0 | goto remove_QueryResourceProperties_op_provider; |
| 2809 | } | |
| 2810 | ||
| 2811 | 12 | result = globus_extension_registry_add( |
| 2812 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 2813 | (void *)&WidgetPortType_GetResourceProperty_op_qname, | |
| 2814 | GlobusExtensionMyModule(WidgetService), | |
| 2815 | (void *)&GetResourceProperty_descriptor); | |
| 2816 | 12 | if(result != GLOBUS_SUCCESS) |
| 2817 | { | |
| 2818 | 0 | rc = (int) result; |
| 2819 | 0 | goto remove_GetResourceProperty_op_provider; |
| 2820 | } | |
| 2821 | ||
| 2822 | 12 | result = globus_operation_table_add_default_provider( |
| 2823 | WidgetService_descriptor.operations, | |
| 2824 | &WidgetPortType_GetResourceProperty_op_qname, | |
| 2825 | &GetResourceProperty_descriptor); | |
| 2826 | 12 | if(result != GLOBUS_SUCCESS) |
| 2827 | { | |
| 2828 | 0 | rc = (int) result; |
| 2829 | 0 | goto remove_GetResourceProperty_op_provider; |
| 2830 | } | |
| 2831 | ||
| 2832 | 12 | result = globus_extension_registry_add( |
| 2833 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 2834 | (void *)&WidgetPortType_createWidget_op_qname, | |
| 2835 | GlobusExtensionMyModule(WidgetService), | |
| 2836 | (void *)&createWidget_descriptor); | |
| 2837 | 12 | if(result != GLOBUS_SUCCESS) |
| 2838 | { | |
| 2839 | 0 | rc = (int) result; |
| 2840 | 0 | goto remove_createWidget_op_provider; |
| 2841 | } | |
| 2842 | ||
| 2843 | 12 | result = globus_operation_table_add_default_provider( |
| 2844 | WidgetService_descriptor.operations, | |
| 2845 | &WidgetPortType_createWidget_op_qname, | |
| 2846 | &createWidget_descriptor); | |
| 2847 | 12 | if(result != GLOBUS_SUCCESS) |
| 2848 | { | |
| 2849 | 0 | rc = (int) result; |
| 2850 | 0 | goto remove_createWidget_op_provider; |
| 2851 | } | |
| 2852 | ||
| 2853 | 12 | result = globus_operation_table_add_provider( |
| 2854 | WidgetService_descriptor.operations, | |
| 2855 | &WidgetService_l_wsrp_GetResourceProperty_qname); | |
| 2856 | 12 | if (result != GLOBUS_SUCCESS) |
| 2857 | { | |
| 2858 | 0 | rc = (int) result; |
| 2859 | 0 | goto remove_op_providers; |
| 2860 | } | |
| 2861 | ||
| 2862 | 12 | result = globus_operation_table_add_provider( |
| 2863 | WidgetService_descriptor.operations, | |
| 2864 | &WidgetService_l_wsrp_GetMultipleResourceProperties_qname); | |
| 2865 | 12 | if (result != GLOBUS_SUCCESS) |
| 2866 | { | |
| 2867 | 0 | rc = (int) result; |
| 2868 | ||
| 2869 | 0 | goto remove_op_providers; |
| 2870 | } | |
| 2871 | ||
| 2872 | 12 | result = globus_operation_table_add_provider( |
| 2873 | WidgetService_descriptor.operations, | |
| 2874 | &WidgetService_l_wsrp_SetResourceProperties_qname); | |
| 2875 | 12 | if (result != GLOBUS_SUCCESS) |
| 2876 | { | |
| 2877 | 0 | rc = (int) result; |
| 2878 | ||
| 2879 | 0 | goto remove_op_providers; |
| 2880 | } | |
| 2881 | ||
| 2882 | 12 | result = globus_operation_table_add_provider( |
| 2883 | WidgetService_descriptor.operations, | |
| 2884 | &WidgetService_l_wsrp_QueryResourceProperties_qname); | |
| 2885 | 12 | if (result != GLOBUS_SUCCESS) |
| 2886 | { | |
| 2887 | 0 | rc = (int) result; |
| 2888 | ||
| 2889 | 0 | goto remove_op_providers; |
| 2890 | } | |
| 2891 | ||
| 2892 | 12 | result = globus_operation_table_add_provider( |
| 2893 | WidgetService_descriptor.operations, | |
| 2894 | &WidgetService_l_wsrl_Destroy_qname); | |
| 2895 | 12 | if (result != GLOBUS_SUCCESS) |
| 2896 | { | |
| 2897 | 0 | rc = (int) result; |
| 2898 | ||
| 2899 | 0 | goto remove_op_providers; |
| 2900 | } | |
| 2901 | ||
| 2902 | 12 | result = globus_operation_table_add_provider( |
| 2903 | WidgetService_descriptor.operations, | |
| 2904 | &WidgetService_l_wsrl_SetTerminationTime_qname); | |
| 2905 | 12 | if (result != GLOBUS_SUCCESS) |
| 2906 | { | |
| 2907 | 0 | rc = (int) result; |
| 2908 | ||
| 2909 | 0 | goto remove_op_providers; |
| 2910 | } | |
| 2911 | ||
| 2912 | 12 | result = globus_operation_table_add_provider( |
| 2913 | WidgetService_descriptor.operations, | |
| 2914 | &WidgetService_l_wsnt_Subscribe_qname); | |
| 2915 | 12 | if (result != GLOBUS_SUCCESS) |
| 2916 | { | |
| 2917 | 0 | rc = (int) result; |
| 2918 | ||
| 2919 | 0 | goto remove_op_providers; |
| 2920 | } | |
| 2921 | ||
| 2922 | 12 | result = globus_operation_table_add_provider( |
| 2923 | WidgetService_descriptor.operations, | |
| 2924 | &WidgetService_l_wsnt_GetCurrentMessage_qname); | |
| 2925 | 12 | if (result != GLOBUS_SUCCESS) |
| 2926 | { | |
| 2927 | 0 | rc = (int) result; |
| 2928 | ||
| 2929 | 0 | goto remove_op_providers; |
| 2930 | } | |
| 2931 | ||
| 2932 | 12 | rc = globus_extension_registry_add( |
| 2933 | GLOBUS_SERVICE_REGISTRY, | |
| 2934 | (void *)WidgetService_descriptor.path, | |
| 2935 | GlobusExtensionMyModule(WidgetService), | |
| 2936 | &WidgetService_descriptor); | |
| 2937 | 12 | if(rc != GLOBUS_SUCCESS) |
| 2938 | { | |
| 2939 | 0 | goto remove_op_providers; |
| 2940 | } | |
| 2941 | ||
| 2942 | 12 | result = WidgetService_init(&WidgetService_descriptor); |
| 2943 | 12 | if(result != GLOBUS_SUCCESS) |
| 2944 | { | |
| 2945 | 0 | rc = (int) result; |
| 2946 | 0 | goto service_extension_remove; |
| 2947 | } | |
| 2948 | ||
| 2949 | 12 | goto exit; |
| 2950 | ||
| 2951 | 0 | service_extension_remove: |
| 2952 | 0 | globus_extension_registry_remove( |
| 2953 | GLOBUS_SERVICE_REGISTRY, | |
| 2954 | (void *)WidgetService_descriptor.path); | |
| 2955 | 0 | remove_op_providers: |
| 2956 | ||
| 2957 | 0 | globus_extension_registry_remove( |
| 2958 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 2959 | (void *)&WidgetPortType_SetTerminationTime_op_qname); | |
| 2960 | 0 | remove_SetTerminationTime_op_provider: |
| 2961 | ||
| 2962 | 0 | globus_extension_registry_remove( |
| 2963 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 2964 | (void *)&WidgetPortType_Destroy_op_qname); | |
| 2965 | 0 | remove_Destroy_op_provider: |
| 2966 | ||
| 2967 | 0 | globus_extension_registry_remove( |
| 2968 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 2969 | (void *)&WidgetPortType_SetResourceProperties_op_qname); | |
| 2970 | 0 | remove_SetResourceProperties_op_provider: |
| 2971 | ||
| 2972 | 0 | globus_extension_registry_remove( |
| 2973 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 2974 | (void *)&WidgetPortType_GetMultipleResourceProperties_op_qname); | |
| 2975 | 0 | remove_GetMultipleResourceProperties_op_provider: |
| 2976 | ||
| 2977 | 0 | globus_extension_registry_remove( |
| 2978 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 2979 | (void *)&WidgetPortType_QueryResourceProperties_op_qname); | |
| 2980 | 0 | remove_QueryResourceProperties_op_provider: |
| 2981 | ||
| 2982 | 0 | globus_extension_registry_remove( |
| 2983 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 2984 | (void *)&WidgetPortType_GetResourceProperty_op_qname); | |
| 2985 | 0 | remove_GetResourceProperty_op_provider: |
| 2986 | ||
| 2987 | 0 | globus_extension_registry_remove( |
| 2988 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 2989 | (void *)&WidgetPortType_createWidget_op_qname); | |
| 2990 | 0 | remove_createWidget_op_provider: |
| 2991 | ||
| 2992 | 0 | destroy_op_table: |
| 2993 | 0 | globus_operation_table_destroy(WidgetService_descriptor.operations); |
| 2994 | 0 | remove_all_ops: |
| 2995 | ||
| 2996 | 0 | globus_hashtable_remove( |
| 2997 | &WidgetService_descriptor.op_mapper, | |
| 2998 | (void *)&WidgetPortType_SetTerminationTime_input_qname); | |
| 2999 | 0 | remove_SetTerminationTime_op: |
| 3000 | ||
| 3001 | 0 | globus_hashtable_remove( |
| 3002 | &WidgetService_descriptor.op_mapper, | |
| 3003 | (void *)&WidgetPortType_Destroy_input_qname); | |
| 3004 | 0 | remove_Destroy_op: |
| 3005 | ||
| 3006 | 0 | globus_hashtable_remove( |
| 3007 | &WidgetService_descriptor.op_mapper, | |
| 3008 | (void *)&WidgetPortType_SetResourceProperties_input_qname); | |
| 3009 | 0 | remove_SetResourceProperties_op: |
| 3010 | ||
| 3011 | 0 | globus_hashtable_remove( |
| 3012 | &WidgetService_descriptor.op_mapper, | |
| 3013 | (void *)&WidgetPortType_GetMultipleResourceProperties_input_qname); | |
| 3014 | 0 | remove_GetMultipleResourceProperties_op: |
| 3015 | ||
| 3016 | 0 | globus_hashtable_remove( |
| 3017 | &WidgetService_descriptor.op_mapper, | |
| 3018 | (void *)&WidgetPortType_QueryResourceProperties_input_qname); | |
| 3019 | 0 | remove_QueryResourceProperties_op: |
| 3020 | ||
| 3021 | 0 | globus_hashtable_remove( |
| 3022 | &WidgetService_descriptor.op_mapper, | |
| 3023 | (void *)&WidgetPortType_GetResourceProperty_input_qname); | |
| 3024 | 0 | remove_GetResourceProperty_op: |
| 3025 | ||
| 3026 | 0 | globus_hashtable_remove( |
| 3027 | &WidgetService_descriptor.op_mapper, | |
| 3028 | (void *)&WidgetPortType_createWidget_input_qname); | |
| 3029 | 0 | remove_createWidget_op: |
| 3030 | ||
| 3031 | 0 | destroy_mutex: |
| 3032 | 0 | globus_mutex_destroy(&WidgetService_descriptor.mutex); |
| 3033 | 0 | clear_service_registry: |
| 3034 | 0 | destroy_service_registry: |
| 3035 | 0 | destroy_op_mapper: |
| 3036 | 0 | globus_hashtable_destroy(&WidgetService_descriptor.op_mapper); |
| 3037 | 0 | clear_global_registry: |
| 3038 | 0 | if(GLOBUS_GLOBAL_TYPE_REGISTRY != NULL) |
| 3039 | { | |
| 3040 | 0 | WidgetService_registry_remove_types( |
| 3041 | GLOBUS_GLOBAL_TYPE_REGISTRY); | |
| 3042 | } | |
| 3043 | 0 | deactivate_nrt: |
| 3044 | 0 | globus_extension_deactivate( |
| 3045 | "globus_wsnt_NotificationProducer_provider"); | |
| 3046 | 0 | deactivate_srt: |
| 3047 | 0 | globus_extension_deactivate( |
| 3048 | "globus_wsrl_ScheduledResourceTermination_provider"); | |
| 3049 | 0 | deactivate_irt: |
| 3050 | 0 | globus_extension_deactivate( |
| 3051 | "globus_wsrl_ImmediateResourceTermination_provider"); | |
| 3052 | 0 | deactivate_queryrp: |
| 3053 | 0 | globus_extension_deactivate( |
| 3054 | "globus_wsrp_QueryResourceProperties_provider"); | |
| 3055 | 0 | deactivate_setrp: |
| 3056 | 0 | globus_extension_deactivate("globus_wsrp_SetResourceProperties_provider"); |
| 3057 | 0 | deactivate_getmrp: |
| 3058 | 0 | globus_extension_deactivate("globus_wsrp_GetMultipleResourceProperties_provider"); |
| 3059 | 0 | deactivate_getrp: |
| 3060 | 0 | globus_extension_deactivate("globus_wsrp_GetResourceProperty_provider"); |
| 3061 | 0 | deactivate_resource_out: |
| 3062 | 0 | globus_module_deactivate(GLOBUS_WSRF_RESOURCE_MODULE); |
| 3063 | ||
| 3064 | 12 | exit: |
| 3065 | 12 | WidgetServiceDebugExit(); |
| 3066 | 12 | return rc; |
| 3067 | } | |
| 3068 | ||
| 3069 | static | |
| 3070 | int | |
| 3071 | WidgetService_deactivate() | |
| 3072 | 0 | { |
| 3073 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 3074 | 0 | int rc = 0; |
| 3075 | ||
| 3076 | 0 | result = WidgetService_finalize(&WidgetService_descriptor); |
| 3077 | 0 | if(result != GLOBUS_SUCCESS) |
| 3078 | { | |
| 3079 | 0 | return GLOBUS_FAILURE; |
| 3080 | } | |
| 3081 | ||
| 3082 | 0 | globus_extension_registry_remove( |
| 3083 | GLOBUS_SERVICE_REGISTRY, | |
| 3084 | (void *)WidgetService_descriptor.path); | |
| 3085 | ||
| 3086 | 0 | globus_extension_registry_remove( |
| 3087 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3088 | (void *)&WidgetPortType_SetTerminationTime_op_qname); | |
| 3089 | ||
| 3090 | 0 | globus_extension_registry_remove( |
| 3091 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3092 | (void *)&WidgetPortType_Destroy_op_qname); | |
| 3093 | ||
| 3094 | 0 | globus_extension_registry_remove( |
| 3095 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3096 | (void *)&WidgetPortType_SetResourceProperties_op_qname); | |
| 3097 | ||
| 3098 | 0 | globus_extension_registry_remove( |
| 3099 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3100 | (void *)&WidgetPortType_GetMultipleResourceProperties_op_qname); | |
| 3101 | ||
| 3102 | 0 | globus_extension_registry_remove( |
| 3103 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3104 | (void *)&WidgetPortType_QueryResourceProperties_op_qname); | |
| 3105 | ||
| 3106 | 0 | globus_extension_registry_remove( |
| 3107 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3108 | (void *)&WidgetPortType_GetResourceProperty_op_qname); | |
| 3109 | ||
| 3110 | 0 | globus_extension_registry_remove( |
| 3111 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3112 | (void *)&WidgetPortType_createWidget_op_qname); | |
| 3113 | ||
| 3114 | 0 | globus_operation_table_destroy(WidgetService_descriptor.operations); |
| 3115 | ||
| 3116 | ||
| 3117 | 0 | globus_hashtable_remove( |
| 3118 | &WidgetService_descriptor.op_mapper, | |
| 3119 | (void *)&WidgetPortType_SetTerminationTime_input_qname); | |
| 3120 | ||
| 3121 | 0 | globus_hashtable_remove( |
| 3122 | &WidgetService_descriptor.op_mapper, | |
| 3123 | (void *)&WidgetPortType_Destroy_input_qname); | |
| 3124 | ||
| 3125 | 0 | globus_hashtable_remove( |
| 3126 | &WidgetService_descriptor.op_mapper, | |
| 3127 | (void *)&WidgetPortType_SetResourceProperties_input_qname); | |
| 3128 | ||
| 3129 | 0 | globus_hashtable_remove( |
| 3130 | &WidgetService_descriptor.op_mapper, | |
| 3131 | (void *)&WidgetPortType_GetMultipleResourceProperties_input_qname); | |
| 3132 | ||
| 3133 | 0 | globus_hashtable_remove( |
| 3134 | &WidgetService_descriptor.op_mapper, | |
| 3135 | (void *)&WidgetPortType_QueryResourceProperties_input_qname); | |
| 3136 | ||
| 3137 | 0 | globus_hashtable_remove( |
| 3138 | &WidgetService_descriptor.op_mapper, | |
| 3139 | (void *)&WidgetPortType_GetResourceProperty_input_qname); | |
| 3140 | ||
| 3141 | 0 | globus_hashtable_remove( |
| 3142 | &WidgetService_descriptor.op_mapper, | |
| 3143 | (void *)&WidgetPortType_createWidget_input_qname); | |
| 3144 | ||
| 3145 | ||
| 3146 | 0 | globus_mutex_destroy(&WidgetService_descriptor.mutex); |
| 3147 | ||
| 3148 | ||
| 3149 | 0 | globus_hashtable_destroy(&WidgetService_descriptor.op_mapper); |
| 3150 | ||
| 3151 | 0 | if(GLOBUS_GLOBAL_TYPE_REGISTRY != NULL) |
| 3152 | { | |
| 3153 | 0 | WidgetService_registry_remove_types( |
| 3154 | GLOBUS_GLOBAL_TYPE_REGISTRY); | |
| 3155 | } | |
| 3156 | ||
| 3157 | 0 | globus_extension_deactivate( |
| 3158 | "globus_wsnt_NotificationProducer_provider"); | |
| 3159 | 0 | globus_extension_deactivate( |
| 3160 | "globus_wsrl_ScheduledResourceTermination_provider"); | |
| 3161 | 0 | globus_extension_deactivate( |
| 3162 | "globus_wsrl_ImmediateResourceTermination_provider"); | |
| 3163 | 0 | globus_extension_deactivate( |
| 3164 | "globus_wsrp_QueryResourceProperties_provider"); | |
| 3165 | 0 | globus_extension_deactivate("globus_wsrp_SetResourceProperties_provider"); |
| 3166 | 0 | globus_extension_deactivate( |
| 3167 | "globus_wsrp_GetMultipleResourceProperties_provider"); | |
| 3168 | 0 | globus_extension_deactivate("globus_wsrp_GetResourceProperty_provider"); |
| 3169 | 0 | globus_module_deactivate(GLOBUS_WSRF_RESOURCE_MODULE); |
| 3170 | ||
| 3171 | 0 | rc = globus_module_deactivate(GLOBUS_SOAP_MESSAGE_MODULE); |
| 3172 | 0 | if(rc != GLOBUS_SUCCESS) |
| 3173 | { | |
| 3174 | 0 | return rc; |
| 3175 | } | |
| 3176 | ||
| 3177 | 0 | GlobusDebugDestroy(WIDGETSERVICE); |
| 3178 | ||
| 3179 | 0 | rc = globus_module_deactivate(GLOBUS_COMMON_MODULE); |
| 3180 | 0 | if(rc != GLOBUS_SUCCESS) |
| 3181 | { | |
| 3182 | 0 | return rc; |
| 3183 | } | |
| 3184 | ||
| 3185 | 0 | return rc; |
| 3186 | } | |
| 3187 | ||
| 3188 | #define WSRP_PROVIDER_NS "http://docs.oasis-open.org/wsrf/rpw-2/providers" | |
| 3189 | ||
| 3190 | static xsd_QName WidgetService_l_wsrp_GetResourceProperty_qname = | |
| 3191 | { | |
| 3192 | WSRP_PROVIDER_NS, | |
| 3193 | "GetResourceProperty" | |
| 3194 | }; | |
| 3195 | ||
| 3196 | static xsd_QName WidgetService_l_wsrp_GetMultipleResourceProperties_qname = | |
| 3197 | { | |
| 3198 | WSRP_PROVIDER_NS, | |
| 3199 | "GetMultipleResourceProperties" | |
| 3200 | }; | |
| 3201 | ||
| 3202 | static xsd_QName WidgetService_l_wsrp_SetResourceProperties_qname = | |
| 3203 | { | |
| 3204 | WSRP_PROVIDER_NS, | |
| 3205 | "SetResourceProperties" | |
| 3206 | }; | |
| 3207 | ||
| 3208 | static xsd_QName WidgetService_l_wsrp_QueryResourceProperties_qname = | |
| 3209 | { | |
| 3210 | WSRP_PROVIDER_NS, | |
| 3211 | "QueryResourceProperties" | |
| 3212 | }; | |
| 3213 | ||
| 3214 | #define WSRL_PROVIDER_NS "http://docs.oasis-open.org/wsrf/rlw-2/providers" | |
| 3215 | ||
| 3216 | static xsd_QName WidgetService_l_wsrl_Destroy_qname = | |
| 3217 | { | |
| 3218 | WSRL_PROVIDER_NS, | |
| 3219 | "Destroy" | |
| 3220 | }; | |
| 3221 | ||
| 3222 | static xsd_QName WidgetService_l_wsrl_SetTerminationTime_qname = | |
| 3223 | { | |
| 3224 | WSRL_PROVIDER_NS, | |
| 3225 | "SetTerminationTime" | |
| 3226 | }; | |
| 3227 | ||
| 3228 | #define WSNT_PROVIDER_NS "http://docs.oasis-open.org/wsn/bw-2/providers" | |
| 3229 | ||
| 3230 | static xsd_QName WidgetService_l_wsnt_Subscribe_qname = | |
| 3231 | { | |
| 3232 | WSNT_PROVIDER_NS, | |
| 3233 | "Subscribe" | |
| 3234 | }; | |
| 3235 | ||
| 3236 | static xsd_QName WidgetService_l_wsnt_GetCurrentMessage_qname = | |
| 3237 | { | |
| 3238 | WSNT_PROVIDER_NS, | |
| 3239 | "GetCurrentMessage" |