| 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 "NotificationProducerTestService.h" | |
| 24 | #include "NotificationProducerTestService_skeleton.h" | |
| 25 | #include "NotificationProducerTestService_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 | ||
| 31 | static | |
| 32 | int | |
| 33 | NotificationProducerTestService_activate(void); | |
| 34 | ||
| 35 | static | |
| 36 | int | |
| 37 | NotificationProducerTestService_deactivate(void); | |
| 38 | ||
| 39 | GlobusExtensionDefineModule(NotificationProducerTestService) = | |
| 40 | { | |
| 41 | "NotificationProducerTestService", | |
| 42 | NotificationProducerTestService_activate, | |
| 43 | NotificationProducerTestService_deactivate, | |
| 44 | NULL, | |
| 45 | NULL, | |
| 46 | &local_version | |
| 47 | }; | |
| 48 | ||
| 49 | 0 | GlobusDebugDefine(NOTIFICATIONPRODUCERTESTSERVICE); |
| 50 | ||
| 51 | xsd_QName NotificationProducerTestService_service_qname = | |
| 52 | { | |
| 53 | "http://www.globus.org/namespaces/2005/03/NotificationProducerTest/service", | |
| 54 | "NotificationProducerTestService" | |
| 55 | }; | |
| 56 | ||
| 57 | globus_service_descriptor_t NotificationProducerTestService_descriptor = | |
| 58 | { | |
| 59 | &NotificationProducerTestService_service_qname, | |
| 60 | GLOBUS_SERVICE_ENGINE_MODULE_PATH_PREFIX "/" NOTIFICATIONPRODUCERTESTSERVICE_BASE_PATH, | |
| 61 | NULL, | |
| 62 | NULL, | |
| 63 | NULL, | |
| 64 | NULL, | |
| 65 | globus_resource_id_get_as_string, | |
| 66 | NULL | |
| 67 | }; | |
| 68 | ||
| 69 | ||
| 70 | xsd_QName NotificationProducerTestPortType_GetCurrentMessage_op_qname = | |
| 71 | { | |
| 72 | "http://localhost:8080/wsrf/services/NotificationProducerTestService" | |
| 73 | "GetCurrentMessage" | |
| 74 | }; | |
| 75 | ||
| 76 | xsd_QName NotificationProducerTestPortType_GetCurrentMessage_input_qname = | |
| 77 | { | |
| 78 | "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd", | |
| 79 | "GetCurrentMessage" | |
| 80 | }; | |
| 81 | ||
| 82 | typedef globus_result_t (* GetCurrentMessage_invoke_func_t) ( | |
| 83 | globus_service_engine_t engine, | |
| 84 | globus_soap_message_handle_t message, | |
| 85 | globus_service_descriptor_t * descriptor, | |
| 86 | wsnt_GetCurrentMessageType * GetCurrentMessage, | |
| 87 | wsnt_GetCurrentMessageResponseType * GetCurrentMessageResponse, | |
| 88 | const char ** fault_type_name, | |
| 89 | void ** fault); | |
| 90 | ||
| 91 | typedef struct GetCurrentMessage_callback_handle_s | |
| 92 | { | |
| 93 | globus_service_engine_t engine; | |
| 94 | globus_soap_message_handle_t message; | |
| 95 | globus_operation_invoke_callback_func_t callback; | |
| 96 | void * args; | |
| 97 | } GetCurrentMessage_callback_handle_t; | |
| 98 | ||
| 99 | ||
| 100 | const char * NotificationProducerTestPortType_GetCurrentMessage_fault_strings[NOTIFICATIONPRODUCERTESTPORTTYPE_GETCURRENTMESSAGE_TOPICNOTSUPPORTEDFAULT] = | |
| 101 | { | |
| 102 | "Unknown", | |
| 103 | "ResourceUnknownFault", | |
| 104 | "NoCurrentMessageOnTopicFault", | |
| 105 | "InvalidTopicExpressionFault", | |
| 106 | "TopicNotSupportedFault" | |
| 107 | }; | |
| 108 | ||
| 109 | static | |
| 110 | NotificationProducerTestPortType_GetCurrentMessage_fault_t | |
| 111 | GetCurrentMessage_lookup_fault_type( | |
| 112 | const char * fault_name) | |
| 113 | { | |
| 114 | 3 | NotificationProducerTestPortType_GetCurrentMessage_fault_t fault_type; |
| 115 | 3 | GlobusFuncName(GetCurrentMessage_lookup_fault_type); |
| 116 | 3 | NotificationProducerTestServiceDebugEnter(); |
| 117 | ||
| 118 | 3 | globus_assert(fault_name); |
| 119 | ||
| 120 | 3 | if(!strcmp(fault_name, "ResourceUnknownFault")) |
| 121 | { | |
| 122 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_GETCURRENTMESSAGE_RESOURCEUNKNOWNFAULT; |
| 123 | } | |
| 124 | 3 | else if(!strcmp(fault_name, "NoCurrentMessageOnTopicFault")) |
| 125 | { | |
| 126 | 1 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_GETCURRENTMESSAGE_NOCURRENTMESSAGEONTOPICFAULT; |
| 127 | } | |
| 128 | 2 | else if(!strcmp(fault_name, "InvalidTopicExpressionFault")) |
| 129 | { | |
| 130 | 1 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_GETCURRENTMESSAGE_INVALIDTOPICEXPRESSIONFAULT; |
| 131 | } | |
| 132 | 1 | else if(!strcmp(fault_name, "TopicNotSupportedFault")) |
| 133 | { | |
| 134 | 1 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_GETCURRENTMESSAGE_TOPICNOTSUPPORTEDFAULT; |
| 135 | } | |
| 136 | else | |
| 137 | { | |
| 138 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_GETCURRENTMESSAGE_UNKNOWN_FAULT; |
| 139 | } | |
| 140 | ||
| 141 | 3 | NotificationProducerTestServiceDebugExit(); |
| 142 | 3 | return fault_type; |
| 143 | } | |
| 144 | ||
| 145 | ||
| 146 | ||
| 147 | static | |
| 148 | void | |
| 149 | GetCurrentMessage_deserialize_callback( | |
| 150 | void * handle) | |
| 151 | 10 | { |
| 152 | 10 | GetCurrentMessage_callback_handle_t * callback_handle; |
| 153 | 10 | globus_result_t result = GLOBUS_SUCCESS; |
| 154 | 10 | struct globus_soap_message_fault_s soap_fault; |
| 155 | 10 | GetCurrentMessage_invoke_func_t invoke_function; |
| 156 | 10 | wsnt_GetCurrentMessageType * GetCurrentMessage = NULL; |
| 157 | 10 | GlobusFuncName(GetCurrentMessage_deserialize_callback); |
| 158 | 10 | NotificationProducerTestServiceDebugEnter(); |
| 159 | ||
| 160 | 10 | callback_handle = (GetCurrentMessage_callback_handle_t *) handle; |
| 161 | ||
| 162 | 10 | result = globus_operation_table_get_operation( |
| 163 | NotificationProducerTestService_descriptor.operations, | |
| 164 | "GetCurrentMessage", | |
| 165 | (void **)&invoke_function); | |
| 166 | 10 | if(result != GLOBUS_SUCCESS) |
| 167 | { | |
| 168 | 0 | goto exit; |
| 169 | } | |
| 170 | ||
| 171 | 10 | if(NotificationProducerTestService_descriptor.registry) |
| 172 | { | |
| 173 | 10 | globus_soap_message_handle_set_registry( |
| 174 | callback_handle->message, | |
| 175 | NotificationProducerTestService_descriptor.registry); | |
| 176 | } | |
| 177 | ||
| 178 | 10 | result = wsnt_GetCurrentMessageType_init( |
| 179 | &GetCurrentMessage); | |
| 180 | 10 | if(result != GLOBUS_SUCCESS) |
| 181 | { | |
| 182 | 0 | goto exit; |
| 183 | } | |
| 184 | ||
| 185 | 10 | result = wsnt_GetCurrentMessageType_deserialize( |
| 186 | &NotificationProducerTestPortType_GetCurrentMessage_input_qname, | |
| 187 | GetCurrentMessage, | |
| 188 | callback_handle->message, | |
| 189 | 0); | |
| 190 | 10 | if(result != GLOBUS_SUCCESS) |
| 191 | { | |
| 192 | 0 | goto exit; |
| 193 | } | |
| 194 | ||
| 195 | 10 | result = globus_soap_message_handle_set_attr( |
| 196 | callback_handle->message, | |
| 197 | "GetCurrentMessageOperationInputParameter", | |
| 198 | wsnt_GetCurrentMessageType_copy_wrapper, | |
| 199 | wsnt_GetCurrentMessageType_destroy_wrapper, | |
| 200 | (void *)GetCurrentMessage); | |
| 201 | 10 | if(result != GLOBUS_SUCCESS) |
| 202 | { | |
| 203 | 10 | goto exit; |
| 204 | } | |
| 205 | ||
| 206 | exit: | |
| 207 | ||
| 208 | 10 | if (GetCurrentMessage != NULL) |
| 209 | { | |
| 210 | 10 | wsnt_GetCurrentMessageType_destroy(GetCurrentMessage); |
| 211 | } | |
| 212 | 10 | callback_handle->callback( |
| 213 | result, | |
| 214 | callback_handle->args); | |
| 215 | ||
| 216 | 10 | free(callback_handle); |
| 217 | 10 | NotificationProducerTestServiceDebugExit(); |
| 218 | } | |
| 219 | ||
| 220 | static | |
| 221 | globus_result_t | |
| 222 | GetCurrentMessage_deserialize( | |
| 223 | globus_service_engine_t engine, | |
| 224 | globus_soap_message_handle_t message, | |
| 225 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 226 | void * args) | |
| 227 | 10 | { |
| 228 | 10 | GetCurrentMessage_callback_handle_t * callback_handle; |
| 229 | 10 | globus_result_t result = GLOBUS_SUCCESS; |
| 230 | 10 | GlobusFuncName(GetCurrentMessage_deserialize); |
| 231 | 10 | NotificationProducerTestServiceDebugEnter(); |
| 232 | ||
| 233 | 10 | callback_handle = malloc(sizeof(GetCurrentMessage_callback_handle_t)); |
| 234 | 10 | globus_assert_string(callback_handle, |
| 235 | "Memory allocation failed " | |
| 236 | "for GetCurrentMessage callback handle"); | |
| 237 | ||
| 238 | 10 | callback_handle->engine = engine; |
| 239 | 10 | callback_handle->message = message; |
| 240 | 10 | callback_handle->callback = invoke_callback; |
| 241 | 10 | callback_handle->args = args; |
| 242 | ||
| 243 | 10 | result = globus_callback_register_oneshot( |
| 244 | NULL, | |
| 245 | &globus_i_reltime_zero, | |
| 246 | GetCurrentMessage_deserialize_callback, | |
| 247 | callback_handle); | |
| 248 | ||
| 249 | 10 | NotificationProducerTestServiceDebugExit(); |
| 250 | 10 | return result; |
| 251 | } | |
| 252 | ||
| 253 | static | |
| 254 | void | |
| 255 | GetCurrentMessage_invoke_callback( | |
| 256 | void * handle) | |
| 257 | 10 | { |
| 258 | 10 | GetCurrentMessage_callback_handle_t * callback_handle; |
| 259 | 10 | globus_result_t result = GLOBUS_SUCCESS; |
| 260 | 10 | struct globus_soap_message_fault_s soap_fault; |
| 261 | 10 | GetCurrentMessage_invoke_func_t invoke_function; |
| 262 | 10 | wsnt_GetCurrentMessageType * GetCurrentMessage; |
| 263 | 10 | wsnt_GetCurrentMessageResponseType GetCurrentMessageResponse; |
| 264 | 10 | xsd_QName element_qname; |
| 265 | 10 | const char * fault_type_name = NULL; |
| 266 | 10 | NotificationProducerTestPortType_GetCurrentMessage_fault_t fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_GETCURRENTMESSAGE_NOFAULT; |
| 267 | 10 | void * fault = NULL; |
| 268 | ||
| 269 | 10 | GlobusFuncName(GetCurrentMessage_invoke_callback); |
| 270 | 10 | NotificationProducerTestServiceDebugEnter(); |
| 271 | ||
| 272 | 10 | callback_handle = (GetCurrentMessage_callback_handle_t *) handle; |
| 273 | ||
| 274 | 10 | GetCurrentMessage = globus_soap_message_handle_get_attr( |
| 275 | callback_handle->message, | |
| 276 | "GetCurrentMessageOperationInputParameter"); | |
| 277 | 10 | globus_assert(GetCurrentMessage); |
| 278 | ||
| 279 | 10 | result = globus_operation_table_get_operation( |
| 280 | NotificationProducerTestService_descriptor.operations, | |
| 281 | "GetCurrentMessage", | |
| 282 | (void **)&invoke_function); | |
| 283 | 10 | if(result != GLOBUS_SUCCESS) |
| 284 | { | |
| 285 | 0 | goto fault_exit; |
| 286 | } | |
| 287 | ||
| 288 | ||
| 289 | 10 | result = wsnt_GetCurrentMessageResponseType_init_contents( |
| 290 | &GetCurrentMessageResponse); | |
| 291 | 10 | if(result != GLOBUS_SUCCESS) |
| 292 | { | |
| 293 | 0 | goto fault_exit; |
| 294 | } | |
| 295 | ||
| 296 | 10 | result = invoke_function( |
| 297 | callback_handle->engine, | |
| 298 | callback_handle->message, | |
| 299 | &NotificationProducerTestService_descriptor, | |
| 300 | GetCurrentMessage, | |
| 301 | &GetCurrentMessageResponse, | |
| 302 | &fault_type_name, | |
| 303 | &fault); | |
| 304 | ||
| 305 | fault_exit: | |
| 306 | ||
| 307 | 10 | if(fault && fault_type_name) |
| 308 | { | |
| 309 | 3 | fault_type = GetCurrentMessage_lookup_fault_type(fault_type_name); |
| 310 | ||
| 311 | 3 | result = globus_service_session_begin_response( |
| 312 | callback_handle->message); | |
| 313 | 3 | if(result != GLOBUS_SUCCESS) |
| 314 | { | |
| 315 | 0 | goto exit; |
| 316 | } | |
| 317 | ||
| 318 | 3 | soap_fault.faultcode = "Server"; |
| 319 | 3 | soap_fault.faultstring = |
| 320 | "An error occurred while processing the message"; | |
| 321 | 3 | soap_fault.faultactor = NULL; |
| 322 | ||
| 323 | 3 | switch(fault_type) |
| 324 | { | |
| 325 | ||
| 326 | case NOTIFICATIONPRODUCERTESTPORTTYPE_GETCURRENTMESSAGE_RESOURCEUNKNOWNFAULT: | |
| 327 | ||
| 328 | 0 | xsd_any_init(&soap_fault.detail); |
| 329 | 0 | soap_fault.detail->any_info = &wsnt_ResourceUnknownFaultType_info; |
| 330 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 331 | 0 | soap_fault.detail->element->local = "ResourceUnknownFault"; |
| 332 | 0 | soap_fault.detail->element->Namespace = |
| 333 | "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"; | |
| 334 | 0 | soap_fault.detail->value = fault; |
| 335 | 0 | break; |
| 336 | ||
| 337 | case NOTIFICATIONPRODUCERTESTPORTTYPE_GETCURRENTMESSAGE_NOCURRENTMESSAGEONTOPICFAULT: | |
| 338 | ||
| 339 | 1 | xsd_any_init(&soap_fault.detail); |
| 340 | 1 | soap_fault.detail->any_info = &wsnt_NoCurrentMessageOnTopicFaultType_info; |
| 341 | 1 | xsd_QName_init(&soap_fault.detail->element); |
| 342 | 1 | soap_fault.detail->element->local = "NoCurrentMessageOnTopicFault"; |
| 343 | 1 | soap_fault.detail->element->Namespace = |
| 344 | "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"; | |
| 345 | 1 | soap_fault.detail->value = fault; |
| 346 | 1 | break; |
| 347 | ||
| 348 | case NOTIFICATIONPRODUCERTESTPORTTYPE_GETCURRENTMESSAGE_INVALIDTOPICEXPRESSIONFAULT: | |
| 349 | ||
| 350 | 1 | xsd_any_init(&soap_fault.detail); |
| 351 | 1 | soap_fault.detail->any_info = &wsnt_InvalidTopicExpressionFaultType_info; |
| 352 | 1 | xsd_QName_init(&soap_fault.detail->element); |
| 353 | 1 | soap_fault.detail->element->local = "InvalidTopicExpressionFault"; |
| 354 | 1 | soap_fault.detail->element->Namespace = |
| 355 | "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"; | |
| 356 | 1 | soap_fault.detail->value = fault; |
| 357 | 1 | break; |
| 358 | ||
| 359 | case NOTIFICATIONPRODUCERTESTPORTTYPE_GETCURRENTMESSAGE_TOPICNOTSUPPORTEDFAULT: | |
| 360 | ||
| 361 | 1 | xsd_any_init(&soap_fault.detail); |
| 362 | 1 | soap_fault.detail->any_info = &wsnt_TopicNotSupportedFaultType_info; |
| 363 | 1 | xsd_QName_init(&soap_fault.detail->element); |
| 364 | 1 | soap_fault.detail->element->local = "TopicNotSupportedFault"; |
| 365 | 1 | soap_fault.detail->element->Namespace = |
| 366 | "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"; | |
| 367 | 1 | soap_fault.detail->value = fault; |
| 368 | 1 | break; |
| 369 | ||
| 370 | default: | |
| 371 | 0 | result = NotificationProducerTestServiceErrorReturnedUnknownFault("GetCurrentMessage"); |
| 372 | 0 | goto exit; |
| 373 | } | |
| 374 | ||
| 375 | 3 | result = globus_service_session_serialize_fault_response( |
| 376 | callback_handle->message, &soap_fault); | |
| 377 | 3 | if(result != GLOBUS_SUCCESS) |
| 378 | { | |
| 379 | 0 | goto exit; |
| 380 | } | |
| 381 | ||
| 382 | 3 | soap_fault.detail->element->local = NULL; |
| 383 | 3 | soap_fault.detail->element->Namespace = NULL; |
| 384 | 3 | soap_fault.detail->any_info = NULL; |
| 385 | 3 | xsd_any_destroy(soap_fault.detail); |
| 386 | ||
| 387 | 3 | globus_soap_message_handle_set_attr( |
| 388 | callback_handle->message, | |
| 389 | WSADDR_ACTION_RESPONSE_KEY, | |
| 390 | globus_soap_message_attr_copy_string, | |
| 391 | globus_libc_free, | |
| 392 | WSADDRESSING_FAULT_NS); | |
| 393 | } | |
| 394 | 7 | else if(result != GLOBUS_SUCCESS) |
| 395 | { | |
| 396 | 0 | globus_result_t local_result; |
| 397 | 0 | local_result = globus_service_session_begin_response( |
| 398 | callback_handle->message); | |
| 399 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 400 | { | |
| 401 | 0 | result = local_result; |
| 402 | 0 | goto exit; |
| 403 | } | |
| 404 | ||
| 405 | 0 | soap_fault.faultcode = "Server"; |
| 406 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 407 | globus_error_get(result)); | |
| 408 | 0 | result = GLOBUS_SUCCESS; |
| 409 | 0 | soap_fault.faultactor = NULL; |
| 410 | 0 | soap_fault.detail = NULL; |
| 411 | 0 | result = globus_service_session_serialize_fault_response( |
| 412 | callback_handle->message, &soap_fault); | |
| 413 | 0 | if(result != GLOBUS_SUCCESS) |
| 414 | { | |
| 415 | 0 | goto exit; |
| 416 | } | |
| 417 | ||
| 418 | 0 | globus_soap_message_handle_set_attr( |
| 419 | callback_handle->message, | |
| 420 | WSADDR_ACTION_RESPONSE_KEY, | |
| 421 | globus_soap_message_attr_copy_string, | |
| 422 | globus_libc_free, | |
| 423 | WSADDRESSING_FAULT_NS); | |
| 424 | } | |
| 425 | else | |
| 426 | { | |
| 427 | 7 | result = globus_service_session_begin_response( |
| 428 | callback_handle->message); | |
| 429 | 7 | if(result != GLOBUS_SUCCESS) |
| 430 | { | |
| 431 | 0 | goto exit; |
| 432 | } | |
| 433 | ||
| 434 | 7 | element_qname.local = "GetCurrentMessageResponse"; |
| 435 | 7 | element_qname.Namespace = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"; |
| 436 | ||
| 437 | 7 | result = wsnt_GetCurrentMessageResponseType_serialize( |
| 438 | &element_qname, | |
| 439 | &GetCurrentMessageResponse, | |
| 440 | callback_handle->message, | |
| 441 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 442 | 7 | if(result != GLOBUS_SUCCESS) |
| 443 | { | |
| 444 | 0 | goto exit; |
| 445 | } | |
| 446 | ||
| 447 | 7 | result = globus_service_session_end_response( |
| 448 | callback_handle->message); | |
| 449 | 7 | if(result != GLOBUS_SUCCESS) |
| 450 | { | |
| 451 | 0 | goto exit; |
| 452 | } | |
| 453 | ||
| 454 | 7 | wsnt_GetCurrentMessageResponseType_destroy_contents( |
| 455 | &GetCurrentMessageResponse); | |
| 456 | ||
| 457 | 7 | globus_soap_message_handle_set_attr( |
| 458 | callback_handle->message, | |
| 459 | WSADDR_ACTION_RESPONSE_KEY, | |
| 460 | globus_soap_message_attr_copy_string, | |
| 461 | globus_libc_free, | |
| 462 | "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification/GetCurrentMessageResponse"); | |
| 463 | } | |
| 464 | ||
| 465 | exit: | |
| 466 | ||
| 467 | 10 | callback_handle->callback( |
| 468 | result, | |
| 469 | callback_handle->args); | |
| 470 | ||
| 471 | 10 | globus_libc_free(callback_handle); |
| 472 | ||
| 473 | 10 | NotificationProducerTestServiceDebugExit(); |
| 474 | } | |
| 475 | ||
| 476 | static | |
| 477 | globus_result_t | |
| 478 | GetCurrentMessage_invoke( | |
| 479 | globus_service_engine_t engine, | |
| 480 | globus_soap_message_handle_t message, | |
| 481 | globus_service_response_t * response, | |
| 482 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 483 | void * args) | |
| 484 | 10 | { |
| 485 | 10 | GetCurrentMessage_callback_handle_t * callback_handle; |
| 486 | 10 | globus_result_t result = GLOBUS_SUCCESS; |
| 487 | 10 | GlobusFuncName(NotificationProducerTestPortType_GetCurrentMessage); |
| 488 | 10 | NotificationProducerTestServiceDebugEnter(); |
| 489 | ||
| 490 | 10 | callback_handle = malloc(sizeof(GetCurrentMessage_callback_handle_t)); |
| 491 | 10 | if(!callback_handle) |
| 492 | { | |
| 493 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 494 | 0 | goto exit; |
| 495 | } | |
| 496 | 10 | callback_handle->engine = engine; |
| 497 | 10 | callback_handle->message = message; |
| 498 | 10 | callback_handle->callback = invoke_callback; |
| 499 | 10 | callback_handle->args = args; |
| 500 | ||
| 501 | 10 | result = globus_callback_register_oneshot( |
| 502 | NULL, | |
| 503 | &globus_i_reltime_zero, | |
| 504 | GetCurrentMessage_invoke_callback, | |
| 505 | callback_handle); | |
| 506 | ||
| 507 | exit: | |
| 508 | 10 | NotificationProducerTestServiceDebugExit(); |
| 509 | 10 | return result; |
| 510 | } | |
| 511 | ||
| 512 | ||
| 513 | static | |
| 514 | globus_result_t | |
| 515 | GetCurrentMessage_fault_to_type( | |
| 516 | const char * fault_type_name, | |
| 517 | int * fault_type, | |
| 518 | globus_xsd_type_info_t * fault_type_info) | |
| 519 | 0 | { |
| 520 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 521 | ||
| 522 | 0 | *fault_type_info = NULL; |
| 523 | ||
| 524 | 0 | *fault_type = GetCurrentMessage_lookup_fault_type(fault_type_name); |
| 525 | ||
| 526 | 0 | switch (*fault_type) |
| 527 | { | |
| 528 | case NOTIFICATIONPRODUCERTESTPORTTYPE_GETCURRENTMESSAGE_RESOURCEUNKNOWNFAULT: | |
| 529 | 0 | *fault_type_info = &wsnt_ResourceUnknownFaultType_info; |
| 530 | 0 | break; |
| 531 | ||
| 532 | case NOTIFICATIONPRODUCERTESTPORTTYPE_GETCURRENTMESSAGE_NOCURRENTMESSAGEONTOPICFAULT: | |
| 533 | 0 | *fault_type_info = &wsnt_NoCurrentMessageOnTopicFaultType_info; |
| 534 | 0 | break; |
| 535 | ||
| 536 | case NOTIFICATIONPRODUCERTESTPORTTYPE_GETCURRENTMESSAGE_INVALIDTOPICEXPRESSIONFAULT: | |
| 537 | 0 | *fault_type_info = &wsnt_InvalidTopicExpressionFaultType_info; |
| 538 | 0 | break; |
| 539 | ||
| 540 | case NOTIFICATIONPRODUCERTESTPORTTYPE_GETCURRENTMESSAGE_TOPICNOTSUPPORTEDFAULT: | |
| 541 | 0 | *fault_type_info = &wsnt_TopicNotSupportedFaultType_info; |
| 542 | 0 | break; |
| 543 | ||
| 544 | default: | |
| 545 | 0 | result = NotificationProducerTestServiceErrorReturnedUnknownFault("GetCurrentMessage"); |
| 546 | goto exit; | |
| 547 | } | |
| 548 | ||
| 549 | exit: | |
| 550 | 0 | return result; |
| 551 | } | |
| 552 | ||
| 553 | ||
| 554 | static | |
| 555 | globus_service_operation_descriptor_t | |
| 556 | GetCurrentMessage_operation_descriptor = | |
| 557 | { | |
| 558 | GetCurrentMessage_deserialize, | |
| 559 | GetCurrentMessage_invoke, | |
| 560 | ||
| 561 | GetCurrentMessage_fault_to_type | |
| 562 | ||
| 563 | }; | |
| 564 | ||
| 565 | static | |
| 566 | globus_operation_provider_descriptor_t GetCurrentMessage_descriptor = | |
| 567 | { | |
| 568 | &NotificationProducerTestPortType_GetCurrentMessage_op_qname, | |
| 569 | "GetCurrentMessage", | |
| 570 | (void *)NotificationProducerTestPortType_GetCurrentMessage_impl, | |
| 571 | NULL | |
| 572 | }; | |
| 573 | ||
| 574 | ||
| 575 | xsd_QName NotificationProducerTestPortType_Subscribe_op_qname = | |
| 576 | { | |
| 577 | "http://localhost:8080/wsrf/services/NotificationProducerTestService" | |
| 578 | "Subscribe" | |
| 579 | }; | |
| 580 | ||
| 581 | xsd_QName NotificationProducerTestPortType_Subscribe_input_qname = | |
| 582 | { | |
| 583 | "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd", | |
| 584 | "Subscribe" | |
| 585 | }; | |
| 586 | ||
| 587 | typedef globus_result_t (* Subscribe_invoke_func_t) ( | |
| 588 | globus_service_engine_t engine, | |
| 589 | globus_soap_message_handle_t message, | |
| 590 | globus_service_descriptor_t * descriptor, | |
| 591 | wsnt_SubscribeType * Subscribe, | |
| 592 | wsnt_SubscribeResponseType * SubscribeResponse, | |
| 593 | const char ** fault_type_name, | |
| 594 | void ** fault); | |
| 595 | ||
| 596 | typedef struct Subscribe_callback_handle_s | |
| 597 | { | |
| 598 | globus_service_engine_t engine; | |
| 599 | globus_soap_message_handle_t message; | |
| 600 | globus_operation_invoke_callback_func_t callback; | |
| 601 | void * args; | |
| 602 | } Subscribe_callback_handle_t; | |
| 603 | ||
| 604 | ||
| 605 | const char * NotificationProducerTestPortType_Subscribe_fault_strings[NOTIFICATIONPRODUCERTESTPORTTYPE_SUBSCRIBE_TOPICNOTSUPPORTEDFAULT] = | |
| 606 | { | |
| 607 | "Unknown", | |
| 608 | "TopicPathDialectUnknownFault", | |
| 609 | "ResourceUnknownFault", | |
| 610 | "SubscribeCreationFailedFault", | |
| 611 | "InvalidTopicExpressionFault", | |
| 612 | "TopicNotSupportedFault" | |
| 613 | }; | |
| 614 | ||
| 615 | static | |
| 616 | NotificationProducerTestPortType_Subscribe_fault_t | |
| 617 | Subscribe_lookup_fault_type( | |
| 618 | const char * fault_name) | |
| 619 | 2 | { |
| 620 | 2 | NotificationProducerTestPortType_Subscribe_fault_t fault_type; |
| 621 | 2 | GlobusFuncName(Subscribe_lookup_fault_type); |
| 622 | 2 | NotificationProducerTestServiceDebugEnter(); |
| 623 | ||
| 624 | 2 | globus_assert(fault_name); |
| 625 | ||
| 626 | 2 | if(!strcmp(fault_name, "TopicPathDialectUnknownFault")) |
| 627 | { | |
| 628 | 1 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_SUBSCRIBE_TOPICPATHDIALECTUNKNOWNFAULT; |
| 629 | } | |
| 630 | 1 | else if(!strcmp(fault_name, "ResourceUnknownFault")) |
| 631 | { | |
| 632 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_SUBSCRIBE_RESOURCEUNKNOWNFAULT; |
| 633 | } | |
| 634 | 1 | else if(!strcmp(fault_name, "SubscribeCreationFailedFault")) |
| 635 | { | |
| 636 | 1 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_SUBSCRIBE_SUBSCRIBECREATIONFAILEDFAULT; |
| 637 | } | |
| 638 | 0 | else if(!strcmp(fault_name, "InvalidTopicExpressionFault")) |
| 639 | { | |
| 640 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_SUBSCRIBE_INVALIDTOPICEXPRESSIONFAULT; |
| 641 | } | |
| 642 | 0 | else if(!strcmp(fault_name, "TopicNotSupportedFault")) |
| 643 | { | |
| 644 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_SUBSCRIBE_TOPICNOTSUPPORTEDFAULT; |
| 645 | } | |
| 646 | else | |
| 647 | { | |
| 648 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_SUBSCRIBE_UNKNOWN_FAULT; |
| 649 | } | |
| 650 | ||
| 651 | 2 | NotificationProducerTestServiceDebugExit(); |
| 652 | 2 | return fault_type; |
| 653 | } | |
| 654 | ||
| 655 | ||
| 656 | ||
| 657 | static | |
| 658 | void | |
| 659 | Subscribe_deserialize_callback( | |
| 660 | void * handle) | |
| 661 | 8 | { |
| 662 | 8 | Subscribe_callback_handle_t * callback_handle; |
| 663 | 8 | globus_result_t result = GLOBUS_SUCCESS; |
| 664 | 8 | struct globus_soap_message_fault_s soap_fault; |
| 665 | 8 | Subscribe_invoke_func_t invoke_function; |
| 666 | 8 | wsnt_SubscribeType * Subscribe = NULL; |
| 667 | 8 | GlobusFuncName(Subscribe_deserialize_callback); |
| 668 | 8 | NotificationProducerTestServiceDebugEnter(); |
| 669 | ||
| 670 | 8 | callback_handle = (Subscribe_callback_handle_t *) handle; |
| 671 | ||
| 672 | 8 | result = globus_operation_table_get_operation( |
| 673 | NotificationProducerTestService_descriptor.operations, | |
| 674 | "Subscribe", | |
| 675 | (void **)&invoke_function); | |
| 676 | 8 | if(result != GLOBUS_SUCCESS) |
| 677 | { | |
| 678 | 0 | goto exit; |
| 679 | } | |
| 680 | ||
| 681 | 8 | if(NotificationProducerTestService_descriptor.registry) |
| 682 | { | |
| 683 | 8 | globus_soap_message_handle_set_registry( |
| 684 | callback_handle->message, | |
| 685 | NotificationProducerTestService_descriptor.registry); | |
| 686 | } | |
| 687 | ||
| 688 | 8 | result = wsnt_SubscribeType_init( |
| 689 | &Subscribe); | |
| 690 | 8 | if(result != GLOBUS_SUCCESS) |
| 691 | { | |
| 692 | 0 | goto exit; |
| 693 | } | |
| 694 | ||
| 695 | 8 | result = wsnt_SubscribeType_deserialize( |
| 696 | &NotificationProducerTestPortType_Subscribe_input_qname, | |
| 697 | Subscribe, | |
| 698 | callback_handle->message, | |
| 699 | 0); | |
| 700 | 8 | if(result != GLOBUS_SUCCESS) |
| 701 | { | |
| 702 | 0 | goto exit; |
| 703 | } | |
| 704 | ||
| 705 | 8 | result = globus_soap_message_handle_set_attr( |
| 706 | callback_handle->message, | |
| 707 | "SubscribeOperationInputParameter", | |
| 708 | wsnt_SubscribeType_copy_wrapper, | |
| 709 | wsnt_SubscribeType_destroy_wrapper, | |
| 710 | (void *)Subscribe); | |
| 711 | 8 | if(result != GLOBUS_SUCCESS) |
| 712 | { | |
| 713 | 8 | goto exit; |
| 714 | } | |
| 715 | ||
| 716 | exit: | |
| 717 | ||
| 718 | 8 | if (Subscribe != NULL) |
| 719 | { | |
| 720 | 8 | wsnt_SubscribeType_destroy(Subscribe); |
| 721 | } | |
| 722 | 8 | callback_handle->callback( |
| 723 | result, | |
| 724 | callback_handle->args); | |
| 725 | ||
| 726 | 8 | free(callback_handle); |
| 727 | 8 | NotificationProducerTestServiceDebugExit(); |
| 728 | } | |
| 729 | ||
| 730 | static | |
| 731 | globus_result_t | |
| 732 | Subscribe_deserialize( | |
| 733 | globus_service_engine_t engine, | |
| 734 | globus_soap_message_handle_t message, | |
| 735 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 736 | void * args) | |
| 737 | 8 | { |
| 738 | 8 | Subscribe_callback_handle_t * callback_handle; |
| 739 | 8 | globus_result_t result = GLOBUS_SUCCESS; |
| 740 | 8 | GlobusFuncName(Subscribe_deserialize); |
| 741 | 8 | NotificationProducerTestServiceDebugEnter(); |
| 742 | ||
| 743 | 8 | callback_handle = malloc(sizeof(Subscribe_callback_handle_t)); |
| 744 | 8 | globus_assert_string(callback_handle, |
| 745 | "Memory allocation failed " | |
| 746 | "for Subscribe callback handle"); | |
| 747 | ||
| 748 | 8 | callback_handle->engine = engine; |
| 749 | 8 | callback_handle->message = message; |
| 750 | 8 | callback_handle->callback = invoke_callback; |
| 751 | 8 | callback_handle->args = args; |
| 752 | ||
| 753 | 8 | result = globus_callback_register_oneshot( |
| 754 | NULL, | |
| 755 | &globus_i_reltime_zero, | |
| 756 | Subscribe_deserialize_callback, | |
| 757 | callback_handle); | |
| 758 | ||
| 759 | 8 | NotificationProducerTestServiceDebugExit(); |
| 760 | 8 | return result; |
| 761 | } | |
| 762 | ||
| 763 | static | |
| 764 | void | |
| 765 | Subscribe_invoke_callback( | |
| 766 | void * handle) | |
| 767 | 8 | { |
| 768 | 8 | Subscribe_callback_handle_t * callback_handle; |
| 769 | 8 | globus_result_t result = GLOBUS_SUCCESS; |
| 770 | 8 | struct globus_soap_message_fault_s soap_fault; |
| 771 | 8 | Subscribe_invoke_func_t invoke_function; |
| 772 | 8 | wsnt_SubscribeType * Subscribe; |
| 773 | 8 | wsnt_SubscribeResponseType SubscribeResponse; |
| 774 | 8 | xsd_QName element_qname; |
| 775 | 8 | const char * fault_type_name = NULL; |
| 776 | 8 | NotificationProducerTestPortType_Subscribe_fault_t fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_SUBSCRIBE_NOFAULT; |
| 777 | 8 | void * fault = NULL; |
| 778 | ||
| 779 | 8 | GlobusFuncName(Subscribe_invoke_callback); |
| 780 | 8 | NotificationProducerTestServiceDebugEnter(); |
| 781 | ||
| 782 | 8 | callback_handle = (Subscribe_callback_handle_t *) handle; |
| 783 | ||
| 784 | 8 | Subscribe = globus_soap_message_handle_get_attr( |
| 785 | callback_handle->message, | |
| 786 | "SubscribeOperationInputParameter"); | |
| 787 | 8 | globus_assert(Subscribe); |
| 788 | ||
| 789 | 8 | result = globus_operation_table_get_operation( |
| 790 | NotificationProducerTestService_descriptor.operations, | |
| 791 | "Subscribe", | |
| 792 | (void **)&invoke_function); | |
| 793 | 8 | if(result != GLOBUS_SUCCESS) |
| 794 | { | |
| 795 | 0 | goto fault_exit; |
| 796 | } | |
| 797 | ||
| 798 | ||
| 799 | 8 | result = wsnt_SubscribeResponseType_init_contents( |
| 800 | &SubscribeResponse); | |
| 801 | 8 | if(result != GLOBUS_SUCCESS) |
| 802 | { | |
| 803 | 0 | goto fault_exit; |
| 804 | } | |
| 805 | ||
| 806 | 8 | result = invoke_function( |
| 807 | callback_handle->engine, | |
| 808 | callback_handle->message, | |
| 809 | &NotificationProducerTestService_descriptor, | |
| 810 | Subscribe, | |
| 811 | &SubscribeResponse, | |
| 812 | &fault_type_name, | |
| 813 | &fault); | |
| 814 | ||
| 815 | fault_exit: | |
| 816 | ||
| 817 | 8 | if(fault && fault_type_name) |
| 818 | { | |
| 819 | 2 | fault_type = Subscribe_lookup_fault_type(fault_type_name); |
| 820 | ||
| 821 | 2 | result = globus_service_session_begin_response( |
| 822 | callback_handle->message); | |
| 823 | 2 | if(result != GLOBUS_SUCCESS) |
| 824 | { | |
| 825 | 0 | goto exit; |
| 826 | } | |
| 827 | ||
| 828 | 2 | soap_fault.faultcode = "Server"; |
| 829 | 2 | soap_fault.faultstring = |
| 830 | "An error occurred while processing the message"; | |
| 831 | 2 | soap_fault.faultactor = NULL; |
| 832 | ||
| 833 | 2 | switch(fault_type) |
| 834 | { | |
| 835 | ||
| 836 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SUBSCRIBE_TOPICPATHDIALECTUNKNOWNFAULT: | |
| 837 | ||
| 838 | 1 | xsd_any_init(&soap_fault.detail); |
| 839 | 1 | soap_fault.detail->any_info = &wsnt_TopicPathDialectUnknownFaultType_info; |
| 840 | 1 | xsd_QName_init(&soap_fault.detail->element); |
| 841 | 1 | soap_fault.detail->element->local = "TopicPathDialectUnknownFault"; |
| 842 | 1 | soap_fault.detail->element->Namespace = |
| 843 | "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"; | |
| 844 | 1 | soap_fault.detail->value = fault; |
| 845 | 1 | break; |
| 846 | ||
| 847 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SUBSCRIBE_RESOURCEUNKNOWNFAULT: | |
| 848 | ||
| 849 | 0 | xsd_any_init(&soap_fault.detail); |
| 850 | 0 | soap_fault.detail->any_info = &wsnt_ResourceUnknownFaultType_info; |
| 851 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 852 | 0 | soap_fault.detail->element->local = "ResourceUnknownFault"; |
| 853 | 0 | soap_fault.detail->element->Namespace = |
| 854 | "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"; | |
| 855 | 0 | soap_fault.detail->value = fault; |
| 856 | 0 | break; |
| 857 | ||
| 858 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SUBSCRIBE_SUBSCRIBECREATIONFAILEDFAULT: | |
| 859 | ||
| 860 | 1 | xsd_any_init(&soap_fault.detail); |
| 861 | 1 | soap_fault.detail->any_info = &wsnt_SubscribeCreationFailedFaultType_info; |
| 862 | 1 | xsd_QName_init(&soap_fault.detail->element); |
| 863 | 1 | soap_fault.detail->element->local = "SubscribeCreationFailedFault"; |
| 864 | 1 | soap_fault.detail->element->Namespace = |
| 865 | "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"; | |
| 866 | 1 | soap_fault.detail->value = fault; |
| 867 | 1 | break; |
| 868 | ||
| 869 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SUBSCRIBE_INVALIDTOPICEXPRESSIONFAULT: | |
| 870 | ||
| 871 | 0 | xsd_any_init(&soap_fault.detail); |
| 872 | 0 | soap_fault.detail->any_info = &wsnt_InvalidTopicExpressionFaultType_info; |
| 873 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 874 | 0 | soap_fault.detail->element->local = "InvalidTopicExpressionFault"; |
| 875 | 0 | soap_fault.detail->element->Namespace = |
| 876 | "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"; | |
| 877 | 0 | soap_fault.detail->value = fault; |
| 878 | 0 | break; |
| 879 | ||
| 880 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SUBSCRIBE_TOPICNOTSUPPORTEDFAULT: | |
| 881 | ||
| 882 | 0 | xsd_any_init(&soap_fault.detail); |
| 883 | 0 | soap_fault.detail->any_info = &wsnt_TopicNotSupportedFaultType_info; |
| 884 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 885 | 0 | soap_fault.detail->element->local = "TopicNotSupportedFault"; |
| 886 | 0 | soap_fault.detail->element->Namespace = |
| 887 | "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"; | |
| 888 | 0 | soap_fault.detail->value = fault; |
| 889 | 0 | break; |
| 890 | ||
| 891 | default: | |
| 892 | 0 | result = NotificationProducerTestServiceErrorReturnedUnknownFault("Subscribe"); |
| 893 | 0 | goto exit; |
| 894 | } | |
| 895 | ||
| 896 | 2 | result = globus_service_session_serialize_fault_response( |
| 897 | callback_handle->message, &soap_fault); | |
| 898 | 2 | if(result != GLOBUS_SUCCESS) |
| 899 | { | |
| 900 | 0 | goto exit; |
| 901 | } | |
| 902 | ||
| 903 | 2 | soap_fault.detail->element->local = NULL; |
| 904 | 2 | soap_fault.detail->element->Namespace = NULL; |
| 905 | 2 | soap_fault.detail->any_info = NULL; |
| 906 | 2 | xsd_any_destroy(soap_fault.detail); |
| 907 | ||
| 908 | 2 | globus_soap_message_handle_set_attr( |
| 909 | callback_handle->message, | |
| 910 | WSADDR_ACTION_RESPONSE_KEY, | |
| 911 | globus_soap_message_attr_copy_string, | |
| 912 | globus_libc_free, | |
| 913 | WSADDRESSING_FAULT_NS); | |
| 914 | } | |
| 915 | 6 | else if(result != GLOBUS_SUCCESS) |
| 916 | { | |
| 917 | 0 | globus_result_t local_result; |
| 918 | 0 | local_result = globus_service_session_begin_response( |
| 919 | callback_handle->message); | |
| 920 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 921 | { | |
| 922 | 0 | result = local_result; |
| 923 | 0 | goto exit; |
| 924 | } | |
| 925 | ||
| 926 | 0 | soap_fault.faultcode = "Server"; |
| 927 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 928 | globus_error_get(result)); | |
| 929 | 0 | result = GLOBUS_SUCCESS; |
| 930 | 0 | soap_fault.faultactor = NULL; |
| 931 | 0 | soap_fault.detail = NULL; |
| 932 | 0 | result = globus_service_session_serialize_fault_response( |
| 933 | callback_handle->message, &soap_fault); | |
| 934 | 0 | if(result != GLOBUS_SUCCESS) |
| 935 | { | |
| 936 | 0 | goto exit; |
| 937 | } | |
| 938 | ||
| 939 | 0 | globus_soap_message_handle_set_attr( |
| 940 | callback_handle->message, | |
| 941 | WSADDR_ACTION_RESPONSE_KEY, | |
| 942 | globus_soap_message_attr_copy_string, | |
| 943 | globus_libc_free, | |
| 944 | WSADDRESSING_FAULT_NS); | |
| 945 | } | |
| 946 | else | |
| 947 | { | |
| 948 | 6 | result = globus_service_session_begin_response( |
| 949 | callback_handle->message); | |
| 950 | 6 | if(result != GLOBUS_SUCCESS) |
| 951 | { | |
| 952 | 0 | goto exit; |
| 953 | } | |
| 954 | ||
| 955 | 6 | element_qname.local = "SubscribeResponse"; |
| 956 | 6 | element_qname.Namespace = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"; |
| 957 | ||
| 958 | 6 | result = wsnt_SubscribeResponseType_serialize( |
| 959 | &element_qname, | |
| 960 | &SubscribeResponse, | |
| 961 | callback_handle->message, | |
| 962 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 963 | 6 | if(result != GLOBUS_SUCCESS) |
| 964 | { | |
| 965 | 0 | goto exit; |
| 966 | } | |
| 967 | ||
| 968 | 6 | result = globus_service_session_end_response( |
| 969 | callback_handle->message); | |
| 970 | 6 | if(result != GLOBUS_SUCCESS) |
| 971 | { | |
| 972 | 0 | goto exit; |
| 973 | } | |
| 974 | ||
| 975 | 6 | wsnt_SubscribeResponseType_destroy_contents( |
| 976 | &SubscribeResponse); | |
| 977 | ||
| 978 | 6 | globus_soap_message_handle_set_attr( |
| 979 | callback_handle->message, | |
| 980 | WSADDR_ACTION_RESPONSE_KEY, | |
| 981 | globus_soap_message_attr_copy_string, | |
| 982 | globus_libc_free, | |
| 983 | "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification/SubscribeResponse"); | |
| 984 | } | |
| 985 | ||
| 986 | exit: | |
| 987 | ||
| 988 | 8 | callback_handle->callback( |
| 989 | result, | |
| 990 | callback_handle->args); | |
| 991 | ||
| 992 | 8 | globus_libc_free(callback_handle); |
| 993 | ||
| 994 | 8 | NotificationProducerTestServiceDebugExit(); |
| 995 | } | |
| 996 | ||
| 997 | static | |
| 998 | globus_result_t | |
| 999 | Subscribe_invoke( | |
| 1000 | globus_service_engine_t engine, | |
| 1001 | globus_soap_message_handle_t message, | |
| 1002 | globus_service_response_t * response, | |
| 1003 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 1004 | void * args) | |
| 1005 | 8 | { |
| 1006 | 8 | Subscribe_callback_handle_t * callback_handle; |
| 1007 | 8 | globus_result_t result = GLOBUS_SUCCESS; |
| 1008 | 8 | GlobusFuncName(NotificationProducerTestPortType_Subscribe); |
| 1009 | 8 | NotificationProducerTestServiceDebugEnter(); |
| 1010 | ||
| 1011 | 8 | callback_handle = malloc(sizeof(Subscribe_callback_handle_t)); |
| 1012 | 8 | if(!callback_handle) |
| 1013 | { | |
| 1014 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 1015 | 0 | goto exit; |
| 1016 | } | |
| 1017 | 8 | callback_handle->engine = engine; |
| 1018 | 8 | callback_handle->message = message; |
| 1019 | 8 | callback_handle->callback = invoke_callback; |
| 1020 | 8 | callback_handle->args = args; |
| 1021 | ||
| 1022 | 8 | result = globus_callback_register_oneshot( |
| 1023 | NULL, | |
| 1024 | &globus_i_reltime_zero, | |
| 1025 | Subscribe_invoke_callback, | |
| 1026 | callback_handle); | |
| 1027 | ||
| 1028 | exit: | |
| 1029 | 8 | NotificationProducerTestServiceDebugExit(); |
| 1030 | 8 | return result; |
| 1031 | } | |
| 1032 | ||
| 1033 | ||
| 1034 | static | |
| 1035 | globus_result_t | |
| 1036 | Subscribe_fault_to_type( | |
| 1037 | const char * fault_type_name, | |
| 1038 | int * fault_type, | |
| 1039 | globus_xsd_type_info_t * fault_type_info) | |
| 1040 | 0 | { |
| 1041 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 1042 | ||
| 1043 | 0 | *fault_type_info = NULL; |
| 1044 | ||
| 1045 | 0 | *fault_type = Subscribe_lookup_fault_type(fault_type_name); |
| 1046 | ||
| 1047 | 0 | switch (*fault_type) |
| 1048 | { | |
| 1049 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SUBSCRIBE_TOPICPATHDIALECTUNKNOWNFAULT: | |
| 1050 | 0 | *fault_type_info = &wsnt_TopicPathDialectUnknownFaultType_info; |
| 1051 | 0 | break; |
| 1052 | ||
| 1053 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SUBSCRIBE_RESOURCEUNKNOWNFAULT: | |
| 1054 | 0 | *fault_type_info = &wsnt_ResourceUnknownFaultType_info; |
| 1055 | 0 | break; |
| 1056 | ||
| 1057 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SUBSCRIBE_SUBSCRIBECREATIONFAILEDFAULT: | |
| 1058 | 0 | *fault_type_info = &wsnt_SubscribeCreationFailedFaultType_info; |
| 1059 | 0 | break; |
| 1060 | ||
| 1061 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SUBSCRIBE_INVALIDTOPICEXPRESSIONFAULT: | |
| 1062 | 0 | *fault_type_info = &wsnt_InvalidTopicExpressionFaultType_info; |
| 1063 | 0 | break; |
| 1064 | ||
| 1065 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SUBSCRIBE_TOPICNOTSUPPORTEDFAULT: | |
| 1066 | 0 | *fault_type_info = &wsnt_TopicNotSupportedFaultType_info; |
| 1067 | 0 | break; |
| 1068 | ||
| 1069 | default: | |
| 1070 | 0 | result = NotificationProducerTestServiceErrorReturnedUnknownFault("Subscribe"); |
| 1071 | goto exit; | |
| 1072 | } | |
| 1073 | ||
| 1074 | exit: | |
| 1075 | 0 | return result; |
| 1076 | } | |
| 1077 | ||
| 1078 | ||
| 1079 | static | |
| 1080 | globus_service_operation_descriptor_t | |
| 1081 | Subscribe_operation_descriptor = | |
| 1082 | { | |
| 1083 | Subscribe_deserialize, | |
| 1084 | Subscribe_invoke, | |
| 1085 | ||
| 1086 | Subscribe_fault_to_type | |
| 1087 | ||
| 1088 | }; | |
| 1089 | ||
| 1090 | static | |
| 1091 | globus_operation_provider_descriptor_t Subscribe_descriptor = | |
| 1092 | { | |
| 1093 | &NotificationProducerTestPortType_Subscribe_op_qname, | |
| 1094 | "Subscribe", | |
| 1095 | (void *)NotificationProducerTestPortType_Subscribe_impl, | |
| 1096 | NULL | |
| 1097 | }; | |
| 1098 | ||
| 1099 | ||
| 1100 | xsd_QName NotificationProducerTestPortType_GetResourceProperty_op_qname = | |
| 1101 | { | |
| 1102 | "http://localhost:8080/wsrf/services/NotificationProducerTestService" | |
| 1103 | "GetResourceProperty" | |
| 1104 | }; | |
| 1105 | ||
| 1106 | xsd_QName NotificationProducerTestPortType_GetResourceProperty_input_qname = | |
| 1107 | { | |
| 1108 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd", | |
| 1109 | "GetResourceProperty" | |
| 1110 | }; | |
| 1111 | ||
| 1112 | typedef globus_result_t (* GetResourceProperty_invoke_func_t) ( | |
| 1113 | globus_service_engine_t engine, | |
| 1114 | globus_soap_message_handle_t message, | |
| 1115 | globus_service_descriptor_t * descriptor, | |
| 1116 | xsd_QName * GetResourceProperty, | |
| 1117 | wsrp_GetResourcePropertyResponseType * GetResourcePropertyResponse, | |
| 1118 | const char ** fault_type_name, | |
| 1119 | void ** fault); | |
| 1120 | ||
| 1121 | typedef struct GetResourceProperty_callback_handle_s | |
| 1122 | { | |
| 1123 | globus_service_engine_t engine; | |
| 1124 | globus_soap_message_handle_t message; | |
| 1125 | globus_operation_invoke_callback_func_t callback; | |
| 1126 | void * args; | |
| 1127 | } GetResourceProperty_callback_handle_t; | |
| 1128 | ||
| 1129 | ||
| 1130 | const char * NotificationProducerTestPortType_GetResourceProperty_fault_strings[NOTIFICATIONPRODUCERTESTPORTTYPE_GETRESOURCEPROPERTY_INVALIDRESOURCEPROPERTYQNAMEFAULT] = | |
| 1131 | { | |
| 1132 | "Unknown", | |
| 1133 | "ResourceUnknownFault", | |
| 1134 | "InvalidResourcePropertyQNameFault" | |
| 1135 | }; | |
| 1136 | ||
| 1137 | static | |
| 1138 | NotificationProducerTestPortType_GetResourceProperty_fault_t | |
| 1139 | GetResourceProperty_lookup_fault_type( | |
| 1140 | const char * fault_name) | |
| 1141 | 0 | { |
| 1142 | 0 | NotificationProducerTestPortType_GetResourceProperty_fault_t fault_type; |
| 1143 | 0 | GlobusFuncName(GetResourceProperty_lookup_fault_type); |
| 1144 | 0 | NotificationProducerTestServiceDebugEnter(); |
| 1145 | ||
| 1146 | 0 | globus_assert(fault_name); |
| 1147 | ||
| 1148 | 0 | if(!strcmp(fault_name, "ResourceUnknownFault")) |
| 1149 | { | |
| 1150 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_GETRESOURCEPROPERTY_RESOURCEUNKNOWNFAULT; |
| 1151 | } | |
| 1152 | 0 | else if(!strcmp(fault_name, "InvalidResourcePropertyQNameFault")) |
| 1153 | { | |
| 1154 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_GETRESOURCEPROPERTY_INVALIDRESOURCEPROPERTYQNAMEFAULT; |
| 1155 | } | |
| 1156 | else | |
| 1157 | { | |
| 1158 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_GETRESOURCEPROPERTY_UNKNOWN_FAULT; |
| 1159 | } | |
| 1160 | ||
| 1161 | 0 | NotificationProducerTestServiceDebugExit(); |
| 1162 | 0 | return fault_type; |
| 1163 | } | |
| 1164 | ||
| 1165 | ||
| 1166 | ||
| 1167 | static | |
| 1168 | void | |
| 1169 | GetResourceProperty_deserialize_callback( | |
| 1170 | void * handle) | |
| 1171 | 12 | { |
| 1172 | 12 | GetResourceProperty_callback_handle_t * callback_handle; |
| 1173 | 12 | globus_result_t result = GLOBUS_SUCCESS; |
| 1174 | 12 | struct globus_soap_message_fault_s soap_fault; |
| 1175 | 12 | GetResourceProperty_invoke_func_t invoke_function; |
| 1176 | 12 | xsd_QName * GetResourceProperty = NULL; |
| 1177 | 12 | GlobusFuncName(GetResourceProperty_deserialize_callback); |
| 1178 | 12 | NotificationProducerTestServiceDebugEnter(); |
| 1179 | ||
| 1180 | 12 | callback_handle = (GetResourceProperty_callback_handle_t *) handle; |
| 1181 | ||
| 1182 | 12 | result = globus_operation_table_get_operation( |
| 1183 | NotificationProducerTestService_descriptor.operations, | |
| 1184 | "GetResourceProperty", | |
| 1185 | (void **)&invoke_function); | |
| 1186 | 12 | if(result != GLOBUS_SUCCESS) |
| 1187 | { | |
| 1188 | 0 | goto exit; |
| 1189 | } | |
| 1190 | ||
| 1191 | 12 | if(NotificationProducerTestService_descriptor.registry) |
| 1192 | { | |
| 1193 | 12 | globus_soap_message_handle_set_registry( |
| 1194 | callback_handle->message, | |
| 1195 | NotificationProducerTestService_descriptor.registry); | |
| 1196 | } | |
| 1197 | ||
| 1198 | 12 | result = xsd_QName_init( |
| 1199 | &GetResourceProperty); | |
| 1200 | 12 | if(result != GLOBUS_SUCCESS) |
| 1201 | { | |
| 1202 | 0 | goto exit; |
| 1203 | } | |
| 1204 | ||
| 1205 | 12 | result = xsd_QName_deserialize( |
| 1206 | &NotificationProducerTestPortType_GetResourceProperty_input_qname, | |
| 1207 | GetResourceProperty, | |
| 1208 | callback_handle->message, | |
| 1209 | 0); | |
| 1210 | 12 | if(result != GLOBUS_SUCCESS) |
| 1211 | { | |
| 1212 | 0 | goto exit; |
| 1213 | } | |
| 1214 | ||
| 1215 | 12 | result = globus_soap_message_handle_set_attr( |
| 1216 | callback_handle->message, | |
| 1217 | "GetResourcePropertyOperationInputParameter", | |
| 1218 | xsd_QName_copy_wrapper, | |
| 1219 | xsd_QName_destroy_wrapper, | |
| 1220 | (void *)GetResourceProperty); | |
| 1221 | 12 | if(result != GLOBUS_SUCCESS) |
| 1222 | { | |
| 1223 | 12 | goto exit; |
| 1224 | } | |
| 1225 | ||
| 1226 | exit: | |
| 1227 | ||
| 1228 | 12 | if (GetResourceProperty != NULL) |
| 1229 | { | |
| 1230 | 12 | xsd_QName_destroy(GetResourceProperty); |
| 1231 | } | |
| 1232 | 12 | callback_handle->callback( |
| 1233 | result, | |
| 1234 | callback_handle->args); | |
| 1235 | ||
| 1236 | 12 | free(callback_handle); |
| 1237 | 12 | NotificationProducerTestServiceDebugExit(); |
| 1238 | } | |
| 1239 | ||
| 1240 | static | |
| 1241 | globus_result_t | |
| 1242 | GetResourceProperty_deserialize( | |
| 1243 | globus_service_engine_t engine, | |
| 1244 | globus_soap_message_handle_t message, | |
| 1245 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 1246 | void * args) | |
| 1247 | 12 | { |
| 1248 | 12 | GetResourceProperty_callback_handle_t * callback_handle; |
| 1249 | 12 | globus_result_t result = GLOBUS_SUCCESS; |
| 1250 | 12 | GlobusFuncName(GetResourceProperty_deserialize); |
| 1251 | 12 | NotificationProducerTestServiceDebugEnter(); |
| 1252 | ||
| 1253 | 12 | callback_handle = malloc(sizeof(GetResourceProperty_callback_handle_t)); |
| 1254 | 12 | globus_assert_string(callback_handle, |
| 1255 | "Memory allocation failed " | |
| 1256 | "for GetResourceProperty callback handle"); | |
| 1257 | ||
| 1258 | 12 | callback_handle->engine = engine; |
| 1259 | 12 | callback_handle->message = message; |
| 1260 | 12 | callback_handle->callback = invoke_callback; |
| 1261 | 12 | callback_handle->args = args; |
| 1262 | ||
| 1263 | 12 | result = globus_callback_register_oneshot( |
| 1264 | NULL, | |
| 1265 | &globus_i_reltime_zero, | |
| 1266 | GetResourceProperty_deserialize_callback, | |
| 1267 | callback_handle); | |
| 1268 | ||
| 1269 | 12 | NotificationProducerTestServiceDebugExit(); |
| 1270 | 12 | return result; |
| 1271 | } | |
| 1272 | ||
| 1273 | static | |
| 1274 | void | |
| 1275 | GetResourceProperty_invoke_callback( | |
| 1276 | void * handle) | |
| 1277 | 12 | { |
| 1278 | 12 | GetResourceProperty_callback_handle_t * callback_handle; |
| 1279 | 12 | globus_result_t result = GLOBUS_SUCCESS; |
| 1280 | 12 | struct globus_soap_message_fault_s soap_fault; |
| 1281 | 12 | GetResourceProperty_invoke_func_t invoke_function; |
| 1282 | 12 | xsd_QName * GetResourceProperty; |
| 1283 | 12 | wsrp_GetResourcePropertyResponseType GetResourcePropertyResponse; |
| 1284 | 12 | xsd_QName element_qname; |
| 1285 | 12 | const char * fault_type_name = NULL; |
| 1286 | 12 | NotificationProducerTestPortType_GetResourceProperty_fault_t fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_GETRESOURCEPROPERTY_NOFAULT; |
| 1287 | 12 | void * fault = NULL; |
| 1288 | ||
| 1289 | 12 | GlobusFuncName(GetResourceProperty_invoke_callback); |
| 1290 | 12 | NotificationProducerTestServiceDebugEnter(); |
| 1291 | ||
| 1292 | 12 | callback_handle = (GetResourceProperty_callback_handle_t *) handle; |
| 1293 | ||
| 1294 | 12 | GetResourceProperty = globus_soap_message_handle_get_attr( |
| 1295 | callback_handle->message, | |
| 1296 | "GetResourcePropertyOperationInputParameter"); | |
| 1297 | 12 | globus_assert(GetResourceProperty); |
| 1298 | ||
| 1299 | 12 | result = globus_operation_table_get_operation( |
| 1300 | NotificationProducerTestService_descriptor.operations, | |
| 1301 | "GetResourceProperty", | |
| 1302 | (void **)&invoke_function); | |
| 1303 | 12 | if(result != GLOBUS_SUCCESS) |
| 1304 | { | |
| 1305 | 0 | goto fault_exit; |
| 1306 | } | |
| 1307 | ||
| 1308 | ||
| 1309 | 12 | result = wsrp_GetResourcePropertyResponseType_init_contents( |
| 1310 | &GetResourcePropertyResponse); | |
| 1311 | 12 | if(result != GLOBUS_SUCCESS) |
| 1312 | { | |
| 1313 | 0 | goto fault_exit; |
| 1314 | } | |
| 1315 | ||
| 1316 | 12 | result = invoke_function( |
| 1317 | callback_handle->engine, | |
| 1318 | callback_handle->message, | |
| 1319 | &NotificationProducerTestService_descriptor, | |
| 1320 | GetResourceProperty, | |
| 1321 | &GetResourcePropertyResponse, | |
| 1322 | &fault_type_name, | |
| 1323 | &fault); | |
| 1324 | ||
| 1325 | fault_exit: | |
| 1326 | ||
| 1327 | 12 | if(fault && fault_type_name) |
| 1328 | { | |
| 1329 | 0 | fault_type = GetResourceProperty_lookup_fault_type(fault_type_name); |
| 1330 | ||
| 1331 | 0 | result = globus_service_session_begin_response( |
| 1332 | callback_handle->message); | |
| 1333 | 0 | if(result != GLOBUS_SUCCESS) |
| 1334 | { | |
| 1335 | 0 | goto exit; |
| 1336 | } | |
| 1337 | ||
| 1338 | 0 | soap_fault.faultcode = "Server"; |
| 1339 | 0 | soap_fault.faultstring = |
| 1340 | "An error occurred while processing the message"; | |
| 1341 | 0 | soap_fault.faultactor = NULL; |
| 1342 | ||
| 1343 | 0 | switch(fault_type) |
| 1344 | { | |
| 1345 | ||
| 1346 | case NOTIFICATIONPRODUCERTESTPORTTYPE_GETRESOURCEPROPERTY_RESOURCEUNKNOWNFAULT: | |
| 1347 | ||
| 1348 | 0 | xsd_any_init(&soap_fault.detail); |
| 1349 | 0 | soap_fault.detail->any_info = &wsrp_ResourceUnknownFaultType_info; |
| 1350 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 1351 | 0 | soap_fault.detail->element->local = "ResourceUnknownFault"; |
| 1352 | 0 | soap_fault.detail->element->Namespace = |
| 1353 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 1354 | 0 | soap_fault.detail->value = fault; |
| 1355 | 0 | break; |
| 1356 | ||
| 1357 | case NOTIFICATIONPRODUCERTESTPORTTYPE_GETRESOURCEPROPERTY_INVALIDRESOURCEPROPERTYQNAMEFAULT: | |
| 1358 | ||
| 1359 | 0 | xsd_any_init(&soap_fault.detail); |
| 1360 | 0 | soap_fault.detail->any_info = &wsrp_InvalidResourcePropertyQNameFaultType_info; |
| 1361 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 1362 | 0 | soap_fault.detail->element->local = "InvalidResourcePropertyQNameFault"; |
| 1363 | 0 | soap_fault.detail->element->Namespace = |
| 1364 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 1365 | 0 | soap_fault.detail->value = fault; |
| 1366 | 0 | break; |
| 1367 | ||
| 1368 | default: | |
| 1369 | 0 | result = NotificationProducerTestServiceErrorReturnedUnknownFault("GetResourceProperty"); |
| 1370 | 0 | goto exit; |
| 1371 | } | |
| 1372 | ||
| 1373 | 0 | result = globus_service_session_serialize_fault_response( |
| 1374 | callback_handle->message, &soap_fault); | |
| 1375 | 0 | if(result != GLOBUS_SUCCESS) |
| 1376 | { | |
| 1377 | 0 | goto exit; |
| 1378 | } | |
| 1379 | ||
| 1380 | 0 | soap_fault.detail->element->local = NULL; |
| 1381 | 0 | soap_fault.detail->element->Namespace = NULL; |
| 1382 | 0 | soap_fault.detail->any_info = NULL; |
| 1383 | 0 | xsd_any_destroy(soap_fault.detail); |
| 1384 | ||
| 1385 | 0 | globus_soap_message_handle_set_attr( |
| 1386 | callback_handle->message, | |
| 1387 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1388 | globus_soap_message_attr_copy_string, | |
| 1389 | globus_libc_free, | |
| 1390 | WSADDRESSING_FAULT_NS); | |
| 1391 | } | |
| 1392 | 12 | else if(result != GLOBUS_SUCCESS) |
| 1393 | { | |
| 1394 | 0 | globus_result_t local_result; |
| 1395 | 0 | local_result = globus_service_session_begin_response( |
| 1396 | callback_handle->message); | |
| 1397 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 1398 | { | |
| 1399 | 0 | result = local_result; |
| 1400 | 0 | goto exit; |
| 1401 | } | |
| 1402 | ||
| 1403 | 0 | soap_fault.faultcode = "Server"; |
| 1404 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 1405 | globus_error_get(result)); | |
| 1406 | 0 | result = GLOBUS_SUCCESS; |
| 1407 | 0 | soap_fault.faultactor = NULL; |
| 1408 | 0 | soap_fault.detail = NULL; |
| 1409 | 0 | result = globus_service_session_serialize_fault_response( |
| 1410 | callback_handle->message, &soap_fault); | |
| 1411 | 0 | if(result != GLOBUS_SUCCESS) |
| 1412 | { | |
| 1413 | 0 | goto exit; |
| 1414 | } | |
| 1415 | ||
| 1416 | 0 | globus_soap_message_handle_set_attr( |
| 1417 | callback_handle->message, | |
| 1418 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1419 | globus_soap_message_attr_copy_string, | |
| 1420 | globus_libc_free, | |
| 1421 | WSADDRESSING_FAULT_NS); | |
| 1422 | } | |
| 1423 | else | |
| 1424 | { | |
| 1425 | 12 | result = globus_service_session_begin_response( |
| 1426 | callback_handle->message); | |
| 1427 | 12 | if(result != GLOBUS_SUCCESS) |
| 1428 | { | |
| 1429 | 0 | goto exit; |
| 1430 | } | |
| 1431 | ||
| 1432 | 12 | element_qname.local = "GetResourcePropertyResponse"; |
| 1433 | 12 | element_qname.Namespace = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; |
| 1434 | ||
| 1435 | 12 | result = wsrp_GetResourcePropertyResponseType_serialize( |
| 1436 | &element_qname, | |
| 1437 | &GetResourcePropertyResponse, | |
| 1438 | callback_handle->message, | |
| 1439 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 1440 | 12 | if(result != GLOBUS_SUCCESS) |
| 1441 | { | |
| 1442 | 0 | goto exit; |
| 1443 | } | |
| 1444 | ||
| 1445 | 12 | result = globus_service_session_end_response( |
| 1446 | callback_handle->message); | |
| 1447 | 12 | if(result != GLOBUS_SUCCESS) |
| 1448 | { | |
| 1449 | 0 | goto exit; |
| 1450 | } | |
| 1451 | ||
| 1452 | 12 | wsrp_GetResourcePropertyResponseType_destroy_contents( |
| 1453 | &GetResourcePropertyResponse); | |
| 1454 | ||
| 1455 | 12 | globus_soap_message_handle_set_attr( |
| 1456 | callback_handle->message, | |
| 1457 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1458 | globus_soap_message_attr_copy_string, | |
| 1459 | globus_libc_free, | |
| 1460 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetResourcePropertyResponse"); | |
| 1461 | } | |
| 1462 | ||
| 1463 | exit: | |
| 1464 | ||
| 1465 | 12 | callback_handle->callback( |
| 1466 | result, | |
| 1467 | callback_handle->args); | |
| 1468 | ||
| 1469 | 12 | globus_libc_free(callback_handle); |
| 1470 | ||
| 1471 | 12 | NotificationProducerTestServiceDebugExit(); |
| 1472 | } | |
| 1473 | ||
| 1474 | static | |
| 1475 | globus_result_t | |
| 1476 | GetResourceProperty_invoke( | |
| 1477 | globus_service_engine_t engine, | |
| 1478 | globus_soap_message_handle_t message, | |
| 1479 | globus_service_response_t * response, | |
| 1480 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 1481 | void * args) | |
| 1482 | 12 | { |
| 1483 | 12 | GetResourceProperty_callback_handle_t * callback_handle; |
| 1484 | 12 | globus_result_t result = GLOBUS_SUCCESS; |
| 1485 | 12 | GlobusFuncName(NotificationProducerTestPortType_GetResourceProperty); |
| 1486 | 12 | NotificationProducerTestServiceDebugEnter(); |
| 1487 | ||
| 1488 | 12 | callback_handle = malloc(sizeof(GetResourceProperty_callback_handle_t)); |
| 1489 | 12 | if(!callback_handle) |
| 1490 | { | |
| 1491 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 1492 | 0 | goto exit; |
| 1493 | } | |
| 1494 | 12 | callback_handle->engine = engine; |
| 1495 | 12 | callback_handle->message = message; |
| 1496 | 12 | callback_handle->callback = invoke_callback; |
| 1497 | 12 | callback_handle->args = args; |
| 1498 | ||
| 1499 | 12 | result = globus_callback_register_oneshot( |
| 1500 | NULL, | |
| 1501 | &globus_i_reltime_zero, | |
| 1502 | GetResourceProperty_invoke_callback, | |
| 1503 | callback_handle); | |
| 1504 | ||
| 1505 | exit: | |
| 1506 | 12 | NotificationProducerTestServiceDebugExit(); |
| 1507 | 12 | return result; |
| 1508 | } | |
| 1509 | ||
| 1510 | ||
| 1511 | static | |
| 1512 | globus_result_t | |
| 1513 | GetResourceProperty_fault_to_type( | |
| 1514 | const char * fault_type_name, | |
| 1515 | int * fault_type, | |
| 1516 | globus_xsd_type_info_t * fault_type_info) | |
| 1517 | 0 | { |
| 1518 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 1519 | ||
| 1520 | 0 | *fault_type_info = NULL; |
| 1521 | ||
| 1522 | 0 | *fault_type = GetResourceProperty_lookup_fault_type(fault_type_name); |
| 1523 | ||
| 1524 | 0 | switch (*fault_type) |
| 1525 | { | |
| 1526 | case NOTIFICATIONPRODUCERTESTPORTTYPE_GETRESOURCEPROPERTY_RESOURCEUNKNOWNFAULT: | |
| 1527 | 0 | *fault_type_info = &wsrp_ResourceUnknownFaultType_info; |
| 1528 | 0 | break; |
| 1529 | ||
| 1530 | case NOTIFICATIONPRODUCERTESTPORTTYPE_GETRESOURCEPROPERTY_INVALIDRESOURCEPROPERTYQNAMEFAULT: | |
| 1531 | 0 | *fault_type_info = &wsrp_InvalidResourcePropertyQNameFaultType_info; |
| 1532 | 0 | break; |
| 1533 | ||
| 1534 | default: | |
| 1535 | 0 | result = NotificationProducerTestServiceErrorReturnedUnknownFault("GetResourceProperty"); |
| 1536 | goto exit; | |
| 1537 | } | |
| 1538 | ||
| 1539 | exit: | |
| 1540 | 0 | return result; |
| 1541 | } | |
| 1542 | ||
| 1543 | ||
| 1544 | static | |
| 1545 | globus_service_operation_descriptor_t | |
| 1546 | GetResourceProperty_operation_descriptor = | |
| 1547 | { | |
| 1548 | GetResourceProperty_deserialize, | |
| 1549 | GetResourceProperty_invoke, | |
| 1550 | ||
| 1551 | GetResourceProperty_fault_to_type | |
| 1552 | ||
| 1553 | }; | |
| 1554 | ||
| 1555 | static | |
| 1556 | globus_operation_provider_descriptor_t GetResourceProperty_descriptor = | |
| 1557 | { | |
| 1558 | &NotificationProducerTestPortType_GetResourceProperty_op_qname, | |
| 1559 | "GetResourceProperty", | |
| 1560 | (void *)NotificationProducerTestPortType_GetResourceProperty_impl, | |
| 1561 | NULL | |
| 1562 | }; | |
| 1563 | ||
| 1564 | ||
| 1565 | xsd_QName NotificationProducerTestPortType_SetResourceProperties_op_qname = | |
| 1566 | { | |
| 1567 | "http://localhost:8080/wsrf/services/NotificationProducerTestService" | |
| 1568 | "SetResourceProperties" | |
| 1569 | }; | |
| 1570 | ||
| 1571 | xsd_QName NotificationProducerTestPortType_SetResourceProperties_input_qname = | |
| 1572 | { | |
| 1573 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd", | |
| 1574 | "SetResourceProperties" | |
| 1575 | }; | |
| 1576 | ||
| 1577 | typedef globus_result_t (* SetResourceProperties_invoke_func_t) ( | |
| 1578 | globus_service_engine_t engine, | |
| 1579 | globus_soap_message_handle_t message, | |
| 1580 | globus_service_descriptor_t * descriptor, | |
| 1581 | wsrp_SetResourcePropertiesType * SetResourceProperties, | |
| 1582 | wsrp_SetResourcePropertiesResponseType * SetResourcePropertiesResponse, | |
| 1583 | const char ** fault_type_name, | |
| 1584 | void ** fault); | |
| 1585 | ||
| 1586 | typedef struct SetResourceProperties_callback_handle_s | |
| 1587 | { | |
| 1588 | globus_service_engine_t engine; | |
| 1589 | globus_soap_message_handle_t message; | |
| 1590 | globus_operation_invoke_callback_func_t callback; | |
| 1591 | void * args; | |
| 1592 | } SetResourceProperties_callback_handle_t; | |
| 1593 | ||
| 1594 | ||
| 1595 | const char * NotificationProducerTestPortType_SetResourceProperties_fault_strings[NOTIFICATIONPRODUCERTESTPORTTYPE_SETRESOURCEPROPERTIES_INVALIDRESOURCEPROPERTYQNAMEFAULT] = | |
| 1596 | { | |
| 1597 | "Unknown", | |
| 1598 | "InvalidSetResourcePropertiesRequestContentFault", | |
| 1599 | "ResourceUnknownFault", | |
| 1600 | "SetResourcePropertyRequestFailedFault", | |
| 1601 | "UnableToModifyResourcePropertyFault", | |
| 1602 | "InvalidResourcePropertyQNameFault" | |
| 1603 | }; | |
| 1604 | ||
| 1605 | static | |
| 1606 | NotificationProducerTestPortType_SetResourceProperties_fault_t | |
| 1607 | SetResourceProperties_lookup_fault_type( | |
| 1608 | const char * fault_name) | |
| 1609 | 0 | { |
| 1610 | 0 | NotificationProducerTestPortType_SetResourceProperties_fault_t fault_type; |
| 1611 | 0 | GlobusFuncName(SetResourceProperties_lookup_fault_type); |
| 1612 | 0 | NotificationProducerTestServiceDebugEnter(); |
| 1613 | ||
| 1614 | 0 | globus_assert(fault_name); |
| 1615 | ||
| 1616 | 0 | if(!strcmp(fault_name, "InvalidSetResourcePropertiesRequestContentFault")) |
| 1617 | { | |
| 1618 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_SETRESOURCEPROPERTIES_INVALIDSETRESOURCEPROPERTIESREQUESTCONTENTFAULT; |
| 1619 | } | |
| 1620 | 0 | else if(!strcmp(fault_name, "ResourceUnknownFault")) |
| 1621 | { | |
| 1622 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_SETRESOURCEPROPERTIES_RESOURCEUNKNOWNFAULT; |
| 1623 | } | |
| 1624 | 0 | else if(!strcmp(fault_name, "SetResourcePropertyRequestFailedFault")) |
| 1625 | { | |
| 1626 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_SETRESOURCEPROPERTIES_SETRESOURCEPROPERTYREQUESTFAILEDFAULT; |
| 1627 | } | |
| 1628 | 0 | else if(!strcmp(fault_name, "UnableToModifyResourcePropertyFault")) |
| 1629 | { | |
| 1630 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_SETRESOURCEPROPERTIES_UNABLETOMODIFYRESOURCEPROPERTYFAULT; |
| 1631 | } | |
| 1632 | 0 | else if(!strcmp(fault_name, "InvalidResourcePropertyQNameFault")) |
| 1633 | { | |
| 1634 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_SETRESOURCEPROPERTIES_INVALIDRESOURCEPROPERTYQNAMEFAULT; |
| 1635 | } | |
| 1636 | else | |
| 1637 | { | |
| 1638 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_SETRESOURCEPROPERTIES_UNKNOWN_FAULT; |
| 1639 | } | |
| 1640 | ||
| 1641 | 0 | NotificationProducerTestServiceDebugExit(); |
| 1642 | 0 | return fault_type; |
| 1643 | } | |
| 1644 | ||
| 1645 | ||
| 1646 | ||
| 1647 | static | |
| 1648 | void | |
| 1649 | SetResourceProperties_deserialize_callback( | |
| 1650 | void * handle) | |
| 1651 | 0 | { |
| 1652 | 0 | SetResourceProperties_callback_handle_t * callback_handle; |
| 1653 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 1654 | 0 | struct globus_soap_message_fault_s soap_fault; |
| 1655 | 0 | SetResourceProperties_invoke_func_t invoke_function; |
| 1656 | 0 | wsrp_SetResourcePropertiesType * SetResourceProperties = NULL; |
| 1657 | 0 | GlobusFuncName(SetResourceProperties_deserialize_callback); |
| 1658 | 0 | NotificationProducerTestServiceDebugEnter(); |
| 1659 | ||
| 1660 | 0 | callback_handle = (SetResourceProperties_callback_handle_t *) handle; |
| 1661 | ||
| 1662 | 0 | result = globus_operation_table_get_operation( |
| 1663 | NotificationProducerTestService_descriptor.operations, | |
| 1664 | "SetResourceProperties", | |
| 1665 | (void **)&invoke_function); | |
| 1666 | 0 | if(result != GLOBUS_SUCCESS) |
| 1667 | { | |
| 1668 | 0 | goto exit; |
| 1669 | } | |
| 1670 | ||
| 1671 | 0 | if(NotificationProducerTestService_descriptor.registry) |
| 1672 | { | |
| 1673 | 0 | globus_soap_message_handle_set_registry( |
| 1674 | callback_handle->message, | |
| 1675 | NotificationProducerTestService_descriptor.registry); | |
| 1676 | } | |
| 1677 | ||
| 1678 | 0 | result = wsrp_SetResourcePropertiesType_init( |
| 1679 | &SetResourceProperties); | |
| 1680 | 0 | if(result != GLOBUS_SUCCESS) |
| 1681 | { | |
| 1682 | 0 | goto exit; |
| 1683 | } | |
| 1684 | ||
| 1685 | 0 | result = wsrp_SetResourcePropertiesType_deserialize( |
| 1686 | &NotificationProducerTestPortType_SetResourceProperties_input_qname, | |
| 1687 | SetResourceProperties, | |
| 1688 | callback_handle->message, | |
| 1689 | 0); | |
| 1690 | 0 | if(result != GLOBUS_SUCCESS) |
| 1691 | { | |
| 1692 | 0 | goto exit; |
| 1693 | } | |
| 1694 | ||
| 1695 | 0 | result = globus_soap_message_handle_set_attr( |
| 1696 | callback_handle->message, | |
| 1697 | "SetResourcePropertiesOperationInputParameter", | |
| 1698 | wsrp_SetResourcePropertiesType_copy_wrapper, | |
| 1699 | wsrp_SetResourcePropertiesType_destroy_wrapper, | |
| 1700 | (void *)SetResourceProperties); | |
| 1701 | 0 | if(result != GLOBUS_SUCCESS) |
| 1702 | { | |
| 1703 | 0 | goto exit; |
| 1704 | } | |
| 1705 | ||
| 1706 | exit: | |
| 1707 | ||
| 1708 | 0 | if (SetResourceProperties != NULL) |
| 1709 | { | |
| 1710 | 0 | wsrp_SetResourcePropertiesType_destroy(SetResourceProperties); |
| 1711 | } | |
| 1712 | 0 | callback_handle->callback( |
| 1713 | result, | |
| 1714 | callback_handle->args); | |
| 1715 | ||
| 1716 | 0 | free(callback_handle); |
| 1717 | 0 | NotificationProducerTestServiceDebugExit(); |
| 1718 | } | |
| 1719 | ||
| 1720 | static | |
| 1721 | globus_result_t | |
| 1722 | SetResourceProperties_deserialize( | |
| 1723 | globus_service_engine_t engine, | |
| 1724 | globus_soap_message_handle_t message, | |
| 1725 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 1726 | void * args) | |
| 1727 | 0 | { |
| 1728 | 0 | SetResourceProperties_callback_handle_t * callback_handle; |
| 1729 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 1730 | 0 | GlobusFuncName(SetResourceProperties_deserialize); |
| 1731 | 0 | NotificationProducerTestServiceDebugEnter(); |
| 1732 | ||
| 1733 | 0 | callback_handle = malloc(sizeof(SetResourceProperties_callback_handle_t)); |
| 1734 | 0 | globus_assert_string(callback_handle, |
| 1735 | "Memory allocation failed " | |
| 1736 | "for SetResourceProperties callback handle"); | |
| 1737 | ||
| 1738 | 0 | callback_handle->engine = engine; |
| 1739 | 0 | callback_handle->message = message; |
| 1740 | 0 | callback_handle->callback = invoke_callback; |
| 1741 | 0 | callback_handle->args = args; |
| 1742 | ||
| 1743 | 0 | result = globus_callback_register_oneshot( |
| 1744 | NULL, | |
| 1745 | &globus_i_reltime_zero, | |
| 1746 | SetResourceProperties_deserialize_callback, | |
| 1747 | callback_handle); | |
| 1748 | ||
| 1749 | 0 | NotificationProducerTestServiceDebugExit(); |
| 1750 | 0 | return result; |
| 1751 | } | |
| 1752 | ||
| 1753 | static | |
| 1754 | void | |
| 1755 | SetResourceProperties_invoke_callback( | |
| 1756 | void * handle) | |
| 1757 | 0 | { |
| 1758 | 0 | SetResourceProperties_callback_handle_t * callback_handle; |
| 1759 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 1760 | 0 | struct globus_soap_message_fault_s soap_fault; |
| 1761 | 0 | SetResourceProperties_invoke_func_t invoke_function; |
| 1762 | 0 | wsrp_SetResourcePropertiesType * SetResourceProperties; |
| 1763 | 0 | wsrp_SetResourcePropertiesResponseType SetResourcePropertiesResponse; |
| 1764 | 0 | xsd_QName element_qname; |
| 1765 | 0 | const char * fault_type_name = NULL; |
| 1766 | 0 | NotificationProducerTestPortType_SetResourceProperties_fault_t fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_SETRESOURCEPROPERTIES_NOFAULT; |
| 1767 | 0 | void * fault = NULL; |
| 1768 | ||
| 1769 | 0 | GlobusFuncName(SetResourceProperties_invoke_callback); |
| 1770 | 0 | NotificationProducerTestServiceDebugEnter(); |
| 1771 | ||
| 1772 | 0 | callback_handle = (SetResourceProperties_callback_handle_t *) handle; |
| 1773 | ||
| 1774 | 0 | SetResourceProperties = globus_soap_message_handle_get_attr( |
| 1775 | callback_handle->message, | |
| 1776 | "SetResourcePropertiesOperationInputParameter"); | |
| 1777 | 0 | globus_assert(SetResourceProperties); |
| 1778 | ||
| 1779 | 0 | result = globus_operation_table_get_operation( |
| 1780 | NotificationProducerTestService_descriptor.operations, | |
| 1781 | "SetResourceProperties", | |
| 1782 | (void **)&invoke_function); | |
| 1783 | 0 | if(result != GLOBUS_SUCCESS) |
| 1784 | { | |
| 1785 | 0 | goto fault_exit; |
| 1786 | } | |
| 1787 | ||
| 1788 | ||
| 1789 | 0 | result = wsrp_SetResourcePropertiesResponseType_init_contents( |
| 1790 | &SetResourcePropertiesResponse); | |
| 1791 | 0 | if(result != GLOBUS_SUCCESS) |
| 1792 | { | |
| 1793 | 0 | goto fault_exit; |
| 1794 | } | |
| 1795 | ||
| 1796 | 0 | result = invoke_function( |
| 1797 | callback_handle->engine, | |
| 1798 | callback_handle->message, | |
| 1799 | &NotificationProducerTestService_descriptor, | |
| 1800 | SetResourceProperties, | |
| 1801 | &SetResourcePropertiesResponse, | |
| 1802 | &fault_type_name, | |
| 1803 | &fault); | |
| 1804 | ||
| 1805 | fault_exit: | |
| 1806 | ||
| 1807 | 0 | if(fault && fault_type_name) |
| 1808 | { | |
| 1809 | 0 | fault_type = SetResourceProperties_lookup_fault_type(fault_type_name); |
| 1810 | ||
| 1811 | 0 | result = globus_service_session_begin_response( |
| 1812 | callback_handle->message); | |
| 1813 | 0 | if(result != GLOBUS_SUCCESS) |
| 1814 | { | |
| 1815 | 0 | goto exit; |
| 1816 | } | |
| 1817 | ||
| 1818 | 0 | soap_fault.faultcode = "Server"; |
| 1819 | 0 | soap_fault.faultstring = |
| 1820 | "An error occurred while processing the message"; | |
| 1821 | 0 | soap_fault.faultactor = NULL; |
| 1822 | ||
| 1823 | 0 | switch(fault_type) |
| 1824 | { | |
| 1825 | ||
| 1826 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SETRESOURCEPROPERTIES_INVALIDSETRESOURCEPROPERTIESREQUESTCONTENTFAULT: | |
| 1827 | ||
| 1828 | 0 | xsd_any_init(&soap_fault.detail); |
| 1829 | 0 | soap_fault.detail->any_info = &wsrp_InvalidSetResourcePropertiesRequestContentFaultType_info; |
| 1830 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 1831 | 0 | soap_fault.detail->element->local = "InvalidSetResourcePropertiesRequestContentFault"; |
| 1832 | 0 | soap_fault.detail->element->Namespace = |
| 1833 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 1834 | 0 | soap_fault.detail->value = fault; |
| 1835 | 0 | break; |
| 1836 | ||
| 1837 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SETRESOURCEPROPERTIES_RESOURCEUNKNOWNFAULT: | |
| 1838 | ||
| 1839 | 0 | xsd_any_init(&soap_fault.detail); |
| 1840 | 0 | soap_fault.detail->any_info = &wsrp_ResourceUnknownFaultType_info; |
| 1841 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 1842 | 0 | soap_fault.detail->element->local = "ResourceUnknownFault"; |
| 1843 | 0 | soap_fault.detail->element->Namespace = |
| 1844 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 1845 | 0 | soap_fault.detail->value = fault; |
| 1846 | 0 | break; |
| 1847 | ||
| 1848 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SETRESOURCEPROPERTIES_SETRESOURCEPROPERTYREQUESTFAILEDFAULT: | |
| 1849 | ||
| 1850 | 0 | xsd_any_init(&soap_fault.detail); |
| 1851 | 0 | soap_fault.detail->any_info = &wsrp_SetResourcePropertyRequestFailedFaultType_info; |
| 1852 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 1853 | 0 | soap_fault.detail->element->local = "SetResourcePropertyRequestFailedFault"; |
| 1854 | 0 | soap_fault.detail->element->Namespace = |
| 1855 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 1856 | 0 | soap_fault.detail->value = fault; |
| 1857 | 0 | break; |
| 1858 | ||
| 1859 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SETRESOURCEPROPERTIES_UNABLETOMODIFYRESOURCEPROPERTYFAULT: | |
| 1860 | ||
| 1861 | 0 | xsd_any_init(&soap_fault.detail); |
| 1862 | 0 | soap_fault.detail->any_info = &wsrp_UnableToModifyResourcePropertyFaultType_info; |
| 1863 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 1864 | 0 | soap_fault.detail->element->local = "UnableToModifyResourcePropertyFault"; |
| 1865 | 0 | soap_fault.detail->element->Namespace = |
| 1866 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 1867 | 0 | soap_fault.detail->value = fault; |
| 1868 | 0 | break; |
| 1869 | ||
| 1870 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SETRESOURCEPROPERTIES_INVALIDRESOURCEPROPERTYQNAMEFAULT: | |
| 1871 | ||
| 1872 | 0 | xsd_any_init(&soap_fault.detail); |
| 1873 | 0 | soap_fault.detail->any_info = &wsrp_InvalidResourcePropertyQNameFaultType_info; |
| 1874 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 1875 | 0 | soap_fault.detail->element->local = "InvalidResourcePropertyQNameFault"; |
| 1876 | 0 | soap_fault.detail->element->Namespace = |
| 1877 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 1878 | 0 | soap_fault.detail->value = fault; |
| 1879 | 0 | break; |
| 1880 | ||
| 1881 | default: | |
| 1882 | 0 | result = NotificationProducerTestServiceErrorReturnedUnknownFault("SetResourceProperties"); |
| 1883 | 0 | goto exit; |
| 1884 | } | |
| 1885 | ||
| 1886 | 0 | result = globus_service_session_serialize_fault_response( |
| 1887 | callback_handle->message, &soap_fault); | |
| 1888 | 0 | if(result != GLOBUS_SUCCESS) |
| 1889 | { | |
| 1890 | 0 | goto exit; |
| 1891 | } | |
| 1892 | ||
| 1893 | 0 | soap_fault.detail->element->local = NULL; |
| 1894 | 0 | soap_fault.detail->element->Namespace = NULL; |
| 1895 | 0 | soap_fault.detail->any_info = NULL; |
| 1896 | 0 | xsd_any_destroy(soap_fault.detail); |
| 1897 | ||
| 1898 | 0 | globus_soap_message_handle_set_attr( |
| 1899 | callback_handle->message, | |
| 1900 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1901 | globus_soap_message_attr_copy_string, | |
| 1902 | globus_libc_free, | |
| 1903 | WSADDRESSING_FAULT_NS); | |
| 1904 | } | |
| 1905 | 0 | else if(result != GLOBUS_SUCCESS) |
| 1906 | { | |
| 1907 | 0 | globus_result_t local_result; |
| 1908 | 0 | local_result = globus_service_session_begin_response( |
| 1909 | callback_handle->message); | |
| 1910 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 1911 | { | |
| 1912 | 0 | result = local_result; |
| 1913 | 0 | goto exit; |
| 1914 | } | |
| 1915 | ||
| 1916 | 0 | soap_fault.faultcode = "Server"; |
| 1917 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 1918 | globus_error_get(result)); | |
| 1919 | 0 | result = GLOBUS_SUCCESS; |
| 1920 | 0 | soap_fault.faultactor = NULL; |
| 1921 | 0 | soap_fault.detail = NULL; |
| 1922 | 0 | result = globus_service_session_serialize_fault_response( |
| 1923 | callback_handle->message, &soap_fault); | |
| 1924 | 0 | if(result != GLOBUS_SUCCESS) |
| 1925 | { | |
| 1926 | 0 | goto exit; |
| 1927 | } | |
| 1928 | ||
| 1929 | 0 | globus_soap_message_handle_set_attr( |
| 1930 | callback_handle->message, | |
| 1931 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1932 | globus_soap_message_attr_copy_string, | |
| 1933 | globus_libc_free, | |
| 1934 | WSADDRESSING_FAULT_NS); | |
| 1935 | } | |
| 1936 | else | |
| 1937 | { | |
| 1938 | 0 | result = globus_service_session_begin_response( |
| 1939 | callback_handle->message); | |
| 1940 | 0 | if(result != GLOBUS_SUCCESS) |
| 1941 | { | |
| 1942 | 0 | goto exit; |
| 1943 | } | |
| 1944 | ||
| 1945 | 0 | element_qname.local = "SetResourcePropertiesResponse"; |
| 1946 | 0 | element_qname.Namespace = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; |
| 1947 | ||
| 1948 | 0 | result = wsrp_SetResourcePropertiesResponseType_serialize( |
| 1949 | &element_qname, | |
| 1950 | &SetResourcePropertiesResponse, | |
| 1951 | callback_handle->message, | |
| 1952 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 1953 | 0 | if(result != GLOBUS_SUCCESS) |
| 1954 | { | |
| 1955 | 0 | goto exit; |
| 1956 | } | |
| 1957 | ||
| 1958 | 0 | result = globus_service_session_end_response( |
| 1959 | callback_handle->message); | |
| 1960 | 0 | if(result != GLOBUS_SUCCESS) |
| 1961 | { | |
| 1962 | 0 | goto exit; |
| 1963 | } | |
| 1964 | ||
| 1965 | 0 | wsrp_SetResourcePropertiesResponseType_destroy_contents( |
| 1966 | &SetResourcePropertiesResponse); | |
| 1967 | ||
| 1968 | 0 | globus_soap_message_handle_set_attr( |
| 1969 | callback_handle->message, | |
| 1970 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1971 | globus_soap_message_attr_copy_string, | |
| 1972 | globus_libc_free, | |
| 1973 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/SetResourcePropertiesResponse"); | |
| 1974 | } | |
| 1975 | ||
| 1976 | exit: | |
| 1977 | ||
| 1978 | 0 | callback_handle->callback( |
| 1979 | result, | |
| 1980 | callback_handle->args); | |
| 1981 | ||
| 1982 | 0 | globus_libc_free(callback_handle); |
| 1983 | ||
| 1984 | 0 | NotificationProducerTestServiceDebugExit(); |
| 1985 | } | |
| 1986 | ||
| 1987 | static | |
| 1988 | globus_result_t | |
| 1989 | SetResourceProperties_invoke( | |
| 1990 | globus_service_engine_t engine, | |
| 1991 | globus_soap_message_handle_t message, | |
| 1992 | globus_service_response_t * response, | |
| 1993 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 1994 | void * args) | |
| 1995 | 0 | { |
| 1996 | 0 | SetResourceProperties_callback_handle_t * callback_handle; |
| 1997 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 1998 | 0 | GlobusFuncName(NotificationProducerTestPortType_SetResourceProperties); |
| 1999 | 0 | NotificationProducerTestServiceDebugEnter(); |
| 2000 | ||
| 2001 | 0 | callback_handle = malloc(sizeof(SetResourceProperties_callback_handle_t)); |
| 2002 | 0 | if(!callback_handle) |
| 2003 | { | |
| 2004 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 2005 | 0 | goto exit; |
| 2006 | } | |
| 2007 | 0 | callback_handle->engine = engine; |
| 2008 | 0 | callback_handle->message = message; |
| 2009 | 0 | callback_handle->callback = invoke_callback; |
| 2010 | 0 | callback_handle->args = args; |
| 2011 | ||
| 2012 | 0 | result = globus_callback_register_oneshot( |
| 2013 | NULL, | |
| 2014 | &globus_i_reltime_zero, | |
| 2015 | SetResourceProperties_invoke_callback, | |
| 2016 | callback_handle); | |
| 2017 | ||
| 2018 | exit: | |
| 2019 | 0 | NotificationProducerTestServiceDebugExit(); |
| 2020 | 0 | return result; |
| 2021 | } | |
| 2022 | ||
| 2023 | ||
| 2024 | static | |
| 2025 | globus_result_t | |
| 2026 | SetResourceProperties_fault_to_type( | |
| 2027 | const char * fault_type_name, | |
| 2028 | int * fault_type, | |
| 2029 | globus_xsd_type_info_t * fault_type_info) | |
| 2030 | 0 | { |
| 2031 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 2032 | ||
| 2033 | 0 | *fault_type_info = NULL; |
| 2034 | ||
| 2035 | 0 | *fault_type = SetResourceProperties_lookup_fault_type(fault_type_name); |
| 2036 | ||
| 2037 | 0 | switch (*fault_type) |
| 2038 | { | |
| 2039 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SETRESOURCEPROPERTIES_INVALIDSETRESOURCEPROPERTIESREQUESTCONTENTFAULT: | |
| 2040 | 0 | *fault_type_info = &wsrp_InvalidSetResourcePropertiesRequestContentFaultType_info; |
| 2041 | 0 | break; |
| 2042 | ||
| 2043 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SETRESOURCEPROPERTIES_RESOURCEUNKNOWNFAULT: | |
| 2044 | 0 | *fault_type_info = &wsrp_ResourceUnknownFaultType_info; |
| 2045 | 0 | break; |
| 2046 | ||
| 2047 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SETRESOURCEPROPERTIES_SETRESOURCEPROPERTYREQUESTFAILEDFAULT: | |
| 2048 | 0 | *fault_type_info = &wsrp_SetResourcePropertyRequestFailedFaultType_info; |
| 2049 | 0 | break; |
| 2050 | ||
| 2051 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SETRESOURCEPROPERTIES_UNABLETOMODIFYRESOURCEPROPERTYFAULT: | |
| 2052 | 0 | *fault_type_info = &wsrp_UnableToModifyResourcePropertyFaultType_info; |
| 2053 | 0 | break; |
| 2054 | ||
| 2055 | case NOTIFICATIONPRODUCERTESTPORTTYPE_SETRESOURCEPROPERTIES_INVALIDRESOURCEPROPERTYQNAMEFAULT: | |
| 2056 | 0 | *fault_type_info = &wsrp_InvalidResourcePropertyQNameFaultType_info; |
| 2057 | 0 | break; |
| 2058 | ||
| 2059 | default: | |
| 2060 | 0 | result = NotificationProducerTestServiceErrorReturnedUnknownFault("SetResourceProperties"); |
| 2061 | goto exit; | |
| 2062 | } | |
| 2063 | ||
| 2064 | exit: | |
| 2065 | 0 | return result; |
| 2066 | } | |
| 2067 | ||
| 2068 | ||
| 2069 | static | |
| 2070 | globus_service_operation_descriptor_t | |
| 2071 | SetResourceProperties_operation_descriptor = | |
| 2072 | { | |
| 2073 | SetResourceProperties_deserialize, | |
| 2074 | SetResourceProperties_invoke, | |
| 2075 | ||
| 2076 | SetResourceProperties_fault_to_type | |
| 2077 | ||
| 2078 | }; | |
| 2079 | ||
| 2080 | static | |
| 2081 | globus_operation_provider_descriptor_t SetResourceProperties_descriptor = | |
| 2082 | { | |
| 2083 | &NotificationProducerTestPortType_SetResourceProperties_op_qname, | |
| 2084 | "SetResourceProperties", | |
| 2085 | (void *)NotificationProducerTestPortType_SetResourceProperties_impl, | |
| 2086 | NULL | |
| 2087 | }; | |
| 2088 | ||
| 2089 | ||
| 2090 | xsd_QName NotificationProducerTestPortType_Destroy_op_qname = | |
| 2091 | { | |
| 2092 | "http://localhost:8080/wsrf/services/NotificationProducerTestService" | |
| 2093 | "Destroy" | |
| 2094 | }; | |
| 2095 | ||
| 2096 | xsd_QName NotificationProducerTestPortType_Destroy_input_qname = | |
| 2097 | { | |
| 2098 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", | |
| 2099 | "Destroy" | |
| 2100 | }; | |
| 2101 | ||
| 2102 | typedef globus_result_t (* Destroy_invoke_func_t) ( | |
| 2103 | globus_service_engine_t engine, | |
| 2104 | globus_soap_message_handle_t message, | |
| 2105 | globus_service_descriptor_t * descriptor, | |
| 2106 | wsrl_DestroyType * Destroy, | |
| 2107 | wsrl_DestroyResponseType * DestroyResponse, | |
| 2108 | const char ** fault_type_name, | |
| 2109 | void ** fault); | |
| 2110 | ||
| 2111 | typedef struct Destroy_callback_handle_s | |
| 2112 | { | |
| 2113 | globus_service_engine_t engine; | |
| 2114 | globus_soap_message_handle_t message; | |
| 2115 | globus_operation_invoke_callback_func_t callback; | |
| 2116 | void * args; | |
| 2117 | } Destroy_callback_handle_t; | |
| 2118 | ||
| 2119 | ||
| 2120 | const char * NotificationProducerTestPortType_Destroy_fault_strings[NOTIFICATIONPRODUCERTESTPORTTYPE_DESTROY_RESOURCENOTDESTROYEDFAULT] = | |
| 2121 | { | |
| 2122 | "Unknown", | |
| 2123 | "ResourceUnknownFault", | |
| 2124 | "ResourceNotDestroyedFault" | |
| 2125 | }; | |
| 2126 | ||
| 2127 | static | |
| 2128 | NotificationProducerTestPortType_Destroy_fault_t | |
| 2129 | Destroy_lookup_fault_type( | |
| 2130 | const char * fault_name) | |
| 2131 | 0 | { |
| 2132 | 0 | NotificationProducerTestPortType_Destroy_fault_t fault_type; |
| 2133 | 0 | GlobusFuncName(Destroy_lookup_fault_type); |
| 2134 | 0 | NotificationProducerTestServiceDebugEnter(); |
| 2135 | ||
| 2136 | 0 | globus_assert(fault_name); |
| 2137 | ||
| 2138 | 0 | if(!strcmp(fault_name, "ResourceUnknownFault")) |
| 2139 | { | |
| 2140 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_DESTROY_RESOURCEUNKNOWNFAULT; |
| 2141 | } | |
| 2142 | 0 | else if(!strcmp(fault_name, "ResourceNotDestroyedFault")) |
| 2143 | { | |
| 2144 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_DESTROY_RESOURCENOTDESTROYEDFAULT; |
| 2145 | } | |
| 2146 | else | |
| 2147 | { | |
| 2148 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_DESTROY_UNKNOWN_FAULT; |
| 2149 | } | |
| 2150 | ||
| 2151 | 0 | NotificationProducerTestServiceDebugExit(); |
| 2152 | 0 | return fault_type; |
| 2153 | } | |
| 2154 | ||
| 2155 | ||
| 2156 | ||
| 2157 | static | |
| 2158 | void | |
| 2159 | Destroy_deserialize_callback( | |
| 2160 | void * handle) | |
| 2161 | 0 | { |
| 2162 | 0 | Destroy_callback_handle_t * callback_handle; |
| 2163 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 2164 | 0 | struct globus_soap_message_fault_s soap_fault; |
| 2165 | 0 | Destroy_invoke_func_t invoke_function; |
| 2166 | 0 | wsrl_DestroyType * Destroy = NULL; |
| 2167 | 0 | GlobusFuncName(Destroy_deserialize_callback); |
| 2168 | 0 | NotificationProducerTestServiceDebugEnter(); |
| 2169 | ||
| 2170 | 0 | callback_handle = (Destroy_callback_handle_t *) handle; |
| 2171 | ||
| 2172 | 0 | result = globus_operation_table_get_operation( |
| 2173 | NotificationProducerTestService_descriptor.operations, | |
| 2174 | "Destroy", | |
| 2175 | (void **)&invoke_function); | |
| 2176 | 0 | if(result != GLOBUS_SUCCESS) |
| 2177 | { | |
| 2178 | 0 | goto exit; |
| 2179 | } | |
| 2180 | ||
| 2181 | 0 | if(NotificationProducerTestService_descriptor.registry) |
| 2182 | { | |
| 2183 | 0 | globus_soap_message_handle_set_registry( |
| 2184 | callback_handle->message, | |
| 2185 | NotificationProducerTestService_descriptor.registry); | |
| 2186 | } | |
| 2187 | ||
| 2188 | 0 | result = wsrl_DestroyType_init( |
| 2189 | &Destroy); | |
| 2190 | 0 | if(result != GLOBUS_SUCCESS) |
| 2191 | { | |
| 2192 | 0 | goto exit; |
| 2193 | } | |
| 2194 | ||
| 2195 | 0 | result = wsrl_DestroyType_deserialize( |
| 2196 | &NotificationProducerTestPortType_Destroy_input_qname, | |
| 2197 | Destroy, | |
| 2198 | callback_handle->message, | |
| 2199 | 0); | |
| 2200 | 0 | if(result != GLOBUS_SUCCESS) |
| 2201 | { | |
| 2202 | 0 | goto exit; |
| 2203 | } | |
| 2204 | ||
| 2205 | 0 | result = globus_soap_message_handle_set_attr( |
| 2206 | callback_handle->message, | |
| 2207 | "DestroyOperationInputParameter", | |
| 2208 | wsrl_DestroyType_copy_wrapper, | |
| 2209 | wsrl_DestroyType_destroy_wrapper, | |
| 2210 | (void *)Destroy); | |
| 2211 | 0 | if(result != GLOBUS_SUCCESS) |
| 2212 | { | |
| 2213 | 0 | goto exit; |
| 2214 | } | |
| 2215 | ||
| 2216 | exit: | |
| 2217 | ||
| 2218 | 0 | if (Destroy != NULL) |
| 2219 | { | |
| 2220 | 0 | wsrl_DestroyType_destroy(Destroy); |
| 2221 | } | |
| 2222 | 0 | callback_handle->callback( |
| 2223 | result, | |
| 2224 | callback_handle->args); | |
| 2225 | ||
| 2226 | 0 | free(callback_handle); |
| 2227 | 0 | NotificationProducerTestServiceDebugExit(); |
| 2228 | } | |
| 2229 | ||
| 2230 | static | |
| 2231 | globus_result_t | |
| 2232 | Destroy_deserialize( | |
| 2233 | globus_service_engine_t engine, | |
| 2234 | globus_soap_message_handle_t message, | |
| 2235 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 2236 | void * args) | |
| 2237 | 0 | { |
| 2238 | 0 | Destroy_callback_handle_t * callback_handle; |
| 2239 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 2240 | 0 | GlobusFuncName(Destroy_deserialize); |
| 2241 | 0 | NotificationProducerTestServiceDebugEnter(); |
| 2242 | ||
| 2243 | 0 | callback_handle = malloc(sizeof(Destroy_callback_handle_t)); |
| 2244 | 0 | globus_assert_string(callback_handle, |
| 2245 | "Memory allocation failed " | |
| 2246 | "for Destroy callback handle"); | |
| 2247 | ||
| 2248 | 0 | callback_handle->engine = engine; |
| 2249 | 0 | callback_handle->message = message; |
| 2250 | 0 | callback_handle->callback = invoke_callback; |
| 2251 | 0 | callback_handle->args = args; |
| 2252 | ||
| 2253 | 0 | result = globus_callback_register_oneshot( |
| 2254 | NULL, | |
| 2255 | &globus_i_reltime_zero, | |
| 2256 | Destroy_deserialize_callback, | |
| 2257 | callback_handle); | |
| 2258 | ||
| 2259 | 0 | NotificationProducerTestServiceDebugExit(); |
| 2260 | 0 | return result; |
| 2261 | } | |
| 2262 | ||
| 2263 | static | |
| 2264 | void | |
| 2265 | Destroy_invoke_callback( | |
| 2266 | void * handle) | |
| 2267 | 0 | { |
| 2268 | 0 | Destroy_callback_handle_t * callback_handle; |
| 2269 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 2270 | 0 | struct globus_soap_message_fault_s soap_fault; |
| 2271 | 0 | Destroy_invoke_func_t invoke_function; |
| 2272 | 0 | wsrl_DestroyType * Destroy; |
| 2273 | 0 | wsrl_DestroyResponseType DestroyResponse; |
| 2274 | 0 | xsd_QName element_qname; |
| 2275 | 0 | const char * fault_type_name = NULL; |
| 2276 | 0 | NotificationProducerTestPortType_Destroy_fault_t fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_DESTROY_NOFAULT; |
| 2277 | 0 | void * fault = NULL; |
| 2278 | ||
| 2279 | 0 | GlobusFuncName(Destroy_invoke_callback); |
| 2280 | 0 | NotificationProducerTestServiceDebugEnter(); |
| 2281 | ||
| 2282 | 0 | callback_handle = (Destroy_callback_handle_t *) handle; |
| 2283 | ||
| 2284 | 0 | Destroy = globus_soap_message_handle_get_attr( |
| 2285 | callback_handle->message, | |
| 2286 | "DestroyOperationInputParameter"); | |
| 2287 | 0 | globus_assert(Destroy); |
| 2288 | ||
| 2289 | 0 | result = globus_operation_table_get_operation( |
| 2290 | NotificationProducerTestService_descriptor.operations, | |
| 2291 | "Destroy", | |
| 2292 | (void **)&invoke_function); | |
| 2293 | 0 | if(result != GLOBUS_SUCCESS) |
| 2294 | { | |
| 2295 | 0 | goto fault_exit; |
| 2296 | } | |
| 2297 | ||
| 2298 | ||
| 2299 | 0 | result = wsrl_DestroyResponseType_init_contents( |
| 2300 | &DestroyResponse); | |
| 2301 | 0 | if(result != GLOBUS_SUCCESS) |
| 2302 | { | |
| 2303 | 0 | goto fault_exit; |
| 2304 | } | |
| 2305 | ||
| 2306 | 0 | result = invoke_function( |
| 2307 | callback_handle->engine, | |
| 2308 | callback_handle->message, | |
| 2309 | &NotificationProducerTestService_descriptor, | |
| 2310 | Destroy, | |
| 2311 | &DestroyResponse, | |
| 2312 | &fault_type_name, | |
| 2313 | &fault); | |
| 2314 | ||
| 2315 | fault_exit: | |
| 2316 | ||
| 2317 | 0 | if(fault && fault_type_name) |
| 2318 | { | |
| 2319 | 0 | fault_type = Destroy_lookup_fault_type(fault_type_name); |
| 2320 | ||
| 2321 | 0 | result = globus_service_session_begin_response( |
| 2322 | callback_handle->message); | |
| 2323 | 0 | if(result != GLOBUS_SUCCESS) |
| 2324 | { | |
| 2325 | 0 | goto exit; |
| 2326 | } | |
| 2327 | ||
| 2328 | 0 | soap_fault.faultcode = "Server"; |
| 2329 | 0 | soap_fault.faultstring = |
| 2330 | "An error occurred while processing the message"; | |
| 2331 | 0 | soap_fault.faultactor = NULL; |
| 2332 | ||
| 2333 | 0 | switch(fault_type) |
| 2334 | { | |
| 2335 | ||
| 2336 | case NOTIFICATIONPRODUCERTESTPORTTYPE_DESTROY_RESOURCEUNKNOWNFAULT: | |
| 2337 | ||
| 2338 | 0 | xsd_any_init(&soap_fault.detail); |
| 2339 | 0 | soap_fault.detail->any_info = &wsrl_ResourceUnknownFaultType_info; |
| 2340 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 2341 | 0 | soap_fault.detail->element->local = "ResourceUnknownFault"; |
| 2342 | 0 | soap_fault.detail->element->Namespace = |
| 2343 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"; | |
| 2344 | 0 | soap_fault.detail->value = fault; |
| 2345 | 0 | break; |
| 2346 | ||
| 2347 | case NOTIFICATIONPRODUCERTESTPORTTYPE_DESTROY_RESOURCENOTDESTROYEDFAULT: | |
| 2348 | ||
| 2349 | 0 | xsd_any_init(&soap_fault.detail); |
| 2350 | 0 | soap_fault.detail->any_info = &wsrl_ResourceNotDestroyedFaultType_info; |
| 2351 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 2352 | 0 | soap_fault.detail->element->local = "ResourceNotDestroyedFault"; |
| 2353 | 0 | soap_fault.detail->element->Namespace = |
| 2354 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"; | |
| 2355 | 0 | soap_fault.detail->value = fault; |
| 2356 | 0 | break; |
| 2357 | ||
| 2358 | default: | |
| 2359 | 0 | result = NotificationProducerTestServiceErrorReturnedUnknownFault("Destroy"); |
| 2360 | 0 | goto exit; |
| 2361 | } | |
| 2362 | ||
| 2363 | 0 | result = globus_service_session_serialize_fault_response( |
| 2364 | callback_handle->message, &soap_fault); | |
| 2365 | 0 | if(result != GLOBUS_SUCCESS) |
| 2366 | { | |
| 2367 | 0 | goto exit; |
| 2368 | } | |
| 2369 | ||
| 2370 | 0 | soap_fault.detail->element->local = NULL; |
| 2371 | 0 | soap_fault.detail->element->Namespace = NULL; |
| 2372 | 0 | soap_fault.detail->any_info = NULL; |
| 2373 | 0 | xsd_any_destroy(soap_fault.detail); |
| 2374 | ||
| 2375 | 0 | globus_soap_message_handle_set_attr( |
| 2376 | callback_handle->message, | |
| 2377 | WSADDR_ACTION_RESPONSE_KEY, | |
| 2378 | globus_soap_message_attr_copy_string, | |
| 2379 | globus_libc_free, | |
| 2380 | WSADDRESSING_FAULT_NS); | |
| 2381 | } | |
| 2382 | 0 | else if(result != GLOBUS_SUCCESS) |
| 2383 | { | |
| 2384 | 0 | globus_result_t local_result; |
| 2385 | 0 | local_result = globus_service_session_begin_response( |
| 2386 | callback_handle->message); | |
| 2387 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 2388 | { | |
| 2389 | 0 | result = local_result; |
| 2390 | 0 | goto exit; |
| 2391 | } | |
| 2392 | ||
| 2393 | 0 | soap_fault.faultcode = "Server"; |
| 2394 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 2395 | globus_error_get(result)); | |
| 2396 | 0 | result = GLOBUS_SUCCESS; |
| 2397 | 0 | soap_fault.faultactor = NULL; |
| 2398 | 0 | soap_fault.detail = NULL; |
| 2399 | 0 | result = globus_service_session_serialize_fault_response( |
| 2400 | callback_handle->message, &soap_fault); | |
| 2401 | 0 | if(result != GLOBUS_SUCCESS) |
| 2402 | { | |
| 2403 | 0 | goto exit; |
| 2404 | } | |
| 2405 | ||
| 2406 | 0 | globus_soap_message_handle_set_attr( |
| 2407 | callback_handle->message, | |
| 2408 | WSADDR_ACTION_RESPONSE_KEY, | |
| 2409 | globus_soap_message_attr_copy_string, | |
| 2410 | globus_libc_free, | |
| 2411 | WSADDRESSING_FAULT_NS); | |
| 2412 | } | |
| 2413 | else | |
| 2414 | { | |
| 2415 | 0 | result = globus_service_session_begin_response( |
| 2416 | callback_handle->message); | |
| 2417 | 0 | if(result != GLOBUS_SUCCESS) |
| 2418 | { | |
| 2419 | 0 | goto exit; |
| 2420 | } | |
| 2421 | ||
| 2422 | 0 | element_qname.local = "DestroyResponse"; |
| 2423 | 0 | element_qname.Namespace = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"; |
| 2424 | ||
| 2425 | 0 | result = wsrl_DestroyResponseType_serialize( |
| 2426 | &element_qname, | |
| 2427 | &DestroyResponse, | |
| 2428 | callback_handle->message, | |
| 2429 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 2430 | 0 | if(result != GLOBUS_SUCCESS) |
| 2431 | { | |
| 2432 | 0 | goto exit; |
| 2433 | } | |
| 2434 | ||
| 2435 | 0 | result = globus_service_session_end_response( |
| 2436 | callback_handle->message); | |
| 2437 | 0 | if(result != GLOBUS_SUCCESS) |
| 2438 | { | |
| 2439 | 0 | goto exit; |
| 2440 | } | |
| 2441 | ||
| 2442 | 0 | wsrl_DestroyResponseType_destroy_contents( |
| 2443 | &DestroyResponse); | |
| 2444 | ||
| 2445 | 0 | globus_soap_message_handle_set_attr( |
| 2446 | callback_handle->message, | |
| 2447 | WSADDR_ACTION_RESPONSE_KEY, | |
| 2448 | globus_soap_message_attr_copy_string, | |
| 2449 | globus_libc_free, | |
| 2450 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/DestroyResponse"); | |
| 2451 | } | |
| 2452 | ||
| 2453 | exit: | |
| 2454 | ||
| 2455 | 0 | callback_handle->callback( |
| 2456 | result, | |
| 2457 | callback_handle->args); | |
| 2458 | ||
| 2459 | 0 | globus_libc_free(callback_handle); |
| 2460 | ||
| 2461 | 0 | NotificationProducerTestServiceDebugExit(); |
| 2462 | } | |
| 2463 | ||
| 2464 | static | |
| 2465 | globus_result_t | |
| 2466 | Destroy_invoke( | |
| 2467 | globus_service_engine_t engine, | |
| 2468 | globus_soap_message_handle_t message, | |
| 2469 | globus_service_response_t * response, | |
| 2470 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 2471 | void * args) | |
| 2472 | 0 | { |
| 2473 | 0 | Destroy_callback_handle_t * callback_handle; |
| 2474 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 2475 | 0 | GlobusFuncName(NotificationProducerTestPortType_Destroy); |
| 2476 | 0 | NotificationProducerTestServiceDebugEnter(); |
| 2477 | ||
| 2478 | 0 | callback_handle = malloc(sizeof(Destroy_callback_handle_t)); |
| 2479 | 0 | if(!callback_handle) |
| 2480 | { | |
| 2481 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 2482 | 0 | goto exit; |
| 2483 | } | |
| 2484 | 0 | callback_handle->engine = engine; |
| 2485 | 0 | callback_handle->message = message; |
| 2486 | 0 | callback_handle->callback = invoke_callback; |
| 2487 | 0 | callback_handle->args = args; |
| 2488 | ||
| 2489 | 0 | result = globus_callback_register_oneshot( |
| 2490 | NULL, | |
| 2491 | &globus_i_reltime_zero, | |
| 2492 | Destroy_invoke_callback, | |
| 2493 | callback_handle); | |
| 2494 | ||
| 2495 | exit: | |
| 2496 | 0 | NotificationProducerTestServiceDebugExit(); |
| 2497 | 0 | return result; |
| 2498 | } | |
| 2499 | ||
| 2500 | ||
| 2501 | static | |
| 2502 | globus_result_t | |
| 2503 | Destroy_fault_to_type( | |
| 2504 | const char * fault_type_name, | |
| 2505 | int * fault_type, | |
| 2506 | globus_xsd_type_info_t * fault_type_info) | |
| 2507 | 0 | { |
| 2508 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 2509 | ||
| 2510 | 0 | *fault_type_info = NULL; |
| 2511 | ||
| 2512 | 0 | *fault_type = Destroy_lookup_fault_type(fault_type_name); |
| 2513 | ||
| 2514 | 0 | switch (*fault_type) |
| 2515 | { | |
| 2516 | case NOTIFICATIONPRODUCERTESTPORTTYPE_DESTROY_RESOURCEUNKNOWNFAULT: | |
| 2517 | 0 | *fault_type_info = &wsrl_ResourceUnknownFaultType_info; |
| 2518 | 0 | break; |
| 2519 | ||
| 2520 | case NOTIFICATIONPRODUCERTESTPORTTYPE_DESTROY_RESOURCENOTDESTROYEDFAULT: | |
| 2521 | 0 | *fault_type_info = &wsrl_ResourceNotDestroyedFaultType_info; |
| 2522 | 0 | break; |
| 2523 | ||
| 2524 | default: | |
| 2525 | 0 | result = NotificationProducerTestServiceErrorReturnedUnknownFault("Destroy"); |
| 2526 | goto exit; | |
| 2527 | } | |
| 2528 | ||
| 2529 | exit: | |
| 2530 | 0 | return result; |
| 2531 | } | |
| 2532 | ||
| 2533 | ||
| 2534 | static | |
| 2535 | globus_service_operation_descriptor_t | |
| 2536 | Destroy_operation_descriptor = | |
| 2537 | { | |
| 2538 | Destroy_deserialize, | |
| 2539 | Destroy_invoke, | |
| 2540 | ||
| 2541 | Destroy_fault_to_type | |
| 2542 | ||
| 2543 | }; | |
| 2544 | ||
| 2545 | static | |
| 2546 | globus_operation_provider_descriptor_t Destroy_descriptor = | |
| 2547 | { | |
| 2548 | &NotificationProducerTestPortType_Destroy_op_qname, | |
| 2549 | "Destroy", | |
| 2550 | (void *)NotificationProducerTestPortType_Destroy_impl, | |
| 2551 | NULL | |
| 2552 | }; | |
| 2553 | ||
| 2554 | ||
| 2555 | xsd_QName NotificationProducerTestPortType_SetTopicValue_op_qname = | |
| 2556 | { | |
| 2557 | "http://localhost:8080/wsrf/services/NotificationProducerTestService" | |
| 2558 | "SetTopicValue" | |
| 2559 | }; | |
| 2560 | ||
| 2561 | xsd_QName NotificationProducerTestPortType_SetTopicValue_input_qname = | |
| 2562 | { | |
| 2563 | "http://www.globus.org/namespaces/2005/03/NotificationProducerTest", | |
| 2564 | "SetTopicValue" | |
| 2565 | }; | |
| 2566 | ||
| 2567 | typedef globus_result_t (* SetTopicValue_invoke_func_t) ( | |
| 2568 | globus_service_engine_t engine, | |
| 2569 | globus_soap_message_handle_t message, | |
| 2570 | globus_service_descriptor_t * descriptor, | |
| 2571 | nptest_SetTopicValueType * SetTopicValue, | |
| 2572 | xsd_anyType * SetTopicValueResponse, | |
| 2573 | const char ** fault_type_name, | |
| 2574 | void ** fault); | |
| 2575 | ||
| 2576 | typedef struct SetTopicValue_callback_handle_s | |
| 2577 | { | |
| 2578 | globus_service_engine_t engine; | |
| 2579 | globus_soap_message_handle_t message; | |
| 2580 | globus_operation_invoke_callback_func_t callback; | |
| 2581 | void * args; | |
| 2582 | } SetTopicValue_callback_handle_t; | |
| 2583 | ||
| 2584 | ||
| 2585 | const char * NotificationProducerTestPortType_SetTopicValue_fault_strings[NOTIFICATIONPRODUCERTESTPORTTYPE_SETTOPICVALUE_UNKNOWN_FAULT] = | |
| 2586 | { | |
| 2587 | "Unknown" | |
| 2588 | ||
| 2589 | }; | |
| 2590 | ||
| 2591 | static | |
| 2592 | NotificationProducerTestPortType_SetTopicValue_fault_t | |
| 2593 | SetTopicValue_lookup_fault_type( | |
| 2594 | const char * fault_name) | |
| 2595 | 0 | { |
| 2596 | 0 | NotificationProducerTestPortType_SetTopicValue_fault_t fault_type; |
| 2597 | 0 | GlobusFuncName(SetTopicValue_lookup_fault_type); |
| 2598 | 0 | NotificationProducerTestServiceDebugEnter(); |
| 2599 | ||
| 2600 | 0 | globus_assert(fault_name); |
| 2601 | ||
| 2602 | ||
| 2603 | { | |
| 2604 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_SETTOPICVALUE_UNKNOWN_FAULT; |
| 2605 | } | |
| 2606 | ||
| 2607 | 0 | NotificationProducerTestServiceDebugExit(); |
| 2608 | 0 | return fault_type; |
| 2609 | } | |
| 2610 | ||
| 2611 | ||
| 2612 | ||
| 2613 | static | |
| 2614 | void | |
| 2615 | SetTopicValue_deserialize_callback( | |
| 2616 | void * handle) | |
| 2617 | 10 | { |
| 2618 | 10 | SetTopicValue_callback_handle_t * callback_handle; |
| 2619 | 10 | globus_result_t result = GLOBUS_SUCCESS; |
| 2620 | 10 | struct globus_soap_message_fault_s soap_fault; |
| 2621 | 10 | SetTopicValue_invoke_func_t invoke_function; |
| 2622 | 10 | nptest_SetTopicValueType * SetTopicValue = NULL; |
| 2623 | 10 | GlobusFuncName(SetTopicValue_deserialize_callback); |
| 2624 | 10 | NotificationProducerTestServiceDebugEnter(); |
| 2625 | ||
| 2626 | 10 | callback_handle = (SetTopicValue_callback_handle_t *) handle; |
| 2627 | ||
| 2628 | 10 | result = globus_operation_table_get_operation( |
| 2629 | NotificationProducerTestService_descriptor.operations, | |
| 2630 | "SetTopicValue", | |
| 2631 | (void **)&invoke_function); | |
| 2632 | 10 | if(result != GLOBUS_SUCCESS) |
| 2633 | { | |
| 2634 | 0 | goto exit; |
| 2635 | } | |
| 2636 | ||
| 2637 | 10 | if(NotificationProducerTestService_descriptor.registry) |
| 2638 | { | |
| 2639 | 10 | globus_soap_message_handle_set_registry( |
| 2640 | callback_handle->message, | |
| 2641 | NotificationProducerTestService_descriptor.registry); | |
| 2642 | } | |
| 2643 | ||
| 2644 | 10 | result = nptest_SetTopicValueType_init( |
| 2645 | &SetTopicValue); | |
| 2646 | 10 | if(result != GLOBUS_SUCCESS) |
| 2647 | { | |
| 2648 | 0 | goto exit; |
| 2649 | } | |
| 2650 | ||
| 2651 | 10 | result = nptest_SetTopicValueType_deserialize( |
| 2652 | &NotificationProducerTestPortType_SetTopicValue_input_qname, | |
| 2653 | SetTopicValue, | |
| 2654 | callback_handle->message, | |
| 2655 | 0); | |
| 2656 | 10 | if(result != GLOBUS_SUCCESS) |
| 2657 | { | |
| 2658 | 0 | goto exit; |
| 2659 | } | |
| 2660 | ||
| 2661 | 10 | result = globus_soap_message_handle_set_attr( |
| 2662 | callback_handle->message, | |
| 2663 | "SetTopicValueOperationInputParameter", | |
| 2664 | nptest_SetTopicValueType_copy_wrapper, | |
| 2665 | nptest_SetTopicValueType_destroy_wrapper, | |
| 2666 | (void *)SetTopicValue); | |
| 2667 | 10 | if(result != GLOBUS_SUCCESS) |
| 2668 | { | |
| 2669 | 10 | goto exit; |
| 2670 | } | |
| 2671 | ||
| 2672 | exit: | |
| 2673 | ||
| 2674 | 10 | if (SetTopicValue != NULL) |
| 2675 | { | |
| 2676 | 10 | nptest_SetTopicValueType_destroy(SetTopicValue); |
| 2677 | } | |
| 2678 | 10 | callback_handle->callback( |
| 2679 | result, | |
| 2680 | callback_handle->args); | |
| 2681 | ||
| 2682 | 10 | free(callback_handle); |
| 2683 | 10 | NotificationProducerTestServiceDebugExit(); |
| 2684 | } | |
| 2685 | ||
| 2686 | static | |
| 2687 | globus_result_t | |
| 2688 | SetTopicValue_deserialize( | |
| 2689 | globus_service_engine_t engine, | |
| 2690 | globus_soap_message_handle_t message, | |
| 2691 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 2692 | void * args) | |
| 2693 | 10 | { |
| 2694 | 10 | SetTopicValue_callback_handle_t * callback_handle; |
| 2695 | 10 | globus_result_t result = GLOBUS_SUCCESS; |
| 2696 | 10 | GlobusFuncName(SetTopicValue_deserialize); |
| 2697 | 10 | NotificationProducerTestServiceDebugEnter(); |
| 2698 | ||
| 2699 | 10 | callback_handle = malloc(sizeof(SetTopicValue_callback_handle_t)); |
| 2700 | 10 | globus_assert_string(callback_handle, |
| 2701 | "Memory allocation failed " | |
| 2702 | "for SetTopicValue callback handle"); | |
| 2703 | ||
| 2704 | 10 | callback_handle->engine = engine; |
| 2705 | 10 | callback_handle->message = message; |
| 2706 | 10 | callback_handle->callback = invoke_callback; |
| 2707 | 10 | callback_handle->args = args; |
| 2708 | ||
| 2709 | 10 | result = globus_callback_register_oneshot( |
| 2710 | NULL, | |
| 2711 | &globus_i_reltime_zero, | |
| 2712 | SetTopicValue_deserialize_callback, | |
| 2713 | callback_handle); | |
| 2714 | ||
| 2715 | 10 | NotificationProducerTestServiceDebugExit(); |
| 2716 | 10 | return result; |
| 2717 | } | |
| 2718 | ||
| 2719 | static | |
| 2720 | void | |
| 2721 | SetTopicValue_invoke_callback( | |
| 2722 | void * handle) | |
| 2723 | 10 | { |
| 2724 | 10 | SetTopicValue_callback_handle_t * callback_handle; |
| 2725 | 10 | globus_result_t result = GLOBUS_SUCCESS; |
| 2726 | 10 | struct globus_soap_message_fault_s soap_fault; |
| 2727 | 10 | SetTopicValue_invoke_func_t invoke_function; |
| 2728 | 10 | nptest_SetTopicValueType * SetTopicValue; |
| 2729 | 10 | xsd_anyType SetTopicValueResponse; |
| 2730 | 10 | xsd_QName element_qname; |
| 2731 | 10 | const char * fault_type_name = NULL; |
| 2732 | 10 | NotificationProducerTestPortType_SetTopicValue_fault_t fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_SETTOPICVALUE_NOFAULT; |
| 2733 | 10 | void * fault = NULL; |
| 2734 | ||
| 2735 | 10 | GlobusFuncName(SetTopicValue_invoke_callback); |
| 2736 | 10 | NotificationProducerTestServiceDebugEnter(); |
| 2737 | ||
| 2738 | 10 | callback_handle = (SetTopicValue_callback_handle_t *) handle; |
| 2739 | ||
| 2740 | 10 | SetTopicValue = globus_soap_message_handle_get_attr( |
| 2741 | callback_handle->message, | |
| 2742 | "SetTopicValueOperationInputParameter"); | |
| 2743 | 10 | globus_assert(SetTopicValue); |
| 2744 | ||
| 2745 | 10 | result = globus_operation_table_get_operation( |
| 2746 | NotificationProducerTestService_descriptor.operations, | |
| 2747 | "SetTopicValue", | |
| 2748 | (void **)&invoke_function); | |
| 2749 | 10 | if(result != GLOBUS_SUCCESS) |
| 2750 | { | |
| 2751 | 0 | goto fault_exit; |
| 2752 | } | |
| 2753 | ||
| 2754 | ||
| 2755 | 10 | result = xsd_anyType_init_contents( |
| 2756 | &SetTopicValueResponse); | |
| 2757 | 10 | if(result != GLOBUS_SUCCESS) |
| 2758 | { | |
| 2759 | 0 | goto fault_exit; |
| 2760 | } | |
| 2761 | ||
| 2762 | 10 | result = invoke_function( |
| 2763 | callback_handle->engine, | |
| 2764 | callback_handle->message, | |
| 2765 | &NotificationProducerTestService_descriptor, | |
| 2766 | SetTopicValue, | |
| 2767 | &SetTopicValueResponse, | |
| 2768 | &fault_type_name, | |
| 2769 | &fault); | |
| 2770 | ||
| 2771 | fault_exit: | |
| 2772 | ||
| 2773 | 10 | if(fault && fault_type_name) |
| 2774 | { | |
| 2775 | 0 | fault_type = SetTopicValue_lookup_fault_type(fault_type_name); |
| 2776 | ||
| 2777 | 0 | result = globus_service_session_begin_response( |
| 2778 | callback_handle->message); | |
| 2779 | 0 | if(result != GLOBUS_SUCCESS) |
| 2780 | { | |
| 2781 | 0 | goto exit; |
| 2782 | } | |
| 2783 | ||
| 2784 | 0 | soap_fault.faultcode = "Server"; |
| 2785 | 0 | soap_fault.faultstring = |
| 2786 | "An error occurred while processing the message"; | |
| 2787 | 0 | soap_fault.faultactor = NULL; |
| 2788 | ||
| 2789 | 0 | switch(fault_type) |
| 2790 | { | |
| 2791 | ||
| 2792 | default: | |
| 2793 | 0 | result = NotificationProducerTestServiceErrorReturnedUnknownFault("SetTopicValue"); |
| 2794 | 0 | goto exit; |
| 2795 | } | |
| 2796 | ||
| 2797 | 10 | result = globus_service_session_serialize_fault_response( |
| 2798 | callback_handle->message, &soap_fault); | |
| 2799 | 10 | if(result != GLOBUS_SUCCESS) |
| 2800 | { | |
| 2801 | 10 | goto exit; |
| 2802 | } | |
| 2803 | ||
| 2804 | 10 | soap_fault.detail->element->local = NULL; |
| 2805 | 10 | soap_fault.detail->element->Namespace = NULL; |
| 2806 | 10 | soap_fault.detail->any_info = NULL; |
| 2807 | 10 | xsd_any_destroy(soap_fault.detail); |
| 2808 | ||
| 2809 | 10 | globus_soap_message_handle_set_attr( |
| 2810 | callback_handle->message, | |
| 2811 | WSADDR_ACTION_RESPONSE_KEY, | |
| 2812 | globus_soap_message_attr_copy_string, | |
| 2813 | globus_libc_free, | |
| 2814 | WSADDRESSING_FAULT_NS); | |
| 2815 | } | |
| 2816 | 10 | else if(result != GLOBUS_SUCCESS) |
| 2817 | { | |
| 2818 | 0 | globus_result_t local_result; |
| 2819 | 0 | local_result = globus_service_session_begin_response( |
| 2820 | callback_handle->message); | |
| 2821 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 2822 | { | |
| 2823 | 0 | result = local_result; |
| 2824 | 0 | goto exit; |
| 2825 | } | |
| 2826 | ||
| 2827 | 0 | soap_fault.faultcode = "Server"; |
| 2828 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 2829 | globus_error_get(result)); | |
| 2830 | 0 | result = GLOBUS_SUCCESS; |
| 2831 | 0 | soap_fault.faultactor = NULL; |
| 2832 | 0 | soap_fault.detail = NULL; |
| 2833 | 0 | result = globus_service_session_serialize_fault_response( |
| 2834 | callback_handle->message, &soap_fault); | |
| 2835 | 0 | if(result != GLOBUS_SUCCESS) |
| 2836 | { | |
| 2837 | 0 | goto exit; |
| 2838 | } | |
| 2839 | ||
| 2840 | 0 | globus_soap_message_handle_set_attr( |
| 2841 | callback_handle->message, | |
| 2842 | WSADDR_ACTION_RESPONSE_KEY, | |
| 2843 | globus_soap_message_attr_copy_string, | |
| 2844 | globus_libc_free, | |
| 2845 | WSADDRESSING_FAULT_NS); | |
| 2846 | } | |
| 2847 | else | |
| 2848 | { | |
| 2849 | 10 | result = globus_service_session_begin_response( |
| 2850 | callback_handle->message); | |
| 2851 | 10 | if(result != GLOBUS_SUCCESS) |
| 2852 | { | |
| 2853 | 0 | goto exit; |
| 2854 | } | |
| 2855 | ||
| 2856 | 10 | element_qname.local = "SetTopicValueResponse"; |
| 2857 | 10 | element_qname.Namespace = "http://www.globus.org/namespaces/2005/03/NotificationProducerTest"; |
| 2858 | ||
| 2859 | 10 | result = xsd_anyType_serialize( |
| 2860 | &element_qname, | |
| 2861 | &SetTopicValueResponse, | |
| 2862 | callback_handle->message, | |
| 2863 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 2864 | 10 | if(result != GLOBUS_SUCCESS) |
| 2865 | { | |
| 2866 | 0 | goto exit; |
| 2867 | } | |
| 2868 | ||
| 2869 | 10 | result = globus_service_session_end_response( |
| 2870 | callback_handle->message); | |
| 2871 | 10 | if(result != GLOBUS_SUCCESS) |
| 2872 | { | |
| 2873 | 0 | goto exit; |
| 2874 | } | |
| 2875 | ||
| 2876 | 10 | xsd_anyType_destroy_contents( |
| 2877 | &SetTopicValueResponse); | |
| 2878 | ||
| 2879 | 10 | globus_soap_message_handle_set_attr( |
| 2880 | callback_handle->message, | |
| 2881 | WSADDR_ACTION_RESPONSE_KEY, | |
| 2882 | globus_soap_message_attr_copy_string, | |
| 2883 | globus_libc_free, | |
| 2884 | "http://www.globus.org/namespaces/2005/03/NotificationProducerTest/NotificationProducerTestPortType/SetTopicValueResponse"); | |
| 2885 | } | |
| 2886 | ||
| 2887 | exit: | |
| 2888 | ||
| 2889 | 10 | callback_handle->callback( |
| 2890 | result, | |
| 2891 | callback_handle->args); | |
| 2892 | ||
| 2893 | 10 | globus_libc_free(callback_handle); |
| 2894 | ||
| 2895 | 10 | NotificationProducerTestServiceDebugExit(); |
| 2896 | } | |
| 2897 | ||
| 2898 | static | |
| 2899 | globus_result_t | |
| 2900 | SetTopicValue_invoke( | |
| 2901 | globus_service_engine_t engine, | |
| 2902 | globus_soap_message_handle_t message, | |
| 2903 | globus_service_response_t * response, | |
| 2904 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 2905 | void * args) | |
| 2906 | 10 | { |
| 2907 | 10 | SetTopicValue_callback_handle_t * callback_handle; |
| 2908 | 10 | globus_result_t result = GLOBUS_SUCCESS; |
| 2909 | 10 | GlobusFuncName(NotificationProducerTestPortType_SetTopicValue); |
| 2910 | 10 | NotificationProducerTestServiceDebugEnter(); |
| 2911 | ||
| 2912 | 10 | callback_handle = malloc(sizeof(SetTopicValue_callback_handle_t)); |
| 2913 | 10 | if(!callback_handle) |
| 2914 | { | |
| 2915 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 2916 | 0 | goto exit; |
| 2917 | } | |
| 2918 | 10 | callback_handle->engine = engine; |
| 2919 | 10 | callback_handle->message = message; |
| 2920 | 10 | callback_handle->callback = invoke_callback; |
| 2921 | 10 | callback_handle->args = args; |
| 2922 | ||
| 2923 | 10 | result = globus_callback_register_oneshot( |
| 2924 | NULL, | |
| 2925 | &globus_i_reltime_zero, | |
| 2926 | SetTopicValue_invoke_callback, | |
| 2927 | callback_handle); | |
| 2928 | ||
| 2929 | exit: | |
| 2930 | 10 | NotificationProducerTestServiceDebugExit(); |
| 2931 | 10 | return result; |
| 2932 | } | |
| 2933 | ||
| 2934 | ||
| 2935 | static | |
| 2936 | globus_result_t | |
| 2937 | SetTopicValue_fault_to_type( | |
| 2938 | const char * fault_type_name, | |
| 2939 | int * fault_type, | |
| 2940 | globus_xsd_type_info_t * fault_type_info) | |
| 2941 | 0 | { |
| 2942 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 2943 | ||
| 2944 | 0 | *fault_type_info = NULL; |
| 2945 | ||
| 2946 | 0 | *fault_type = SetTopicValue_lookup_fault_type(fault_type_name); |
| 2947 | ||
| 2948 | 0 | switch (*fault_type) |
| 2949 | { | |
| 2950 | default: | |
| 2951 | 0 | result = NotificationProducerTestServiceErrorReturnedUnknownFault("SetTopicValue"); |
| 2952 | 0 | goto exit; |
| 2953 | } | |
| 2954 | ||
| 2955 | exit: | |
| 2956 | 0 | return result; |
| 2957 | } | |
| 2958 | ||
| 2959 | ||
| 2960 | static | |
| 2961 | globus_service_operation_descriptor_t | |
| 2962 | SetTopicValue_operation_descriptor = | |
| 2963 | { | |
| 2964 | SetTopicValue_deserialize, | |
| 2965 | SetTopicValue_invoke, | |
| 2966 | ||
| 2967 | SetTopicValue_fault_to_type | |
| 2968 | ||
| 2969 | }; | |
| 2970 | ||
| 2971 | static | |
| 2972 | globus_operation_provider_descriptor_t SetTopicValue_descriptor = | |
| 2973 | { | |
| 2974 | &NotificationProducerTestPortType_SetTopicValue_op_qname, | |
| 2975 | "SetTopicValue", | |
| 2976 | (void *)NotificationProducerTestPortType_SetTopicValue_impl, | |
| 2977 | NULL | |
| 2978 | }; | |
| 2979 | ||
| 2980 | ||
| 2981 | xsd_QName NotificationProducerTestPortType_DestroyTopic_op_qname = | |
| 2982 | { | |
| 2983 | "http://localhost:8080/wsrf/services/NotificationProducerTestService" | |
| 2984 | "DestroyTopic" | |
| 2985 | }; | |
| 2986 | ||
| 2987 | xsd_QName NotificationProducerTestPortType_DestroyTopic_input_qname = | |
| 2988 | { | |
| 2989 | "http://www.globus.org/namespaces/2005/03/NotificationProducerTest", | |
| 2990 | "DestroyTopic" | |
| 2991 | }; | |
| 2992 | ||
| 2993 | typedef globus_result_t (* DestroyTopic_invoke_func_t) ( | |
| 2994 | globus_service_engine_t engine, | |
| 2995 | globus_soap_message_handle_t message, | |
| 2996 | globus_service_descriptor_t * descriptor, | |
| 2997 | wsnt_TopicExpressionType * DestroyTopic, | |
| 2998 | xsd_anyType * DestroyTopicResponse, | |
| 2999 | const char ** fault_type_name, | |
| 3000 | void ** fault); | |
| 3001 | ||
| 3002 | typedef struct DestroyTopic_callback_handle_s | |
| 3003 | { | |
| 3004 | globus_service_engine_t engine; | |
| 3005 | globus_soap_message_handle_t message; | |
| 3006 | globus_operation_invoke_callback_func_t callback; | |
| 3007 | void * args; | |
| 3008 | } DestroyTopic_callback_handle_t; | |
| 3009 | ||
| 3010 | ||
| 3011 | const char * NotificationProducerTestPortType_DestroyTopic_fault_strings[NOTIFICATIONPRODUCERTESTPORTTYPE_DESTROYTOPIC_UNKNOWN_FAULT] = | |
| 3012 | { | |
| 3013 | "Unknown" | |
| 3014 | ||
| 3015 | }; | |
| 3016 | ||
| 3017 | static | |
| 3018 | NotificationProducerTestPortType_DestroyTopic_fault_t | |
| 3019 | DestroyTopic_lookup_fault_type( | |
| 3020 | const char * fault_name) | |
| 3021 | 0 | { |
| 3022 | 0 | NotificationProducerTestPortType_DestroyTopic_fault_t fault_type; |
| 3023 | 0 | GlobusFuncName(DestroyTopic_lookup_fault_type); |
| 3024 | 0 | NotificationProducerTestServiceDebugEnter(); |
| 3025 | ||
| 3026 | 0 | globus_assert(fault_name); |
| 3027 | ||
| 3028 | ||
| 3029 | { | |
| 3030 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_DESTROYTOPIC_UNKNOWN_FAULT; |
| 3031 | } | |
| 3032 | ||
| 3033 | 0 | NotificationProducerTestServiceDebugExit(); |
| 3034 | 0 | return fault_type; |
| 3035 | } | |
| 3036 | ||
| 3037 | ||
| 3038 | ||
| 3039 | static | |
| 3040 | void | |
| 3041 | DestroyTopic_deserialize_callback( | |
| 3042 | void * handle) | |
| 3043 | 1 | { |
| 3044 | 1 | DestroyTopic_callback_handle_t * callback_handle; |
| 3045 | 1 | globus_result_t result = GLOBUS_SUCCESS; |
| 3046 | 1 | struct globus_soap_message_fault_s soap_fault; |
| 3047 | 1 | DestroyTopic_invoke_func_t invoke_function; |
| 3048 | 1 | wsnt_TopicExpressionType * DestroyTopic = NULL; |
| 3049 | 1 | GlobusFuncName(DestroyTopic_deserialize_callback); |
| 3050 | 1 | NotificationProducerTestServiceDebugEnter(); |
| 3051 | ||
| 3052 | 1 | callback_handle = (DestroyTopic_callback_handle_t *) handle; |
| 3053 | ||
| 3054 | 1 | result = globus_operation_table_get_operation( |
| 3055 | NotificationProducerTestService_descriptor.operations, | |
| 3056 | "DestroyTopic", | |
| 3057 | (void **)&invoke_function); | |
| 3058 | 1 | if(result != GLOBUS_SUCCESS) |
| 3059 | { | |
| 3060 | 0 | goto exit; |
| 3061 | } | |
| 3062 | ||
| 3063 | 1 | if(NotificationProducerTestService_descriptor.registry) |
| 3064 | { | |
| 3065 | 1 | globus_soap_message_handle_set_registry( |
| 3066 | callback_handle->message, | |
| 3067 | NotificationProducerTestService_descriptor.registry); | |
| 3068 | } | |
| 3069 | ||
| 3070 | 1 | result = wsnt_TopicExpressionType_init( |
| 3071 | &DestroyTopic); | |
| 3072 | 1 | if(result != GLOBUS_SUCCESS) |
| 3073 | { | |
| 3074 | 0 | goto exit; |
| 3075 | } | |
| 3076 | ||
| 3077 | 1 | result = wsnt_TopicExpressionType_deserialize( |
| 3078 | &NotificationProducerTestPortType_DestroyTopic_input_qname, | |
| 3079 | DestroyTopic, | |
| 3080 | callback_handle->message, | |
| 3081 | 0); | |
| 3082 | 1 | if(result != GLOBUS_SUCCESS) |
| 3083 | { | |
| 3084 | 0 | goto exit; |
| 3085 | } | |
| 3086 | ||
| 3087 | 1 | result = globus_soap_message_handle_set_attr( |
| 3088 | callback_handle->message, | |
| 3089 | "DestroyTopicOperationInputParameter", | |
| 3090 | wsnt_TopicExpressionType_copy_wrapper, | |
| 3091 | wsnt_TopicExpressionType_destroy_wrapper, | |
| 3092 | (void *)DestroyTopic); | |
| 3093 | 1 | if(result != GLOBUS_SUCCESS) |
| 3094 | { | |
| 3095 | 1 | goto exit; |
| 3096 | } | |
| 3097 | ||
| 3098 | exit: | |
| 3099 | ||
| 3100 | 1 | if (DestroyTopic != NULL) |
| 3101 | { | |
| 3102 | 1 | wsnt_TopicExpressionType_destroy(DestroyTopic); |
| 3103 | } | |
| 3104 | 1 | callback_handle->callback( |
| 3105 | result, | |
| 3106 | callback_handle->args); | |
| 3107 | ||
| 3108 | 1 | free(callback_handle); |
| 3109 | 1 | NotificationProducerTestServiceDebugExit(); |
| 3110 | } | |
| 3111 | ||
| 3112 | static | |
| 3113 | globus_result_t | |
| 3114 | DestroyTopic_deserialize( | |
| 3115 | globus_service_engine_t engine, | |
| 3116 | globus_soap_message_handle_t message, | |
| 3117 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 3118 | void * args) | |
| 3119 | 1 | { |
| 3120 | 1 | DestroyTopic_callback_handle_t * callback_handle; |
| 3121 | 1 | globus_result_t result = GLOBUS_SUCCESS; |
| 3122 | 1 | GlobusFuncName(DestroyTopic_deserialize); |
| 3123 | 1 | NotificationProducerTestServiceDebugEnter(); |
| 3124 | ||
| 3125 | 1 | callback_handle = malloc(sizeof(DestroyTopic_callback_handle_t)); |
| 3126 | 1 | globus_assert_string(callback_handle, |
| 3127 | "Memory allocation failed " | |
| 3128 | "for DestroyTopic callback handle"); | |
| 3129 | ||
| 3130 | 1 | callback_handle->engine = engine; |
| 3131 | 1 | callback_handle->message = message; |
| 3132 | 1 | callback_handle->callback = invoke_callback; |
| 3133 | 1 | callback_handle->args = args; |
| 3134 | ||
| 3135 | 1 | result = globus_callback_register_oneshot( |
| 3136 | NULL, | |
| 3137 | &globus_i_reltime_zero, | |
| 3138 | DestroyTopic_deserialize_callback, | |
| 3139 | callback_handle); | |
| 3140 | ||
| 3141 | 1 | NotificationProducerTestServiceDebugExit(); |
| 3142 | 1 | return result; |
| 3143 | } | |
| 3144 | ||
| 3145 | static | |
| 3146 | void | |
| 3147 | DestroyTopic_invoke_callback( | |
| 3148 | void * handle) | |
| 3149 | 1 | { |
| 3150 | 1 | DestroyTopic_callback_handle_t * callback_handle; |
| 3151 | 1 | globus_result_t result = GLOBUS_SUCCESS; |
| 3152 | 1 | struct globus_soap_message_fault_s soap_fault; |
| 3153 | 1 | DestroyTopic_invoke_func_t invoke_function; |
| 3154 | 1 | wsnt_TopicExpressionType * DestroyTopic; |
| 3155 | 1 | xsd_anyType DestroyTopicResponse; |
| 3156 | 1 | xsd_QName element_qname; |
| 3157 | 1 | const char * fault_type_name = NULL; |
| 3158 | 1 | NotificationProducerTestPortType_DestroyTopic_fault_t fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_DESTROYTOPIC_NOFAULT; |
| 3159 | 1 | void * fault = NULL; |
| 3160 | ||
| 3161 | 1 | GlobusFuncName(DestroyTopic_invoke_callback); |
| 3162 | 1 | NotificationProducerTestServiceDebugEnter(); |
| 3163 | ||
| 3164 | 1 | callback_handle = (DestroyTopic_callback_handle_t *) handle; |
| 3165 | ||
| 3166 | 1 | DestroyTopic = globus_soap_message_handle_get_attr( |
| 3167 | callback_handle->message, | |
| 3168 | "DestroyTopicOperationInputParameter"); | |
| 3169 | 1 | globus_assert(DestroyTopic); |
| 3170 | ||
| 3171 | 1 | result = globus_operation_table_get_operation( |
| 3172 | NotificationProducerTestService_descriptor.operations, | |
| 3173 | "DestroyTopic", | |
| 3174 | (void **)&invoke_function); | |
| 3175 | 1 | if(result != GLOBUS_SUCCESS) |
| 3176 | { | |
| 3177 | 0 | goto fault_exit; |
| 3178 | } | |
| 3179 | ||
| 3180 | ||
| 3181 | 1 | result = xsd_anyType_init_contents( |
| 3182 | &DestroyTopicResponse); | |
| 3183 | 1 | if(result != GLOBUS_SUCCESS) |
| 3184 | { | |
| 3185 | 0 | goto fault_exit; |
| 3186 | } | |
| 3187 | ||
| 3188 | 1 | result = invoke_function( |
| 3189 | callback_handle->engine, | |
| 3190 | callback_handle->message, | |
| 3191 | &NotificationProducerTestService_descriptor, | |
| 3192 | DestroyTopic, | |
| 3193 | &DestroyTopicResponse, | |
| 3194 | &fault_type_name, | |
| 3195 | &fault); | |
| 3196 | ||
| 3197 | fault_exit: | |
| 3198 | ||
| 3199 | 1 | if(fault && fault_type_name) |
| 3200 | { | |
| 3201 | 0 | fault_type = DestroyTopic_lookup_fault_type(fault_type_name); |
| 3202 | ||
| 3203 | 0 | result = globus_service_session_begin_response( |
| 3204 | callback_handle->message); | |
| 3205 | 0 | if(result != GLOBUS_SUCCESS) |
| 3206 | { | |
| 3207 | 0 | goto exit; |
| 3208 | } | |
| 3209 | ||
| 3210 | 0 | soap_fault.faultcode = "Server"; |
| 3211 | 0 | soap_fault.faultstring = |
| 3212 | "An error occurred while processing the message"; | |
| 3213 | 0 | soap_fault.faultactor = NULL; |
| 3214 | ||
| 3215 | 0 | switch(fault_type) |
| 3216 | { | |
| 3217 | ||
| 3218 | default: | |
| 3219 | 0 | result = NotificationProducerTestServiceErrorReturnedUnknownFault("DestroyTopic"); |
| 3220 | 0 | goto exit; |
| 3221 | } | |
| 3222 | ||
| 3223 | 1 | result = globus_service_session_serialize_fault_response( |
| 3224 | callback_handle->message, &soap_fault); | |
| 3225 | 1 | if(result != GLOBUS_SUCCESS) |
| 3226 | { | |
| 3227 | 1 | goto exit; |
| 3228 | } | |
| 3229 | ||
| 3230 | 1 | soap_fault.detail->element->local = NULL; |
| 3231 | 1 | soap_fault.detail->element->Namespace = NULL; |
| 3232 | 1 | soap_fault.detail->any_info = NULL; |
| 3233 | 1 | xsd_any_destroy(soap_fault.detail); |
| 3234 | ||
| 3235 | 1 | globus_soap_message_handle_set_attr( |
| 3236 | callback_handle->message, | |
| 3237 | WSADDR_ACTION_RESPONSE_KEY, | |
| 3238 | globus_soap_message_attr_copy_string, | |
| 3239 | globus_libc_free, | |
| 3240 | WSADDRESSING_FAULT_NS); | |
| 3241 | } | |
| 3242 | 1 | else if(result != GLOBUS_SUCCESS) |
| 3243 | { | |
| 3244 | 0 | globus_result_t local_result; |
| 3245 | 0 | local_result = globus_service_session_begin_response( |
| 3246 | callback_handle->message); | |
| 3247 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 3248 | { | |
| 3249 | 0 | result = local_result; |
| 3250 | 0 | goto exit; |
| 3251 | } | |
| 3252 | ||
| 3253 | 0 | soap_fault.faultcode = "Server"; |
| 3254 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 3255 | globus_error_get(result)); | |
| 3256 | 0 | result = GLOBUS_SUCCESS; |
| 3257 | 0 | soap_fault.faultactor = NULL; |
| 3258 | 0 | soap_fault.detail = NULL; |
| 3259 | 0 | result = globus_service_session_serialize_fault_response( |
| 3260 | callback_handle->message, &soap_fault); | |
| 3261 | 0 | if(result != GLOBUS_SUCCESS) |
| 3262 | { | |
| 3263 | 0 | goto exit; |
| 3264 | } | |
| 3265 | ||
| 3266 | 0 | globus_soap_message_handle_set_attr( |
| 3267 | callback_handle->message, | |
| 3268 | WSADDR_ACTION_RESPONSE_KEY, | |
| 3269 | globus_soap_message_attr_copy_string, | |
| 3270 | globus_libc_free, | |
| 3271 | WSADDRESSING_FAULT_NS); | |
| 3272 | } | |
| 3273 | else | |
| 3274 | { | |
| 3275 | 1 | result = globus_service_session_begin_response( |
| 3276 | callback_handle->message); | |
| 3277 | 1 | if(result != GLOBUS_SUCCESS) |
| 3278 | { | |
| 3279 | 0 | goto exit; |
| 3280 | } | |
| 3281 | ||
| 3282 | 1 | element_qname.local = "DestroyTopicResponse"; |
| 3283 | 1 | element_qname.Namespace = "http://www.globus.org/namespaces/2005/03/NotificationProducerTest"; |
| 3284 | ||
| 3285 | 1 | result = xsd_anyType_serialize( |
| 3286 | &element_qname, | |
| 3287 | &DestroyTopicResponse, | |
| 3288 | callback_handle->message, | |
| 3289 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 3290 | 1 | if(result != GLOBUS_SUCCESS) |
| 3291 | { | |
| 3292 | 0 | goto exit; |
| 3293 | } | |
| 3294 | ||
| 3295 | 1 | result = globus_service_session_end_response( |
| 3296 | callback_handle->message); | |
| 3297 | 1 | if(result != GLOBUS_SUCCESS) |
| 3298 | { | |
| 3299 | 0 | goto exit; |
| 3300 | } | |
| 3301 | ||
| 3302 | 1 | xsd_anyType_destroy_contents( |
| 3303 | &DestroyTopicResponse); | |
| 3304 | ||
| 3305 | 1 | globus_soap_message_handle_set_attr( |
| 3306 | callback_handle->message, | |
| 3307 | WSADDR_ACTION_RESPONSE_KEY, | |
| 3308 | globus_soap_message_attr_copy_string, | |
| 3309 | globus_libc_free, | |
| 3310 | "http://www.globus.org/namespaces/2005/03/NotificationProducerTest/NotificationProducerTestPortType/DestroyTopicResponse"); | |
| 3311 | } | |
| 3312 | ||
| 3313 | exit: | |
| 3314 | ||
| 3315 | 1 | callback_handle->callback( |
| 3316 | result, | |
| 3317 | callback_handle->args); | |
| 3318 | ||
| 3319 | 1 | globus_libc_free(callback_handle); |
| 3320 | ||
| 3321 | 1 | NotificationProducerTestServiceDebugExit(); |
| 3322 | } | |
| 3323 | ||
| 3324 | static | |
| 3325 | globus_result_t | |
| 3326 | DestroyTopic_invoke( | |
| 3327 | globus_service_engine_t engine, | |
| 3328 | globus_soap_message_handle_t message, | |
| 3329 | globus_service_response_t * response, | |
| 3330 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 3331 | void * args) | |
| 3332 | 1 | { |
| 3333 | 1 | DestroyTopic_callback_handle_t * callback_handle; |
| 3334 | 1 | globus_result_t result = GLOBUS_SUCCESS; |
| 3335 | 1 | GlobusFuncName(NotificationProducerTestPortType_DestroyTopic); |
| 3336 | 1 | NotificationProducerTestServiceDebugEnter(); |
| 3337 | ||
| 3338 | 1 | callback_handle = malloc(sizeof(DestroyTopic_callback_handle_t)); |
| 3339 | 1 | if(!callback_handle) |
| 3340 | { | |
| 3341 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 3342 | 0 | goto exit; |
| 3343 | } | |
| 3344 | 1 | callback_handle->engine = engine; |
| 3345 | 1 | callback_handle->message = message; |
| 3346 | 1 | callback_handle->callback = invoke_callback; |
| 3347 | 1 | callback_handle->args = args; |
| 3348 | ||
| 3349 | 1 | result = globus_callback_register_oneshot( |
| 3350 | NULL, | |
| 3351 | &globus_i_reltime_zero, | |
| 3352 | DestroyTopic_invoke_callback, | |
| 3353 | callback_handle); | |
| 3354 | ||
| 3355 | exit: | |
| 3356 | 1 | NotificationProducerTestServiceDebugExit(); |
| 3357 | 1 | return result; |
| 3358 | } | |
| 3359 | ||
| 3360 | ||
| 3361 | static | |
| 3362 | globus_result_t | |
| 3363 | DestroyTopic_fault_to_type( | |
| 3364 | const char * fault_type_name, | |
| 3365 | int * fault_type, | |
| 3366 | globus_xsd_type_info_t * fault_type_info) | |
| 3367 | 0 | { |
| 3368 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 3369 | ||
| 3370 | 0 | *fault_type_info = NULL; |
| 3371 | ||
| 3372 | 0 | *fault_type = DestroyTopic_lookup_fault_type(fault_type_name); |
| 3373 | ||
| 3374 | 0 | switch (*fault_type) |
| 3375 | { | |
| 3376 | default: | |
| 3377 | 0 | result = NotificationProducerTestServiceErrorReturnedUnknownFault("DestroyTopic"); |
| 3378 | 0 | goto exit; |
| 3379 | } | |
| 3380 | ||
| 3381 | exit: | |
| 3382 | 0 | return result; |
| 3383 | } | |
| 3384 | ||
| 3385 | ||
| 3386 | static | |
| 3387 | globus_service_operation_descriptor_t | |
| 3388 | DestroyTopic_operation_descriptor = | |
| 3389 | { | |
| 3390 | DestroyTopic_deserialize, | |
| 3391 | DestroyTopic_invoke, | |
| 3392 | ||
| 3393 | DestroyTopic_fault_to_type | |
| 3394 | ||
| 3395 | }; | |
| 3396 | ||
| 3397 | static | |
| 3398 | globus_operation_provider_descriptor_t DestroyTopic_descriptor = | |
| 3399 | { | |
| 3400 | &NotificationProducerTestPortType_DestroyTopic_op_qname, | |
| 3401 | "DestroyTopic", | |
| 3402 | (void *)NotificationProducerTestPortType_DestroyTopic_impl, | |
| 3403 | NULL | |
| 3404 | }; | |
| 3405 | ||
| 3406 | ||
| 3407 | xsd_QName NotificationProducerTestPortType_CreateTopic_op_qname = | |
| 3408 | { | |
| 3409 | "http://localhost:8080/wsrf/services/NotificationProducerTestService" | |
| 3410 | "CreateTopic" | |
| 3411 | }; | |
| 3412 | ||
| 3413 | xsd_QName NotificationProducerTestPortType_CreateTopic_input_qname = | |
| 3414 | { | |
| 3415 | "http://www.globus.org/namespaces/2005/03/NotificationProducerTest", | |
| 3416 | "CreateTopic" | |
| 3417 | }; | |
| 3418 | ||
| 3419 | typedef globus_result_t (* CreateTopic_invoke_func_t) ( | |
| 3420 | globus_service_engine_t engine, | |
| 3421 | globus_soap_message_handle_t message, | |
| 3422 | globus_service_descriptor_t * descriptor, | |
| 3423 | nptest_CreateTopicType * CreateTopic, | |
| 3424 | xsd_anyType * CreateTopicResponse, | |
| 3425 | const char ** fault_type_name, | |
| 3426 | void ** fault); | |
| 3427 | ||
| 3428 | typedef struct CreateTopic_callback_handle_s | |
| 3429 | { | |
| 3430 | globus_service_engine_t engine; | |
| 3431 | globus_soap_message_handle_t message; | |
| 3432 | globus_operation_invoke_callback_func_t callback; | |
| 3433 | void * args; | |
| 3434 | } CreateTopic_callback_handle_t; | |
| 3435 | ||
| 3436 | ||
| 3437 | const char * NotificationProducerTestPortType_CreateTopic_fault_strings[NOTIFICATIONPRODUCERTESTPORTTYPE_CREATETOPIC_UNKNOWN_FAULT] = | |
| 3438 | { | |
| 3439 | "Unknown" | |
| 3440 | ||
| 3441 | }; | |
| 3442 | ||
| 3443 | static | |
| 3444 | NotificationProducerTestPortType_CreateTopic_fault_t | |
| 3445 | CreateTopic_lookup_fault_type( | |
| 3446 | const char * fault_name) | |
| 3447 | 0 | { |
| 3448 | 0 | NotificationProducerTestPortType_CreateTopic_fault_t fault_type; |
| 3449 | 0 | GlobusFuncName(CreateTopic_lookup_fault_type); |
| 3450 | 0 | NotificationProducerTestServiceDebugEnter(); |
| 3451 | ||
| 3452 | 0 | globus_assert(fault_name); |
| 3453 | ||
| 3454 | ||
| 3455 | { | |
| 3456 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_CREATETOPIC_UNKNOWN_FAULT; |
| 3457 | } | |
| 3458 | ||
| 3459 | 0 | NotificationProducerTestServiceDebugExit(); |
| 3460 | 0 | return fault_type; |
| 3461 | } | |
| 3462 | ||
| 3463 | ||
| 3464 | ||
| 3465 | static | |
| 3466 | void | |
| 3467 | CreateTopic_deserialize_callback( | |
| 3468 | void * handle) | |
| 3469 | 19 | { |
| 3470 | 19 | CreateTopic_callback_handle_t * callback_handle; |
| 3471 | 19 | globus_result_t result = GLOBUS_SUCCESS; |
| 3472 | 19 | struct globus_soap_message_fault_s soap_fault; |
| 3473 | 19 | CreateTopic_invoke_func_t invoke_function; |
| 3474 | 19 | nptest_CreateTopicType * CreateTopic = NULL; |
| 3475 | 19 | GlobusFuncName(CreateTopic_deserialize_callback); |
| 3476 | 19 | NotificationProducerTestServiceDebugEnter(); |
| 3477 | ||
| 3478 | 19 | callback_handle = (CreateTopic_callback_handle_t *) handle; |
| 3479 | ||
| 3480 | 19 | result = globus_operation_table_get_operation( |
| 3481 | NotificationProducerTestService_descriptor.operations, | |
| 3482 | "CreateTopic", | |
| 3483 | (void **)&invoke_function); | |
| 3484 | 19 | if(result != GLOBUS_SUCCESS) |
| 3485 | { | |
| 3486 | 0 | goto exit; |
| 3487 | } | |
| 3488 | ||
| 3489 | 19 | if(NotificationProducerTestService_descriptor.registry) |
| 3490 | { | |
| 3491 | 19 | globus_soap_message_handle_set_registry( |
| 3492 | callback_handle->message, | |
| 3493 | NotificationProducerTestService_descriptor.registry); | |
| 3494 | } | |
| 3495 | ||
| 3496 | 19 | result = nptest_CreateTopicType_init( |
| 3497 | &CreateTopic); | |
| 3498 | 19 | if(result != GLOBUS_SUCCESS) |
| 3499 | { | |
| 3500 | 0 | goto exit; |
| 3501 | } | |
| 3502 | ||
| 3503 | 19 | result = nptest_CreateTopicType_deserialize( |
| 3504 | &NotificationProducerTestPortType_CreateTopic_input_qname, | |
| 3505 | CreateTopic, | |
| 3506 | callback_handle->message, | |
| 3507 | 0); | |
| 3508 | 19 | if(result != GLOBUS_SUCCESS) |
| 3509 | { | |
| 3510 | 0 | goto exit; |
| 3511 | } | |
| 3512 | ||
| 3513 | 19 | result = globus_soap_message_handle_set_attr( |
| 3514 | callback_handle->message, | |
| 3515 | "CreateTopicOperationInputParameter", | |
| 3516 | nptest_CreateTopicType_copy_wrapper, | |
| 3517 | nptest_CreateTopicType_destroy_wrapper, | |
| 3518 | (void *)CreateTopic); | |
| 3519 | 19 | if(result != GLOBUS_SUCCESS) |
| 3520 | { | |
| 3521 | 19 | goto exit; |
| 3522 | } | |
| 3523 | ||
| 3524 | exit: | |
| 3525 | ||
| 3526 | 19 | if (CreateTopic != NULL) |
| 3527 | { | |
| 3528 | 19 | nptest_CreateTopicType_destroy(CreateTopic); |
| 3529 | } | |
| 3530 | 19 | callback_handle->callback( |
| 3531 | result, | |
| 3532 | callback_handle->args); | |
| 3533 | ||
| 3534 | 19 | free(callback_handle); |
| 3535 | 19 | NotificationProducerTestServiceDebugExit(); |
| 3536 | } | |
| 3537 | ||
| 3538 | static | |
| 3539 | globus_result_t | |
| 3540 | CreateTopic_deserialize( | |
| 3541 | globus_service_engine_t engine, | |
| 3542 | globus_soap_message_handle_t message, | |
| 3543 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 3544 | void * args) | |
| 3545 | 19 | { |
| 3546 | 19 | CreateTopic_callback_handle_t * callback_handle; |
| 3547 | 19 | globus_result_t result = GLOBUS_SUCCESS; |
| 3548 | 19 | GlobusFuncName(CreateTopic_deserialize); |
| 3549 | 19 | NotificationProducerTestServiceDebugEnter(); |
| 3550 | ||
| 3551 | 19 | callback_handle = malloc(sizeof(CreateTopic_callback_handle_t)); |
| 3552 | 19 | globus_assert_string(callback_handle, |
| 3553 | "Memory allocation failed " | |
| 3554 | "for CreateTopic callback handle"); | |
| 3555 | ||
| 3556 | 19 | callback_handle->engine = engine; |
| 3557 | 19 | callback_handle->message = message; |
| 3558 | 19 | callback_handle->callback = invoke_callback; |
| 3559 | 19 | callback_handle->args = args; |
| 3560 | ||
| 3561 | 19 | result = globus_callback_register_oneshot( |
| 3562 | NULL, | |
| 3563 | &globus_i_reltime_zero, | |
| 3564 | CreateTopic_deserialize_callback, | |
| 3565 | callback_handle); | |
| 3566 | ||
| 3567 | 19 | NotificationProducerTestServiceDebugExit(); |
| 3568 | 19 | return result; |
| 3569 | } | |
| 3570 | ||
| 3571 | static | |
| 3572 | void | |
| 3573 | CreateTopic_invoke_callback( | |
| 3574 | void * handle) | |
| 3575 | 19 | { |
| 3576 | 19 | CreateTopic_callback_handle_t * callback_handle; |
| 3577 | 19 | globus_result_t result = GLOBUS_SUCCESS; |
| 3578 | 19 | struct globus_soap_message_fault_s soap_fault; |
| 3579 | 19 | CreateTopic_invoke_func_t invoke_function; |
| 3580 | 19 | nptest_CreateTopicType * CreateTopic; |
| 3581 | 19 | xsd_anyType CreateTopicResponse; |
| 3582 | 19 | xsd_QName element_qname; |
| 3583 | 19 | const char * fault_type_name = NULL; |
| 3584 | 19 | NotificationProducerTestPortType_CreateTopic_fault_t fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_CREATETOPIC_NOFAULT; |
| 3585 | 19 | void * fault = NULL; |
| 3586 | ||
| 3587 | 19 | GlobusFuncName(CreateTopic_invoke_callback); |
| 3588 | 19 | NotificationProducerTestServiceDebugEnter(); |
| 3589 | ||
| 3590 | 19 | callback_handle = (CreateTopic_callback_handle_t *) handle; |
| 3591 | ||
| 3592 | 19 | CreateTopic = globus_soap_message_handle_get_attr( |
| 3593 | callback_handle->message, | |
| 3594 | "CreateTopicOperationInputParameter"); | |
| 3595 | 19 | globus_assert(CreateTopic); |
| 3596 | ||
| 3597 | 19 | result = globus_operation_table_get_operation( |
| 3598 | NotificationProducerTestService_descriptor.operations, | |
| 3599 | "CreateTopic", | |
| 3600 | (void **)&invoke_function); | |
| 3601 | 19 | if(result != GLOBUS_SUCCESS) |
| 3602 | { | |
| 3603 | 0 | goto fault_exit; |
| 3604 | } | |
| 3605 | ||
| 3606 | ||
| 3607 | 19 | result = xsd_anyType_init_contents( |
| 3608 | &CreateTopicResponse); | |
| 3609 | 19 | if(result != GLOBUS_SUCCESS) |
| 3610 | { | |
| 3611 | 0 | goto fault_exit; |
| 3612 | } | |
| 3613 | ||
| 3614 | 19 | result = invoke_function( |
| 3615 | callback_handle->engine, | |
| 3616 | callback_handle->message, | |
| 3617 | &NotificationProducerTestService_descriptor, | |
| 3618 | CreateTopic, | |
| 3619 | &CreateTopicResponse, | |
| 3620 | &fault_type_name, | |
| 3621 | &fault); | |
| 3622 | ||
| 3623 | fault_exit: | |
| 3624 | ||
| 3625 | 19 | if(fault && fault_type_name) |
| 3626 | { | |
| 3627 | 0 | fault_type = CreateTopic_lookup_fault_type(fault_type_name); |
| 3628 | ||
| 3629 | 0 | result = globus_service_session_begin_response( |
| 3630 | callback_handle->message); | |
| 3631 | 0 | if(result != GLOBUS_SUCCESS) |
| 3632 | { | |
| 3633 | 0 | goto exit; |
| 3634 | } | |
| 3635 | ||
| 3636 | 0 | soap_fault.faultcode = "Server"; |
| 3637 | 0 | soap_fault.faultstring = |
| 3638 | "An error occurred while processing the message"; | |
| 3639 | 0 | soap_fault.faultactor = NULL; |
| 3640 | ||
| 3641 | 0 | switch(fault_type) |
| 3642 | { | |
| 3643 | ||
| 3644 | default: | |
| 3645 | 0 | result = NotificationProducerTestServiceErrorReturnedUnknownFault("CreateTopic"); |
| 3646 | 0 | goto exit; |
| 3647 | } | |
| 3648 | ||
| 3649 | 19 | result = globus_service_session_serialize_fault_response( |
| 3650 | callback_handle->message, &soap_fault); | |
| 3651 | 19 | if(result != GLOBUS_SUCCESS) |
| 3652 | { | |
| 3653 | 19 | goto exit; |
| 3654 | } | |
| 3655 | ||
| 3656 | 19 | soap_fault.detail->element->local = NULL; |
| 3657 | 19 | soap_fault.detail->element->Namespace = NULL; |
| 3658 | 19 | soap_fault.detail->any_info = NULL; |
| 3659 | 19 | xsd_any_destroy(soap_fault.detail); |
| 3660 | ||
| 3661 | 19 | globus_soap_message_handle_set_attr( |
| 3662 | callback_handle->message, | |
| 3663 | WSADDR_ACTION_RESPONSE_KEY, | |
| 3664 | globus_soap_message_attr_copy_string, | |
| 3665 | globus_libc_free, | |
| 3666 | WSADDRESSING_FAULT_NS); | |
| 3667 | } | |
| 3668 | 19 | else if(result != GLOBUS_SUCCESS) |
| 3669 | { | |
| 3670 | 0 | globus_result_t local_result; |
| 3671 | 0 | local_result = globus_service_session_begin_response( |
| 3672 | callback_handle->message); | |
| 3673 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 3674 | { | |
| 3675 | 0 | result = local_result; |
| 3676 | 0 | goto exit; |
| 3677 | } | |
| 3678 | ||
| 3679 | 0 | soap_fault.faultcode = "Server"; |
| 3680 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 3681 | globus_error_get(result)); | |
| 3682 | 0 | result = GLOBUS_SUCCESS; |
| 3683 | 0 | soap_fault.faultactor = NULL; |
| 3684 | 0 | soap_fault.detail = NULL; |
| 3685 | 0 | result = globus_service_session_serialize_fault_response( |
| 3686 | callback_handle->message, &soap_fault); | |
| 3687 | 0 | if(result != GLOBUS_SUCCESS) |
| 3688 | { | |
| 3689 | 0 | goto exit; |
| 3690 | } | |
| 3691 | ||
| 3692 | 0 | globus_soap_message_handle_set_attr( |
| 3693 | callback_handle->message, | |
| 3694 | WSADDR_ACTION_RESPONSE_KEY, | |
| 3695 | globus_soap_message_attr_copy_string, | |
| 3696 | globus_libc_free, | |
| 3697 | WSADDRESSING_FAULT_NS); | |
| 3698 | } | |
| 3699 | else | |
| 3700 | { | |
| 3701 | 19 | result = globus_service_session_begin_response( |
| 3702 | callback_handle->message); | |
| 3703 | 19 | if(result != GLOBUS_SUCCESS) |
| 3704 | { | |
| 3705 | 0 | goto exit; |
| 3706 | } | |
| 3707 | ||
| 3708 | 19 | element_qname.local = "CreateTopicResponse"; |
| 3709 | 19 | element_qname.Namespace = "http://www.globus.org/namespaces/2005/03/NotificationProducerTest"; |
| 3710 | ||
| 3711 | 19 | result = xsd_anyType_serialize( |
| 3712 | &element_qname, | |
| 3713 | &CreateTopicResponse, | |
| 3714 | callback_handle->message, | |
| 3715 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 3716 | 19 | if(result != GLOBUS_SUCCESS) |
| 3717 | { | |
| 3718 | 0 | goto exit; |
| 3719 | } | |
| 3720 | ||
| 3721 | 19 | result = globus_service_session_end_response( |
| 3722 | callback_handle->message); | |
| 3723 | 19 | if(result != GLOBUS_SUCCESS) |
| 3724 | { | |
| 3725 | 0 | goto exit; |
| 3726 | } | |
| 3727 | ||
| 3728 | 19 | xsd_anyType_destroy_contents( |
| 3729 | &CreateTopicResponse); | |
| 3730 | ||
| 3731 | 19 | globus_soap_message_handle_set_attr( |
| 3732 | callback_handle->message, | |
| 3733 | WSADDR_ACTION_RESPONSE_KEY, | |
| 3734 | globus_soap_message_attr_copy_string, | |
| 3735 | globus_libc_free, | |
| 3736 | "http://www.globus.org/namespaces/2005/03/NotificationProducerTest/NotificationProducerTestPortType/CreateTopicResponse"); | |
| 3737 | } | |
| 3738 | ||
| 3739 | exit: | |
| 3740 | ||
| 3741 | 19 | callback_handle->callback( |
| 3742 | result, | |
| 3743 | callback_handle->args); | |
| 3744 | ||
| 3745 | 19 | globus_libc_free(callback_handle); |
| 3746 | ||
| 3747 | 19 | NotificationProducerTestServiceDebugExit(); |
| 3748 | } | |
| 3749 | ||
| 3750 | static | |
| 3751 | globus_result_t | |
| 3752 | CreateTopic_invoke( | |
| 3753 | globus_service_engine_t engine, | |
| 3754 | globus_soap_message_handle_t message, | |
| 3755 | globus_service_response_t * response, | |
| 3756 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 3757 | void * args) | |
| 3758 | 19 | { |
| 3759 | 19 | CreateTopic_callback_handle_t * callback_handle; |
| 3760 | 19 | globus_result_t result = GLOBUS_SUCCESS; |
| 3761 | 19 | GlobusFuncName(NotificationProducerTestPortType_CreateTopic); |
| 3762 | 19 | NotificationProducerTestServiceDebugEnter(); |
| 3763 | ||
| 3764 | 19 | callback_handle = malloc(sizeof(CreateTopic_callback_handle_t)); |
| 3765 | 19 | if(!callback_handle) |
| 3766 | { | |
| 3767 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 3768 | 0 | goto exit; |
| 3769 | } | |
| 3770 | 19 | callback_handle->engine = engine; |
| 3771 | 19 | callback_handle->message = message; |
| 3772 | 19 | callback_handle->callback = invoke_callback; |
| 3773 | 19 | callback_handle->args = args; |
| 3774 | ||
| 3775 | 19 | result = globus_callback_register_oneshot( |
| 3776 | NULL, | |
| 3777 | &globus_i_reltime_zero, | |
| 3778 | CreateTopic_invoke_callback, | |
| 3779 | callback_handle); | |
| 3780 | ||
| 3781 | exit: | |
| 3782 | 19 | NotificationProducerTestServiceDebugExit(); |
| 3783 | 19 | return result; |
| 3784 | } | |
| 3785 | ||
| 3786 | ||
| 3787 | static | |
| 3788 | globus_result_t | |
| 3789 | CreateTopic_fault_to_type( | |
| 3790 | const char * fault_type_name, | |
| 3791 | int * fault_type, | |
| 3792 | globus_xsd_type_info_t * fault_type_info) | |
| 3793 | 0 | { |
| 3794 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 3795 | ||
| 3796 | 0 | *fault_type_info = NULL; |
| 3797 | ||
| 3798 | 0 | *fault_type = CreateTopic_lookup_fault_type(fault_type_name); |
| 3799 | ||
| 3800 | 0 | switch (*fault_type) |
| 3801 | { | |
| 3802 | default: | |
| 3803 | 0 | result = NotificationProducerTestServiceErrorReturnedUnknownFault("CreateTopic"); |
| 3804 | 0 | goto exit; |
| 3805 | } | |
| 3806 | ||
| 3807 | exit: | |
| 3808 | 0 | return result; |
| 3809 | } | |
| 3810 | ||
| 3811 | ||
| 3812 | static | |
| 3813 | globus_service_operation_descriptor_t | |
| 3814 | CreateTopic_operation_descriptor = | |
| 3815 | { | |
| 3816 | CreateTopic_deserialize, | |
| 3817 | CreateTopic_invoke, | |
| 3818 | ||
| 3819 | CreateTopic_fault_to_type | |
| 3820 | ||
| 3821 | }; | |
| 3822 | ||
| 3823 | static | |
| 3824 | globus_operation_provider_descriptor_t CreateTopic_descriptor = | |
| 3825 | { | |
| 3826 | &NotificationProducerTestPortType_CreateTopic_op_qname, | |
| 3827 | "CreateTopic", | |
| 3828 | (void *)NotificationProducerTestPortType_CreateTopic_impl, | |
| 3829 | NULL | |
| 3830 | }; | |
| 3831 | ||
| 3832 | ||
| 3833 | xsd_QName NotificationProducerTestPortType_CreateNotificationProducerTest_op_qname = | |
| 3834 | { | |
| 3835 | "http://localhost:8080/wsrf/services/NotificationProducerTestService" | |
| 3836 | "CreateNotificationProducerTest" | |
| 3837 | }; | |
| 3838 | ||
| 3839 | xsd_QName NotificationProducerTestPortType_CreateNotificationProducerTest_input_qname = | |
| 3840 | { | |
| 3841 | "http://www.globus.org/namespaces/2005/03/NotificationProducerTest", | |
| 3842 | "CreateNotificationProducerTest" | |
| 3843 | }; | |
| 3844 | ||
| 3845 | typedef globus_result_t (* CreateNotificationProducerTest_invoke_func_t) ( | |
| 3846 | globus_service_engine_t engine, | |
| 3847 | globus_soap_message_handle_t message, | |
| 3848 | globus_service_descriptor_t * descriptor, | |
| 3849 | xsd_anyType * CreateNotificationProducerTest, | |
| 3850 | nptest_CreateNotificationProducerTestResponseType * CreateNotificationProducerTestResponse, | |
| 3851 | const char ** fault_type_name, | |
| 3852 | void ** fault); | |
| 3853 | ||
| 3854 | typedef struct CreateNotificationProducerTest_callback_handle_s | |
| 3855 | { | |
| 3856 | globus_service_engine_t engine; | |
| 3857 | globus_soap_message_handle_t message; | |
| 3858 | globus_operation_invoke_callback_func_t callback; | |
| 3859 | void * args; | |
| 3860 | } CreateNotificationProducerTest_callback_handle_t; | |
| 3861 | ||
| 3862 | ||
| 3863 | const char * NotificationProducerTestPortType_CreateNotificationProducerTest_fault_strings[NOTIFICATIONPRODUCERTESTPORTTYPE_CREATENOTIFICATIONPRODUCERTEST_UNKNOWN_FAULT] = | |
| 3864 | { | |
| 3865 | "Unknown" | |
| 3866 | ||
| 3867 | }; | |
| 3868 | ||
| 3869 | static | |
| 3870 | NotificationProducerTestPortType_CreateNotificationProducerTest_fault_t | |
| 3871 | CreateNotificationProducerTest_lookup_fault_type( | |
| 3872 | const char * fault_name) | |
| 3873 | 0 | { |
| 3874 | 0 | NotificationProducerTestPortType_CreateNotificationProducerTest_fault_t fault_type; |
| 3875 | 0 | GlobusFuncName(CreateNotificationProducerTest_lookup_fault_type); |
| 3876 | 0 | NotificationProducerTestServiceDebugEnter(); |
| 3877 | ||
| 3878 | 0 | globus_assert(fault_name); |
| 3879 | ||
| 3880 | ||
| 3881 | { | |
| 3882 | 0 | fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_CREATENOTIFICATIONPRODUCERTEST_UNKNOWN_FAULT; |
| 3883 | } | |
| 3884 | ||
| 3885 | 0 | NotificationProducerTestServiceDebugExit(); |
| 3886 | 0 | return fault_type; |
| 3887 | } | |
| 3888 | ||
| 3889 | ||
| 3890 | ||
| 3891 | static | |
| 3892 | void | |
| 3893 | CreateNotificationProducerTest_deserialize_callback( | |
| 3894 | void * handle) | |
| 3895 | 12 | { |
| 3896 | 12 | CreateNotificationProducerTest_callback_handle_t * callback_handle; |
| 3897 | 12 | globus_result_t result = GLOBUS_SUCCESS; |
| 3898 | 12 | struct globus_soap_message_fault_s soap_fault; |
| 3899 | 12 | CreateNotificationProducerTest_invoke_func_t invoke_function; |
| 3900 | 12 | xsd_anyType * CreateNotificationProducerTest = NULL; |
| 3901 | 12 | GlobusFuncName(CreateNotificationProducerTest_deserialize_callback); |
| 3902 | 12 | NotificationProducerTestServiceDebugEnter(); |
| 3903 | ||
| 3904 | 12 | callback_handle = (CreateNotificationProducerTest_callback_handle_t *) handle; |
| 3905 | ||
| 3906 | 12 | result = globus_operation_table_get_operation( |
| 3907 | NotificationProducerTestService_descriptor.operations, | |
| 3908 | "CreateNotificationProducerTest", | |
| 3909 | (void **)&invoke_function); | |
| 3910 | 12 | if(result != GLOBUS_SUCCESS) |
| 3911 | { | |
| 3912 | 0 | goto exit; |
| 3913 | } | |
| 3914 | ||
| 3915 | 12 | if(NotificationProducerTestService_descriptor.registry) |
| 3916 | { | |
| 3917 | 12 | globus_soap_message_handle_set_registry( |
| 3918 | callback_handle->message, | |
| 3919 | NotificationProducerTestService_descriptor.registry); | |
| 3920 | } | |
| 3921 | ||
| 3922 | 12 | result = xsd_anyType_init( |
| 3923 | &CreateNotificationProducerTest); | |
| 3924 | 12 | if(result != GLOBUS_SUCCESS) |
| 3925 | { | |
| 3926 | 0 | goto exit; |
| 3927 | } | |
| 3928 | ||
| 3929 | 12 | result = xsd_anyType_deserialize( |
| 3930 | &NotificationProducerTestPortType_CreateNotificationProducerTest_input_qname, | |
| 3931 | CreateNotificationProducerTest, | |
| 3932 | callback_handle->message, | |
| 3933 | 0); | |
| 3934 | 12 | if(result != GLOBUS_SUCCESS) |
| 3935 | { | |
| 3936 | 0 | goto exit; |
| 3937 | } | |
| 3938 | ||
| 3939 | 12 | result = globus_soap_message_handle_set_attr( |
| 3940 | callback_handle->message, | |
| 3941 | "CreateNotificationProducerTestOperationInputParameter", | |
| 3942 | xsd_anyType_copy_wrapper, | |
| 3943 | xsd_anyType_destroy_wrapper, | |
| 3944 | (void *)CreateNotificationProducerTest); | |
| 3945 | 12 | if(result != GLOBUS_SUCCESS) |
| 3946 | { | |
| 3947 | 12 | goto exit; |
| 3948 | } | |
| 3949 | ||
| 3950 | exit: | |
| 3951 | ||
| 3952 | 12 | if (CreateNotificationProducerTest != NULL) |
| 3953 | { | |
| 3954 | 12 | xsd_anyType_destroy(CreateNotificationProducerTest); |
| 3955 | } | |
| 3956 | 12 | callback_handle->callback( |
| 3957 | result, | |
| 3958 | callback_handle->args); | |
| 3959 | ||
| 3960 | 12 | free(callback_handle); |
| 3961 | 12 | NotificationProducerTestServiceDebugExit(); |
| 3962 | } | |
| 3963 | ||
| 3964 | static | |
| 3965 | globus_result_t | |
| 3966 | CreateNotificationProducerTest_deserialize( | |
| 3967 | globus_service_engine_t engine, | |
| 3968 | globus_soap_message_handle_t message, | |
| 3969 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 3970 | void * args) | |
| 3971 | 12 | { |
| 3972 | 12 | CreateNotificationProducerTest_callback_handle_t * callback_handle; |
| 3973 | 12 | globus_result_t result = GLOBUS_SUCCESS; |
| 3974 | 12 | GlobusFuncName(CreateNotificationProducerTest_deserialize); |
| 3975 | 12 | NotificationProducerTestServiceDebugEnter(); |
| 3976 | ||
| 3977 | 12 | callback_handle = malloc(sizeof(CreateNotificationProducerTest_callback_handle_t)); |
| 3978 | 12 | globus_assert_string(callback_handle, |
| 3979 | "Memory allocation failed " | |
| 3980 | "for CreateNotificationProducerTest callback handle"); | |
| 3981 | ||
| 3982 | 12 | callback_handle->engine = engine; |
| 3983 | 12 | callback_handle->message = message; |
| 3984 | 12 | callback_handle->callback = invoke_callback; |
| 3985 | 12 | callback_handle->args = args; |
| 3986 | ||
| 3987 | 12 | result = globus_callback_register_oneshot( |
| 3988 | NULL, | |
| 3989 | &globus_i_reltime_zero, | |
| 3990 | CreateNotificationProducerTest_deserialize_callback, | |
| 3991 | callback_handle); | |
| 3992 | ||
| 3993 | 12 | NotificationProducerTestServiceDebugExit(); |
| 3994 | 12 | return result; |
| 3995 | } | |
| 3996 | ||
| 3997 | static | |
| 3998 | void | |
| 3999 | CreateNotificationProducerTest_invoke_callback( | |
| 4000 | void * handle) | |
| 4001 | 12 | { |
| 4002 | 12 | CreateNotificationProducerTest_callback_handle_t * callback_handle; |
| 4003 | 12 | globus_result_t result = GLOBUS_SUCCESS; |
| 4004 | 12 | struct globus_soap_message_fault_s soap_fault; |
| 4005 | 12 | CreateNotificationProducerTest_invoke_func_t invoke_function; |
| 4006 | 12 | xsd_anyType * CreateNotificationProducerTest; |
| 4007 | 12 | nptest_CreateNotificationProducerTestResponseType CreateNotificationProducerTestResponse; |
| 4008 | 12 | xsd_QName element_qname; |
| 4009 | 12 | const char * fault_type_name = NULL; |
| 4010 | 12 | NotificationProducerTestPortType_CreateNotificationProducerTest_fault_t fault_type = NOTIFICATIONPRODUCERTESTPORTTYPE_CREATENOTIFICATIONPRODUCERTEST_NOFAULT; |
| 4011 | 12 | void * fault = NULL; |
| 4012 | ||
| 4013 | 12 | GlobusFuncName(CreateNotificationProducerTest_invoke_callback); |
| 4014 | 12 | NotificationProducerTestServiceDebugEnter(); |
| 4015 | ||
| 4016 | 12 | callback_handle = (CreateNotificationProducerTest_callback_handle_t *) handle; |
| 4017 | ||
| 4018 | 12 | CreateNotificationProducerTest = globus_soap_message_handle_get_attr( |
| 4019 | callback_handle->message, | |
| 4020 | "CreateNotificationProducerTestOperationInputParameter"); | |
| 4021 | 12 | globus_assert(CreateNotificationProducerTest); |
| 4022 | ||
| 4023 | 12 | result = globus_operation_table_get_operation( |
| 4024 | NotificationProducerTestService_descriptor.operations, | |
| 4025 | "CreateNotificationProducerTest", | |
| 4026 | (void **)&invoke_function); | |
| 4027 | 12 | if(result != GLOBUS_SUCCESS) |
| 4028 | { | |
| 4029 | 0 | goto fault_exit; |
| 4030 | } | |
| 4031 | ||
| 4032 | ||
| 4033 | 12 | result = nptest_CreateNotificationProducerTestResponseType_init_contents( |
| 4034 | &CreateNotificationProducerTestResponse); | |
| 4035 | 12 | if(result != GLOBUS_SUCCESS) |
| 4036 | { | |
| 4037 | 0 | goto fault_exit; |
| 4038 | } | |
| 4039 | ||
| 4040 | 12 | result = invoke_function( |
| 4041 | callback_handle->engine, | |
| 4042 | callback_handle->message, | |
| 4043 | &NotificationProducerTestService_descriptor, | |
| 4044 | CreateNotificationProducerTest, | |
| 4045 | &CreateNotificationProducerTestResponse, | |
| 4046 | &fault_type_name, | |
| 4047 | &fault); | |
| 4048 | ||
| 4049 | fault_exit: | |
| 4050 | ||
| 4051 | 12 | if(fault && fault_type_name) |
| 4052 | { | |
| 4053 | 0 | fault_type = CreateNotificationProducerTest_lookup_fault_type(fault_type_name); |
| 4054 | ||
| 4055 | 0 | result = globus_service_session_begin_response( |
| 4056 | callback_handle->message); | |
| 4057 | 0 | if(result != GLOBUS_SUCCESS) |
| 4058 | { | |
| 4059 | 0 | goto exit; |
| 4060 | } | |
| 4061 | ||
| 4062 | 0 | soap_fault.faultcode = "Server"; |
| 4063 | 0 | soap_fault.faultstring = |
| 4064 | "An error occurred while processing the message"; | |
| 4065 | 0 | soap_fault.faultactor = NULL; |
| 4066 | ||
| 4067 | 0 | switch(fault_type) |
| 4068 | { | |
| 4069 | ||
| 4070 | default: | |
| 4071 | 0 | result = NotificationProducerTestServiceErrorReturnedUnknownFault("CreateNotificationProducerTest"); |
| 4072 | 0 | goto exit; |
| 4073 | } | |
| 4074 | ||
| 4075 | 12 | result = globus_service_session_serialize_fault_response( |
| 4076 | callback_handle->message, &soap_fault); | |
| 4077 | 12 | if(result != GLOBUS_SUCCESS) |
| 4078 | { | |
| 4079 | 12 | goto exit; |
| 4080 | } | |
| 4081 | ||
| 4082 | 12 | soap_fault.detail->element->local = NULL; |
| 4083 | 12 | soap_fault.detail->element->Namespace = NULL; |
| 4084 | 12 | soap_fault.detail->any_info = NULL; |
| 4085 | 12 | xsd_any_destroy(soap_fault.detail); |
| 4086 | ||
| 4087 | 12 | globus_soap_message_handle_set_attr( |
| 4088 | callback_handle->message, | |
| 4089 | WSADDR_ACTION_RESPONSE_KEY, | |
| 4090 | globus_soap_message_attr_copy_string, | |
| 4091 | globus_libc_free, | |
| 4092 | WSADDRESSING_FAULT_NS); | |
| 4093 | } | |
| 4094 | 12 | else if(result != GLOBUS_SUCCESS) |
| 4095 | { | |
| 4096 | 0 | globus_result_t local_result; |
| 4097 | 0 | local_result = globus_service_session_begin_response( |
| 4098 | callback_handle->message); | |
| 4099 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 4100 | { | |
| 4101 | 0 | result = local_result; |
| 4102 | 0 | goto exit; |
| 4103 | } | |
| 4104 | ||
| 4105 | 0 | soap_fault.faultcode = "Server"; |
| 4106 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 4107 | globus_error_get(result)); | |
| 4108 | 0 | result = GLOBUS_SUCCESS; |
| 4109 | 0 | soap_fault.faultactor = NULL; |
| 4110 | 0 | soap_fault.detail = NULL; |
| 4111 | 0 | result = globus_service_session_serialize_fault_response( |
| 4112 | callback_handle->message, &soap_fault); | |
| 4113 | 0 | if(result != GLOBUS_SUCCESS) |
| 4114 | { | |
| 4115 | 0 | goto exit; |
| 4116 | } | |
| 4117 | ||
| 4118 | 0 | globus_soap_message_handle_set_attr( |
| 4119 | callback_handle->message, | |
| 4120 | WSADDR_ACTION_RESPONSE_KEY, | |
| 4121 | globus_soap_message_attr_copy_string, | |
| 4122 | globus_libc_free, | |
| 4123 | WSADDRESSING_FAULT_NS); | |
| 4124 | } | |
| 4125 | else | |
| 4126 | { | |
| 4127 | 12 | result = globus_service_session_begin_response( |
| 4128 | callback_handle->message); | |
| 4129 | 12 | if(result != GLOBUS_SUCCESS) |
| 4130 | { | |
| 4131 | 0 | goto exit; |
| 4132 | } | |
| 4133 | ||
| 4134 | 12 | element_qname.local = "CreateNotificationProducerTestResponse"; |
| 4135 | 12 | element_qname.Namespace = "http://www.globus.org/namespaces/2005/03/NotificationProducerTest"; |
| 4136 | ||
| 4137 | 12 | result = nptest_CreateNotificationProducerTestResponseType_serialize( |
| 4138 | &element_qname, | |
| 4139 | &CreateNotificationProducerTestResponse, | |
| 4140 | callback_handle->message, | |
| 4141 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 4142 | 12 | if(result != GLOBUS_SUCCESS) |
| 4143 | { | |
| 4144 | 0 | goto exit; |
| 4145 | } | |
| 4146 | ||
| 4147 | 12 | result = globus_service_session_end_response( |
| 4148 | callback_handle->message); | |
| 4149 | 12 | if(result != GLOBUS_SUCCESS) |
| 4150 | { | |
| 4151 | 0 | goto exit; |
| 4152 | } | |
| 4153 | ||
| 4154 | 12 | nptest_CreateNotificationProducerTestResponseType_destroy_contents( |
| 4155 | &CreateNotificationProducerTestResponse); | |
| 4156 | ||
| 4157 | 12 | globus_soap_message_handle_set_attr( |
| 4158 | callback_handle->message, | |
| 4159 | WSADDR_ACTION_RESPONSE_KEY, | |
| 4160 | globus_soap_message_attr_copy_string, | |
| 4161 | globus_libc_free, | |
| 4162 | "http://www.globus.org/namespaces/2005/03/NotificationProducerTest/NotificationProducerTestPortType/CreateNotificationProducerTestResponse"); | |
| 4163 | } | |
| 4164 | ||
| 4165 | exit: | |
| 4166 | ||
| 4167 | 12 | callback_handle->callback( |
| 4168 | result, | |
| 4169 | callback_handle->args); | |
| 4170 | ||
| 4171 | 12 | globus_libc_free(callback_handle); |
| 4172 | ||
| 4173 | 12 | NotificationProducerTestServiceDebugExit(); |
| 4174 | } | |
| 4175 | ||
| 4176 | static | |
| 4177 | globus_result_t | |
| 4178 | CreateNotificationProducerTest_invoke( | |
| 4179 | globus_service_engine_t engine, | |
| 4180 | globus_soap_message_handle_t message, | |
| 4181 | globus_service_response_t * response, | |
| 4182 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 4183 | void * args) | |
| 4184 | 12 | { |
| 4185 | 12 | CreateNotificationProducerTest_callback_handle_t * callback_handle; |
| 4186 | 12 | globus_result_t result = GLOBUS_SUCCESS; |
| 4187 | 12 | GlobusFuncName(NotificationProducerTestPortType_CreateNotificationProducerTest); |
| 4188 | 12 | NotificationProducerTestServiceDebugEnter(); |
| 4189 | ||
| 4190 | 12 | callback_handle = malloc(sizeof(CreateNotificationProducerTest_callback_handle_t)); |
| 4191 | 12 | if(!callback_handle) |
| 4192 | { | |
| 4193 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 4194 | 0 | goto exit; |
| 4195 | } | |
| 4196 | 12 | callback_handle->engine = engine; |
| 4197 | 12 | callback_handle->message = message; |
| 4198 | 12 | callback_handle->callback = invoke_callback; |
| 4199 | 12 | callback_handle->args = args; |
| 4200 | ||
| 4201 | 12 | result = globus_callback_register_oneshot( |
| 4202 | NULL, | |
| 4203 | &globus_i_reltime_zero, | |
| 4204 | CreateNotificationProducerTest_invoke_callback, | |
| 4205 | callback_handle); | |
| 4206 | ||
| 4207 | exit: | |
| 4208 | 12 | NotificationProducerTestServiceDebugExit(); |
| 4209 | 12 | return result; |
| 4210 | } | |
| 4211 | ||
| 4212 | ||
| 4213 | static | |
| 4214 | globus_result_t | |
| 4215 | CreateNotificationProducerTest_fault_to_type( | |
| 4216 | const char * fault_type_name, | |
| 4217 | int * fault_type, | |
| 4218 | globus_xsd_type_info_t * fault_type_info) | |
| 4219 | 0 | { |
| 4220 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 4221 | ||
| 4222 | 0 | *fault_type_info = NULL; |
| 4223 | ||
| 4224 | 0 | *fault_type = CreateNotificationProducerTest_lookup_fault_type(fault_type_name); |
| 4225 | ||
| 4226 | 0 | switch (*fault_type) |
| 4227 | { | |
| 4228 | default: | |
| 4229 | 0 | result = NotificationProducerTestServiceErrorReturnedUnknownFault("CreateNotificationProducerTest"); |
| 4230 | 0 | goto exit; |
| 4231 | } | |
| 4232 | ||
| 4233 | exit: | |
| 4234 | 0 | return result; |
| 4235 | } | |
| 4236 | ||
| 4237 | ||
| 4238 | static | |
| 4239 | globus_service_operation_descriptor_t | |
| 4240 | CreateNotificationProducerTest_operation_descriptor = | |
| 4241 | { | |
| 4242 | CreateNotificationProducerTest_deserialize, | |
| 4243 | CreateNotificationProducerTest_invoke, | |
| 4244 | ||
| 4245 | CreateNotificationProducerTest_fault_to_type | |
| 4246 | ||
| 4247 | }; | |
| 4248 | ||
| 4249 | static | |
| 4250 | globus_operation_provider_descriptor_t CreateNotificationProducerTest_descriptor = | |
| 4251 | { | |
| 4252 | &NotificationProducerTestPortType_CreateNotificationProducerTest_op_qname, | |
| 4253 | "CreateNotificationProducerTest", | |
| 4254 | (void *)NotificationProducerTestPortType_CreateNotificationProducerTest_impl, | |
| 4255 | NULL | |
| 4256 | }; | |
| 4257 | ||
| 4258 | ||
| 4259 | ||
| 4260 | static xsd_QName NotificationProducerTestService_l_wsrp_GetResourceProperty_qname; | |
| 4261 | static xsd_QName NotificationProducerTestService_l_wsrp_GetMultipleResourceProperties_qname; | |
| 4262 | static xsd_QName NotificationProducerTestService_l_wsrp_SetResourceProperties_qname; | |
| 4263 | static xsd_QName NotificationProducerTestService_l_wsrp_QueryResourceProperties_qname; | |
| 4264 | static xsd_QName NotificationProducerTestService_l_wsrl_Destroy_qname; | |
| 4265 | static xsd_QName NotificationProducerTestService_l_wsrl_SetTerminationTime_qname; | |
| 4266 | static xsd_QName NotificationProducerTestService_l_wsnt_Subscribe_qname; | |
| 4267 | static xsd_QName NotificationProducerTestService_l_wsnt_GetCurrentMessage_qname; | |
| 4268 | ||
| 4269 | static | |
| 4270 | int | |
| 4271 | NotificationProducerTestService_activate() | |
| 4272 | 12 | { |
| 4273 | 12 | globus_result_t result = GLOBUS_SUCCESS; |
| 4274 | 12 | int rc = 0; |
| 4275 | 12 | GlobusFuncName(NotificationProducerTestService_activate); |
| 4276 | ||
| 4277 | 12 | rc = globus_module_activate(GLOBUS_COMMON_MODULE); |
| 4278 | 12 | if(rc != GLOBUS_SUCCESS) |
| 4279 | { | |
| 4280 | 0 | return rc; |
| 4281 | } | |
| 4282 | ||
| 4283 | 12 | GlobusDebugInit(NOTIFICATIONPRODUCERTESTSERVICE, INFO DEBUG TRACE WARN ERROR); |
| 4284 | ||
| 4285 | 12 | rc = globus_module_activate(GLOBUS_SOAP_MESSAGE_MODULE); |
| 4286 | 12 | if(rc != GLOBUS_SUCCESS) |
| 4287 | { | |
| 4288 | 0 | return rc; |
| 4289 | } | |
| 4290 | ||
| 4291 | 12 | NotificationProducerTestServiceDebugEnter(); |
| 4292 | ||
| 4293 | 12 | result = globus_module_activate(GLOBUS_WSRF_RESOURCE_MODULE); |
| 4294 | 12 | if (result != GLOBUS_SUCCESS) |
| 4295 | { | |
| 4296 | 0 | rc = (int) result; |
| 4297 | 0 | goto exit; |
| 4298 | } | |
| 4299 | ||
| 4300 | 12 | rc = globus_extension_activate( |
| 4301 | "globus_wsrp_GetResourceProperty_provider"); | |
| 4302 | 12 | if(rc != GLOBUS_SUCCESS) |
| 4303 | { | |
| 4304 | 0 | goto deactivate_resource_out; |
| 4305 | } | |
| 4306 | ||
| 4307 | 12 | rc = globus_extension_activate( |
| 4308 | "globus_wsrp_GetMultipleResourceProperties_provider"); | |
| 4309 | 12 | if (rc != GLOBUS_SUCCESS) |
| 4310 | { | |
| 4311 | 0 | goto deactivate_getrp; |
| 4312 | } | |
| 4313 | ||
| 4314 | 12 | rc = globus_extension_activate( |
| 4315 | "globus_wsrp_SetResourceProperties_provider"); | |
| 4316 | 12 | if (rc != GLOBUS_SUCCESS) |
| 4317 | { | |
| 4318 | 0 | goto deactivate_getmrp; |
| 4319 | } | |
| 4320 | ||
| 4321 | 12 | rc = globus_extension_activate( |
| 4322 | "globus_wsrp_QueryResourceProperties_provider"); | |
| 4323 | 12 | if (rc != GLOBUS_SUCCESS) |
| 4324 | { | |
| 4325 | 0 | goto deactivate_setrp; |
| 4326 | } | |
| 4327 | ||
| 4328 | 12 | rc = globus_extension_activate( |
| 4329 | "globus_wsrl_ImmediateResourceTermination_provider"); | |
| 4330 | 12 | if (rc != GLOBUS_SUCCESS) |
| 4331 | { | |
| 4332 | 0 | goto deactivate_queryrp; |
| 4333 | } | |
| 4334 | ||
| 4335 | 12 | rc = globus_extension_activate( |
| 4336 | "globus_wsrl_ScheduledResourceTermination_provider"); | |
| 4337 | 12 | if (rc != GLOBUS_SUCCESS) |
| 4338 | { | |
| 4339 | 0 | goto deactivate_irt; |
| 4340 | } | |
| 4341 | ||
| 4342 | 12 | rc = globus_extension_activate( |
| 4343 | "globus_wsnt_NotificationProducer_provider"); | |
| 4344 | 12 | if (rc != GLOBUS_SUCCESS) |
| 4345 | { | |
| 4346 | 0 | goto deactivate_srt; |
| 4347 | } | |
| 4348 | ||
| 4349 | 12 | if(GLOBUS_GLOBAL_TYPE_REGISTRY != NULL) |
| 4350 | { | |
| 4351 | 12 | result = NotificationProducerTestService_registry_add_types( |
| 4352 | GLOBUS_GLOBAL_TYPE_REGISTRY); | |
| 4353 | 12 | if(result != GLOBUS_SUCCESS) |
| 4354 | { | |
| 4355 | 0 | rc = (int) result; |
| 4356 | 0 | goto deactivate_nrt; |
| 4357 | } | |
| 4358 | } | |
| 4359 | ||
| 4360 | 12 | rc = globus_hashtable_init( |
| 4361 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4362 | 10, | |
| 4363 | xsd_QName_hash, | |
| 4364 | xsd_QName_keyeq); | |
| 4365 | 12 | if(rc != GLOBUS_SUCCESS) |
| 4366 | { | |
| 4367 | 0 | goto clear_global_registry; |
| 4368 | } | |
| 4369 | ||
| 4370 | 12 | result = globus_xsd_type_registry_init( |
| 4371 | &NotificationProducerTestService_descriptor.registry); | |
| 4372 | 12 | if(result != GLOBUS_SUCCESS) |
| 4373 | { | |
| 4374 | 0 | rc = (int) result; |
| 4375 | 0 | goto destroy_op_mapper; |
| 4376 | } | |
| 4377 | ||
| 4378 | 12 | result = NotificationProducerTestService_registry_add_types( |
| 4379 | NotificationProducerTestService_descriptor.registry); | |
| 4380 | 12 | if(result != GLOBUS_SUCCESS) |
| 4381 | { | |
| 4382 | 0 | rc = (int) result; |
| 4383 | 0 | goto destroy_service_registry; |
| 4384 | } | |
| 4385 | ||
| 4386 | 12 | globus_mutex_init(&NotificationProducerTestService_descriptor.mutex, NULL); |
| 4387 | ||
| 4388 | 12 | rc = globus_hashtable_insert( |
| 4389 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4390 | (void *)&NotificationProducerTestPortType_GetCurrentMessage_input_qname, | |
| 4391 | (void *)&GetCurrentMessage_operation_descriptor); | |
| 4392 | 12 | if(rc != GLOBUS_SUCCESS) |
| 4393 | { | |
| 4394 | 0 | goto remove_GetCurrentMessage_op; |
| 4395 | } | |
| 4396 | ||
| 4397 | 12 | rc = globus_hashtable_insert( |
| 4398 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4399 | (void *)&NotificationProducerTestPortType_Subscribe_input_qname, | |
| 4400 | (void *)&Subscribe_operation_descriptor); | |
| 4401 | 12 | if(rc != GLOBUS_SUCCESS) |
| 4402 | { | |
| 4403 | 0 | goto remove_Subscribe_op; |
| 4404 | } | |
| 4405 | ||
| 4406 | 12 | rc = globus_hashtable_insert( |
| 4407 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4408 | (void *)&NotificationProducerTestPortType_GetResourceProperty_input_qname, | |
| 4409 | (void *)&GetResourceProperty_operation_descriptor); | |
| 4410 | 12 | if(rc != GLOBUS_SUCCESS) |
| 4411 | { | |
| 4412 | 0 | goto remove_GetResourceProperty_op; |
| 4413 | } | |
| 4414 | ||
| 4415 | 12 | rc = globus_hashtable_insert( |
| 4416 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4417 | (void *)&NotificationProducerTestPortType_SetResourceProperties_input_qname, | |
| 4418 | (void *)&SetResourceProperties_operation_descriptor); | |
| 4419 | 12 | if(rc != GLOBUS_SUCCESS) |
| 4420 | { | |
| 4421 | 0 | goto remove_SetResourceProperties_op; |
| 4422 | } | |
| 4423 | ||
| 4424 | 12 | rc = globus_hashtable_insert( |
| 4425 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4426 | (void *)&NotificationProducerTestPortType_Destroy_input_qname, | |
| 4427 | (void *)&Destroy_operation_descriptor); | |
| 4428 | 12 | if(rc != GLOBUS_SUCCESS) |
| 4429 | { | |
| 4430 | 0 | goto remove_Destroy_op; |
| 4431 | } | |
| 4432 | ||
| 4433 | 12 | rc = globus_hashtable_insert( |
| 4434 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4435 | (void *)&NotificationProducerTestPortType_SetTopicValue_input_qname, | |
| 4436 | (void *)&SetTopicValue_operation_descriptor); | |
| 4437 | 12 | if(rc != GLOBUS_SUCCESS) |
| 4438 | { | |
| 4439 | 0 | goto remove_SetTopicValue_op; |
| 4440 | } | |
| 4441 | ||
| 4442 | 12 | rc = globus_hashtable_insert( |
| 4443 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4444 | (void *)&NotificationProducerTestPortType_DestroyTopic_input_qname, | |
| 4445 | (void *)&DestroyTopic_operation_descriptor); | |
| 4446 | 12 | if(rc != GLOBUS_SUCCESS) |
| 4447 | { | |
| 4448 | 0 | goto remove_DestroyTopic_op; |
| 4449 | } | |
| 4450 | ||
| 4451 | 12 | rc = globus_hashtable_insert( |
| 4452 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4453 | (void *)&NotificationProducerTestPortType_CreateTopic_input_qname, | |
| 4454 | (void *)&CreateTopic_operation_descriptor); | |
| 4455 | 12 | if(rc != GLOBUS_SUCCESS) |
| 4456 | { | |
| 4457 | 0 | goto remove_CreateTopic_op; |
| 4458 | } | |
| 4459 | ||
| 4460 | 12 | rc = globus_hashtable_insert( |
| 4461 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4462 | (void *)&NotificationProducerTestPortType_CreateNotificationProducerTest_input_qname, | |
| 4463 | (void *)&CreateNotificationProducerTest_operation_descriptor); | |
| 4464 | 12 | if(rc != GLOBUS_SUCCESS) |
| 4465 | { | |
| 4466 | 0 | goto remove_CreateNotificationProducerTest_op; |
| 4467 | } | |
| 4468 | ||
| 4469 | ||
| 4470 | 12 | result = globus_operation_table_init( |
| 4471 | &NotificationProducerTestService_descriptor.operations, | |
| 4472 | NotificationProducerTestService_service_qname.Namespace); | |
| 4473 | 12 | if(result != GLOBUS_SUCCESS) |
| 4474 | { | |
| 4475 | 0 | rc = (int) result; |
| 4476 | 0 | goto remove_all_ops; |
| 4477 | } | |
| 4478 | ||
| 4479 | ||
| 4480 | 12 | result = globus_extension_registry_add( |
| 4481 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4482 | (void *)&NotificationProducerTestPortType_GetCurrentMessage_op_qname, | |
| 4483 | GlobusExtensionMyModule(NotificationProducerTestService), | |
| 4484 | (void *)&GetCurrentMessage_descriptor); | |
| 4485 | 12 | if(result != GLOBUS_SUCCESS) |
| 4486 | { | |
| 4487 | 0 | rc = (int) result; |
| 4488 | 0 | goto remove_GetCurrentMessage_op_provider; |
| 4489 | } | |
| 4490 | ||
| 4491 | 12 | result = globus_operation_table_add_default_provider( |
| 4492 | NotificationProducerTestService_descriptor.operations, | |
| 4493 | &NotificationProducerTestPortType_GetCurrentMessage_op_qname, | |
| 4494 | &GetCurrentMessage_descriptor); | |
| 4495 | 12 | if(result != GLOBUS_SUCCESS) |
| 4496 | { | |
| 4497 | 0 | rc = (int) result; |
| 4498 | 0 | goto remove_GetCurrentMessage_op_provider; |
| 4499 | } | |
| 4500 | ||
| 4501 | 12 | result = globus_extension_registry_add( |
| 4502 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4503 | (void *)&NotificationProducerTestPortType_Subscribe_op_qname, | |
| 4504 | GlobusExtensionMyModule(NotificationProducerTestService), | |
| 4505 | (void *)&Subscribe_descriptor); | |
| 4506 | 12 | if(result != GLOBUS_SUCCESS) |
| 4507 | { | |
| 4508 | 0 | rc = (int) result; |
| 4509 | 0 | goto remove_Subscribe_op_provider; |
| 4510 | } | |
| 4511 | ||
| 4512 | 12 | result = globus_operation_table_add_default_provider( |
| 4513 | NotificationProducerTestService_descriptor.operations, | |
| 4514 | &NotificationProducerTestPortType_Subscribe_op_qname, | |
| 4515 | &Subscribe_descriptor); | |
| 4516 | 12 | if(result != GLOBUS_SUCCESS) |
| 4517 | { | |
| 4518 | 0 | rc = (int) result; |
| 4519 | 0 | goto remove_Subscribe_op_provider; |
| 4520 | } | |
| 4521 | ||
| 4522 | 12 | result = globus_extension_registry_add( |
| 4523 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4524 | (void *)&NotificationProducerTestPortType_GetResourceProperty_op_qname, | |
| 4525 | GlobusExtensionMyModule(NotificationProducerTestService), | |
| 4526 | (void *)&GetResourceProperty_descriptor); | |
| 4527 | 12 | if(result != GLOBUS_SUCCESS) |
| 4528 | { | |
| 4529 | 0 | rc = (int) result; |
| 4530 | 0 | goto remove_GetResourceProperty_op_provider; |
| 4531 | } | |
| 4532 | ||
| 4533 | 12 | result = globus_operation_table_add_default_provider( |
| 4534 | NotificationProducerTestService_descriptor.operations, | |
| 4535 | &NotificationProducerTestPortType_GetResourceProperty_op_qname, | |
| 4536 | &GetResourceProperty_descriptor); | |
| 4537 | 12 | if(result != GLOBUS_SUCCESS) |
| 4538 | { | |
| 4539 | 0 | rc = (int) result; |
| 4540 | 0 | goto remove_GetResourceProperty_op_provider; |
| 4541 | } | |
| 4542 | ||
| 4543 | 12 | result = globus_extension_registry_add( |
| 4544 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4545 | (void *)&NotificationProducerTestPortType_SetResourceProperties_op_qname, | |
| 4546 | GlobusExtensionMyModule(NotificationProducerTestService), | |
| 4547 | (void *)&SetResourceProperties_descriptor); | |
| 4548 | 12 | if(result != GLOBUS_SUCCESS) |
| 4549 | { | |
| 4550 | 0 | rc = (int) result; |
| 4551 | 0 | goto remove_SetResourceProperties_op_provider; |
| 4552 | } | |
| 4553 | ||
| 4554 | 12 | result = globus_operation_table_add_default_provider( |
| 4555 | NotificationProducerTestService_descriptor.operations, | |
| 4556 | &NotificationProducerTestPortType_SetResourceProperties_op_qname, | |
| 4557 | &SetResourceProperties_descriptor); | |
| 4558 | 12 | if(result != GLOBUS_SUCCESS) |
| 4559 | { | |
| 4560 | 0 | rc = (int) result; |
| 4561 | 0 | goto remove_SetResourceProperties_op_provider; |
| 4562 | } | |
| 4563 | ||
| 4564 | 12 | result = globus_extension_registry_add( |
| 4565 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4566 | (void *)&NotificationProducerTestPortType_Destroy_op_qname, | |
| 4567 | GlobusExtensionMyModule(NotificationProducerTestService), | |
| 4568 | (void *)&Destroy_descriptor); | |
| 4569 | 12 | if(result != GLOBUS_SUCCESS) |
| 4570 | { | |
| 4571 | 0 | rc = (int) result; |
| 4572 | 0 | goto remove_Destroy_op_provider; |
| 4573 | } | |
| 4574 | ||
| 4575 | 12 | result = globus_operation_table_add_default_provider( |
| 4576 | NotificationProducerTestService_descriptor.operations, | |
| 4577 | &NotificationProducerTestPortType_Destroy_op_qname, | |
| 4578 | &Destroy_descriptor); | |
| 4579 | 12 | if(result != GLOBUS_SUCCESS) |
| 4580 | { | |
| 4581 | 0 | rc = (int) result; |
| 4582 | 0 | goto remove_Destroy_op_provider; |
| 4583 | } | |
| 4584 | ||
| 4585 | 12 | result = globus_extension_registry_add( |
| 4586 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4587 | (void *)&NotificationProducerTestPortType_SetTopicValue_op_qname, | |
| 4588 | GlobusExtensionMyModule(NotificationProducerTestService), | |
| 4589 | (void *)&SetTopicValue_descriptor); | |
| 4590 | 12 | if(result != GLOBUS_SUCCESS) |
| 4591 | { | |
| 4592 | 0 | rc = (int) result; |
| 4593 | 0 | goto remove_SetTopicValue_op_provider; |
| 4594 | } | |
| 4595 | ||
| 4596 | 12 | result = globus_operation_table_add_default_provider( |
| 4597 | NotificationProducerTestService_descriptor.operations, | |
| 4598 | &NotificationProducerTestPortType_SetTopicValue_op_qname, | |
| 4599 | &SetTopicValue_descriptor); | |
| 4600 | 12 | if(result != GLOBUS_SUCCESS) |
| 4601 | { | |
| 4602 | 0 | rc = (int) result; |
| 4603 | 0 | goto remove_SetTopicValue_op_provider; |
| 4604 | } | |
| 4605 | ||
| 4606 | 12 | result = globus_extension_registry_add( |
| 4607 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4608 | (void *)&NotificationProducerTestPortType_DestroyTopic_op_qname, | |
| 4609 | GlobusExtensionMyModule(NotificationProducerTestService), | |
| 4610 | (void *)&DestroyTopic_descriptor); | |
| 4611 | 12 | if(result != GLOBUS_SUCCESS) |
| 4612 | { | |
| 4613 | 0 | rc = (int) result; |
| 4614 | 0 | goto remove_DestroyTopic_op_provider; |
| 4615 | } | |
| 4616 | ||
| 4617 | 12 | result = globus_operation_table_add_default_provider( |
| 4618 | NotificationProducerTestService_descriptor.operations, | |
| 4619 | &NotificationProducerTestPortType_DestroyTopic_op_qname, | |
| 4620 | &DestroyTopic_descriptor); | |
| 4621 | 12 | if(result != GLOBUS_SUCCESS) |
| 4622 | { | |
| 4623 | 0 | rc = (int) result; |
| 4624 | 0 | goto remove_DestroyTopic_op_provider; |
| 4625 | } | |
| 4626 | ||
| 4627 | 12 | result = globus_extension_registry_add( |
| 4628 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4629 | (void *)&NotificationProducerTestPortType_CreateTopic_op_qname, | |
| 4630 | GlobusExtensionMyModule(NotificationProducerTestService), | |
| 4631 | (void *)&CreateTopic_descriptor); | |
| 4632 | 12 | if(result != GLOBUS_SUCCESS) |
| 4633 | { | |
| 4634 | 0 | rc = (int) result; |
| 4635 | 0 | goto remove_CreateTopic_op_provider; |
| 4636 | } | |
| 4637 | ||
| 4638 | 12 | result = globus_operation_table_add_default_provider( |
| 4639 | NotificationProducerTestService_descriptor.operations, | |
| 4640 | &NotificationProducerTestPortType_CreateTopic_op_qname, | |
| 4641 | &CreateTopic_descriptor); | |
| 4642 | 12 | if(result != GLOBUS_SUCCESS) |
| 4643 | { | |
| 4644 | 0 | rc = (int) result; |
| 4645 | 0 | goto remove_CreateTopic_op_provider; |
| 4646 | } | |
| 4647 | ||
| 4648 | 12 | result = globus_extension_registry_add( |
| 4649 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4650 | (void *)&NotificationProducerTestPortType_CreateNotificationProducerTest_op_qname, | |
| 4651 | GlobusExtensionMyModule(NotificationProducerTestService), | |
| 4652 | (void *)&CreateNotificationProducerTest_descriptor); | |
| 4653 | 12 | if(result != GLOBUS_SUCCESS) |
| 4654 | { | |
| 4655 | 0 | rc = (int) result; |
| 4656 | 0 | goto remove_CreateNotificationProducerTest_op_provider; |
| 4657 | } | |
| 4658 | ||
| 4659 | 12 | result = globus_operation_table_add_default_provider( |
| 4660 | NotificationProducerTestService_descriptor.operations, | |
| 4661 | &NotificationProducerTestPortType_CreateNotificationProducerTest_op_qname, | |
| 4662 | &CreateNotificationProducerTest_descriptor); | |
| 4663 | 12 | if(result != GLOBUS_SUCCESS) |
| 4664 | { | |
| 4665 | 0 | rc = (int) result; |
| 4666 | 0 | goto remove_CreateNotificationProducerTest_op_provider; |
| 4667 | } | |
| 4668 | ||
| 4669 | 12 | result = globus_operation_table_add_provider( |
| 4670 | NotificationProducerTestService_descriptor.operations, | |
| 4671 | &NotificationProducerTestService_l_wsrp_GetResourceProperty_qname); | |
| 4672 | 12 | if (result != GLOBUS_SUCCESS) |
| 4673 | { | |
| 4674 | 0 | rc = (int) result; |
| 4675 | 0 | goto remove_op_providers; |
| 4676 | } | |
| 4677 | ||
| 4678 | 12 | result = globus_operation_table_add_provider( |
| 4679 | NotificationProducerTestService_descriptor.operations, | |
| 4680 | &NotificationProducerTestService_l_wsrp_GetMultipleResourceProperties_qname); | |
| 4681 | 12 | if (result != GLOBUS_SUCCESS) |
| 4682 | { | |
| 4683 | 0 | rc = (int) result; |
| 4684 | ||
| 4685 | 0 | goto remove_op_providers; |
| 4686 | } | |
| 4687 | ||
| 4688 | 12 | result = globus_operation_table_add_provider( |
| 4689 | NotificationProducerTestService_descriptor.operations, | |
| 4690 | &NotificationProducerTestService_l_wsrp_SetResourceProperties_qname); | |
| 4691 | 12 | if (result != GLOBUS_SUCCESS) |
| 4692 | { | |
| 4693 | 0 | rc = (int) result; |
| 4694 | ||
| 4695 | 0 | goto remove_op_providers; |
| 4696 | } | |
| 4697 | ||
| 4698 | 12 | result = globus_operation_table_add_provider( |
| 4699 | NotificationProducerTestService_descriptor.operations, | |
| 4700 | &NotificationProducerTestService_l_wsrp_QueryResourceProperties_qname); | |
| 4701 | 12 | if (result != GLOBUS_SUCCESS) |
| 4702 | { | |
| 4703 | 0 | rc = (int) result; |
| 4704 | ||
| 4705 | 0 | goto remove_op_providers; |
| 4706 | } | |
| 4707 | ||
| 4708 | 12 | result = globus_operation_table_add_provider( |
| 4709 | NotificationProducerTestService_descriptor.operations, | |
| 4710 | &NotificationProducerTestService_l_wsrl_Destroy_qname); | |
| 4711 | 12 | if (result != GLOBUS_SUCCESS) |
| 4712 | { | |
| 4713 | 0 | rc = (int) result; |
| 4714 | ||
| 4715 | 0 | goto remove_op_providers; |
| 4716 | } | |
| 4717 | ||
| 4718 | 12 | result = globus_operation_table_add_provider( |
| 4719 | NotificationProducerTestService_descriptor.operations, | |
| 4720 | &NotificationProducerTestService_l_wsrl_SetTerminationTime_qname); | |
| 4721 | 12 | if (result != GLOBUS_SUCCESS) |
| 4722 | { | |
| 4723 | 0 | rc = (int) result; |
| 4724 | ||
| 4725 | 0 | goto remove_op_providers; |
| 4726 | } | |
| 4727 | ||
| 4728 | 12 | result = globus_operation_table_add_provider( |
| 4729 | NotificationProducerTestService_descriptor.operations, | |
| 4730 | &NotificationProducerTestService_l_wsnt_Subscribe_qname); | |
| 4731 | 12 | if (result != GLOBUS_SUCCESS) |
| 4732 | { | |
| 4733 | 0 | rc = (int) result; |
| 4734 | ||
| 4735 | 0 | goto remove_op_providers; |
| 4736 | } | |
| 4737 | ||
| 4738 | 12 | result = globus_operation_table_add_provider( |
| 4739 | NotificationProducerTestService_descriptor.operations, | |
| 4740 | &NotificationProducerTestService_l_wsnt_GetCurrentMessage_qname); | |
| 4741 | 12 | if (result != GLOBUS_SUCCESS) |
| 4742 | { | |
| 4743 | 0 | rc = (int) result; |
| 4744 | ||
| 4745 | 0 | goto remove_op_providers; |
| 4746 | } | |
| 4747 | ||
| 4748 | 12 | rc = globus_extension_registry_add( |
| 4749 | GLOBUS_SERVICE_REGISTRY, | |
| 4750 | (void *)NotificationProducerTestService_descriptor.path, | |
| 4751 | GlobusExtensionMyModule(NotificationProducerTestService), | |
| 4752 | &NotificationProducerTestService_descriptor); | |
| 4753 | 12 | if(rc != GLOBUS_SUCCESS) |
| 4754 | { | |
| 4755 | 0 | goto remove_op_providers; |
| 4756 | } | |
| 4757 | ||
| 4758 | 12 | result = NotificationProducerTestService_init(&NotificationProducerTestService_descriptor); |
| 4759 | 12 | if(result != GLOBUS_SUCCESS) |
| 4760 | { | |
| 4761 | 0 | rc = (int) result; |
| 4762 | goto service_extension_remove; | |
| 4763 | } | |
| 4764 | ||
| 4765 | 0 | goto exit; |
| 4766 | ||
| 4767 | service_extension_remove: | |
| 4768 | 0 | globus_extension_registry_remove( |
| 4769 | GLOBUS_SERVICE_REGISTRY, | |
| 4770 | (void *)NotificationProducerTestService_descriptor.path); | |
| 4771 | remove_op_providers: | |
| 4772 | ||
| 4773 | 0 | globus_extension_registry_remove( |
| 4774 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4775 | (void *)&NotificationProducerTestPortType_GetCurrentMessage_op_qname); | |
| 4776 | remove_GetCurrentMessage_op_provider: | |
| 4777 | ||
| 4778 | 0 | globus_extension_registry_remove( |
| 4779 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4780 | (void *)&NotificationProducerTestPortType_Subscribe_op_qname); | |
| 4781 | remove_Subscribe_op_provider: | |
| 4782 | ||
| 4783 | 0 | globus_extension_registry_remove( |
| 4784 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4785 | (void *)&NotificationProducerTestPortType_GetResourceProperty_op_qname); | |
| 4786 | remove_GetResourceProperty_op_provider: | |
| 4787 | ||
| 4788 | 0 | globus_extension_registry_remove( |
| 4789 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4790 | (void *)&NotificationProducerTestPortType_SetResourceProperties_op_qname); | |
| 4791 | remove_SetResourceProperties_op_provider: | |
| 4792 | ||
| 4793 | 0 | globus_extension_registry_remove( |
| 4794 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4795 | (void *)&NotificationProducerTestPortType_Destroy_op_qname); | |
| 4796 | remove_Destroy_op_provider: | |
| 4797 | ||
| 4798 | 0 | globus_extension_registry_remove( |
| 4799 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4800 | (void *)&NotificationProducerTestPortType_SetTopicValue_op_qname); | |
| 4801 | remove_SetTopicValue_op_provider: | |
| 4802 | ||
| 4803 | 0 | globus_extension_registry_remove( |
| 4804 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4805 | (void *)&NotificationProducerTestPortType_DestroyTopic_op_qname); | |
| 4806 | remove_DestroyTopic_op_provider: | |
| 4807 | ||
| 4808 | 0 | globus_extension_registry_remove( |
| 4809 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4810 | (void *)&NotificationProducerTestPortType_CreateTopic_op_qname); | |
| 4811 | remove_CreateTopic_op_provider: | |
| 4812 | ||
| 4813 | 0 | globus_extension_registry_remove( |
| 4814 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4815 | (void *)&NotificationProducerTestPortType_CreateNotificationProducerTest_op_qname); | |
| 4816 | remove_CreateNotificationProducerTest_op_provider: | |
| 4817 | ||
| 4818 | destroy_op_table: | |
| 4819 | 0 | globus_operation_table_destroy(NotificationProducerTestService_descriptor.operations); |
| 4820 | remove_all_ops: | |
| 4821 | ||
| 4822 | 0 | globus_hashtable_remove( |
| 4823 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4824 | (void *)&NotificationProducerTestPortType_GetCurrentMessage_input_qname); | |
| 4825 | remove_GetCurrentMessage_op: | |
| 4826 | ||
| 4827 | 0 | globus_hashtable_remove( |
| 4828 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4829 | (void *)&NotificationProducerTestPortType_Subscribe_input_qname); | |
| 4830 | remove_Subscribe_op: | |
| 4831 | ||
| 4832 | 0 | globus_hashtable_remove( |
| 4833 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4834 | (void *)&NotificationProducerTestPortType_GetResourceProperty_input_qname); | |
| 4835 | remove_GetResourceProperty_op: | |
| 4836 | ||
| 4837 | 0 | globus_hashtable_remove( |
| 4838 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4839 | (void *)&NotificationProducerTestPortType_SetResourceProperties_input_qname); | |
| 4840 | remove_SetResourceProperties_op: | |
| 4841 | ||
| 4842 | 0 | globus_hashtable_remove( |
| 4843 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4844 | (void *)&NotificationProducerTestPortType_Destroy_input_qname); | |
| 4845 | remove_Destroy_op: | |
| 4846 | ||
| 4847 | 0 | globus_hashtable_remove( |
| 4848 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4849 | (void *)&NotificationProducerTestPortType_SetTopicValue_input_qname); | |
| 4850 | remove_SetTopicValue_op: | |
| 4851 | ||
| 4852 | 0 | globus_hashtable_remove( |
| 4853 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4854 | (void *)&NotificationProducerTestPortType_DestroyTopic_input_qname); | |
| 4855 | remove_DestroyTopic_op: | |
| 4856 | ||
| 4857 | 0 | globus_hashtable_remove( |
| 4858 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4859 | (void *)&NotificationProducerTestPortType_CreateTopic_input_qname); | |
| 4860 | remove_CreateTopic_op: | |
| 4861 | ||
| 4862 | 0 | globus_hashtable_remove( |
| 4863 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4864 | (void *)&NotificationProducerTestPortType_CreateNotificationProducerTest_input_qname); | |
| 4865 | remove_CreateNotificationProducerTest_op: | |
| 4866 | ||
| 4867 | destroy_mutex: | |
| 4868 | 0 | globus_mutex_destroy(&NotificationProducerTestService_descriptor.mutex); |
| 4869 | clear_service_registry: | |
| 4870 | 0 | NotificationProducerTestService_registry_remove_types( |
| 4871 | NotificationProducerTestService_descriptor.registry); | |
| 4872 | destroy_service_registry: | |
| 4873 | 0 | globus_xsd_type_registry_destroy(NotificationProducerTestService_descriptor.registry); |
| 4874 | destroy_op_mapper: | |
| 4875 | 0 | globus_hashtable_destroy(&NotificationProducerTestService_descriptor.op_mapper); |
| 4876 | clear_global_registry: | |
| 4877 | 0 | if(GLOBUS_GLOBAL_TYPE_REGISTRY != NULL) |
| 4878 | { | |
| 4879 | 0 | NotificationProducerTestService_registry_remove_types( |
| 4880 | GLOBUS_GLOBAL_TYPE_REGISTRY); | |
| 4881 | } | |
| 4882 | deactivate_nrt: | |
| 4883 | 0 | globus_extension_deactivate( |
| 4884 | "globus_wsnt_NotificationProducer_provider"); | |
| 4885 | deactivate_srt: | |
| 4886 | 0 | globus_extension_deactivate( |
| 4887 | "globus_wsrl_ScheduledResourceTermination_provider"); | |
| 4888 | deactivate_irt: | |
| 4889 | 0 | globus_extension_deactivate( |
| 4890 | "globus_wsrl_ImmediateResourceTermination_provider"); | |
| 4891 | deactivate_queryrp: | |
| 4892 | 0 | globus_extension_deactivate( |
| 4893 | "globus_wsrp_QueryResourceProperties_provider"); | |
| 4894 | deactivate_setrp: | |
| 4895 | 0 | globus_extension_deactivate("globus_wsrp_SetResourceProperties_provider"); |
| 4896 | deactivate_getmrp: | |
| 4897 | 0 | globus_extension_deactivate("globus_wsrp_GetMultipleResourceProperties_provider"); |
| 4898 | deactivate_getrp: | |
| 4899 | 0 | globus_extension_deactivate("globus_wsrp_GetResourceProperty_provider"); |
| 4900 | deactivate_resource_out: | |
| 4901 | 0 | globus_module_deactivate(GLOBUS_WSRF_RESOURCE_MODULE); |
| 4902 | ||
| 4903 | exit: | |
| 4904 | 12 | NotificationProducerTestServiceDebugExit(); |
| 4905 | 12 | return rc; |
| 4906 | } | |
| 4907 | ||
| 4908 | static | |
| 4909 | int | |
| 4910 | NotificationProducerTestService_deactivate() | |
| 4911 | 0 | { |
| 4912 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 4913 | 0 | int rc = 0; |
| 4914 | ||
| 4915 | 0 | result = NotificationProducerTestService_finalize(&NotificationProducerTestService_descriptor); |
| 4916 | 0 | if(result != GLOBUS_SUCCESS) |
| 4917 | { | |
| 4918 | 0 | return GLOBUS_FAILURE; |
| 4919 | } | |
| 4920 | ||
| 4921 | 0 | globus_extension_registry_remove( |
| 4922 | GLOBUS_SERVICE_REGISTRY, | |
| 4923 | (void *)NotificationProducerTestService_descriptor.path); | |
| 4924 | ||
| 4925 | 0 | globus_extension_registry_remove( |
| 4926 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4927 | (void *)&NotificationProducerTestPortType_GetCurrentMessage_op_qname); | |
| 4928 | ||
| 4929 | 0 | globus_extension_registry_remove( |
| 4930 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4931 | (void *)&NotificationProducerTestPortType_Subscribe_op_qname); | |
| 4932 | ||
| 4933 | 0 | globus_extension_registry_remove( |
| 4934 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4935 | (void *)&NotificationProducerTestPortType_GetResourceProperty_op_qname); | |
| 4936 | ||
| 4937 | 0 | globus_extension_registry_remove( |
| 4938 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4939 | (void *)&NotificationProducerTestPortType_SetResourceProperties_op_qname); | |
| 4940 | ||
| 4941 | 0 | globus_extension_registry_remove( |
| 4942 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4943 | (void *)&NotificationProducerTestPortType_Destroy_op_qname); | |
| 4944 | ||
| 4945 | 0 | globus_extension_registry_remove( |
| 4946 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4947 | (void *)&NotificationProducerTestPortType_SetTopicValue_op_qname); | |
| 4948 | ||
| 4949 | 0 | globus_extension_registry_remove( |
| 4950 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4951 | (void *)&NotificationProducerTestPortType_DestroyTopic_op_qname); | |
| 4952 | ||
| 4953 | 0 | globus_extension_registry_remove( |
| 4954 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4955 | (void *)&NotificationProducerTestPortType_CreateTopic_op_qname); | |
| 4956 | ||
| 4957 | 0 | globus_extension_registry_remove( |
| 4958 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4959 | (void *)&NotificationProducerTestPortType_CreateNotificationProducerTest_op_qname); | |
| 4960 | ||
| 4961 | 0 | globus_operation_table_destroy(NotificationProducerTestService_descriptor.operations); |
| 4962 | ||
| 4963 | ||
| 4964 | 0 | globus_hashtable_remove( |
| 4965 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4966 | (void *)&NotificationProducerTestPortType_GetCurrentMessage_input_qname); | |
| 4967 | ||
| 4968 | 0 | globus_hashtable_remove( |
| 4969 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4970 | (void *)&NotificationProducerTestPortType_Subscribe_input_qname); | |
| 4971 | ||
| 4972 | 0 | globus_hashtable_remove( |
| 4973 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4974 | (void *)&NotificationProducerTestPortType_GetResourceProperty_input_qname); | |
| 4975 | ||
| 4976 | 0 | globus_hashtable_remove( |
| 4977 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4978 | (void *)&NotificationProducerTestPortType_SetResourceProperties_input_qname); | |
| 4979 | ||
| 4980 | 0 | globus_hashtable_remove( |
| 4981 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4982 | (void *)&NotificationProducerTestPortType_Destroy_input_qname); | |
| 4983 | ||
| 4984 | 0 | globus_hashtable_remove( |
| 4985 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4986 | (void *)&NotificationProducerTestPortType_SetTopicValue_input_qname); | |
| 4987 | ||
| 4988 | 0 | globus_hashtable_remove( |
| 4989 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4990 | (void *)&NotificationProducerTestPortType_DestroyTopic_input_qname); | |
| 4991 | ||
| 4992 | 0 | globus_hashtable_remove( |
| 4993 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4994 | (void *)&NotificationProducerTestPortType_CreateTopic_input_qname); | |
| 4995 | ||
| 4996 | 0 | globus_hashtable_remove( |
| 4997 | &NotificationProducerTestService_descriptor.op_mapper, | |
| 4998 | (void *)&NotificationProducerTestPortType_CreateNotificationProducerTest_input_qname); | |
| 4999 | ||
| 5000 | ||
| 5001 | 0 | globus_mutex_destroy(&NotificationProducerTestService_descriptor.mutex); |
| 5002 | ||
| 5003 | 0 | NotificationProducerTestService_registry_remove_types( |
| 5004 | NotificationProducerTestService_descriptor.registry); | |
| 5005 | ||
| 5006 | 0 | globus_xsd_type_registry_destroy(NotificationProducerTestService_descriptor.registry); |
| 5007 | ||
| 5008 | 0 | globus_hashtable_destroy(&NotificationProducerTestService_descriptor.op_mapper); |
| 5009 | ||
| 5010 | 0 | if(GLOBUS_GLOBAL_TYPE_REGISTRY != NULL) |
| 5011 | { | |
| 5012 | 0 | NotificationProducerTestService_registry_remove_types( |
| 5013 | GLOBUS_GLOBAL_TYPE_REGISTRY); | |
| 5014 | } | |
| 5015 | ||
| 5016 | 0 | globus_extension_deactivate( |
| 5017 | "globus_wsnt_NotificationProducer_provider"); | |
| 5018 | 0 | globus_extension_deactivate( |
| 5019 | "globus_wsrl_ScheduledResourceTermination_provider"); | |
| 5020 | 0 | globus_extension_deactivate( |
| 5021 | "globus_wsrl_ImmediateResourceTermination_provider"); | |
| 5022 | 0 | globus_extension_deactivate( |
| 5023 | "globus_wsrp_QueryResourceProperties_provider"); | |
| 5024 | 0 | globus_extension_deactivate("globus_wsrp_SetResourceProperties_provider"); |
| 5025 | 0 | globus_extension_deactivate( |
| 5026 | "globus_wsrp_GetMultipleResourceProperties_provider"); | |
| 5027 | 0 | globus_extension_deactivate("globus_wsrp_GetResourceProperty_provider"); |
| 5028 | 0 | globus_module_deactivate(GLOBUS_WSRF_RESOURCE_MODULE); |
| 5029 | ||
| 5030 | 0 | rc = globus_module_deactivate(GLOBUS_SOAP_MESSAGE_MODULE); |
| 5031 | 0 | if(rc != GLOBUS_SUCCESS) |
| 5032 | { | |
| 5033 | 0 | return rc; |
| 5034 | } | |
| 5035 | ||
| 5036 | 0 | GlobusDebugDestroy(NOTIFICATIONPRODUCERTESTSERVICE); |
| 5037 | ||
| 5038 | 0 | rc = globus_module_deactivate(GLOBUS_COMMON_MODULE); |
| 5039 | 0 | if(rc != GLOBUS_SUCCESS) |
| 5040 | { | |
| 5041 | 0 | return rc; |
| 5042 | } | |
| 5043 | ||
| 5044 | 0 | return rc; |
| 5045 | } | |
| 5046 | ||
| 5047 | #define WSRP_NS "http://www.globus.org/docs.oasis-open.org" \ | |
| 5048 | "/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl" | |
| 5049 | ||
| 5050 | static xsd_QName NotificationProducerTestService_l_wsrp_GetResourceProperty_qname = | |
| 5051 | { | |
| 5052 | WSRP_NS, | |
| 5053 | "GetResourceProperty" | |
| 5054 | }; | |
| 5055 | ||
| 5056 | static xsd_QName NotificationProducerTestService_l_wsrp_GetMultipleResourceProperties_qname = | |
| 5057 | { | |
| 5058 | WSRP_NS, | |
| 5059 | "GetMultipleResourceProperties" | |
| 5060 | }; | |
| 5061 | ||
| 5062 | static xsd_QName NotificationProducerTestService_l_wsrp_SetResourceProperties_qname = | |
| 5063 | { | |
| 5064 | WSRP_NS, | |
| 5065 | "SetResourceProperties" | |
| 5066 | }; | |
| 5067 | ||
| 5068 | static xsd_QName NotificationProducerTestService_l_wsrp_QueryResourceProperties_qname = | |
| 5069 | { | |
| 5070 | WSRP_NS, | |
| 5071 | "QueryResourceProperties" | |
| 5072 | }; | |
| 5073 | ||
| 5074 | static xsd_QName NotificationProducerTestService_l_wsrl_Destroy_qname = | |
| 5075 | { | |
| 5076 | "http://www.globus.org/docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl", | |
| 5077 | "Destroy" | |
| 5078 | }; | |
| 5079 | ||
| 5080 | static xsd_QName NotificationProducerTestService_l_wsrl_SetTerminationTime_qname = | |
| 5081 | { | |
| 5082 | "http://www.globus.org/docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl", | |
| 5083 | "SetTerminationTime" | |
| 5084 | }; | |
| 5085 | ||
| 5086 | static xsd_QName NotificationProducerTestService_l_wsnt_Subscribe_qname = | |
| 5087 | { | |
| 5088 | "http://www.globus.org/docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl", | |
| 5089 | "Subscribe" | |
| 5090 | }; | |
| 5091 | ||
| 5092 | static xsd_QName NotificationProducerTestService_l_wsnt_GetCurrentMessage_qname = | |
| 5093 | { | |
| 5094 | "http://www.globus.org/docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl", | |
| 5095 | "GetCurrentMessage" |