| 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 "WidgetNotificationService.h" | |
| 24 | #include "WidgetNotificationService_skeleton.h" | |
| 25 | #include "WidgetNotificationService_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 | WidgetNotificationService_activate(void); | |
| 35 | ||
| 36 | static | |
| 37 | int | |
| 38 | WidgetNotificationService_deactivate(void); | |
| 39 | ||
| 40 | GlobusExtensionDefineModule(WidgetNotificationService) = | |
| 41 | { | |
| 42 | "WidgetNotificationService", | |
| 43 | WidgetNotificationService_activate, | |
| 44 | WidgetNotificationService_deactivate, | |
| 45 | NULL, | |
| 46 | NULL, | |
| 47 | &local_version | |
| 48 | }; | |
| 49 | ||
| 50 | 0 | GlobusDebugDefine(WIDGETNOTIFICATIONSERVICE); |
| 51 | ||
| 52 | xsd_QName WidgetNotificationService_service_qname = | |
| 53 | { | |
| 54 | "http://widgets.com/service", | |
| 55 | "WidgetNotificationService" | |
| 56 | }; | |
| 57 | ||
| 58 | globus_service_descriptor_t WidgetNotificationService_descriptor = | |
| 59 | { | |
| 60 | &WidgetNotificationService_service_qname, | |
| 61 | GLOBUS_SERVICE_ENGINE_MODULE_PATH_PREFIX "/" WIDGETNOTIFICATIONSERVICE_BASE_PATH, | |
| 62 | NULL, | |
| 63 | NULL, | |
| 64 | NULL, | |
| 65 | globus_resource_id_get_as_string | |
| 66 | }; | |
| 67 | ||
| 68 | ||
| 69 | xsd_QName WidgetNotificationPortType_GetCurrentMessage_op_qname = | |
| 70 | { | |
| 71 | "http://localhost:8080/wsrf/services/WidgetNotificationService" | |
| 72 | "GetCurrentMessage" | |
| 73 | }; | |
| 74 | ||
| 75 | xsd_QName WidgetNotificationPortType_GetCurrentMessage_input_qname = | |
| 76 | { | |
| 77 | "http://docs.oasis-open.org/wsn/b-2", | |
| 78 | "GetCurrentMessage" | |
| 79 | }; | |
| 80 | ||
| 81 | typedef globus_result_t (* GetCurrentMessage_invoke_func_t) ( | |
| 82 | globus_service_engine_t engine, | |
| 83 | globus_soap_message_handle_t message, | |
| 84 | globus_service_descriptor_t * descriptor, | |
| 85 | wsnt_GetCurrentMessageType * input, | |
| 86 | wsnt_GetCurrentMessageResponseType * output, | |
| 87 | xsd_any * fault); | |
| 88 | ||
| 89 | typedef struct GetCurrentMessage_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 | } GetCurrentMessage_callback_handle_t; | |
| 96 | ||
| 97 | static | |
| 98 | void | |
| 99 | GetCurrentMessage_deserialize_callback( | |
| 100 | void * handle) | |
| 101 | 0 | { |
| 102 | GetCurrentMessage_callback_handle_t * callback_handle; | |
| 103 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 104 | struct globus_soap_message_fault_s soap_fault; | |
| 105 | GetCurrentMessage_invoke_func_t invoke_function; | |
| 106 | 0 | wsnt_GetCurrentMessageType * input = NULL; |
| 107 | GlobusFuncName(GetCurrentMessage_deserialize_callback); | |
| 108 | 0 | WidgetNotificationServiceDebugEnter(); |
| 109 | ||
| 110 | 0 | callback_handle = (GetCurrentMessage_callback_handle_t *) handle; |
| 111 | ||
| 112 | 0 | result = globus_operation_table_get_operation( |
| 113 | WidgetNotificationService_descriptor.operations, | |
| 114 | "GetCurrentMessage", | |
| 115 | (void **)&invoke_function); | |
| 116 | 0 | if(result != GLOBUS_SUCCESS) |
| 117 | { | |
| 118 | 0 | goto exit; |
| 119 | } | |
| 120 | ||
| 121 | 0 | result = wsnt_GetCurrentMessageType_init( |
| 122 | &input); | |
| 123 | 0 | if(result != GLOBUS_SUCCESS) |
| 124 | { | |
| 125 | 0 | goto exit; |
| 126 | } | |
| 127 | ||
| 128 | 0 | result = wsnt_GetCurrentMessageType_deserialize( |
| 129 | &WidgetNotificationPortType_GetCurrentMessage_input_qname, | |
| 130 | input, | |
| 131 | callback_handle->message, | |
| 132 | 0); | |
| 133 | 0 | if(result != GLOBUS_SUCCESS) |
| 134 | { | |
| 135 | 0 | goto free_exit; |
| 136 | } | |
| 137 | ||
| 138 | 0 | result = globus_soap_message_handle_set_attr( |
| 139 | callback_handle->message, | |
| 140 | "GetCurrentMessageOperationInputParameter", | |
| 141 | wsnt_GetCurrentMessageType_info.copy, | |
| 142 | wsnt_GetCurrentMessageType_info.destroy, | |
| 143 | (void *)input); | |
| 144 | if(result != GLOBUS_SUCCESS) | |
| 145 | { | |
| 146 | 0 | goto free_exit; |
| 147 | } | |
| 148 | ||
| 149 | 0 | free_exit: |
| 150 | 0 | wsnt_GetCurrentMessageType_destroy(input); |
| 151 | ||
| 152 | 0 | exit: |
| 153 | 0 | callback_handle->callback( |
| 154 | result, | |
| 155 | callback_handle->args); | |
| 156 | ||
| 157 | 0 | free(callback_handle); |
| 158 | 0 | WidgetNotificationServiceDebugExit(); |
| 159 | 0 | } |
| 160 | /* GetCurrentMessage_deserialize_callback() */ | |
| 161 | ||
| 162 | static | |
| 163 | globus_result_t | |
| 164 | GetCurrentMessage_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 | 0 | { |
| 170 | GetCurrentMessage_callback_handle_t * callback_handle; | |
| 171 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 172 | GlobusFuncName(GetCurrentMessage_deserialize); | |
| 173 | 0 | WidgetNotificationServiceDebugEnter(); |
| 174 | ||
| 175 | 0 | callback_handle = malloc(sizeof(GetCurrentMessage_callback_handle_t)); |
| 176 | 0 | globus_assert_string(callback_handle, |
| 177 | "Memory allocation failed " | |
| 178 | "for GetCurrentMessage callback handle"); | |
| 179 | ||
| 180 | 0 | callback_handle->engine = engine; |
| 181 | 0 | callback_handle->message = message; |
| 182 | 0 | callback_handle->callback = invoke_callback; |
| 183 | 0 | callback_handle->args = args; |
| 184 | ||
| 185 | 0 | result = globus_callback_register_oneshot( |
| 186 | NULL, | |
| 187 | &globus_i_reltime_zero, | |
| 188 | GetCurrentMessage_deserialize_callback, | |
| 189 | callback_handle); | |
| 190 | ||
| 191 | 0 | WidgetNotificationServiceDebugExit(); |
| 192 | 0 | return result; |
| 193 | } | |
| 194 | ||
| 195 | static | |
| 196 | void | |
| 197 | GetCurrentMessage_invoke_callback( | |
| 198 | void * handle) | |
| 199 | 0 | { |
| 200 | GetCurrentMessage_callback_handle_t * callback_handle; | |
| 201 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 202 | struct globus_soap_message_fault_s soap_fault; | |
| 203 | GetCurrentMessage_invoke_func_t invoke_function; | |
| 204 | wsnt_GetCurrentMessageType * input; | |
| 205 | wsnt_GetCurrentMessageResponseType output; | |
| 206 | xsd_QName element_qname; | |
| 207 | xsd_any fault; | |
| 208 | ||
| 209 | GlobusFuncName(GetCurrentMessage_invoke_callback); | |
| 210 | 0 | WidgetNotificationServiceDebugEnter(); |
| 211 | ||
| 212 | 0 | callback_handle = (GetCurrentMessage_callback_handle_t *) handle; |
| 213 | ||
| 214 | 0 | input = globus_soap_message_handle_get_attr( |
| 215 | callback_handle->message, | |
| 216 | "GetCurrentMessageOperationInputParameter"); | |
| 217 | 0 | globus_assert(input); |
| 218 | ||
| 219 | 0 | result = globus_operation_table_get_operation( |
| 220 | WidgetNotificationService_descriptor.operations, | |
| 221 | "GetCurrentMessage", | |
| 222 | (void **)&invoke_function); | |
| 223 | 0 | if(result != GLOBUS_SUCCESS) |
| 224 | { | |
| 225 | 0 | goto fault_exit; |
| 226 | } | |
| 227 | ||
| 228 | ||
| 229 | 0 | result = wsnt_GetCurrentMessageResponseType_init_contents( |
| 230 | &output); | |
| 231 | 0 | if(result != GLOBUS_SUCCESS) |
| 232 | { | |
| 233 | 0 | goto fault_exit; |
| 234 | } | |
| 235 | 0 | result = xsd_any_init_contents(&fault); |
| 236 | 0 | if(result != GLOBUS_SUCCESS) |
| 237 | { | |
| 238 | 0 | goto fault_exit; |
| 239 | } | |
| 240 | 0 | result = invoke_function( |
| 241 | callback_handle->engine, | |
| 242 | callback_handle->message, | |
| 243 | &WidgetNotificationService_descriptor, | |
| 244 | input, | |
| 245 | &output, | |
| 246 | &fault); | |
| 247 | ||
| 248 | ||
| 249 | 0 | fault_exit: |
| 250 | ||
| 251 | 0 | 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 | 0 | 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 | 0 | result = globus_service_session_begin_response( |
| 316 | callback_handle->message); | |
| 317 | 0 | if(result != GLOBUS_SUCCESS) |
| 318 | { | |
| 319 | 0 | goto exit; |
| 320 | } | |
| 321 | ||
| 322 | 0 | element_qname.local = "GetCurrentMessageResponse"; |
| 323 | 0 | element_qname.Namespace = "http://docs.oasis-open.org/wsn/b-2"; |
| 324 | ||
| 325 | 0 | result = wsnt_GetCurrentMessageResponseType_serialize( |
| 326 | &element_qname, | |
| 327 | &output, | |
| 328 | callback_handle->message, | |
| 329 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 330 | 0 | if(result != GLOBUS_SUCCESS) |
| 331 | { | |
| 332 | 0 | goto exit; |
| 333 | } | |
| 334 | ||
| 335 | 0 | result = globus_service_session_end_response( |
| 336 | callback_handle->message); | |
| 337 | 0 | if(result != GLOBUS_SUCCESS) |
| 338 | { | |
| 339 | 0 | goto exit; |
| 340 | } | |
| 341 | ||
| 342 | 0 | wsnt_GetCurrentMessageResponseType_destroy_contents( |
| 343 | &output); | |
| 344 | ||
| 345 | 0 | 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/wsn/bw-2/NotificationProducer/GetCurrentMessageResponse"); | |
| 351 | } | |
| 352 | ||
| 353 | 0 | exit: |
| 354 | ||
| 355 | 0 | callback_handle->callback( |
| 356 | result, | |
| 357 | callback_handle->args); | |
| 358 | ||
| 359 | 0 | globus_libc_free(callback_handle); |
| 360 | ||
| 361 | 0 | WidgetNotificationServiceDebugExit(); |
| 362 | 0 | } |
| 363 | ||
| 364 | static | |
| 365 | globus_result_t | |
| 366 | GetCurrentMessage_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 | 0 | { |
| 373 | GetCurrentMessage_callback_handle_t * callback_handle; | |
| 374 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 375 | GlobusFuncName(WidgetNotificationPortType_GetCurrentMessage); | |
| 376 | 0 | WidgetNotificationServiceDebugEnter(); |
| 377 | ||
| 378 | 0 | callback_handle = malloc(sizeof(GetCurrentMessage_callback_handle_t)); |
| 379 | 0 | if(!callback_handle) |
| 380 | { | |
| 381 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 382 | 0 | goto exit; |
| 383 | } | |
| 384 | 0 | callback_handle->engine = engine; |
| 385 | 0 | callback_handle->message = message; |
| 386 | 0 | callback_handle->callback = invoke_callback; |
| 387 | 0 | callback_handle->args = args; |
| 388 | ||
| 389 | 0 | result = globus_callback_register_oneshot( |
| 390 | NULL, | |
| 391 | &globus_i_reltime_zero, | |
| 392 | GetCurrentMessage_invoke_callback, | |
| 393 | callback_handle); | |
| 394 | ||
| 395 | 0 | exit: |
| 396 | 0 | WidgetNotificationServiceDebugExit(); |
| 397 | 0 | return result; |
| 398 | } | |
| 399 | ||
| 400 | static | |
| 401 | globus_service_operation_descriptor_t | |
| 402 | GetCurrentMessage_operation_descriptor = | |
| 403 | { | |
| 404 | GetCurrentMessage_deserialize, | |
| 405 | GetCurrentMessage_invoke, | |
| 406 | }; | |
| 407 | ||
| 408 | static | |
| 409 | globus_operation_provider_descriptor_t GetCurrentMessage_descriptor = | |
| 410 | { | |
| 411 | &WidgetNotificationPortType_GetCurrentMessage_op_qname, | |
| 412 | "GetCurrentMessage", | |
| 413 | (void *)WidgetNotificationPortType_GetCurrentMessage_impl, | |
| 414 | NULL | |
| 415 | }; | |
| 416 | ||
| 417 | ||
| 418 | xsd_QName WidgetNotificationPortType_Subscribe_op_qname = | |
| 419 | { | |
| 420 | "http://localhost:8080/wsrf/services/WidgetNotificationService" | |
| 421 | "Subscribe" | |
| 422 | }; | |
| 423 | ||
| 424 | xsd_QName WidgetNotificationPortType_Subscribe_input_qname = | |
| 425 | { | |
| 426 | "http://docs.oasis-open.org/wsn/b-2", | |
| 427 | "Subscribe" | |
| 428 | }; | |
| 429 | ||
| 430 | typedef globus_result_t (* Subscribe_invoke_func_t) ( | |
| 431 | globus_service_engine_t engine, | |
| 432 | globus_soap_message_handle_t message, | |
| 433 | globus_service_descriptor_t * descriptor, | |
| 434 | wsnt_SubscribeType * input, | |
| 435 | wsnt_SubscribeResponseType * output, | |
| 436 | xsd_any * fault); | |
| 437 | ||
| 438 | typedef struct Subscribe_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 | } Subscribe_callback_handle_t; | |
| 445 | ||
| 446 | static | |
| 447 | void | |
| 448 | Subscribe_deserialize_callback( | |
| 449 | void * handle) | |
| 450 | 0 | { |
| 451 | Subscribe_callback_handle_t * callback_handle; | |
| 452 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 453 | struct globus_soap_message_fault_s soap_fault; | |
| 454 | Subscribe_invoke_func_t invoke_function; | |
| 455 | 0 | wsnt_SubscribeType * input = NULL; |
| 456 | GlobusFuncName(Subscribe_deserialize_callback); | |
| 457 | 0 | WidgetNotificationServiceDebugEnter(); |
| 458 | ||
| 459 | 0 | callback_handle = (Subscribe_callback_handle_t *) handle; |
| 460 | ||
| 461 | 0 | result = globus_operation_table_get_operation( |
| 462 | WidgetNotificationService_descriptor.operations, | |
| 463 | "Subscribe", | |
| 464 | (void **)&invoke_function); | |
| 465 | 0 | if(result != GLOBUS_SUCCESS) |
| 466 | { | |
| 467 | 0 | goto exit; |
| 468 | } | |
| 469 | ||
| 470 | 0 | result = wsnt_SubscribeType_init( |
| 471 | &input); | |
| 472 | 0 | if(result != GLOBUS_SUCCESS) |
| 473 | { | |
| 474 | 0 | goto exit; |
| 475 | } | |
| 476 | ||
| 477 | 0 | result = wsnt_SubscribeType_deserialize( |
| 478 | &WidgetNotificationPortType_Subscribe_input_qname, | |
| 479 | input, | |
| 480 | callback_handle->message, | |
| 481 | 0); | |
| 482 | 0 | if(result != GLOBUS_SUCCESS) |
| 483 | { | |
| 484 | 0 | goto free_exit; |
| 485 | } | |
| 486 | ||
| 487 | 0 | result = globus_soap_message_handle_set_attr( |
| 488 | callback_handle->message, | |
| 489 | "SubscribeOperationInputParameter", | |
| 490 | wsnt_SubscribeType_info.copy, | |
| 491 | wsnt_SubscribeType_info.destroy, | |
| 492 | (void *)input); | |
| 493 | if(result != GLOBUS_SUCCESS) | |
| 494 | { | |
| 495 | 0 | goto free_exit; |
| 496 | } | |
| 497 | ||
| 498 | 0 | free_exit: |
| 499 | 0 | wsnt_SubscribeType_destroy(input); |
| 500 | ||
| 501 | 0 | exit: |
| 502 | 0 | callback_handle->callback( |
| 503 | result, | |
| 504 | callback_handle->args); | |
| 505 | ||
| 506 | 0 | free(callback_handle); |
| 507 | 0 | WidgetNotificationServiceDebugExit(); |
| 508 | 0 | } |
| 509 | /* Subscribe_deserialize_callback() */ | |
| 510 | ||
| 511 | static | |
| 512 | globus_result_t | |
| 513 | Subscribe_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 | 0 | { |
| 519 | Subscribe_callback_handle_t * callback_handle; | |
| 520 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 521 | GlobusFuncName(Subscribe_deserialize); | |
| 522 | 0 | WidgetNotificationServiceDebugEnter(); |
| 523 | ||
| 524 | 0 | callback_handle = malloc(sizeof(Subscribe_callback_handle_t)); |
| 525 | 0 | globus_assert_string(callback_handle, |
| 526 | "Memory allocation failed " | |
| 527 | "for Subscribe callback handle"); | |
| 528 | ||
| 529 | 0 | callback_handle->engine = engine; |
| 530 | 0 | callback_handle->message = message; |
| 531 | 0 | callback_handle->callback = invoke_callback; |
| 532 | 0 | callback_handle->args = args; |
| 533 | ||
| 534 | 0 | result = globus_callback_register_oneshot( |
| 535 | NULL, | |
| 536 | &globus_i_reltime_zero, | |
| 537 | Subscribe_deserialize_callback, | |
| 538 | callback_handle); | |
| 539 | ||
| 540 | 0 | WidgetNotificationServiceDebugExit(); |
| 541 | 0 | return result; |
| 542 | } | |
| 543 | ||
| 544 | static | |
| 545 | void | |
| 546 | Subscribe_invoke_callback( | |
| 547 | void * handle) | |
| 548 | 0 | { |
| 549 | Subscribe_callback_handle_t * callback_handle; | |
| 550 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 551 | struct globus_soap_message_fault_s soap_fault; | |
| 552 | Subscribe_invoke_func_t invoke_function; | |
| 553 | wsnt_SubscribeType * input; | |
| 554 | wsnt_SubscribeResponseType output; | |
| 555 | xsd_QName element_qname; | |
| 556 | xsd_any fault; | |
| 557 | ||
| 558 | GlobusFuncName(Subscribe_invoke_callback); | |
| 559 | 0 | WidgetNotificationServiceDebugEnter(); |
| 560 | ||
| 561 | 0 | callback_handle = (Subscribe_callback_handle_t *) handle; |
| 562 | ||
| 563 | 0 | input = globus_soap_message_handle_get_attr( |
| 564 | callback_handle->message, | |
| 565 | "SubscribeOperationInputParameter"); | |
| 566 | 0 | globus_assert(input); |
| 567 | ||
| 568 | 0 | result = globus_operation_table_get_operation( |
| 569 | WidgetNotificationService_descriptor.operations, | |
| 570 | "Subscribe", | |
| 571 | (void **)&invoke_function); | |
| 572 | 0 | if(result != GLOBUS_SUCCESS) |
| 573 | { | |
| 574 | 0 | goto fault_exit; |
| 575 | } | |
| 576 | ||
| 577 | ||
| 578 | 0 | result = wsnt_SubscribeResponseType_init_contents( |
| 579 | &output); | |
| 580 | 0 | if(result != GLOBUS_SUCCESS) |
| 581 | { | |
| 582 | 0 | goto fault_exit; |
| 583 | } | |
| 584 | 0 | result = xsd_any_init_contents(&fault); |
| 585 | 0 | if(result != GLOBUS_SUCCESS) |
| 586 | { | |
| 587 | 0 | goto fault_exit; |
| 588 | } | |
| 589 | 0 | result = invoke_function( |
| 590 | callback_handle->engine, | |
| 591 | callback_handle->message, | |
| 592 | &WidgetNotificationService_descriptor, | |
| 593 | input, | |
| 594 | &output, | |
| 595 | &fault); | |
| 596 | ||
| 597 | ||
| 598 | 0 | fault_exit: |
| 599 | ||
| 600 | 0 | 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 | 0 | 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 | 0 | result = globus_service_session_begin_response( |
| 665 | callback_handle->message); | |
| 666 | 0 | if(result != GLOBUS_SUCCESS) |
| 667 | { | |
| 668 | 0 | goto exit; |
| 669 | } | |
| 670 | ||
| 671 | 0 | element_qname.local = "SubscribeResponse"; |
| 672 | 0 | element_qname.Namespace = "http://docs.oasis-open.org/wsn/b-2"; |
| 673 | ||
| 674 | 0 | result = wsnt_SubscribeResponseType_serialize( |
| 675 | &element_qname, | |
| 676 | &output, | |
| 677 | callback_handle->message, | |
| 678 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 679 | 0 | if(result != GLOBUS_SUCCESS) |
| 680 | { | |
| 681 | 0 | goto exit; |
| 682 | } | |
| 683 | ||
| 684 | 0 | result = globus_service_session_end_response( |
| 685 | callback_handle->message); | |
| 686 | 0 | if(result != GLOBUS_SUCCESS) |
| 687 | { | |
| 688 | 0 | goto exit; |
| 689 | } | |
| 690 | ||
| 691 | 0 | wsnt_SubscribeResponseType_destroy_contents( |
| 692 | &output); | |
| 693 | ||
| 694 | 0 | 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/wsn/bw-2/NotificationProducer/SubscribeResponse"); | |
| 700 | } | |
| 701 | ||
| 702 | 0 | exit: |
| 703 | ||
| 704 | 0 | callback_handle->callback( |
| 705 | result, | |
| 706 | callback_handle->args); | |
| 707 | ||
| 708 | 0 | globus_libc_free(callback_handle); |
| 709 | ||
| 710 | 0 | WidgetNotificationServiceDebugExit(); |
| 711 | 0 | } |
| 712 | ||
| 713 | static | |
| 714 | globus_result_t | |
| 715 | Subscribe_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 | 0 | { |
| 722 | Subscribe_callback_handle_t * callback_handle; | |
| 723 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 724 | GlobusFuncName(WidgetNotificationPortType_Subscribe); | |
| 725 | 0 | WidgetNotificationServiceDebugEnter(); |
| 726 | ||
| 727 | 0 | callback_handle = malloc(sizeof(Subscribe_callback_handle_t)); |
| 728 | 0 | if(!callback_handle) |
| 729 | { | |
| 730 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 731 | 0 | goto exit; |
| 732 | } | |
| 733 | 0 | callback_handle->engine = engine; |
| 734 | 0 | callback_handle->message = message; |
| 735 | 0 | callback_handle->callback = invoke_callback; |
| 736 | 0 | callback_handle->args = args; |
| 737 | ||
| 738 | 0 | result = globus_callback_register_oneshot( |
| 739 | NULL, | |
| 740 | &globus_i_reltime_zero, | |
| 741 | Subscribe_invoke_callback, | |
| 742 | callback_handle); | |
| 743 | ||
| 744 | 0 | exit: |
| 745 | 0 | WidgetNotificationServiceDebugExit(); |
| 746 | 0 | return result; |
| 747 | } | |
| 748 | ||
| 749 | static | |
| 750 | globus_service_operation_descriptor_t | |
| 751 | Subscribe_operation_descriptor = | |
| 752 | { | |
| 753 | Subscribe_deserialize, | |
| 754 | Subscribe_invoke, | |
| 755 | }; | |
| 756 | ||
| 757 | static | |
| 758 | globus_operation_provider_descriptor_t Subscribe_descriptor = | |
| 759 | { | |
| 760 | &WidgetNotificationPortType_Subscribe_op_qname, | |
| 761 | "Subscribe", | |
| 762 | (void *)WidgetNotificationPortType_Subscribe_impl, | |
| 763 | NULL | |
| 764 | }; | |
| 765 | ||
| 766 | ||
| 767 | xsd_QName WidgetNotificationPortType_generateNotification_op_qname = | |
| 768 | { | |
| 769 | "http://localhost:8080/wsrf/services/WidgetNotificationService" | |
| 770 | "generateNotification" | |
| 771 | }; | |
| 772 | ||
| 773 | xsd_QName WidgetNotificationPortType_generateNotification_input_qname = | |
| 774 | { | |
| 775 | "http://widgets.com", | |
| 776 | "generateNotification" | |
| 777 | }; | |
| 778 | ||
| 779 | typedef globus_result_t (* generateNotification_invoke_func_t) ( | |
| 780 | globus_service_engine_t engine, | |
| 781 | globus_soap_message_handle_t message, | |
| 782 | globus_service_descriptor_t * descriptor, | |
| 783 | widget_generateNotificationType * input, | |
| 784 | widget_generateNotificationResponseType * output, | |
| 785 | xsd_any * fault); | |
| 786 | ||
| 787 | typedef struct generateNotification_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 | } generateNotification_callback_handle_t; | |
| 794 | ||
| 795 | static | |
| 796 | void | |
| 797 | generateNotification_deserialize_callback( | |
| 798 | void * handle) | |
| 799 | 0 | { |
| 800 | generateNotification_callback_handle_t * callback_handle; | |
| 801 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 802 | struct globus_soap_message_fault_s soap_fault; | |
| 803 | generateNotification_invoke_func_t invoke_function; | |
| 804 | 0 | widget_generateNotificationType * input = NULL; |
| 805 | GlobusFuncName(generateNotification_deserialize_callback); | |
| 806 | 0 | WidgetNotificationServiceDebugEnter(); |
| 807 | ||
| 808 | 0 | callback_handle = (generateNotification_callback_handle_t *) handle; |
| 809 | ||
| 810 | 0 | result = globus_operation_table_get_operation( |
| 811 | WidgetNotificationService_descriptor.operations, | |
| 812 | "generateNotification", | |
| 813 | (void **)&invoke_function); | |
| 814 | 0 | if(result != GLOBUS_SUCCESS) |
| 815 | { | |
| 816 | 0 | goto exit; |
| 817 | } | |
| 818 | ||
| 819 | 0 | result = widget_generateNotificationType_init( |
| 820 | &input); | |
| 821 | 0 | if(result != GLOBUS_SUCCESS) |
| 822 | { | |
| 823 | 0 | goto exit; |
| 824 | } | |
| 825 | ||
| 826 | 0 | result = widget_generateNotificationType_deserialize( |
| 827 | &WidgetNotificationPortType_generateNotification_input_qname, | |
| 828 | input, | |
| 829 | callback_handle->message, | |
| 830 | 0); | |
| 831 | 0 | if(result != GLOBUS_SUCCESS) |
| 832 | { | |
| 833 | 0 | goto free_exit; |
| 834 | } | |
| 835 | ||
| 836 | 0 | result = globus_soap_message_handle_set_attr( |
| 837 | callback_handle->message, | |
| 838 | "generateNotificationOperationInputParameter", | |
| 839 | widget_generateNotificationType_info.copy, | |
| 840 | widget_generateNotificationType_info.destroy, | |
| 841 | (void *)input); | |
| 842 | if(result != GLOBUS_SUCCESS) | |
| 843 | { | |
| 844 | 0 | goto free_exit; |
| 845 | } | |
| 846 | ||
| 847 | 0 | free_exit: |
| 848 | 0 | widget_generateNotificationType_destroy(input); |
| 849 | ||
| 850 | 0 | exit: |
| 851 | 0 | callback_handle->callback( |
| 852 | result, | |
| 853 | callback_handle->args); | |
| 854 | ||
| 855 | 0 | free(callback_handle); |
| 856 | 0 | WidgetNotificationServiceDebugExit(); |
| 857 | 0 | } |
| 858 | /* generateNotification_deserialize_callback() */ | |
| 859 | ||
| 860 | static | |
| 861 | globus_result_t | |
| 862 | generateNotification_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 | 0 | { |
| 868 | generateNotification_callback_handle_t * callback_handle; | |
| 869 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 870 | GlobusFuncName(generateNotification_deserialize); | |
| 871 | 0 | WidgetNotificationServiceDebugEnter(); |
| 872 | ||
| 873 | 0 | callback_handle = malloc(sizeof(generateNotification_callback_handle_t)); |
| 874 | 0 | globus_assert_string(callback_handle, |
| 875 | "Memory allocation failed " | |
| 876 | "for generateNotification callback handle"); | |
| 877 | ||
| 878 | 0 | callback_handle->engine = engine; |
| 879 | 0 | callback_handle->message = message; |
| 880 | 0 | callback_handle->callback = invoke_callback; |
| 881 | 0 | callback_handle->args = args; |
| 882 | ||
| 883 | 0 | result = globus_callback_register_oneshot( |
| 884 | NULL, | |
| 885 | &globus_i_reltime_zero, | |
| 886 | generateNotification_deserialize_callback, | |
| 887 | callback_handle); | |
| 888 | ||
| 889 | 0 | WidgetNotificationServiceDebugExit(); |
| 890 | 0 | return result; |
| 891 | } | |
| 892 | ||
| 893 | static | |
| 894 | void | |
| 895 | generateNotification_invoke_callback( | |
| 896 | void * handle) | |
| 897 | 0 | { |
| 898 | generateNotification_callback_handle_t * callback_handle; | |
| 899 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 900 | struct globus_soap_message_fault_s soap_fault; | |
| 901 | generateNotification_invoke_func_t invoke_function; | |
| 902 | widget_generateNotificationType * input; | |
| 903 | widget_generateNotificationResponseType output; | |
| 904 | xsd_QName element_qname; | |
| 905 | xsd_any fault; | |
| 906 | ||
| 907 | GlobusFuncName(generateNotification_invoke_callback); | |
| 908 | 0 | WidgetNotificationServiceDebugEnter(); |
| 909 | ||
| 910 | 0 | callback_handle = (generateNotification_callback_handle_t *) handle; |
| 911 | ||
| 912 | 0 | input = globus_soap_message_handle_get_attr( |
| 913 | callback_handle->message, | |
| 914 | "generateNotificationOperationInputParameter"); | |
| 915 | 0 | globus_assert(input); |
| 916 | ||
| 917 | 0 | result = globus_operation_table_get_operation( |
| 918 | WidgetNotificationService_descriptor.operations, | |
| 919 | "generateNotification", | |
| 920 | (void **)&invoke_function); | |
| 921 | 0 | if(result != GLOBUS_SUCCESS) |
| 922 | { | |
| 923 | 0 | goto fault_exit; |
| 924 | } | |
| 925 | ||
| 926 | ||
| 927 | 0 | result = widget_generateNotificationResponseType_init_contents( |
| 928 | &output); | |
| 929 | 0 | if(result != GLOBUS_SUCCESS) |
| 930 | { | |
| 931 | 0 | goto fault_exit; |
| 932 | } | |
| 933 | 0 | result = xsd_any_init_contents(&fault); |
| 934 | 0 | if(result != GLOBUS_SUCCESS) |
| 935 | { | |
| 936 | 0 | goto fault_exit; |
| 937 | } | |
| 938 | 0 | result = invoke_function( |
| 939 | callback_handle->engine, | |
| 940 | callback_handle->message, | |
| 941 | &WidgetNotificationService_descriptor, | |
| 942 | input, | |
| 943 | &output, | |
| 944 | &fault); | |
| 945 | ||
| 946 | ||
| 947 | 0 | fault_exit: |
| 948 | ||
| 949 | 0 | 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 | 0 | 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 | 0 | result = globus_service_session_begin_response( |
| 1014 | callback_handle->message); | |
| 1015 | 0 | if(result != GLOBUS_SUCCESS) |
| 1016 | { | |
| 1017 | 0 | goto exit; |
| 1018 | } | |
| 1019 | ||
| 1020 | 0 | element_qname.local = "generateNotificationResponse"; |
| 1021 | 0 | element_qname.Namespace = "http://widgets.com"; |
| 1022 | ||
| 1023 | 0 | result = widget_generateNotificationResponseType_serialize( |
| 1024 | &element_qname, | |
| 1025 | &output, | |
| 1026 | callback_handle->message, | |
| 1027 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 1028 | 0 | if(result != GLOBUS_SUCCESS) |
| 1029 | { | |
| 1030 | 0 | goto exit; |
| 1031 | } | |
| 1032 | ||
| 1033 | 0 | result = globus_service_session_end_response( |
| 1034 | callback_handle->message); | |
| 1035 | 0 | if(result != GLOBUS_SUCCESS) |
| 1036 | { | |
| 1037 | 0 | goto exit; |
| 1038 | } | |
| 1039 | ||
| 1040 | 0 | widget_generateNotificationResponseType_destroy_contents( |
| 1041 | &output); | |
| 1042 | ||
| 1043 | 0 | 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://widgets.com/WidgetNotificationPortType/generateNotificationResponse"); | |
| 1049 | } | |
| 1050 | ||
| 1051 | 0 | exit: |
| 1052 | ||
| 1053 | 0 | callback_handle->callback( |
| 1054 | result, | |
| 1055 | callback_handle->args); | |
| 1056 | ||
| 1057 | 0 | globus_libc_free(callback_handle); |
| 1058 | ||
| 1059 | 0 | WidgetNotificationServiceDebugExit(); |
| 1060 | 0 | } |
| 1061 | ||
| 1062 | static | |
| 1063 | globus_result_t | |
| 1064 | generateNotification_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 | 0 | { |
| 1071 | generateNotification_callback_handle_t * callback_handle; | |
| 1072 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 1073 | GlobusFuncName(WidgetNotificationPortType_generateNotification); | |
| 1074 | 0 | WidgetNotificationServiceDebugEnter(); |
| 1075 | ||
| 1076 | 0 | callback_handle = malloc(sizeof(generateNotification_callback_handle_t)); |
| 1077 | 0 | if(!callback_handle) |
| 1078 | { | |
| 1079 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 1080 | 0 | goto exit; |
| 1081 | } | |
| 1082 | 0 | callback_handle->engine = engine; |
| 1083 | 0 | callback_handle->message = message; |
| 1084 | 0 | callback_handle->callback = invoke_callback; |
| 1085 | 0 | callback_handle->args = args; |
| 1086 | ||
| 1087 | 0 | result = globus_callback_register_oneshot( |
| 1088 | NULL, | |
| 1089 | &globus_i_reltime_zero, | |
| 1090 | generateNotification_invoke_callback, | |
| 1091 | callback_handle); | |
| 1092 | ||
| 1093 | 0 | exit: |
| 1094 | 0 | WidgetNotificationServiceDebugExit(); |
| 1095 | 0 | return result; |
| 1096 | } | |
| 1097 | ||
| 1098 | static | |
| 1099 | globus_service_operation_descriptor_t | |
| 1100 | generateNotification_operation_descriptor = | |
| 1101 | { | |
| 1102 | generateNotification_deserialize, | |
| 1103 | generateNotification_invoke, | |
| 1104 | }; | |
| 1105 | ||
| 1106 | static | |
| 1107 | globus_operation_provider_descriptor_t generateNotification_descriptor = | |
| 1108 | { | |
| 1109 | &WidgetNotificationPortType_generateNotification_op_qname, | |
| 1110 | "generateNotification", | |
| 1111 | (void *)WidgetNotificationPortType_generateNotification_impl, | |
| 1112 | NULL | |
| 1113 | }; | |
| 1114 | ||
| 1115 | ||
| 1116 | ||
| 1117 | static xsd_QName WidgetNotificationService_l_wsrp_GetResourceProperty_qname; | |
| 1118 | static xsd_QName WidgetNotificationService_l_wsrp_GetMultipleResourceProperties_qname; | |
| 1119 | static xsd_QName WidgetNotificationService_l_wsrp_SetResourceProperties_qname; | |
| 1120 | static xsd_QName WidgetNotificationService_l_wsrp_QueryResourceProperties_qname; | |
| 1121 | static xsd_QName WidgetNotificationService_l_wsrl_Destroy_qname; | |
| 1122 | static xsd_QName WidgetNotificationService_l_wsrl_SetTerminationTime_qname; | |
| 1123 | static xsd_QName WidgetNotificationService_l_wsnt_Subscribe_qname; | |
| 1124 | static xsd_QName WidgetNotificationService_l_wsnt_GetCurrentMessage_qname; | |
| 1125 | ||
| 1126 | static | |
| 1127 | int | |
| 1128 | WidgetNotificationService_activate() | |
| 1129 | 0 | { |
| 1130 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 1131 | 0 | int rc = 0; |
| 1132 | GlobusFuncName(WidgetNotificationService_activate); | |
| 1133 | ||
| 1134 | 0 | rc = globus_module_activate(GLOBUS_COMMON_MODULE); |
| 1135 | 0 | if(rc != GLOBUS_SUCCESS) |
| 1136 | { | |
| 1137 | 0 | return rc; |
| 1138 | } | |
| 1139 | ||
| 1140 | 0 | GlobusDebugInit(WIDGETNOTIFICATIONSERVICE, INFO DEBUG TRACE WARN ERROR); |
| 1141 | ||
| 1142 | 0 | rc = globus_module_activate(GLOBUS_SOAP_MESSAGE_MODULE); |
| 1143 | 0 | if(rc != GLOBUS_SUCCESS) |
| 1144 | { | |
| 1145 | 0 | return rc; |
| 1146 | } | |
| 1147 | ||
| 1148 | 0 | WidgetNotificationServiceDebugEnter(); |
| 1149 | ||
| 1150 | 0 | result = globus_module_activate(GLOBUS_WSRF_RESOURCE_MODULE); |
| 1151 | 0 | if (result != GLOBUS_SUCCESS) |
| 1152 | { | |
| 1153 | 0 | rc = (int) result; |
| 1154 | 0 | goto exit; |
| 1155 | } | |
| 1156 | ||
| 1157 | 0 | result = globus_module_activate(GLOBUS_WSRF_CORE_TOOLS_MODULE); |
| 1158 | 0 | if (result != GLOBUS_SUCCESS) |
| 1159 | { | |
| 1160 | 0 | rc = (int) result; |
| 1161 | 0 | goto exit; |
| 1162 | } | |
| 1163 | ||
| 1164 | 0 | rc = globus_extension_activate( |
| 1165 | "globus_wsrp_GetResourceProperty_provider"); | |
| 1166 | 0 | if(rc != GLOBUS_SUCCESS) |
| 1167 | { | |
| 1168 | 0 | goto deactivate_resource_out; |
| 1169 | } | |
| 1170 | ||
| 1171 | 0 | rc = globus_extension_activate( |
| 1172 | "globus_wsrp_GetMultipleResourceProperties_provider"); | |
| 1173 | 0 | if (rc != GLOBUS_SUCCESS) |
| 1174 | { | |
| 1175 | 0 | goto deactivate_getrp; |
| 1176 | } | |
| 1177 | ||
| 1178 | 0 | rc = globus_extension_activate( |
| 1179 | "globus_wsrp_SetResourceProperties_provider"); | |
| 1180 | 0 | if (rc != GLOBUS_SUCCESS) |
| 1181 | { | |
| 1182 | 0 | goto deactivate_getmrp; |
| 1183 | } | |
| 1184 | ||
| 1185 | 0 | rc = globus_extension_activate( |
| 1186 | "globus_wsrp_QueryResourceProperties_provider"); | |
| 1187 | 0 | if (rc != GLOBUS_SUCCESS) |
| 1188 | { | |
| 1189 | 0 | goto deactivate_setrp; |
| 1190 | } | |
| 1191 | ||
| 1192 | 0 | rc = globus_extension_activate( |
| 1193 | "globus_wsrl_ImmediateResourceTermination_provider"); | |
| 1194 | 0 | if (rc != GLOBUS_SUCCESS) |
| 1195 | { | |
| 1196 | 0 | goto deactivate_queryrp; |
| 1197 | } | |
| 1198 | ||
| 1199 | 0 | rc = globus_extension_activate( |
| 1200 | "globus_wsrl_ScheduledResourceTermination_provider"); | |
| 1201 | 0 | if (rc != GLOBUS_SUCCESS) |
| 1202 | { | |
| 1203 | 0 | goto deactivate_irt; |
| 1204 | } | |
| 1205 | ||
| 1206 | 0 | rc = globus_extension_activate( |
| 1207 | "globus_wsnt_NotificationProducer_provider"); | |
| 1208 | 0 | if (rc != GLOBUS_SUCCESS) |
| 1209 | { | |
| 1210 | 0 | goto deactivate_srt; |
| 1211 | } | |
| 1212 | ||
| 1213 | 0 | if(GLOBUS_GLOBAL_TYPE_REGISTRY != NULL) |
| 1214 | { | |
| 1215 | 0 | result = WidgetNotificationService_registry_add_types( |
| 1216 | GLOBUS_GLOBAL_TYPE_REGISTRY); | |
| 1217 | 0 | if(result != GLOBUS_SUCCESS) |
| 1218 | { | |
| 1219 | 0 | rc = (int) result; |
| 1220 | 0 | goto deactivate_nrt; |
| 1221 | } | |
| 1222 | } | |
| 1223 | ||
| 1224 | 0 | rc = globus_hashtable_init( |
| 1225 | &WidgetNotificationService_descriptor.op_mapper, | |
| 1226 | 10, | |
| 1227 | xsd_QName_hash, | |
| 1228 | xsd_QName_keyeq); | |
| 1229 | 0 | if(rc != GLOBUS_SUCCESS) |
| 1230 | { | |
| 1231 | 0 | goto clear_global_registry; |
| 1232 | } | |
| 1233 | ||
| 1234 | 0 | globus_mutex_init(&WidgetNotificationService_descriptor.mutex, NULL); |
| 1235 | ||
| 1236 | 0 | rc = globus_hashtable_insert( |
| 1237 | &WidgetNotificationService_descriptor.op_mapper, | |
| 1238 | (void *)&WidgetNotificationPortType_GetCurrentMessage_input_qname, | |
| 1239 | (void *)&GetCurrentMessage_operation_descriptor); | |
| 1240 | 0 | if(rc != GLOBUS_SUCCESS) |
| 1241 | { | |
| 1242 | 0 | goto remove_GetCurrentMessage_op; |
| 1243 | } | |
| 1244 | ||
| 1245 | 0 | rc = globus_hashtable_insert( |
| 1246 | &WidgetNotificationService_descriptor.op_mapper, | |
| 1247 | (void *)&WidgetNotificationPortType_Subscribe_input_qname, | |
| 1248 | (void *)&Subscribe_operation_descriptor); | |
| 1249 | 0 | if(rc != GLOBUS_SUCCESS) |
| 1250 | { | |
| 1251 | 0 | goto remove_Subscribe_op; |
| 1252 | } | |
| 1253 | ||
| 1254 | 0 | rc = globus_hashtable_insert( |
| 1255 | &WidgetNotificationService_descriptor.op_mapper, | |
| 1256 | (void *)&WidgetNotificationPortType_generateNotification_input_qname, | |
| 1257 | (void *)&generateNotification_operation_descriptor); | |
| 1258 | 0 | if(rc != GLOBUS_SUCCESS) |
| 1259 | { | |
| 1260 | 0 | goto remove_generateNotification_op; |
| 1261 | } | |
| 1262 | ||
| 1263 | ||
| 1264 | 0 | result = globus_operation_table_init( |
| 1265 | &WidgetNotificationService_descriptor.operations, | |
| 1266 | WidgetNotificationService_service_qname.Namespace); | |
| 1267 | 0 | if(result != GLOBUS_SUCCESS) |
| 1268 | { | |
| 1269 | 0 | rc = (int) result; |
| 1270 | 0 | goto remove_all_ops; |
| 1271 | } | |
| 1272 | ||
| 1273 | ||
| 1274 | 0 | result = globus_extension_registry_add( |
| 1275 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 1276 | (void *)&WidgetNotificationPortType_GetCurrentMessage_op_qname, | |
| 1277 | GlobusExtensionMyModule(WidgetNotificationService), | |
| 1278 | (void *)&GetCurrentMessage_descriptor); | |
| 1279 | 0 | if(result != GLOBUS_SUCCESS) |
| 1280 | { | |
| 1281 | 0 | rc = (int) result; |
| 1282 | 0 | goto remove_GetCurrentMessage_op_provider; |
| 1283 | } | |
| 1284 | ||
| 1285 | 0 | result = globus_operation_table_add_default_provider( |
| 1286 | WidgetNotificationService_descriptor.operations, | |
| 1287 | &WidgetNotificationPortType_GetCurrentMessage_op_qname, | |
| 1288 | &GetCurrentMessage_descriptor); | |
| 1289 | 0 | if(result != GLOBUS_SUCCESS) |
| 1290 | { | |
| 1291 | 0 | rc = (int) result; |
| 1292 | 0 | goto remove_GetCurrentMessage_op_provider; |
| 1293 | } | |
| 1294 | ||
| 1295 | 0 | result = globus_extension_registry_add( |
| 1296 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 1297 | (void *)&WidgetNotificationPortType_Subscribe_op_qname, | |
| 1298 | GlobusExtensionMyModule(WidgetNotificationService), | |
| 1299 | (void *)&Subscribe_descriptor); | |
| 1300 | 0 | if(result != GLOBUS_SUCCESS) |
| 1301 | { | |
| 1302 | 0 | rc = (int) result; |
| 1303 | 0 | goto remove_Subscribe_op_provider; |
| 1304 | } | |
| 1305 | ||
| 1306 | 0 | result = globus_operation_table_add_default_provider( |
| 1307 | WidgetNotificationService_descriptor.operations, | |
| 1308 | &WidgetNotificationPortType_Subscribe_op_qname, | |
| 1309 | &Subscribe_descriptor); | |
| 1310 | 0 | if(result != GLOBUS_SUCCESS) |
| 1311 | { | |
| 1312 | 0 | rc = (int) result; |
| 1313 | 0 | goto remove_Subscribe_op_provider; |
| 1314 | } | |
| 1315 | ||
| 1316 | 0 | result = globus_extension_registry_add( |
| 1317 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 1318 | (void *)&WidgetNotificationPortType_generateNotification_op_qname, | |
| 1319 | GlobusExtensionMyModule(WidgetNotificationService), | |
| 1320 | (void *)&generateNotification_descriptor); | |
| 1321 | 0 | if(result != GLOBUS_SUCCESS) |
| 1322 | { | |
| 1323 | 0 | rc = (int) result; |
| 1324 | 0 | goto remove_generateNotification_op_provider; |
| 1325 | } | |
| 1326 | ||
| 1327 | 0 | result = globus_operation_table_add_default_provider( |
| 1328 | WidgetNotificationService_descriptor.operations, | |
| 1329 | &WidgetNotificationPortType_generateNotification_op_qname, | |
| 1330 | &generateNotification_descriptor); | |
| 1331 | 0 | if(result != GLOBUS_SUCCESS) |
| 1332 | { | |
| 1333 | 0 | rc = (int) result; |
| 1334 | 0 | goto remove_generateNotification_op_provider; |
| 1335 | } | |
| 1336 | ||
| 1337 | 0 | result = globus_operation_table_add_provider( |
| 1338 | WidgetNotificationService_descriptor.operations, | |
| 1339 | &WidgetNotificationService_l_wsrp_GetResourceProperty_qname); | |
| 1340 | 0 | if (result != GLOBUS_SUCCESS) |
| 1341 | { | |
| 1342 | 0 | rc = (int) result; |
| 1343 | 0 | goto remove_op_providers; |
| 1344 | } | |
| 1345 | ||
| 1346 | 0 | result = globus_operation_table_add_provider( |
| 1347 | WidgetNotificationService_descriptor.operations, | |
| 1348 | &WidgetNotificationService_l_wsrp_GetMultipleResourceProperties_qname); | |
| 1349 | 0 | if (result != GLOBUS_SUCCESS) |
| 1350 | { | |
| 1351 | 0 | rc = (int) result; |
| 1352 | ||
| 1353 | 0 | goto remove_op_providers; |
| 1354 | } | |
| 1355 | ||
| 1356 | 0 | result = globus_operation_table_add_provider( |
| 1357 | WidgetNotificationService_descriptor.operations, | |
| 1358 | &WidgetNotificationService_l_wsrp_SetResourceProperties_qname); | |
| 1359 | 0 | if (result != GLOBUS_SUCCESS) |
| 1360 | { | |
| 1361 | 0 | rc = (int) result; |
| 1362 | ||
| 1363 | 0 | goto remove_op_providers; |
| 1364 | } | |
| 1365 | ||
| 1366 | 0 | result = globus_operation_table_add_provider( |
| 1367 | WidgetNotificationService_descriptor.operations, | |
| 1368 | &WidgetNotificationService_l_wsrp_QueryResourceProperties_qname); | |
| 1369 | 0 | if (result != GLOBUS_SUCCESS) |
| 1370 | { | |
| 1371 | 0 | rc = (int) result; |
| 1372 | ||
| 1373 | 0 | goto remove_op_providers; |
| 1374 | } | |
| 1375 | ||
| 1376 | 0 | result = globus_operation_table_add_provider( |
| 1377 | WidgetNotificationService_descriptor.operations, | |
| 1378 | &WidgetNotificationService_l_wsrl_Destroy_qname); | |
| 1379 | 0 | if (result != GLOBUS_SUCCESS) |
| 1380 | { | |
| 1381 | 0 | rc = (int) result; |
| 1382 | ||
| 1383 | 0 | goto remove_op_providers; |
| 1384 | } | |
| 1385 | ||
| 1386 | 0 | result = globus_operation_table_add_provider( |
| 1387 | WidgetNotificationService_descriptor.operations, | |
| 1388 | &WidgetNotificationService_l_wsrl_SetTerminationTime_qname); | |
| 1389 | 0 | if (result != GLOBUS_SUCCESS) |
| 1390 | { | |
| 1391 | 0 | rc = (int) result; |
| 1392 | ||
| 1393 | 0 | goto remove_op_providers; |
| 1394 | } | |
| 1395 | ||
| 1396 | 0 | result = globus_operation_table_add_provider( |
| 1397 | WidgetNotificationService_descriptor.operations, | |
| 1398 | &WidgetNotificationService_l_wsnt_Subscribe_qname); | |
| 1399 | 0 | if (result != GLOBUS_SUCCESS) |
| 1400 | { | |
| 1401 | 0 | rc = (int) result; |
| 1402 | ||
| 1403 | 0 | goto remove_op_providers; |
| 1404 | } | |
| 1405 | ||
| 1406 | 0 | result = globus_operation_table_add_provider( |
| 1407 | WidgetNotificationService_descriptor.operations, | |
| 1408 | &WidgetNotificationService_l_wsnt_GetCurrentMessage_qname); | |
| 1409 | 0 | if (result != GLOBUS_SUCCESS) |
| 1410 | { | |
| 1411 | 0 | rc = (int) result; |
| 1412 | ||
| 1413 | 0 | goto remove_op_providers; |
| 1414 | } | |
| 1415 | ||
| 1416 | 0 | rc = globus_extension_registry_add( |
| 1417 | GLOBUS_SERVICE_REGISTRY, | |
| 1418 | (void *)WidgetNotificationService_descriptor.path, | |
| 1419 | GlobusExtensionMyModule(WidgetNotificationService), | |
| 1420 | &WidgetNotificationService_descriptor); | |
| 1421 | 0 | if(rc != GLOBUS_SUCCESS) |
| 1422 | { | |
| 1423 | 0 | goto remove_op_providers; |
| 1424 | } | |
| 1425 | ||
| 1426 | 0 | result = WidgetNotificationService_init(&WidgetNotificationService_descriptor); |
| 1427 | 0 | if(result != GLOBUS_SUCCESS) |
| 1428 | { | |
| 1429 | 0 | rc = (int) result; |
| 1430 | 0 | goto service_extension_remove; |
| 1431 | } | |
| 1432 | ||
| 1433 | 0 | goto exit; |
| 1434 | ||
| 1435 | 0 | service_extension_remove: |
| 1436 | 0 | globus_extension_registry_remove( |
| 1437 | GLOBUS_SERVICE_REGISTRY, | |
| 1438 | (void *)WidgetNotificationService_descriptor.path); | |
| 1439 | 0 | remove_op_providers: |
| 1440 | ||
| 1441 | 0 | globus_extension_registry_remove( |
| 1442 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 1443 | (void *)&WidgetNotificationPortType_GetCurrentMessage_op_qname); | |
| 1444 | 0 | remove_GetCurrentMessage_op_provider: |
| 1445 | ||
| 1446 | 0 | globus_extension_registry_remove( |
| 1447 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 1448 | (void *)&WidgetNotificationPortType_Subscribe_op_qname); | |
| 1449 | 0 | remove_Subscribe_op_provider: |
| 1450 | ||
| 1451 | 0 | globus_extension_registry_remove( |
| 1452 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 1453 | (void *)&WidgetNotificationPortType_generateNotification_op_qname); | |
| 1454 | 0 | remove_generateNotification_op_provider: |
| 1455 | ||
| 1456 | 0 | destroy_op_table: |
| 1457 | 0 | globus_operation_table_destroy(WidgetNotificationService_descriptor.operations); |
| 1458 | 0 | remove_all_ops: |
| 1459 | ||
| 1460 | 0 | globus_hashtable_remove( |
| 1461 | &WidgetNotificationService_descriptor.op_mapper, | |
| 1462 | (void *)&WidgetNotificationPortType_GetCurrentMessage_input_qname); | |
| 1463 | 0 | remove_GetCurrentMessage_op: |
| 1464 | ||
| 1465 | 0 | globus_hashtable_remove( |
| 1466 | &WidgetNotificationService_descriptor.op_mapper, | |
| 1467 | (void *)&WidgetNotificationPortType_Subscribe_input_qname); | |
| 1468 | 0 | remove_Subscribe_op: |
| 1469 | ||
| 1470 | 0 | globus_hashtable_remove( |
| 1471 | &WidgetNotificationService_descriptor.op_mapper, | |
| 1472 | (void *)&WidgetNotificationPortType_generateNotification_input_qname); | |
| 1473 | 0 | remove_generateNotification_op: |
| 1474 | ||
| 1475 | 0 | destroy_mutex: |
| 1476 | 0 | globus_mutex_destroy(&WidgetNotificationService_descriptor.mutex); |
| 1477 | 0 | clear_service_registry: |
| 1478 | 0 | destroy_service_registry: |
| 1479 | 0 | destroy_op_mapper: |
| 1480 | 0 | globus_hashtable_destroy(&WidgetNotificationService_descriptor.op_mapper); |
| 1481 | 0 | clear_global_registry: |
| 1482 | 0 | if(GLOBUS_GLOBAL_TYPE_REGISTRY != NULL) |
| 1483 | { | |
| 1484 | 0 | WidgetNotificationService_registry_remove_types( |
| 1485 | GLOBUS_GLOBAL_TYPE_REGISTRY); | |
| 1486 | } | |
| 1487 | 0 | deactivate_nrt: |
| 1488 | 0 | globus_extension_deactivate( |
| 1489 | "globus_wsnt_NotificationProducer_provider"); | |
| 1490 | 0 | deactivate_srt: |
| 1491 | 0 | globus_extension_deactivate( |
| 1492 | "globus_wsrl_ScheduledResourceTermination_provider"); | |
| 1493 | 0 | deactivate_irt: |
| 1494 | 0 | globus_extension_deactivate( |
| 1495 | "globus_wsrl_ImmediateResourceTermination_provider"); | |
| 1496 | 0 | deactivate_queryrp: |
| 1497 | 0 | globus_extension_deactivate( |
| 1498 | "globus_wsrp_QueryResourceProperties_provider"); | |
| 1499 | 0 | deactivate_setrp: |
| 1500 | 0 | globus_extension_deactivate("globus_wsrp_SetResourceProperties_provider"); |
| 1501 | 0 | deactivate_getmrp: |
| 1502 | 0 | globus_extension_deactivate("globus_wsrp_GetMultipleResourceProperties_provider"); |
| 1503 | 0 | deactivate_getrp: |
| 1504 | 0 | globus_extension_deactivate("globus_wsrp_GetResourceProperty_provider"); |
| 1505 | 0 | deactivate_resource_out: |
| 1506 | 0 | globus_module_deactivate(GLOBUS_WSRF_RESOURCE_MODULE); |
| 1507 | ||
| 1508 | 0 | exit: |
| 1509 | 0 | WidgetNotificationServiceDebugExit(); |
| 1510 | 0 | return rc; |
| 1511 | } | |
| 1512 | ||
| 1513 | static | |
| 1514 | int | |
| 1515 | WidgetNotificationService_deactivate() | |
| 1516 | 0 | { |
| 1517 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 1518 | 0 | int rc = 0; |
| 1519 | ||
| 1520 | 0 | result = WidgetNotificationService_finalize(&WidgetNotificationService_descriptor); |
| 1521 | 0 | if(result != GLOBUS_SUCCESS) |
| 1522 | { | |
| 1523 | 0 | return GLOBUS_FAILURE; |
| 1524 | } | |
| 1525 | ||
| 1526 | 0 | globus_extension_registry_remove( |
| 1527 | GLOBUS_SERVICE_REGISTRY, | |
| 1528 | (void *)WidgetNotificationService_descriptor.path); | |
| 1529 | ||
| 1530 | 0 | globus_extension_registry_remove( |
| 1531 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 1532 | (void *)&WidgetNotificationPortType_GetCurrentMessage_op_qname); | |
| 1533 | ||
| 1534 | 0 | globus_extension_registry_remove( |
| 1535 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 1536 | (void *)&WidgetNotificationPortType_Subscribe_op_qname); | |
| 1537 | ||
| 1538 | 0 | globus_extension_registry_remove( |
| 1539 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 1540 | (void *)&WidgetNotificationPortType_generateNotification_op_qname); | |
| 1541 | ||
| 1542 | 0 | globus_operation_table_destroy(WidgetNotificationService_descriptor.operations); |
| 1543 | ||
| 1544 | ||
| 1545 | 0 | globus_hashtable_remove( |
| 1546 | &WidgetNotificationService_descriptor.op_mapper, | |
| 1547 | (void *)&WidgetNotificationPortType_GetCurrentMessage_input_qname); | |
| 1548 | ||
| 1549 | 0 | globus_hashtable_remove( |
| 1550 | &WidgetNotificationService_descriptor.op_mapper, | |
| 1551 | (void *)&WidgetNotificationPortType_Subscribe_input_qname); | |
| 1552 | ||
| 1553 | 0 | globus_hashtable_remove( |
| 1554 | &WidgetNotificationService_descriptor.op_mapper, | |
| 1555 | (void *)&WidgetNotificationPortType_generateNotification_input_qname); | |
| 1556 | ||
| 1557 | ||
| 1558 | 0 | globus_mutex_destroy(&WidgetNotificationService_descriptor.mutex); |
| 1559 | ||
| 1560 | ||
| 1561 | 0 | globus_hashtable_destroy(&WidgetNotificationService_descriptor.op_mapper); |
| 1562 | ||
| 1563 | 0 | if(GLOBUS_GLOBAL_TYPE_REGISTRY != NULL) |
| 1564 | { | |
| 1565 | 0 | WidgetNotificationService_registry_remove_types( |
| 1566 | GLOBUS_GLOBAL_TYPE_REGISTRY); | |
| 1567 | } | |
| 1568 | ||
| 1569 | 0 | globus_extension_deactivate( |
| 1570 | "globus_wsnt_NotificationProducer_provider"); | |
| 1571 | 0 | globus_extension_deactivate( |
| 1572 | "globus_wsrl_ScheduledResourceTermination_provider"); | |
| 1573 | 0 | globus_extension_deactivate( |
| 1574 | "globus_wsrl_ImmediateResourceTermination_provider"); | |
| 1575 | 0 | globus_extension_deactivate( |
| 1576 | "globus_wsrp_QueryResourceProperties_provider"); | |
| 1577 | 0 | globus_extension_deactivate("globus_wsrp_SetResourceProperties_provider"); |
| 1578 | 0 | globus_extension_deactivate( |
| 1579 | "globus_wsrp_GetMultipleResourceProperties_provider"); | |
| 1580 | 0 | globus_extension_deactivate("globus_wsrp_GetResourceProperty_provider"); |
| 1581 | 0 | globus_module_deactivate(GLOBUS_WSRF_RESOURCE_MODULE); |
| 1582 | ||
| 1583 | 0 | rc = globus_module_deactivate(GLOBUS_SOAP_MESSAGE_MODULE); |
| 1584 | 0 | if(rc != GLOBUS_SUCCESS) |
| 1585 | { | |
| 1586 | 0 | return rc; |
| 1587 | } | |
| 1588 | ||
| 1589 | 0 | GlobusDebugDestroy(WIDGETNOTIFICATIONSERVICE); |
| 1590 | ||
| 1591 | 0 | rc = globus_module_deactivate(GLOBUS_COMMON_MODULE); |
| 1592 | 0 | if(rc != GLOBUS_SUCCESS) |
| 1593 | { | |
| 1594 | 0 | return rc; |
| 1595 | } | |
| 1596 | ||
| 1597 | 0 | return rc; |
| 1598 | } | |
| 1599 | ||
| 1600 | #define WSRP_PROVIDER_NS "http://docs.oasis-open.org/wsrf/rpw-2/providers" | |
| 1601 | ||
| 1602 | static xsd_QName WidgetNotificationService_l_wsrp_GetResourceProperty_qname = | |
| 1603 | { | |
| 1604 | WSRP_PROVIDER_NS, | |
| 1605 | "GetResourceProperty" | |
| 1606 | }; | |
| 1607 | ||
| 1608 | static xsd_QName WidgetNotificationService_l_wsrp_GetMultipleResourceProperties_qname = | |
| 1609 | { | |
| 1610 | WSRP_PROVIDER_NS, | |
| 1611 | "GetMultipleResourceProperties" | |
| 1612 | }; | |
| 1613 | ||
| 1614 | static xsd_QName WidgetNotificationService_l_wsrp_SetResourceProperties_qname = | |
| 1615 | { | |
| 1616 | WSRP_PROVIDER_NS, | |
| 1617 | "SetResourceProperties" | |
| 1618 | }; | |
| 1619 | ||
| 1620 | static xsd_QName WidgetNotificationService_l_wsrp_QueryResourceProperties_qname = | |
| 1621 | { | |
| 1622 | WSRP_PROVIDER_NS, | |
| 1623 | "QueryResourceProperties" | |
| 1624 | }; | |
| 1625 | ||
| 1626 | #define WSRL_PROVIDER_NS "http://docs.oasis-open.org/wsrf/rlw-2/providers" | |
| 1627 | ||
| 1628 | static xsd_QName WidgetNotificationService_l_wsrl_Destroy_qname = | |
| 1629 | { | |
| 1630 | WSRL_PROVIDER_NS, | |
| 1631 | "Destroy" | |
| 1632 | }; | |
| 1633 | ||
| 1634 | static xsd_QName WidgetNotificationService_l_wsrl_SetTerminationTime_qname = | |
| 1635 | { | |
| 1636 | WSRL_PROVIDER_NS, | |
| 1637 | "SetTerminationTime" | |
| 1638 | }; | |
| 1639 | ||
| 1640 | #define WSNT_PROVIDER_NS "http://docs.oasis-open.org/wsn/bw-2/providers" | |
| 1641 | ||
| 1642 | static xsd_QName WidgetNotificationService_l_wsnt_Subscribe_qname = | |
| 1643 | { | |
| 1644 | WSNT_PROVIDER_NS, | |
| 1645 | "Subscribe" | |
| 1646 | }; | |
| 1647 | ||
| 1648 | static xsd_QName WidgetNotificationService_l_wsnt_GetCurrentMessage_qname = | |
| 1649 | { | |
| 1650 | WSNT_PROVIDER_NS, | |
| 1651 | "GetCurrentMessage" |