| 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 "ResourcePropertiesTestService.h" | |
| 24 | #include "ResourcePropertiesTestService_skeleton.h" | |
| 25 | #include "ResourcePropertiesTestService_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 | ResourcePropertiesTestService_activate(void); | |
| 34 | ||
| 35 | static | |
| 36 | int | |
| 37 | ResourcePropertiesTestService_deactivate(void); | |
| 38 | ||
| 39 | GlobusExtensionDefineModule(ResourcePropertiesTestService) = | |
| 40 | { | |
| 41 | "ResourcePropertiesTestService", | |
| 42 | ResourcePropertiesTestService_activate, | |
| 43 | ResourcePropertiesTestService_deactivate, | |
| 44 | NULL, | |
| 45 | NULL, | |
| 46 | &local_version | |
| 47 | }; | |
| 48 | ||
| 49 | 0 | GlobusDebugDefine(RESOURCEPROPERTIESTESTSERVICE); |
| 50 | ||
| 51 | xsd_QName ResourcePropertiesTestService_service_qname = | |
| 52 | { | |
| 53 | "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest/service", | |
| 54 | "ResourcePropertiesTestService" | |
| 55 | }; | |
| 56 | ||
| 57 | globus_service_descriptor_t ResourcePropertiesTestService_descriptor = | |
| 58 | { | |
| 59 | &ResourcePropertiesTestService_service_qname, | |
| 60 | GLOBUS_SERVICE_ENGINE_MODULE_PATH_PREFIX "/" RESOURCEPROPERTIESTESTSERVICE_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 ResourcePropertiesTestPortType_GetResourceProperty_op_qname = | |
| 71 | { | |
| 72 | "http://localhost:8080/wsrf/services/ResourcePropertiesTestService" | |
| 73 | "GetResourceProperty" | |
| 74 | }; | |
| 75 | ||
| 76 | xsd_QName ResourcePropertiesTestPortType_GetResourceProperty_input_qname = | |
| 77 | { | |
| 78 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd", | |
| 79 | "GetResourceProperty" | |
| 80 | }; | |
| 81 | ||
| 82 | typedef globus_result_t (* GetResourceProperty_invoke_func_t) ( | |
| 83 | globus_service_engine_t engine, | |
| 84 | globus_soap_message_handle_t message, | |
| 85 | globus_service_descriptor_t * descriptor, | |
| 86 | xsd_QName * GetResourceProperty, | |
| 87 | wsrp_GetResourcePropertyResponseType * GetResourcePropertyResponse, | |
| 88 | const char ** fault_type_name, | |
| 89 | void ** fault); | |
| 90 | ||
| 91 | typedef struct GetResourceProperty_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 | } GetResourceProperty_callback_handle_t; | |
| 98 | ||
| 99 | ||
| 100 | const char * ResourcePropertiesTestPortType_GetResourceProperty_fault_strings[RESOURCEPROPERTIESTESTPORTTYPE_GETRESOURCEPROPERTY_INVALIDRESOURCEPROPERTYQNAMEFAULT] = | |
| 101 | { | |
| 102 | "Unknown", | |
| 103 | "ResourceUnknownFault", | |
| 104 | "InvalidResourcePropertyQNameFault" | |
| 105 | }; | |
| 106 | ||
| 107 | static | |
| 108 | ResourcePropertiesTestPortType_GetResourceProperty_fault_t | |
| 109 | GetResourceProperty_lookup_fault_type( | |
| 110 | const char * fault_name) | |
| 111 | { | |
| 112 | 16 | ResourcePropertiesTestPortType_GetResourceProperty_fault_t fault_type; |
| 113 | 16 | GlobusFuncName(GetResourceProperty_lookup_fault_type); |
| 114 | 16 | ResourcePropertiesTestServiceDebugEnter(); |
| 115 | ||
| 116 | 16 | globus_assert(fault_name); |
| 117 | ||
| 118 | 16 | if(!strcmp(fault_name, "ResourceUnknownFault")) |
| 119 | { | |
| 120 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_GETRESOURCEPROPERTY_RESOURCEUNKNOWNFAULT; |
| 121 | } | |
| 122 | 16 | else if(!strcmp(fault_name, "InvalidResourcePropertyQNameFault")) |
| 123 | { | |
| 124 | 16 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_GETRESOURCEPROPERTY_INVALIDRESOURCEPROPERTYQNAMEFAULT; |
| 125 | } | |
| 126 | else | |
| 127 | { | |
| 128 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_GETRESOURCEPROPERTY_UNKNOWN_FAULT; |
| 129 | } | |
| 130 | ||
| 131 | 16 | ResourcePropertiesTestServiceDebugExit(); |
| 132 | 16 | return fault_type; |
| 133 | } | |
| 134 | ||
| 135 | ||
| 136 | ||
| 137 | static | |
| 138 | void | |
| 139 | GetResourceProperty_deserialize_callback( | |
| 140 | void * handle) | |
| 141 | 90 | { |
| 142 | 90 | GetResourceProperty_callback_handle_t * callback_handle; |
| 143 | 90 | globus_result_t result = GLOBUS_SUCCESS; |
| 144 | 90 | struct globus_soap_message_fault_s soap_fault; |
| 145 | 90 | GetResourceProperty_invoke_func_t invoke_function; |
| 146 | 90 | xsd_QName * GetResourceProperty = NULL; |
| 147 | 90 | GlobusFuncName(GetResourceProperty_deserialize_callback); |
| 148 | 90 | ResourcePropertiesTestServiceDebugEnter(); |
| 149 | ||
| 150 | 90 | callback_handle = (GetResourceProperty_callback_handle_t *) handle; |
| 151 | ||
| 152 | 90 | result = globus_operation_table_get_operation( |
| 153 | ResourcePropertiesTestService_descriptor.operations, | |
| 154 | "GetResourceProperty", | |
| 155 | (void **)&invoke_function); | |
| 156 | 90 | if(result != GLOBUS_SUCCESS) |
| 157 | { | |
| 158 | 0 | goto exit; |
| 159 | } | |
| 160 | ||
| 161 | 90 | if(ResourcePropertiesTestService_descriptor.registry) |
| 162 | { | |
| 163 | 90 | globus_soap_message_handle_set_registry( |
| 164 | callback_handle->message, | |
| 165 | ResourcePropertiesTestService_descriptor.registry); | |
| 166 | } | |
| 167 | ||
| 168 | 90 | result = xsd_QName_init( |
| 169 | &GetResourceProperty); | |
| 170 | 90 | if(result != GLOBUS_SUCCESS) |
| 171 | { | |
| 172 | 0 | goto exit; |
| 173 | } | |
| 174 | ||
| 175 | 90 | result = xsd_QName_deserialize( |
| 176 | &ResourcePropertiesTestPortType_GetResourceProperty_input_qname, | |
| 177 | GetResourceProperty, | |
| 178 | callback_handle->message, | |
| 179 | 0); | |
| 180 | 90 | if(result != GLOBUS_SUCCESS) |
| 181 | { | |
| 182 | 0 | goto exit; |
| 183 | } | |
| 184 | ||
| 185 | 90 | result = globus_soap_message_handle_set_attr( |
| 186 | callback_handle->message, | |
| 187 | "GetResourcePropertyOperationInputParameter", | |
| 188 | xsd_QName_copy_wrapper, | |
| 189 | xsd_QName_destroy_wrapper, | |
| 190 | (void *)GetResourceProperty); | |
| 191 | 90 | if(result != GLOBUS_SUCCESS) |
| 192 | { | |
| 193 | 90 | goto exit; |
| 194 | } | |
| 195 | ||
| 196 | exit: | |
| 197 | ||
| 198 | 90 | if (GetResourceProperty != NULL) |
| 199 | { | |
| 200 | 90 | xsd_QName_destroy(GetResourceProperty); |
| 201 | } | |
| 202 | 90 | callback_handle->callback( |
| 203 | result, | |
| 204 | callback_handle->args); | |
| 205 | ||
| 206 | 90 | free(callback_handle); |
| 207 | 90 | ResourcePropertiesTestServiceDebugExit(); |
| 208 | } | |
| 209 | ||
| 210 | static | |
| 211 | globus_result_t | |
| 212 | GetResourceProperty_deserialize( | |
| 213 | globus_service_engine_t engine, | |
| 214 | globus_soap_message_handle_t message, | |
| 215 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 216 | void * args) | |
| 217 | 90 | { |
| 218 | 90 | GetResourceProperty_callback_handle_t * callback_handle; |
| 219 | 90 | globus_result_t result = GLOBUS_SUCCESS; |
| 220 | 90 | GlobusFuncName(GetResourceProperty_deserialize); |
| 221 | 90 | ResourcePropertiesTestServiceDebugEnter(); |
| 222 | ||
| 223 | 90 | callback_handle = malloc(sizeof(GetResourceProperty_callback_handle_t)); |
| 224 | 90 | globus_assert_string(callback_handle, |
| 225 | "Memory allocation failed " | |
| 226 | "for GetResourceProperty callback handle"); | |
| 227 | ||
| 228 | 90 | callback_handle->engine = engine; |
| 229 | 90 | callback_handle->message = message; |
| 230 | 90 | callback_handle->callback = invoke_callback; |
| 231 | 90 | callback_handle->args = args; |
| 232 | ||
| 233 | 90 | result = globus_callback_register_oneshot( |
| 234 | NULL, | |
| 235 | &globus_i_reltime_zero, | |
| 236 | GetResourceProperty_deserialize_callback, | |
| 237 | callback_handle); | |
| 238 | ||
| 239 | 90 | ResourcePropertiesTestServiceDebugExit(); |
| 240 | 90 | return result; |
| 241 | } | |
| 242 | ||
| 243 | static | |
| 244 | void | |
| 245 | GetResourceProperty_invoke_callback( | |
| 246 | void * handle) | |
| 247 | 90 | { |
| 248 | 90 | GetResourceProperty_callback_handle_t * callback_handle; |
| 249 | 90 | globus_result_t result = GLOBUS_SUCCESS; |
| 250 | 90 | struct globus_soap_message_fault_s soap_fault; |
| 251 | 90 | GetResourceProperty_invoke_func_t invoke_function; |
| 252 | 90 | xsd_QName * GetResourceProperty; |
| 253 | 90 | wsrp_GetResourcePropertyResponseType GetResourcePropertyResponse; |
| 254 | 90 | xsd_QName element_qname; |
| 255 | 90 | const char * fault_type_name = NULL; |
| 256 | 90 | ResourcePropertiesTestPortType_GetResourceProperty_fault_t fault_type = RESOURCEPROPERTIESTESTPORTTYPE_GETRESOURCEPROPERTY_NOFAULT; |
| 257 | 90 | void * fault = NULL; |
| 258 | ||
| 259 | 90 | GlobusFuncName(GetResourceProperty_invoke_callback); |
| 260 | 90 | ResourcePropertiesTestServiceDebugEnter(); |
| 261 | ||
| 262 | 90 | callback_handle = (GetResourceProperty_callback_handle_t *) handle; |
| 263 | ||
| 264 | 90 | GetResourceProperty = globus_soap_message_handle_get_attr( |
| 265 | callback_handle->message, | |
| 266 | "GetResourcePropertyOperationInputParameter"); | |
| 267 | 90 | globus_assert(GetResourceProperty); |
| 268 | ||
| 269 | 90 | result = globus_operation_table_get_operation( |
| 270 | ResourcePropertiesTestService_descriptor.operations, | |
| 271 | "GetResourceProperty", | |
| 272 | (void **)&invoke_function); | |
| 273 | 90 | if(result != GLOBUS_SUCCESS) |
| 274 | { | |
| 275 | 0 | goto fault_exit; |
| 276 | } | |
| 277 | ||
| 278 | ||
| 279 | 90 | result = wsrp_GetResourcePropertyResponseType_init_contents( |
| 280 | &GetResourcePropertyResponse); | |
| 281 | 90 | if(result != GLOBUS_SUCCESS) |
| 282 | { | |
| 283 | 0 | goto fault_exit; |
| 284 | } | |
| 285 | ||
| 286 | 90 | result = invoke_function( |
| 287 | callback_handle->engine, | |
| 288 | callback_handle->message, | |
| 289 | &ResourcePropertiesTestService_descriptor, | |
| 290 | GetResourceProperty, | |
| 291 | &GetResourcePropertyResponse, | |
| 292 | &fault_type_name, | |
| 293 | &fault); | |
| 294 | ||
| 295 | fault_exit: | |
| 296 | ||
| 297 | 90 | if(fault && fault_type_name) |
| 298 | { | |
| 299 | 16 | fault_type = GetResourceProperty_lookup_fault_type(fault_type_name); |
| 300 | ||
| 301 | 16 | result = globus_service_session_begin_response( |
| 302 | callback_handle->message); | |
| 303 | 16 | if(result != GLOBUS_SUCCESS) |
| 304 | { | |
| 305 | 0 | goto exit; |
| 306 | } | |
| 307 | ||
| 308 | 16 | soap_fault.faultcode = "Server"; |
| 309 | 16 | soap_fault.faultstring = |
| 310 | "An error occurred while processing the message"; | |
| 311 | 16 | soap_fault.faultactor = NULL; |
| 312 | ||
| 313 | 16 | switch(fault_type) |
| 314 | { | |
| 315 | ||
| 316 | case RESOURCEPROPERTIESTESTPORTTYPE_GETRESOURCEPROPERTY_RESOURCEUNKNOWNFAULT: | |
| 317 | ||
| 318 | 0 | xsd_any_init(&soap_fault.detail); |
| 319 | 0 | soap_fault.detail->any_info = &wsrp_ResourceUnknownFaultType_info; |
| 320 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 321 | 0 | soap_fault.detail->element->local = "ResourceUnknownFault"; |
| 322 | 0 | soap_fault.detail->element->Namespace = |
| 323 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 324 | 0 | soap_fault.detail->value = fault; |
| 325 | 0 | break; |
| 326 | ||
| 327 | case RESOURCEPROPERTIESTESTPORTTYPE_GETRESOURCEPROPERTY_INVALIDRESOURCEPROPERTYQNAMEFAULT: | |
| 328 | ||
| 329 | 16 | xsd_any_init(&soap_fault.detail); |
| 330 | 16 | soap_fault.detail->any_info = &wsrp_InvalidResourcePropertyQNameFaultType_info; |
| 331 | 16 | xsd_QName_init(&soap_fault.detail->element); |
| 332 | 16 | soap_fault.detail->element->local = "InvalidResourcePropertyQNameFault"; |
| 333 | 16 | soap_fault.detail->element->Namespace = |
| 334 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 335 | 16 | soap_fault.detail->value = fault; |
| 336 | 16 | break; |
| 337 | ||
| 338 | default: | |
| 339 | 0 | result = ResourcePropertiesTestServiceErrorReturnedUnknownFault("GetResourceProperty"); |
| 340 | 0 | goto exit; |
| 341 | } | |
| 342 | ||
| 343 | 16 | result = globus_service_session_serialize_fault_response( |
| 344 | callback_handle->message, &soap_fault); | |
| 345 | 16 | if(result != GLOBUS_SUCCESS) |
| 346 | { | |
| 347 | 0 | goto exit; |
| 348 | } | |
| 349 | ||
| 350 | 16 | soap_fault.detail->element->local = NULL; |
| 351 | 16 | soap_fault.detail->element->Namespace = NULL; |
| 352 | 16 | soap_fault.detail->any_info = NULL; |
| 353 | 16 | xsd_any_destroy(soap_fault.detail); |
| 354 | ||
| 355 | 16 | globus_soap_message_handle_set_attr( |
| 356 | callback_handle->message, | |
| 357 | WSADDR_ACTION_RESPONSE_KEY, | |
| 358 | globus_soap_message_attr_copy_string, | |
| 359 | globus_libc_free, | |
| 360 | WSADDRESSING_FAULT_NS); | |
| 361 | } | |
| 362 | 74 | else if(result != GLOBUS_SUCCESS) |
| 363 | { | |
| 364 | 0 | globus_result_t local_result; |
| 365 | 0 | local_result = globus_service_session_begin_response( |
| 366 | callback_handle->message); | |
| 367 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 368 | { | |
| 369 | 0 | result = local_result; |
| 370 | 0 | goto exit; |
| 371 | } | |
| 372 | ||
| 373 | 0 | soap_fault.faultcode = "Server"; |
| 374 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 375 | globus_error_get(result)); | |
| 376 | 0 | result = GLOBUS_SUCCESS; |
| 377 | 0 | soap_fault.faultactor = NULL; |
| 378 | 0 | soap_fault.detail = NULL; |
| 379 | 0 | result = globus_service_session_serialize_fault_response( |
| 380 | callback_handle->message, &soap_fault); | |
| 381 | 0 | if(result != GLOBUS_SUCCESS) |
| 382 | { | |
| 383 | 0 | goto exit; |
| 384 | } | |
| 385 | ||
| 386 | 0 | globus_soap_message_handle_set_attr( |
| 387 | callback_handle->message, | |
| 388 | WSADDR_ACTION_RESPONSE_KEY, | |
| 389 | globus_soap_message_attr_copy_string, | |
| 390 | globus_libc_free, | |
| 391 | WSADDRESSING_FAULT_NS); | |
| 392 | } | |
| 393 | else | |
| 394 | { | |
| 395 | 74 | result = globus_service_session_begin_response( |
| 396 | callback_handle->message); | |
| 397 | 74 | if(result != GLOBUS_SUCCESS) |
| 398 | { | |
| 399 | 0 | goto exit; |
| 400 | } | |
| 401 | ||
| 402 | 74 | element_qname.local = "GetResourcePropertyResponse"; |
| 403 | 74 | element_qname.Namespace = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; |
| 404 | ||
| 405 | 74 | result = wsrp_GetResourcePropertyResponseType_serialize( |
| 406 | &element_qname, | |
| 407 | &GetResourcePropertyResponse, | |
| 408 | callback_handle->message, | |
| 409 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 410 | 74 | if(result != GLOBUS_SUCCESS) |
| 411 | { | |
| 412 | 0 | goto exit; |
| 413 | } | |
| 414 | ||
| 415 | 74 | result = globus_service_session_end_response( |
| 416 | callback_handle->message); | |
| 417 | 74 | if(result != GLOBUS_SUCCESS) |
| 418 | { | |
| 419 | 0 | goto exit; |
| 420 | } | |
| 421 | ||
| 422 | 74 | wsrp_GetResourcePropertyResponseType_destroy_contents( |
| 423 | &GetResourcePropertyResponse); | |
| 424 | ||
| 425 | 74 | globus_soap_message_handle_set_attr( |
| 426 | callback_handle->message, | |
| 427 | WSADDR_ACTION_RESPONSE_KEY, | |
| 428 | globus_soap_message_attr_copy_string, | |
| 429 | globus_libc_free, | |
| 430 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetResourcePropertyResponse"); | |
| 431 | } | |
| 432 | ||
| 433 | exit: | |
| 434 | ||
| 435 | 90 | callback_handle->callback( |
| 436 | result, | |
| 437 | callback_handle->args); | |
| 438 | ||
| 439 | 90 | globus_libc_free(callback_handle); |
| 440 | ||
| 441 | 90 | ResourcePropertiesTestServiceDebugExit(); |
| 442 | } | |
| 443 | ||
| 444 | static | |
| 445 | globus_result_t | |
| 446 | GetResourceProperty_invoke( | |
| 447 | globus_service_engine_t engine, | |
| 448 | globus_soap_message_handle_t message, | |
| 449 | globus_service_response_t * response, | |
| 450 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 451 | void * args) | |
| 452 | 90 | { |
| 453 | 90 | GetResourceProperty_callback_handle_t * callback_handle; |
| 454 | 90 | globus_result_t result = GLOBUS_SUCCESS; |
| 455 | 90 | GlobusFuncName(ResourcePropertiesTestPortType_GetResourceProperty); |
| 456 | 90 | ResourcePropertiesTestServiceDebugEnter(); |
| 457 | ||
| 458 | 90 | callback_handle = malloc(sizeof(GetResourceProperty_callback_handle_t)); |
| 459 | 90 | if(!callback_handle) |
| 460 | { | |
| 461 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 462 | 0 | goto exit; |
| 463 | } | |
| 464 | 90 | callback_handle->engine = engine; |
| 465 | 90 | callback_handle->message = message; |
| 466 | 90 | callback_handle->callback = invoke_callback; |
| 467 | 90 | callback_handle->args = args; |
| 468 | ||
| 469 | 90 | result = globus_callback_register_oneshot( |
| 470 | NULL, | |
| 471 | &globus_i_reltime_zero, | |
| 472 | GetResourceProperty_invoke_callback, | |
| 473 | callback_handle); | |
| 474 | ||
| 475 | exit: | |
| 476 | 90 | ResourcePropertiesTestServiceDebugExit(); |
| 477 | 90 | return result; |
| 478 | } | |
| 479 | ||
| 480 | ||
| 481 | static | |
| 482 | globus_result_t | |
| 483 | GetResourceProperty_fault_to_type( | |
| 484 | const char * fault_type_name, | |
| 485 | int * fault_type, | |
| 486 | globus_xsd_type_info_t * fault_type_info) | |
| 487 | 0 | { |
| 488 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 489 | ||
| 490 | 0 | *fault_type_info = NULL; |
| 491 | ||
| 492 | 0 | *fault_type = GetResourceProperty_lookup_fault_type(fault_type_name); |
| 493 | ||
| 494 | 0 | switch (*fault_type) |
| 495 | { | |
| 496 | case RESOURCEPROPERTIESTESTPORTTYPE_GETRESOURCEPROPERTY_RESOURCEUNKNOWNFAULT: | |
| 497 | 0 | *fault_type_info = &wsrp_ResourceUnknownFaultType_info; |
| 498 | 0 | break; |
| 499 | ||
| 500 | case RESOURCEPROPERTIESTESTPORTTYPE_GETRESOURCEPROPERTY_INVALIDRESOURCEPROPERTYQNAMEFAULT: | |
| 501 | 0 | *fault_type_info = &wsrp_InvalidResourcePropertyQNameFaultType_info; |
| 502 | 0 | break; |
| 503 | ||
| 504 | default: | |
| 505 | 0 | result = ResourcePropertiesTestServiceErrorReturnedUnknownFault("GetResourceProperty"); |
| 506 | goto exit; | |
| 507 | } | |
| 508 | ||
| 509 | exit: | |
| 510 | 0 | return result; |
| 511 | } | |
| 512 | ||
| 513 | ||
| 514 | static | |
| 515 | globus_service_operation_descriptor_t | |
| 516 | GetResourceProperty_operation_descriptor = | |
| 517 | { | |
| 518 | GetResourceProperty_deserialize, | |
| 519 | GetResourceProperty_invoke, | |
| 520 | ||
| 521 | GetResourceProperty_fault_to_type | |
| 522 | ||
| 523 | }; | |
| 524 | ||
| 525 | static | |
| 526 | globus_operation_provider_descriptor_t GetResourceProperty_descriptor = | |
| 527 | { | |
| 528 | &ResourcePropertiesTestPortType_GetResourceProperty_op_qname, | |
| 529 | "GetResourceProperty", | |
| 530 | (void *)ResourcePropertiesTestPortType_GetResourceProperty_impl, | |
| 531 | NULL | |
| 532 | }; | |
| 533 | ||
| 534 | ||
| 535 | xsd_QName ResourcePropertiesTestPortType_GetMultipleResourceProperties_op_qname = | |
| 536 | { | |
| 537 | "http://localhost:8080/wsrf/services/ResourcePropertiesTestService" | |
| 538 | "GetMultipleResourceProperties" | |
| 539 | }; | |
| 540 | ||
| 541 | xsd_QName ResourcePropertiesTestPortType_GetMultipleResourceProperties_input_qname = | |
| 542 | { | |
| 543 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd", | |
| 544 | "GetMultipleResourceProperties" | |
| 545 | }; | |
| 546 | ||
| 547 | typedef globus_result_t (* GetMultipleResourceProperties_invoke_func_t) ( | |
| 548 | globus_service_engine_t engine, | |
| 549 | globus_soap_message_handle_t message, | |
| 550 | globus_service_descriptor_t * descriptor, | |
| 551 | wsrp_GetMultipleResourcePropertiesType * GetMultipleResourceProperties, | |
| 552 | wsrp_GetMultipleResourcePropertiesResponseType * GetMultipleResourcePropertiesResponse, | |
| 553 | const char ** fault_type_name, | |
| 554 | void ** fault); | |
| 555 | ||
| 556 | typedef struct GetMultipleResourceProperties_callback_handle_s | |
| 557 | { | |
| 558 | globus_service_engine_t engine; | |
| 559 | globus_soap_message_handle_t message; | |
| 560 | globus_operation_invoke_callback_func_t callback; | |
| 561 | void * args; | |
| 562 | } GetMultipleResourceProperties_callback_handle_t; | |
| 563 | ||
| 564 | ||
| 565 | const char * ResourcePropertiesTestPortType_GetMultipleResourceProperties_fault_strings[RESOURCEPROPERTIESTESTPORTTYPE_GETMULTIPLERESOURCEPROPERTIES_INVALIDRESOURCEPROPERTYQNAMEFAULT] = | |
| 566 | { | |
| 567 | "Unknown", | |
| 568 | "ResourceUnknownFault", | |
| 569 | "InvalidResourcePropertyQNameFault" | |
| 570 | }; | |
| 571 | ||
| 572 | static | |
| 573 | ResourcePropertiesTestPortType_GetMultipleResourceProperties_fault_t | |
| 574 | GetMultipleResourceProperties_lookup_fault_type( | |
| 575 | const char * fault_name) | |
| 576 | 0 | { |
| 577 | 0 | ResourcePropertiesTestPortType_GetMultipleResourceProperties_fault_t fault_type; |
| 578 | 0 | GlobusFuncName(GetMultipleResourceProperties_lookup_fault_type); |
| 579 | 0 | ResourcePropertiesTestServiceDebugEnter(); |
| 580 | ||
| 581 | 0 | globus_assert(fault_name); |
| 582 | ||
| 583 | 0 | if(!strcmp(fault_name, "ResourceUnknownFault")) |
| 584 | { | |
| 585 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_GETMULTIPLERESOURCEPROPERTIES_RESOURCEUNKNOWNFAULT; |
| 586 | } | |
| 587 | 0 | else if(!strcmp(fault_name, "InvalidResourcePropertyQNameFault")) |
| 588 | { | |
| 589 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_GETMULTIPLERESOURCEPROPERTIES_INVALIDRESOURCEPROPERTYQNAMEFAULT; |
| 590 | } | |
| 591 | else | |
| 592 | { | |
| 593 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_GETMULTIPLERESOURCEPROPERTIES_UNKNOWN_FAULT; |
| 594 | } | |
| 595 | ||
| 596 | 0 | ResourcePropertiesTestServiceDebugExit(); |
| 597 | 0 | return fault_type; |
| 598 | } | |
| 599 | ||
| 600 | ||
| 601 | ||
| 602 | static | |
| 603 | void | |
| 604 | GetMultipleResourceProperties_deserialize_callback( | |
| 605 | void * handle) | |
| 606 | 8 | { |
| 607 | 8 | GetMultipleResourceProperties_callback_handle_t * callback_handle; |
| 608 | 8 | globus_result_t result = GLOBUS_SUCCESS; |
| 609 | 8 | struct globus_soap_message_fault_s soap_fault; |
| 610 | 8 | GetMultipleResourceProperties_invoke_func_t invoke_function; |
| 611 | 8 | wsrp_GetMultipleResourcePropertiesType * GetMultipleResourceProperties = NULL; |
| 612 | 8 | GlobusFuncName(GetMultipleResourceProperties_deserialize_callback); |
| 613 | 8 | ResourcePropertiesTestServiceDebugEnter(); |
| 614 | ||
| 615 | 8 | callback_handle = (GetMultipleResourceProperties_callback_handle_t *) handle; |
| 616 | ||
| 617 | 8 | result = globus_operation_table_get_operation( |
| 618 | ResourcePropertiesTestService_descriptor.operations, | |
| 619 | "GetMultipleResourceProperties", | |
| 620 | (void **)&invoke_function); | |
| 621 | 8 | if(result != GLOBUS_SUCCESS) |
| 622 | { | |
| 623 | 0 | goto exit; |
| 624 | } | |
| 625 | ||
| 626 | 8 | if(ResourcePropertiesTestService_descriptor.registry) |
| 627 | { | |
| 628 | 8 | globus_soap_message_handle_set_registry( |
| 629 | callback_handle->message, | |
| 630 | ResourcePropertiesTestService_descriptor.registry); | |
| 631 | } | |
| 632 | ||
| 633 | 8 | result = wsrp_GetMultipleResourcePropertiesType_init( |
| 634 | &GetMultipleResourceProperties); | |
| 635 | 8 | if(result != GLOBUS_SUCCESS) |
| 636 | { | |
| 637 | 0 | goto exit; |
| 638 | } | |
| 639 | ||
| 640 | 8 | result = wsrp_GetMultipleResourcePropertiesType_deserialize( |
| 641 | &ResourcePropertiesTestPortType_GetMultipleResourceProperties_input_qname, | |
| 642 | GetMultipleResourceProperties, | |
| 643 | callback_handle->message, | |
| 644 | 0); | |
| 645 | 8 | if(result != GLOBUS_SUCCESS) |
| 646 | { | |
| 647 | 0 | goto exit; |
| 648 | } | |
| 649 | ||
| 650 | 8 | result = globus_soap_message_handle_set_attr( |
| 651 | callback_handle->message, | |
| 652 | "GetMultipleResourcePropertiesOperationInputParameter", | |
| 653 | wsrp_GetMultipleResourcePropertiesType_copy_wrapper, | |
| 654 | wsrp_GetMultipleResourcePropertiesType_destroy_wrapper, | |
| 655 | (void *)GetMultipleResourceProperties); | |
| 656 | 8 | if(result != GLOBUS_SUCCESS) |
| 657 | { | |
| 658 | 8 | goto exit; |
| 659 | } | |
| 660 | ||
| 661 | exit: | |
| 662 | ||
| 663 | 8 | if (GetMultipleResourceProperties != NULL) |
| 664 | { | |
| 665 | 8 | wsrp_GetMultipleResourcePropertiesType_destroy(GetMultipleResourceProperties); |
| 666 | } | |
| 667 | 8 | callback_handle->callback( |
| 668 | result, | |
| 669 | callback_handle->args); | |
| 670 | ||
| 671 | 8 | free(callback_handle); |
| 672 | 8 | ResourcePropertiesTestServiceDebugExit(); |
| 673 | } | |
| 674 | ||
| 675 | static | |
| 676 | globus_result_t | |
| 677 | GetMultipleResourceProperties_deserialize( | |
| 678 | globus_service_engine_t engine, | |
| 679 | globus_soap_message_handle_t message, | |
| 680 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 681 | void * args) | |
| 682 | 8 | { |
| 683 | 8 | GetMultipleResourceProperties_callback_handle_t * callback_handle; |
| 684 | 8 | globus_result_t result = GLOBUS_SUCCESS; |
| 685 | 8 | GlobusFuncName(GetMultipleResourceProperties_deserialize); |
| 686 | 8 | ResourcePropertiesTestServiceDebugEnter(); |
| 687 | ||
| 688 | 8 | callback_handle = malloc(sizeof(GetMultipleResourceProperties_callback_handle_t)); |
| 689 | 8 | globus_assert_string(callback_handle, |
| 690 | "Memory allocation failed " | |
| 691 | "for GetMultipleResourceProperties callback handle"); | |
| 692 | ||
| 693 | 8 | callback_handle->engine = engine; |
| 694 | 8 | callback_handle->message = message; |
| 695 | 8 | callback_handle->callback = invoke_callback; |
| 696 | 8 | callback_handle->args = args; |
| 697 | ||
| 698 | 8 | result = globus_callback_register_oneshot( |
| 699 | NULL, | |
| 700 | &globus_i_reltime_zero, | |
| 701 | GetMultipleResourceProperties_deserialize_callback, | |
| 702 | callback_handle); | |
| 703 | ||
| 704 | 8 | ResourcePropertiesTestServiceDebugExit(); |
| 705 | 8 | return result; |
| 706 | } | |
| 707 | ||
| 708 | static | |
| 709 | void | |
| 710 | GetMultipleResourceProperties_invoke_callback( | |
| 711 | void * handle) | |
| 712 | 8 | { |
| 713 | 8 | GetMultipleResourceProperties_callback_handle_t * callback_handle; |
| 714 | 8 | globus_result_t result = GLOBUS_SUCCESS; |
| 715 | 8 | struct globus_soap_message_fault_s soap_fault; |
| 716 | 8 | GetMultipleResourceProperties_invoke_func_t invoke_function; |
| 717 | 8 | wsrp_GetMultipleResourcePropertiesType * GetMultipleResourceProperties; |
| 718 | 8 | wsrp_GetMultipleResourcePropertiesResponseType GetMultipleResourcePropertiesResponse; |
| 719 | 8 | xsd_QName element_qname; |
| 720 | 8 | const char * fault_type_name = NULL; |
| 721 | 8 | ResourcePropertiesTestPortType_GetMultipleResourceProperties_fault_t fault_type = RESOURCEPROPERTIESTESTPORTTYPE_GETMULTIPLERESOURCEPROPERTIES_NOFAULT; |
| 722 | 8 | void * fault = NULL; |
| 723 | ||
| 724 | 8 | GlobusFuncName(GetMultipleResourceProperties_invoke_callback); |
| 725 | 8 | ResourcePropertiesTestServiceDebugEnter(); |
| 726 | ||
| 727 | 8 | callback_handle = (GetMultipleResourceProperties_callback_handle_t *) handle; |
| 728 | ||
| 729 | 8 | GetMultipleResourceProperties = globus_soap_message_handle_get_attr( |
| 730 | callback_handle->message, | |
| 731 | "GetMultipleResourcePropertiesOperationInputParameter"); | |
| 732 | 8 | globus_assert(GetMultipleResourceProperties); |
| 733 | ||
| 734 | 8 | result = globus_operation_table_get_operation( |
| 735 | ResourcePropertiesTestService_descriptor.operations, | |
| 736 | "GetMultipleResourceProperties", | |
| 737 | (void **)&invoke_function); | |
| 738 | 8 | if(result != GLOBUS_SUCCESS) |
| 739 | { | |
| 740 | 0 | goto fault_exit; |
| 741 | } | |
| 742 | ||
| 743 | ||
| 744 | 8 | result = wsrp_GetMultipleResourcePropertiesResponseType_init_contents( |
| 745 | &GetMultipleResourcePropertiesResponse); | |
| 746 | 8 | if(result != GLOBUS_SUCCESS) |
| 747 | { | |
| 748 | 0 | goto fault_exit; |
| 749 | } | |
| 750 | ||
| 751 | 8 | result = invoke_function( |
| 752 | callback_handle->engine, | |
| 753 | callback_handle->message, | |
| 754 | &ResourcePropertiesTestService_descriptor, | |
| 755 | GetMultipleResourceProperties, | |
| 756 | &GetMultipleResourcePropertiesResponse, | |
| 757 | &fault_type_name, | |
| 758 | &fault); | |
| 759 | ||
| 760 | fault_exit: | |
| 761 | ||
| 762 | 8 | if(fault && fault_type_name) |
| 763 | { | |
| 764 | 0 | fault_type = GetMultipleResourceProperties_lookup_fault_type(fault_type_name); |
| 765 | ||
| 766 | 0 | result = globus_service_session_begin_response( |
| 767 | callback_handle->message); | |
| 768 | 0 | if(result != GLOBUS_SUCCESS) |
| 769 | { | |
| 770 | 0 | goto exit; |
| 771 | } | |
| 772 | ||
| 773 | 0 | soap_fault.faultcode = "Server"; |
| 774 | 0 | soap_fault.faultstring = |
| 775 | "An error occurred while processing the message"; | |
| 776 | 0 | soap_fault.faultactor = NULL; |
| 777 | ||
| 778 | 0 | switch(fault_type) |
| 779 | { | |
| 780 | ||
| 781 | case RESOURCEPROPERTIESTESTPORTTYPE_GETMULTIPLERESOURCEPROPERTIES_RESOURCEUNKNOWNFAULT: | |
| 782 | ||
| 783 | 0 | xsd_any_init(&soap_fault.detail); |
| 784 | 0 | soap_fault.detail->any_info = &wsrp_ResourceUnknownFaultType_info; |
| 785 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 786 | 0 | soap_fault.detail->element->local = "ResourceUnknownFault"; |
| 787 | 0 | soap_fault.detail->element->Namespace = |
| 788 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 789 | 0 | soap_fault.detail->value = fault; |
| 790 | 0 | break; |
| 791 | ||
| 792 | case RESOURCEPROPERTIESTESTPORTTYPE_GETMULTIPLERESOURCEPROPERTIES_INVALIDRESOURCEPROPERTYQNAMEFAULT: | |
| 793 | ||
| 794 | 0 | xsd_any_init(&soap_fault.detail); |
| 795 | 0 | soap_fault.detail->any_info = &wsrp_InvalidResourcePropertyQNameFaultType_info; |
| 796 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 797 | 0 | soap_fault.detail->element->local = "InvalidResourcePropertyQNameFault"; |
| 798 | 0 | soap_fault.detail->element->Namespace = |
| 799 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 800 | 0 | soap_fault.detail->value = fault; |
| 801 | 0 | break; |
| 802 | ||
| 803 | default: | |
| 804 | 0 | result = ResourcePropertiesTestServiceErrorReturnedUnknownFault("GetMultipleResourceProperties"); |
| 805 | 0 | goto exit; |
| 806 | } | |
| 807 | ||
| 808 | 0 | result = globus_service_session_serialize_fault_response( |
| 809 | callback_handle->message, &soap_fault); | |
| 810 | 0 | if(result != GLOBUS_SUCCESS) |
| 811 | { | |
| 812 | 0 | goto exit; |
| 813 | } | |
| 814 | ||
| 815 | 0 | soap_fault.detail->element->local = NULL; |
| 816 | 0 | soap_fault.detail->element->Namespace = NULL; |
| 817 | 0 | soap_fault.detail->any_info = NULL; |
| 818 | 0 | xsd_any_destroy(soap_fault.detail); |
| 819 | ||
| 820 | 0 | globus_soap_message_handle_set_attr( |
| 821 | callback_handle->message, | |
| 822 | WSADDR_ACTION_RESPONSE_KEY, | |
| 823 | globus_soap_message_attr_copy_string, | |
| 824 | globus_libc_free, | |
| 825 | WSADDRESSING_FAULT_NS); | |
| 826 | } | |
| 827 | 8 | else if(result != GLOBUS_SUCCESS) |
| 828 | { | |
| 829 | 0 | globus_result_t local_result; |
| 830 | 0 | local_result = globus_service_session_begin_response( |
| 831 | callback_handle->message); | |
| 832 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 833 | { | |
| 834 | 0 | result = local_result; |
| 835 | 0 | goto exit; |
| 836 | } | |
| 837 | ||
| 838 | 0 | soap_fault.faultcode = "Server"; |
| 839 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 840 | globus_error_get(result)); | |
| 841 | 0 | result = GLOBUS_SUCCESS; |
| 842 | 0 | soap_fault.faultactor = NULL; |
| 843 | 0 | soap_fault.detail = NULL; |
| 844 | 0 | result = globus_service_session_serialize_fault_response( |
| 845 | callback_handle->message, &soap_fault); | |
| 846 | 0 | if(result != GLOBUS_SUCCESS) |
| 847 | { | |
| 848 | 0 | goto exit; |
| 849 | } | |
| 850 | ||
| 851 | 0 | globus_soap_message_handle_set_attr( |
| 852 | callback_handle->message, | |
| 853 | WSADDR_ACTION_RESPONSE_KEY, | |
| 854 | globus_soap_message_attr_copy_string, | |
| 855 | globus_libc_free, | |
| 856 | WSADDRESSING_FAULT_NS); | |
| 857 | } | |
| 858 | else | |
| 859 | { | |
| 860 | 8 | result = globus_service_session_begin_response( |
| 861 | callback_handle->message); | |
| 862 | 8 | if(result != GLOBUS_SUCCESS) |
| 863 | { | |
| 864 | 0 | goto exit; |
| 865 | } | |
| 866 | ||
| 867 | 8 | element_qname.local = "GetMultipleResourcePropertiesResponse"; |
| 868 | 8 | element_qname.Namespace = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; |
| 869 | ||
| 870 | 8 | result = wsrp_GetMultipleResourcePropertiesResponseType_serialize( |
| 871 | &element_qname, | |
| 872 | &GetMultipleResourcePropertiesResponse, | |
| 873 | callback_handle->message, | |
| 874 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 875 | 8 | if(result != GLOBUS_SUCCESS) |
| 876 | { | |
| 877 | 0 | goto exit; |
| 878 | } | |
| 879 | ||
| 880 | 8 | result = globus_service_session_end_response( |
| 881 | callback_handle->message); | |
| 882 | 8 | if(result != GLOBUS_SUCCESS) |
| 883 | { | |
| 884 | 0 | goto exit; |
| 885 | } | |
| 886 | ||
| 887 | 8 | wsrp_GetMultipleResourcePropertiesResponseType_destroy_contents( |
| 888 | &GetMultipleResourcePropertiesResponse); | |
| 889 | ||
| 890 | 8 | globus_soap_message_handle_set_attr( |
| 891 | callback_handle->message, | |
| 892 | WSADDR_ACTION_RESPONSE_KEY, | |
| 893 | globus_soap_message_attr_copy_string, | |
| 894 | globus_libc_free, | |
| 895 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetMultipleResourcePropertiesResponse"); | |
| 896 | } | |
| 897 | ||
| 898 | exit: | |
| 899 | ||
| 900 | 8 | callback_handle->callback( |
| 901 | result, | |
| 902 | callback_handle->args); | |
| 903 | ||
| 904 | 8 | globus_libc_free(callback_handle); |
| 905 | ||
| 906 | 8 | ResourcePropertiesTestServiceDebugExit(); |
| 907 | } | |
| 908 | ||
| 909 | static | |
| 910 | globus_result_t | |
| 911 | GetMultipleResourceProperties_invoke( | |
| 912 | globus_service_engine_t engine, | |
| 913 | globus_soap_message_handle_t message, | |
| 914 | globus_service_response_t * response, | |
| 915 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 916 | void * args) | |
| 917 | 8 | { |
| 918 | 8 | GetMultipleResourceProperties_callback_handle_t * callback_handle; |
| 919 | 8 | globus_result_t result = GLOBUS_SUCCESS; |
| 920 | 8 | GlobusFuncName(ResourcePropertiesTestPortType_GetMultipleResourceProperties); |
| 921 | 8 | ResourcePropertiesTestServiceDebugEnter(); |
| 922 | ||
| 923 | 8 | callback_handle = malloc(sizeof(GetMultipleResourceProperties_callback_handle_t)); |
| 924 | 8 | if(!callback_handle) |
| 925 | { | |
| 926 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 927 | 0 | goto exit; |
| 928 | } | |
| 929 | 8 | callback_handle->engine = engine; |
| 930 | 8 | callback_handle->message = message; |
| 931 | 8 | callback_handle->callback = invoke_callback; |
| 932 | 8 | callback_handle->args = args; |
| 933 | ||
| 934 | 8 | result = globus_callback_register_oneshot( |
| 935 | NULL, | |
| 936 | &globus_i_reltime_zero, | |
| 937 | GetMultipleResourceProperties_invoke_callback, | |
| 938 | callback_handle); | |
| 939 | ||
| 940 | exit: | |
| 941 | 8 | ResourcePropertiesTestServiceDebugExit(); |
| 942 | 8 | return result; |
| 943 | } | |
| 944 | ||
| 945 | ||
| 946 | static | |
| 947 | globus_result_t | |
| 948 | GetMultipleResourceProperties_fault_to_type( | |
| 949 | const char * fault_type_name, | |
| 950 | int * fault_type, | |
| 951 | globus_xsd_type_info_t * fault_type_info) | |
| 952 | 0 | { |
| 953 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 954 | ||
| 955 | 0 | *fault_type_info = NULL; |
| 956 | ||
| 957 | 0 | *fault_type = GetMultipleResourceProperties_lookup_fault_type(fault_type_name); |
| 958 | ||
| 959 | 0 | switch (*fault_type) |
| 960 | { | |
| 961 | case RESOURCEPROPERTIESTESTPORTTYPE_GETMULTIPLERESOURCEPROPERTIES_RESOURCEUNKNOWNFAULT: | |
| 962 | 0 | *fault_type_info = &wsrp_ResourceUnknownFaultType_info; |
| 963 | 0 | break; |
| 964 | ||
| 965 | case RESOURCEPROPERTIESTESTPORTTYPE_GETMULTIPLERESOURCEPROPERTIES_INVALIDRESOURCEPROPERTYQNAMEFAULT: | |
| 966 | 0 | *fault_type_info = &wsrp_InvalidResourcePropertyQNameFaultType_info; |
| 967 | 0 | break; |
| 968 | ||
| 969 | default: | |
| 970 | 0 | result = ResourcePropertiesTestServiceErrorReturnedUnknownFault("GetMultipleResourceProperties"); |
| 971 | goto exit; | |
| 972 | } | |
| 973 | ||
| 974 | exit: | |
| 975 | 0 | return result; |
| 976 | } | |
| 977 | ||
| 978 | ||
| 979 | static | |
| 980 | globus_service_operation_descriptor_t | |
| 981 | GetMultipleResourceProperties_operation_descriptor = | |
| 982 | { | |
| 983 | GetMultipleResourceProperties_deserialize, | |
| 984 | GetMultipleResourceProperties_invoke, | |
| 985 | ||
| 986 | GetMultipleResourceProperties_fault_to_type | |
| 987 | ||
| 988 | }; | |
| 989 | ||
| 990 | static | |
| 991 | globus_operation_provider_descriptor_t GetMultipleResourceProperties_descriptor = | |
| 992 | { | |
| 993 | &ResourcePropertiesTestPortType_GetMultipleResourceProperties_op_qname, | |
| 994 | "GetMultipleResourceProperties", | |
| 995 | (void *)ResourcePropertiesTestPortType_GetMultipleResourceProperties_impl, | |
| 996 | NULL | |
| 997 | }; | |
| 998 | ||
| 999 | ||
| 1000 | xsd_QName ResourcePropertiesTestPortType_SetResourceProperties_op_qname = | |
| 1001 | { | |
| 1002 | "http://localhost:8080/wsrf/services/ResourcePropertiesTestService" | |
| 1003 | "SetResourceProperties" | |
| 1004 | }; | |
| 1005 | ||
| 1006 | xsd_QName ResourcePropertiesTestPortType_SetResourceProperties_input_qname = | |
| 1007 | { | |
| 1008 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd", | |
| 1009 | "SetResourceProperties" | |
| 1010 | }; | |
| 1011 | ||
| 1012 | typedef globus_result_t (* SetResourceProperties_invoke_func_t) ( | |
| 1013 | globus_service_engine_t engine, | |
| 1014 | globus_soap_message_handle_t message, | |
| 1015 | globus_service_descriptor_t * descriptor, | |
| 1016 | wsrp_SetResourcePropertiesType * SetResourceProperties, | |
| 1017 | wsrp_SetResourcePropertiesResponseType * SetResourcePropertiesResponse, | |
| 1018 | const char ** fault_type_name, | |
| 1019 | void ** fault); | |
| 1020 | ||
| 1021 | typedef struct SetResourceProperties_callback_handle_s | |
| 1022 | { | |
| 1023 | globus_service_engine_t engine; | |
| 1024 | globus_soap_message_handle_t message; | |
| 1025 | globus_operation_invoke_callback_func_t callback; | |
| 1026 | void * args; | |
| 1027 | } SetResourceProperties_callback_handle_t; | |
| 1028 | ||
| 1029 | ||
| 1030 | const char * ResourcePropertiesTestPortType_SetResourceProperties_fault_strings[RESOURCEPROPERTIESTESTPORTTYPE_SETRESOURCEPROPERTIES_INVALIDRESOURCEPROPERTYQNAMEFAULT] = | |
| 1031 | { | |
| 1032 | "Unknown", | |
| 1033 | "InvalidSetResourcePropertiesRequestContentFault", | |
| 1034 | "ResourceUnknownFault", | |
| 1035 | "SetResourcePropertyRequestFailedFault", | |
| 1036 | "UnableToModifyResourcePropertyFault", | |
| 1037 | "InvalidResourcePropertyQNameFault" | |
| 1038 | }; | |
| 1039 | ||
| 1040 | static | |
| 1041 | ResourcePropertiesTestPortType_SetResourceProperties_fault_t | |
| 1042 | SetResourceProperties_lookup_fault_type( | |
| 1043 | const char * fault_name) | |
| 1044 | 52 | { |
| 1045 | 52 | ResourcePropertiesTestPortType_SetResourceProperties_fault_t fault_type; |
| 1046 | 52 | GlobusFuncName(SetResourceProperties_lookup_fault_type); |
| 1047 | 52 | ResourcePropertiesTestServiceDebugEnter(); |
| 1048 | ||
| 1049 | 52 | globus_assert(fault_name); |
| 1050 | ||
| 1051 | 52 | if(!strcmp(fault_name, "InvalidSetResourcePropertiesRequestContentFault")) |
| 1052 | { | |
| 1053 | 36 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_SETRESOURCEPROPERTIES_INVALIDSETRESOURCEPROPERTIESREQUESTCONTENTFAULT; |
| 1054 | } | |
| 1055 | 16 | else if(!strcmp(fault_name, "ResourceUnknownFault")) |
| 1056 | { | |
| 1057 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_SETRESOURCEPROPERTIES_RESOURCEUNKNOWNFAULT; |
| 1058 | } | |
| 1059 | 16 | else if(!strcmp(fault_name, "SetResourcePropertyRequestFailedFault")) |
| 1060 | { | |
| 1061 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_SETRESOURCEPROPERTIES_SETRESOURCEPROPERTYREQUESTFAILEDFAULT; |
| 1062 | } | |
| 1063 | 16 | else if(!strcmp(fault_name, "UnableToModifyResourcePropertyFault")) |
| 1064 | { | |
| 1065 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_SETRESOURCEPROPERTIES_UNABLETOMODIFYRESOURCEPROPERTYFAULT; |
| 1066 | } | |
| 1067 | 16 | else if(!strcmp(fault_name, "InvalidResourcePropertyQNameFault")) |
| 1068 | { | |
| 1069 | 16 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_SETRESOURCEPROPERTIES_INVALIDRESOURCEPROPERTYQNAMEFAULT; |
| 1070 | } | |
| 1071 | else | |
| 1072 | { | |
| 1073 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_SETRESOURCEPROPERTIES_UNKNOWN_FAULT; |
| 1074 | } | |
| 1075 | ||
| 1076 | 52 | ResourcePropertiesTestServiceDebugExit(); |
| 1077 | 52 | return fault_type; |
| 1078 | } | |
| 1079 | ||
| 1080 | ||
| 1081 | ||
| 1082 | static | |
| 1083 | void | |
| 1084 | SetResourceProperties_deserialize_callback( | |
| 1085 | void * handle) | |
| 1086 | 142 | { |
| 1087 | 142 | SetResourceProperties_callback_handle_t * callback_handle; |
| 1088 | 142 | globus_result_t result = GLOBUS_SUCCESS; |
| 1089 | 142 | struct globus_soap_message_fault_s soap_fault; |
| 1090 | 142 | SetResourceProperties_invoke_func_t invoke_function; |
| 1091 | 142 | wsrp_SetResourcePropertiesType * SetResourceProperties = NULL; |
| 1092 | 142 | GlobusFuncName(SetResourceProperties_deserialize_callback); |
| 1093 | 142 | ResourcePropertiesTestServiceDebugEnter(); |
| 1094 | ||
| 1095 | 142 | callback_handle = (SetResourceProperties_callback_handle_t *) handle; |
| 1096 | ||
| 1097 | 142 | result = globus_operation_table_get_operation( |
| 1098 | ResourcePropertiesTestService_descriptor.operations, | |
| 1099 | "SetResourceProperties", | |
| 1100 | (void **)&invoke_function); | |
| 1101 | 142 | if(result != GLOBUS_SUCCESS) |
| 1102 | { | |
| 1103 | 0 | goto exit; |
| 1104 | } | |
| 1105 | ||
| 1106 | 142 | if(ResourcePropertiesTestService_descriptor.registry) |
| 1107 | { | |
| 1108 | 142 | globus_soap_message_handle_set_registry( |
| 1109 | callback_handle->message, | |
| 1110 | ResourcePropertiesTestService_descriptor.registry); | |
| 1111 | } | |
| 1112 | ||
| 1113 | 142 | result = wsrp_SetResourcePropertiesType_init( |
| 1114 | &SetResourceProperties); | |
| 1115 | 142 | if(result != GLOBUS_SUCCESS) |
| 1116 | { | |
| 1117 | 0 | goto exit; |
| 1118 | } | |
| 1119 | ||
| 1120 | 142 | result = wsrp_SetResourcePropertiesType_deserialize( |
| 1121 | &ResourcePropertiesTestPortType_SetResourceProperties_input_qname, | |
| 1122 | SetResourceProperties, | |
| 1123 | callback_handle->message, | |
| 1124 | 0); | |
| 1125 | 142 | if(result != GLOBUS_SUCCESS) |
| 1126 | { | |
| 1127 | 0 | goto exit; |
| 1128 | } | |
| 1129 | ||
| 1130 | 142 | result = globus_soap_message_handle_set_attr( |
| 1131 | callback_handle->message, | |
| 1132 | "SetResourcePropertiesOperationInputParameter", | |
| 1133 | wsrp_SetResourcePropertiesType_copy_wrapper, | |
| 1134 | wsrp_SetResourcePropertiesType_destroy_wrapper, | |
| 1135 | (void *)SetResourceProperties); | |
| 1136 | 142 | if(result != GLOBUS_SUCCESS) |
| 1137 | { | |
| 1138 | 142 | goto exit; |
| 1139 | } | |
| 1140 | ||
| 1141 | exit: | |
| 1142 | ||
| 1143 | 142 | if (SetResourceProperties != NULL) |
| 1144 | { | |
| 1145 | 142 | wsrp_SetResourcePropertiesType_destroy(SetResourceProperties); |
| 1146 | } | |
| 1147 | 142 | callback_handle->callback( |
| 1148 | result, | |
| 1149 | callback_handle->args); | |
| 1150 | ||
| 1151 | 142 | free(callback_handle); |
| 1152 | 142 | ResourcePropertiesTestServiceDebugExit(); |
| 1153 | } | |
| 1154 | ||
| 1155 | static | |
| 1156 | globus_result_t | |
| 1157 | SetResourceProperties_deserialize( | |
| 1158 | globus_service_engine_t engine, | |
| 1159 | globus_soap_message_handle_t message, | |
| 1160 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 1161 | void * args) | |
| 1162 | 142 | { |
| 1163 | 142 | SetResourceProperties_callback_handle_t * callback_handle; |
| 1164 | 142 | globus_result_t result = GLOBUS_SUCCESS; |
| 1165 | 142 | GlobusFuncName(SetResourceProperties_deserialize); |
| 1166 | 142 | ResourcePropertiesTestServiceDebugEnter(); |
| 1167 | ||
| 1168 | 142 | callback_handle = malloc(sizeof(SetResourceProperties_callback_handle_t)); |
| 1169 | 142 | globus_assert_string(callback_handle, |
| 1170 | "Memory allocation failed " | |
| 1171 | "for SetResourceProperties callback handle"); | |
| 1172 | ||
| 1173 | 142 | callback_handle->engine = engine; |
| 1174 | 142 | callback_handle->message = message; |
| 1175 | 142 | callback_handle->callback = invoke_callback; |
| 1176 | 142 | callback_handle->args = args; |
| 1177 | ||
| 1178 | 142 | result = globus_callback_register_oneshot( |
| 1179 | NULL, | |
| 1180 | &globus_i_reltime_zero, | |
| 1181 | SetResourceProperties_deserialize_callback, | |
| 1182 | callback_handle); | |
| 1183 | ||
| 1184 | 142 | ResourcePropertiesTestServiceDebugExit(); |
| 1185 | 142 | return result; |
| 1186 | } | |
| 1187 | ||
| 1188 | static | |
| 1189 | void | |
| 1190 | SetResourceProperties_invoke_callback( | |
| 1191 | void * handle) | |
| 1192 | 142 | { |
| 1193 | 142 | SetResourceProperties_callback_handle_t * callback_handle; |
| 1194 | 142 | globus_result_t result = GLOBUS_SUCCESS; |
| 1195 | 142 | struct globus_soap_message_fault_s soap_fault; |
| 1196 | 142 | SetResourceProperties_invoke_func_t invoke_function; |
| 1197 | 142 | wsrp_SetResourcePropertiesType * SetResourceProperties; |
| 1198 | 142 | wsrp_SetResourcePropertiesResponseType SetResourcePropertiesResponse; |
| 1199 | 142 | xsd_QName element_qname; |
| 1200 | 142 | const char * fault_type_name = NULL; |
| 1201 | 142 | ResourcePropertiesTestPortType_SetResourceProperties_fault_t fault_type = RESOURCEPROPERTIESTESTPORTTYPE_SETRESOURCEPROPERTIES_NOFAULT; |
| 1202 | 142 | void * fault = NULL; |
| 1203 | ||
| 1204 | 142 | GlobusFuncName(SetResourceProperties_invoke_callback); |
| 1205 | 142 | ResourcePropertiesTestServiceDebugEnter(); |
| 1206 | ||
| 1207 | 142 | callback_handle = (SetResourceProperties_callback_handle_t *) handle; |
| 1208 | ||
| 1209 | 142 | SetResourceProperties = globus_soap_message_handle_get_attr( |
| 1210 | callback_handle->message, | |
| 1211 | "SetResourcePropertiesOperationInputParameter"); | |
| 1212 | 142 | globus_assert(SetResourceProperties); |
| 1213 | ||
| 1214 | 142 | result = globus_operation_table_get_operation( |
| 1215 | ResourcePropertiesTestService_descriptor.operations, | |
| 1216 | "SetResourceProperties", | |
| 1217 | (void **)&invoke_function); | |
| 1218 | 142 | if(result != GLOBUS_SUCCESS) |
| 1219 | { | |
| 1220 | 0 | goto fault_exit; |
| 1221 | } | |
| 1222 | ||
| 1223 | ||
| 1224 | 142 | result = wsrp_SetResourcePropertiesResponseType_init_contents( |
| 1225 | &SetResourcePropertiesResponse); | |
| 1226 | 142 | if(result != GLOBUS_SUCCESS) |
| 1227 | { | |
| 1228 | 0 | goto fault_exit; |
| 1229 | } | |
| 1230 | ||
| 1231 | 142 | result = invoke_function( |
| 1232 | callback_handle->engine, | |
| 1233 | callback_handle->message, | |
| 1234 | &ResourcePropertiesTestService_descriptor, | |
| 1235 | SetResourceProperties, | |
| 1236 | &SetResourcePropertiesResponse, | |
| 1237 | &fault_type_name, | |
| 1238 | &fault); | |
| 1239 | ||
| 1240 | fault_exit: | |
| 1241 | ||
| 1242 | 142 | if(fault && fault_type_name) |
| 1243 | { | |
| 1244 | 52 | fault_type = SetResourceProperties_lookup_fault_type(fault_type_name); |
| 1245 | ||
| 1246 | 52 | result = globus_service_session_begin_response( |
| 1247 | callback_handle->message); | |
| 1248 | 52 | if(result != GLOBUS_SUCCESS) |
| 1249 | { | |
| 1250 | 0 | goto exit; |
| 1251 | } | |
| 1252 | ||
| 1253 | 52 | soap_fault.faultcode = "Server"; |
| 1254 | 52 | soap_fault.faultstring = |
| 1255 | "An error occurred while processing the message"; | |
| 1256 | 52 | soap_fault.faultactor = NULL; |
| 1257 | ||
| 1258 | 52 | switch(fault_type) |
| 1259 | { | |
| 1260 | ||
| 1261 | case RESOURCEPROPERTIESTESTPORTTYPE_SETRESOURCEPROPERTIES_INVALIDSETRESOURCEPROPERTIESREQUESTCONTENTFAULT: | |
| 1262 | ||
| 1263 | 36 | xsd_any_init(&soap_fault.detail); |
| 1264 | 36 | soap_fault.detail->any_info = &wsrp_InvalidSetResourcePropertiesRequestContentFaultType_info; |
| 1265 | 36 | xsd_QName_init(&soap_fault.detail->element); |
| 1266 | 36 | soap_fault.detail->element->local = "InvalidSetResourcePropertiesRequestContentFault"; |
| 1267 | 36 | soap_fault.detail->element->Namespace = |
| 1268 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 1269 | 36 | soap_fault.detail->value = fault; |
| 1270 | 36 | break; |
| 1271 | ||
| 1272 | case RESOURCEPROPERTIESTESTPORTTYPE_SETRESOURCEPROPERTIES_RESOURCEUNKNOWNFAULT: | |
| 1273 | ||
| 1274 | 0 | xsd_any_init(&soap_fault.detail); |
| 1275 | 0 | soap_fault.detail->any_info = &wsrp_ResourceUnknownFaultType_info; |
| 1276 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 1277 | 0 | soap_fault.detail->element->local = "ResourceUnknownFault"; |
| 1278 | 0 | soap_fault.detail->element->Namespace = |
| 1279 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 1280 | 0 | soap_fault.detail->value = fault; |
| 1281 | 0 | break; |
| 1282 | ||
| 1283 | case RESOURCEPROPERTIESTESTPORTTYPE_SETRESOURCEPROPERTIES_SETRESOURCEPROPERTYREQUESTFAILEDFAULT: | |
| 1284 | ||
| 1285 | 0 | xsd_any_init(&soap_fault.detail); |
| 1286 | 0 | soap_fault.detail->any_info = &wsrp_SetResourcePropertyRequestFailedFaultType_info; |
| 1287 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 1288 | 0 | soap_fault.detail->element->local = "SetResourcePropertyRequestFailedFault"; |
| 1289 | 0 | soap_fault.detail->element->Namespace = |
| 1290 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 1291 | 0 | soap_fault.detail->value = fault; |
| 1292 | 0 | break; |
| 1293 | ||
| 1294 | case RESOURCEPROPERTIESTESTPORTTYPE_SETRESOURCEPROPERTIES_UNABLETOMODIFYRESOURCEPROPERTYFAULT: | |
| 1295 | ||
| 1296 | 0 | xsd_any_init(&soap_fault.detail); |
| 1297 | 0 | soap_fault.detail->any_info = &wsrp_UnableToModifyResourcePropertyFaultType_info; |
| 1298 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 1299 | 0 | soap_fault.detail->element->local = "UnableToModifyResourcePropertyFault"; |
| 1300 | 0 | soap_fault.detail->element->Namespace = |
| 1301 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 1302 | 0 | soap_fault.detail->value = fault; |
| 1303 | 0 | break; |
| 1304 | ||
| 1305 | case RESOURCEPROPERTIESTESTPORTTYPE_SETRESOURCEPROPERTIES_INVALIDRESOURCEPROPERTYQNAMEFAULT: | |
| 1306 | ||
| 1307 | 16 | xsd_any_init(&soap_fault.detail); |
| 1308 | 16 | soap_fault.detail->any_info = &wsrp_InvalidResourcePropertyQNameFaultType_info; |
| 1309 | 16 | xsd_QName_init(&soap_fault.detail->element); |
| 1310 | 16 | soap_fault.detail->element->local = "InvalidResourcePropertyQNameFault"; |
| 1311 | 16 | soap_fault.detail->element->Namespace = |
| 1312 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 1313 | 16 | soap_fault.detail->value = fault; |
| 1314 | 16 | break; |
| 1315 | ||
| 1316 | default: | |
| 1317 | 0 | result = ResourcePropertiesTestServiceErrorReturnedUnknownFault("SetResourceProperties"); |
| 1318 | 0 | goto exit; |
| 1319 | } | |
| 1320 | ||
| 1321 | 52 | result = globus_service_session_serialize_fault_response( |
| 1322 | callback_handle->message, &soap_fault); | |
| 1323 | 52 | if(result != GLOBUS_SUCCESS) |
| 1324 | { | |
| 1325 | 0 | goto exit; |
| 1326 | } | |
| 1327 | ||
| 1328 | 52 | soap_fault.detail->element->local = NULL; |
| 1329 | 52 | soap_fault.detail->element->Namespace = NULL; |
| 1330 | 52 | soap_fault.detail->any_info = NULL; |
| 1331 | 52 | xsd_any_destroy(soap_fault.detail); |
| 1332 | ||
| 1333 | 52 | globus_soap_message_handle_set_attr( |
| 1334 | callback_handle->message, | |
| 1335 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1336 | globus_soap_message_attr_copy_string, | |
| 1337 | globus_libc_free, | |
| 1338 | WSADDRESSING_FAULT_NS); | |
| 1339 | } | |
| 1340 | 90 | else if(result != GLOBUS_SUCCESS) |
| 1341 | { | |
| 1342 | 0 | globus_result_t local_result; |
| 1343 | 0 | local_result = globus_service_session_begin_response( |
| 1344 | callback_handle->message); | |
| 1345 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 1346 | { | |
| 1347 | 0 | result = local_result; |
| 1348 | 0 | goto exit; |
| 1349 | } | |
| 1350 | ||
| 1351 | 0 | soap_fault.faultcode = "Server"; |
| 1352 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 1353 | globus_error_get(result)); | |
| 1354 | 0 | result = GLOBUS_SUCCESS; |
| 1355 | 0 | soap_fault.faultactor = NULL; |
| 1356 | 0 | soap_fault.detail = NULL; |
| 1357 | 0 | result = globus_service_session_serialize_fault_response( |
| 1358 | callback_handle->message, &soap_fault); | |
| 1359 | 0 | if(result != GLOBUS_SUCCESS) |
| 1360 | { | |
| 1361 | 0 | goto exit; |
| 1362 | } | |
| 1363 | ||
| 1364 | 0 | globus_soap_message_handle_set_attr( |
| 1365 | callback_handle->message, | |
| 1366 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1367 | globus_soap_message_attr_copy_string, | |
| 1368 | globus_libc_free, | |
| 1369 | WSADDRESSING_FAULT_NS); | |
| 1370 | } | |
| 1371 | else | |
| 1372 | { | |
| 1373 | 90 | result = globus_service_session_begin_response( |
| 1374 | callback_handle->message); | |
| 1375 | 90 | if(result != GLOBUS_SUCCESS) |
| 1376 | { | |
| 1377 | 0 | goto exit; |
| 1378 | } | |
| 1379 | ||
| 1380 | 90 | element_qname.local = "SetResourcePropertiesResponse"; |
| 1381 | 90 | element_qname.Namespace = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; |
| 1382 | ||
| 1383 | 90 | result = wsrp_SetResourcePropertiesResponseType_serialize( |
| 1384 | &element_qname, | |
| 1385 | &SetResourcePropertiesResponse, | |
| 1386 | callback_handle->message, | |
| 1387 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 1388 | 90 | if(result != GLOBUS_SUCCESS) |
| 1389 | { | |
| 1390 | 0 | goto exit; |
| 1391 | } | |
| 1392 | ||
| 1393 | 90 | result = globus_service_session_end_response( |
| 1394 | callback_handle->message); | |
| 1395 | 90 | if(result != GLOBUS_SUCCESS) |
| 1396 | { | |
| 1397 | 0 | goto exit; |
| 1398 | } | |
| 1399 | ||
| 1400 | 90 | wsrp_SetResourcePropertiesResponseType_destroy_contents( |
| 1401 | &SetResourcePropertiesResponse); | |
| 1402 | ||
| 1403 | 90 | globus_soap_message_handle_set_attr( |
| 1404 | callback_handle->message, | |
| 1405 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1406 | globus_soap_message_attr_copy_string, | |
| 1407 | globus_libc_free, | |
| 1408 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/SetResourcePropertiesResponse"); | |
| 1409 | } | |
| 1410 | ||
| 1411 | exit: | |
| 1412 | ||
| 1413 | 142 | callback_handle->callback( |
| 1414 | result, | |
| 1415 | callback_handle->args); | |
| 1416 | ||
| 1417 | 142 | globus_libc_free(callback_handle); |
| 1418 | ||
| 1419 | 142 | ResourcePropertiesTestServiceDebugExit(); |
| 1420 | } | |
| 1421 | ||
| 1422 | static | |
| 1423 | globus_result_t | |
| 1424 | SetResourceProperties_invoke( | |
| 1425 | globus_service_engine_t engine, | |
| 1426 | globus_soap_message_handle_t message, | |
| 1427 | globus_service_response_t * response, | |
| 1428 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 1429 | void * args) | |
| 1430 | 142 | { |
| 1431 | 142 | SetResourceProperties_callback_handle_t * callback_handle; |
| 1432 | 142 | globus_result_t result = GLOBUS_SUCCESS; |
| 1433 | 142 | GlobusFuncName(ResourcePropertiesTestPortType_SetResourceProperties); |
| 1434 | 142 | ResourcePropertiesTestServiceDebugEnter(); |
| 1435 | ||
| 1436 | 142 | callback_handle = malloc(sizeof(SetResourceProperties_callback_handle_t)); |
| 1437 | 142 | if(!callback_handle) |
| 1438 | { | |
| 1439 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 1440 | 0 | goto exit; |
| 1441 | } | |
| 1442 | 142 | callback_handle->engine = engine; |
| 1443 | 142 | callback_handle->message = message; |
| 1444 | 142 | callback_handle->callback = invoke_callback; |
| 1445 | 142 | callback_handle->args = args; |
| 1446 | ||
| 1447 | 142 | result = globus_callback_register_oneshot( |
| 1448 | NULL, | |
| 1449 | &globus_i_reltime_zero, | |
| 1450 | SetResourceProperties_invoke_callback, | |
| 1451 | callback_handle); | |
| 1452 | ||
| 1453 | exit: | |
| 1454 | 142 | ResourcePropertiesTestServiceDebugExit(); |
| 1455 | 142 | return result; |
| 1456 | } | |
| 1457 | ||
| 1458 | ||
| 1459 | static | |
| 1460 | globus_result_t | |
| 1461 | SetResourceProperties_fault_to_type( | |
| 1462 | const char * fault_type_name, | |
| 1463 | int * fault_type, | |
| 1464 | globus_xsd_type_info_t * fault_type_info) | |
| 1465 | 0 | { |
| 1466 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 1467 | ||
| 1468 | 0 | *fault_type_info = NULL; |
| 1469 | ||
| 1470 | 0 | *fault_type = SetResourceProperties_lookup_fault_type(fault_type_name); |
| 1471 | ||
| 1472 | 0 | switch (*fault_type) |
| 1473 | { | |
| 1474 | case RESOURCEPROPERTIESTESTPORTTYPE_SETRESOURCEPROPERTIES_INVALIDSETRESOURCEPROPERTIESREQUESTCONTENTFAULT: | |
| 1475 | 0 | *fault_type_info = &wsrp_InvalidSetResourcePropertiesRequestContentFaultType_info; |
| 1476 | 0 | break; |
| 1477 | ||
| 1478 | case RESOURCEPROPERTIESTESTPORTTYPE_SETRESOURCEPROPERTIES_RESOURCEUNKNOWNFAULT: | |
| 1479 | 0 | *fault_type_info = &wsrp_ResourceUnknownFaultType_info; |
| 1480 | 0 | break; |
| 1481 | ||
| 1482 | case RESOURCEPROPERTIESTESTPORTTYPE_SETRESOURCEPROPERTIES_SETRESOURCEPROPERTYREQUESTFAILEDFAULT: | |
| 1483 | 0 | *fault_type_info = &wsrp_SetResourcePropertyRequestFailedFaultType_info; |
| 1484 | 0 | break; |
| 1485 | ||
| 1486 | case RESOURCEPROPERTIESTESTPORTTYPE_SETRESOURCEPROPERTIES_UNABLETOMODIFYRESOURCEPROPERTYFAULT: | |
| 1487 | 0 | *fault_type_info = &wsrp_UnableToModifyResourcePropertyFaultType_info; |
| 1488 | 0 | break; |
| 1489 | ||
| 1490 | case RESOURCEPROPERTIESTESTPORTTYPE_SETRESOURCEPROPERTIES_INVALIDRESOURCEPROPERTYQNAMEFAULT: | |
| 1491 | 0 | *fault_type_info = &wsrp_InvalidResourcePropertyQNameFaultType_info; |
| 1492 | 0 | break; |
| 1493 | ||
| 1494 | default: | |
| 1495 | 0 | result = ResourcePropertiesTestServiceErrorReturnedUnknownFault("SetResourceProperties"); |
| 1496 | goto exit; | |
| 1497 | } | |
| 1498 | ||
| 1499 | exit: | |
| 1500 | 0 | return result; |
| 1501 | } | |
| 1502 | ||
| 1503 | ||
| 1504 | static | |
| 1505 | globus_service_operation_descriptor_t | |
| 1506 | SetResourceProperties_operation_descriptor = | |
| 1507 | { | |
| 1508 | SetResourceProperties_deserialize, | |
| 1509 | SetResourceProperties_invoke, | |
| 1510 | ||
| 1511 | SetResourceProperties_fault_to_type | |
| 1512 | ||
| 1513 | }; | |
| 1514 | ||
| 1515 | static | |
| 1516 | globus_operation_provider_descriptor_t SetResourceProperties_descriptor = | |
| 1517 | { | |
| 1518 | &ResourcePropertiesTestPortType_SetResourceProperties_op_qname, | |
| 1519 | "SetResourceProperties", | |
| 1520 | (void *)ResourcePropertiesTestPortType_SetResourceProperties_impl, | |
| 1521 | NULL | |
| 1522 | }; | |
| 1523 | ||
| 1524 | ||
| 1525 | xsd_QName ResourcePropertiesTestPortType_QueryResourceProperties_op_qname = | |
| 1526 | { | |
| 1527 | "http://localhost:8080/wsrf/services/ResourcePropertiesTestService" | |
| 1528 | "QueryResourceProperties" | |
| 1529 | }; | |
| 1530 | ||
| 1531 | xsd_QName ResourcePropertiesTestPortType_QueryResourceProperties_input_qname = | |
| 1532 | { | |
| 1533 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd", | |
| 1534 | "QueryResourceProperties" | |
| 1535 | }; | |
| 1536 | ||
| 1537 | typedef globus_result_t (* QueryResourceProperties_invoke_func_t) ( | |
| 1538 | globus_service_engine_t engine, | |
| 1539 | globus_soap_message_handle_t message, | |
| 1540 | globus_service_descriptor_t * descriptor, | |
| 1541 | wsrp_QueryResourcePropertiesType * QueryResourceProperties, | |
| 1542 | wsrp_QueryResourcePropertiesResponseType * QueryResourcePropertiesResponse, | |
| 1543 | const char ** fault_type_name, | |
| 1544 | void ** fault); | |
| 1545 | ||
| 1546 | typedef struct QueryResourceProperties_callback_handle_s | |
| 1547 | { | |
| 1548 | globus_service_engine_t engine; | |
| 1549 | globus_soap_message_handle_t message; | |
| 1550 | globus_operation_invoke_callback_func_t callback; | |
| 1551 | void * args; | |
| 1552 | } QueryResourceProperties_callback_handle_t; | |
| 1553 | ||
| 1554 | ||
| 1555 | const char * ResourcePropertiesTestPortType_QueryResourceProperties_fault_strings[RESOURCEPROPERTIESTESTPORTTYPE_QUERYRESOURCEPROPERTIES_INVALIDRESOURCEPROPERTYQNAMEFAULT] = | |
| 1556 | { | |
| 1557 | "Unknown", | |
| 1558 | "UnknownQueryExpressionDialectFault", | |
| 1559 | "ResourceUnknownFault", | |
| 1560 | "QueryEvaluationErrorFault", | |
| 1561 | "InvalidQueryExpressionFault", | |
| 1562 | "InvalidResourcePropertyQNameFault" | |
| 1563 | }; | |
| 1564 | ||
| 1565 | static | |
| 1566 | ResourcePropertiesTestPortType_QueryResourceProperties_fault_t | |
| 1567 | QueryResourceProperties_lookup_fault_type( | |
| 1568 | const char * fault_name) | |
| 1569 | 2 | { |
| 1570 | 2 | ResourcePropertiesTestPortType_QueryResourceProperties_fault_t fault_type; |
| 1571 | 2 | GlobusFuncName(QueryResourceProperties_lookup_fault_type); |
| 1572 | 2 | ResourcePropertiesTestServiceDebugEnter(); |
| 1573 | ||
| 1574 | 2 | globus_assert(fault_name); |
| 1575 | ||
| 1576 | 2 | if(!strcmp(fault_name, "UnknownQueryExpressionDialectFault")) |
| 1577 | { | |
| 1578 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_QUERYRESOURCEPROPERTIES_UNKNOWNQUERYEXPRESSIONDIALECTFAULT; |
| 1579 | } | |
| 1580 | 2 | else if(!strcmp(fault_name, "ResourceUnknownFault")) |
| 1581 | { | |
| 1582 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_QUERYRESOURCEPROPERTIES_RESOURCEUNKNOWNFAULT; |
| 1583 | } | |
| 1584 | 2 | else if(!strcmp(fault_name, "QueryEvaluationErrorFault")) |
| 1585 | { | |
| 1586 | 2 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_QUERYRESOURCEPROPERTIES_QUERYEVALUATIONERRORFAULT; |
| 1587 | } | |
| 1588 | 0 | else if(!strcmp(fault_name, "InvalidQueryExpressionFault")) |
| 1589 | { | |
| 1590 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_QUERYRESOURCEPROPERTIES_INVALIDQUERYEXPRESSIONFAULT; |
| 1591 | } | |
| 1592 | 0 | else if(!strcmp(fault_name, "InvalidResourcePropertyQNameFault")) |
| 1593 | { | |
| 1594 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_QUERYRESOURCEPROPERTIES_INVALIDRESOURCEPROPERTYQNAMEFAULT; |
| 1595 | } | |
| 1596 | else | |
| 1597 | { | |
| 1598 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_QUERYRESOURCEPROPERTIES_UNKNOWN_FAULT; |
| 1599 | } | |
| 1600 | ||
| 1601 | 2 | ResourcePropertiesTestServiceDebugExit(); |
| 1602 | 2 | return fault_type; |
| 1603 | } | |
| 1604 | ||
| 1605 | ||
| 1606 | ||
| 1607 | static | |
| 1608 | void | |
| 1609 | QueryResourceProperties_deserialize_callback( | |
| 1610 | void * handle) | |
| 1611 | 20 | { |
| 1612 | 20 | QueryResourceProperties_callback_handle_t * callback_handle; |
| 1613 | 20 | globus_result_t result = GLOBUS_SUCCESS; |
| 1614 | 20 | struct globus_soap_message_fault_s soap_fault; |
| 1615 | 20 | QueryResourceProperties_invoke_func_t invoke_function; |
| 1616 | 20 | wsrp_QueryResourcePropertiesType * QueryResourceProperties = NULL; |
| 1617 | 20 | GlobusFuncName(QueryResourceProperties_deserialize_callback); |
| 1618 | 20 | ResourcePropertiesTestServiceDebugEnter(); |
| 1619 | ||
| 1620 | 20 | callback_handle = (QueryResourceProperties_callback_handle_t *) handle; |
| 1621 | ||
| 1622 | 20 | result = globus_operation_table_get_operation( |
| 1623 | ResourcePropertiesTestService_descriptor.operations, | |
| 1624 | "QueryResourceProperties", | |
| 1625 | (void **)&invoke_function); | |
| 1626 | 20 | if(result != GLOBUS_SUCCESS) |
| 1627 | { | |
| 1628 | 0 | goto exit; |
| 1629 | } | |
| 1630 | ||
| 1631 | 20 | if(ResourcePropertiesTestService_descriptor.registry) |
| 1632 | { | |
| 1633 | 20 | globus_soap_message_handle_set_registry( |
| 1634 | callback_handle->message, | |
| 1635 | ResourcePropertiesTestService_descriptor.registry); | |
| 1636 | } | |
| 1637 | ||
| 1638 | 20 | result = wsrp_QueryResourcePropertiesType_init( |
| 1639 | &QueryResourceProperties); | |
| 1640 | 20 | if(result != GLOBUS_SUCCESS) |
| 1641 | { | |
| 1642 | 0 | goto exit; |
| 1643 | } | |
| 1644 | ||
| 1645 | 20 | result = wsrp_QueryResourcePropertiesType_deserialize( |
| 1646 | &ResourcePropertiesTestPortType_QueryResourceProperties_input_qname, | |
| 1647 | QueryResourceProperties, | |
| 1648 | callback_handle->message, | |
| 1649 | 0); | |
| 1650 | 20 | if(result != GLOBUS_SUCCESS) |
| 1651 | { | |
| 1652 | 0 | goto exit; |
| 1653 | } | |
| 1654 | ||
| 1655 | 20 | result = globus_soap_message_handle_set_attr( |
| 1656 | callback_handle->message, | |
| 1657 | "QueryResourcePropertiesOperationInputParameter", | |
| 1658 | wsrp_QueryResourcePropertiesType_copy_wrapper, | |
| 1659 | wsrp_QueryResourcePropertiesType_destroy_wrapper, | |
| 1660 | (void *)QueryResourceProperties); | |
| 1661 | 20 | if(result != GLOBUS_SUCCESS) |
| 1662 | { | |
| 1663 | 20 | goto exit; |
| 1664 | } | |
| 1665 | ||
| 1666 | exit: | |
| 1667 | ||
| 1668 | 20 | if (QueryResourceProperties != NULL) |
| 1669 | { | |
| 1670 | 20 | wsrp_QueryResourcePropertiesType_destroy(QueryResourceProperties); |
| 1671 | } | |
| 1672 | 20 | callback_handle->callback( |
| 1673 | result, | |
| 1674 | callback_handle->args); | |
| 1675 | ||
| 1676 | 20 | free(callback_handle); |
| 1677 | 20 | ResourcePropertiesTestServiceDebugExit(); |
| 1678 | } | |
| 1679 | ||
| 1680 | static | |
| 1681 | globus_result_t | |
| 1682 | QueryResourceProperties_deserialize( | |
| 1683 | globus_service_engine_t engine, | |
| 1684 | globus_soap_message_handle_t message, | |
| 1685 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 1686 | void * args) | |
| 1687 | 20 | { |
| 1688 | 20 | QueryResourceProperties_callback_handle_t * callback_handle; |
| 1689 | 20 | globus_result_t result = GLOBUS_SUCCESS; |
| 1690 | 20 | GlobusFuncName(QueryResourceProperties_deserialize); |
| 1691 | 20 | ResourcePropertiesTestServiceDebugEnter(); |
| 1692 | ||
| 1693 | 20 | callback_handle = malloc(sizeof(QueryResourceProperties_callback_handle_t)); |
| 1694 | 20 | globus_assert_string(callback_handle, |
| 1695 | "Memory allocation failed " | |
| 1696 | "for QueryResourceProperties callback handle"); | |
| 1697 | ||
| 1698 | 20 | callback_handle->engine = engine; |
| 1699 | 20 | callback_handle->message = message; |
| 1700 | 20 | callback_handle->callback = invoke_callback; |
| 1701 | 20 | callback_handle->args = args; |
| 1702 | ||
| 1703 | 20 | result = globus_callback_register_oneshot( |
| 1704 | NULL, | |
| 1705 | &globus_i_reltime_zero, | |
| 1706 | QueryResourceProperties_deserialize_callback, | |
| 1707 | callback_handle); | |
| 1708 | ||
| 1709 | 20 | ResourcePropertiesTestServiceDebugExit(); |
| 1710 | 20 | return result; |
| 1711 | } | |
| 1712 | ||
| 1713 | static | |
| 1714 | void | |
| 1715 | QueryResourceProperties_invoke_callback( | |
| 1716 | void * handle) | |
| 1717 | 20 | { |
| 1718 | 20 | QueryResourceProperties_callback_handle_t * callback_handle; |
| 1719 | 20 | globus_result_t result = GLOBUS_SUCCESS; |
| 1720 | 20 | struct globus_soap_message_fault_s soap_fault; |
| 1721 | 20 | QueryResourceProperties_invoke_func_t invoke_function; |
| 1722 | 20 | wsrp_QueryResourcePropertiesType * QueryResourceProperties; |
| 1723 | 20 | wsrp_QueryResourcePropertiesResponseType QueryResourcePropertiesResponse; |
| 1724 | 20 | xsd_QName element_qname; |
| 1725 | 20 | const char * fault_type_name = NULL; |
| 1726 | 20 | ResourcePropertiesTestPortType_QueryResourceProperties_fault_t fault_type = RESOURCEPROPERTIESTESTPORTTYPE_QUERYRESOURCEPROPERTIES_NOFAULT; |
| 1727 | 20 | void * fault = NULL; |
| 1728 | ||
| 1729 | 20 | GlobusFuncName(QueryResourceProperties_invoke_callback); |
| 1730 | 20 | ResourcePropertiesTestServiceDebugEnter(); |
| 1731 | ||
| 1732 | 20 | callback_handle = (QueryResourceProperties_callback_handle_t *) handle; |
| 1733 | ||
| 1734 | 20 | QueryResourceProperties = globus_soap_message_handle_get_attr( |
| 1735 | callback_handle->message, | |
| 1736 | "QueryResourcePropertiesOperationInputParameter"); | |
| 1737 | 20 | globus_assert(QueryResourceProperties); |
| 1738 | ||
| 1739 | 20 | result = globus_operation_table_get_operation( |
| 1740 | ResourcePropertiesTestService_descriptor.operations, | |
| 1741 | "QueryResourceProperties", | |
| 1742 | (void **)&invoke_function); | |
| 1743 | 20 | if(result != GLOBUS_SUCCESS) |
| 1744 | { | |
| 1745 | 0 | goto fault_exit; |
| 1746 | } | |
| 1747 | ||
| 1748 | ||
| 1749 | 20 | result = wsrp_QueryResourcePropertiesResponseType_init_contents( |
| 1750 | &QueryResourcePropertiesResponse); | |
| 1751 | 20 | if(result != GLOBUS_SUCCESS) |
| 1752 | { | |
| 1753 | 0 | goto fault_exit; |
| 1754 | } | |
| 1755 | ||
| 1756 | 20 | result = invoke_function( |
| 1757 | callback_handle->engine, | |
| 1758 | callback_handle->message, | |
| 1759 | &ResourcePropertiesTestService_descriptor, | |
| 1760 | QueryResourceProperties, | |
| 1761 | &QueryResourcePropertiesResponse, | |
| 1762 | &fault_type_name, | |
| 1763 | &fault); | |
| 1764 | ||
| 1765 | fault_exit: | |
| 1766 | ||
| 1767 | 20 | if(fault && fault_type_name) |
| 1768 | { | |
| 1769 | 2 | fault_type = QueryResourceProperties_lookup_fault_type(fault_type_name); |
| 1770 | ||
| 1771 | 2 | result = globus_service_session_begin_response( |
| 1772 | callback_handle->message); | |
| 1773 | 2 | if(result != GLOBUS_SUCCESS) |
| 1774 | { | |
| 1775 | 0 | goto exit; |
| 1776 | } | |
| 1777 | ||
| 1778 | 2 | soap_fault.faultcode = "Server"; |
| 1779 | 2 | soap_fault.faultstring = |
| 1780 | "An error occurred while processing the message"; | |
| 1781 | 2 | soap_fault.faultactor = NULL; |
| 1782 | ||
| 1783 | 2 | switch(fault_type) |
| 1784 | { | |
| 1785 | ||
| 1786 | case RESOURCEPROPERTIESTESTPORTTYPE_QUERYRESOURCEPROPERTIES_UNKNOWNQUERYEXPRESSIONDIALECTFAULT: | |
| 1787 | ||
| 1788 | 0 | xsd_any_init(&soap_fault.detail); |
| 1789 | 0 | soap_fault.detail->any_info = &wsrp_UnknownQueryExpressionDialectFaultType_info; |
| 1790 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 1791 | 0 | soap_fault.detail->element->local = "UnknownQueryExpressionDialectFault"; |
| 1792 | 0 | soap_fault.detail->element->Namespace = |
| 1793 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 1794 | 0 | soap_fault.detail->value = fault; |
| 1795 | 0 | break; |
| 1796 | ||
| 1797 | case RESOURCEPROPERTIESTESTPORTTYPE_QUERYRESOURCEPROPERTIES_RESOURCEUNKNOWNFAULT: | |
| 1798 | ||
| 1799 | 0 | xsd_any_init(&soap_fault.detail); |
| 1800 | 0 | soap_fault.detail->any_info = &wsrp_ResourceUnknownFaultType_info; |
| 1801 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 1802 | 0 | soap_fault.detail->element->local = "ResourceUnknownFault"; |
| 1803 | 0 | soap_fault.detail->element->Namespace = |
| 1804 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 1805 | 0 | soap_fault.detail->value = fault; |
| 1806 | 0 | break; |
| 1807 | ||
| 1808 | case RESOURCEPROPERTIESTESTPORTTYPE_QUERYRESOURCEPROPERTIES_QUERYEVALUATIONERRORFAULT: | |
| 1809 | ||
| 1810 | 2 | xsd_any_init(&soap_fault.detail); |
| 1811 | 2 | soap_fault.detail->any_info = &wsrp_QueryEvaluationErrorFaultType_info; |
| 1812 | 2 | xsd_QName_init(&soap_fault.detail->element); |
| 1813 | 2 | soap_fault.detail->element->local = "QueryEvaluationErrorFault"; |
| 1814 | 2 | soap_fault.detail->element->Namespace = |
| 1815 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 1816 | 2 | soap_fault.detail->value = fault; |
| 1817 | 2 | break; |
| 1818 | ||
| 1819 | case RESOURCEPROPERTIESTESTPORTTYPE_QUERYRESOURCEPROPERTIES_INVALIDQUERYEXPRESSIONFAULT: | |
| 1820 | ||
| 1821 | 0 | xsd_any_init(&soap_fault.detail); |
| 1822 | 0 | soap_fault.detail->any_info = &wsrp_InvalidQueryExpressionFaultType_info; |
| 1823 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 1824 | 0 | soap_fault.detail->element->local = "InvalidQueryExpressionFault"; |
| 1825 | 0 | soap_fault.detail->element->Namespace = |
| 1826 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 1827 | 0 | soap_fault.detail->value = fault; |
| 1828 | 0 | break; |
| 1829 | ||
| 1830 | case RESOURCEPROPERTIESTESTPORTTYPE_QUERYRESOURCEPROPERTIES_INVALIDRESOURCEPROPERTYQNAMEFAULT: | |
| 1831 | ||
| 1832 | 0 | xsd_any_init(&soap_fault.detail); |
| 1833 | 0 | soap_fault.detail->any_info = &wsrp_InvalidResourcePropertyQNameFaultType_info; |
| 1834 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 1835 | 0 | soap_fault.detail->element->local = "InvalidResourcePropertyQNameFault"; |
| 1836 | 0 | soap_fault.detail->element->Namespace = |
| 1837 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; | |
| 1838 | 0 | soap_fault.detail->value = fault; |
| 1839 | 0 | break; |
| 1840 | ||
| 1841 | default: | |
| 1842 | 0 | result = ResourcePropertiesTestServiceErrorReturnedUnknownFault("QueryResourceProperties"); |
| 1843 | 0 | goto exit; |
| 1844 | } | |
| 1845 | ||
| 1846 | 2 | result = globus_service_session_serialize_fault_response( |
| 1847 | callback_handle->message, &soap_fault); | |
| 1848 | 2 | if(result != GLOBUS_SUCCESS) |
| 1849 | { | |
| 1850 | 0 | goto exit; |
| 1851 | } | |
| 1852 | ||
| 1853 | 2 | soap_fault.detail->element->local = NULL; |
| 1854 | 2 | soap_fault.detail->element->Namespace = NULL; |
| 1855 | 2 | soap_fault.detail->any_info = NULL; |
| 1856 | 2 | xsd_any_destroy(soap_fault.detail); |
| 1857 | ||
| 1858 | 2 | globus_soap_message_handle_set_attr( |
| 1859 | callback_handle->message, | |
| 1860 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1861 | globus_soap_message_attr_copy_string, | |
| 1862 | globus_libc_free, | |
| 1863 | WSADDRESSING_FAULT_NS); | |
| 1864 | } | |
| 1865 | 18 | else if(result != GLOBUS_SUCCESS) |
| 1866 | { | |
| 1867 | 0 | globus_result_t local_result; |
| 1868 | 0 | local_result = globus_service_session_begin_response( |
| 1869 | callback_handle->message); | |
| 1870 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 1871 | { | |
| 1872 | 0 | result = local_result; |
| 1873 | 0 | goto exit; |
| 1874 | } | |
| 1875 | ||
| 1876 | 0 | soap_fault.faultcode = "Server"; |
| 1877 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 1878 | globus_error_get(result)); | |
| 1879 | 0 | result = GLOBUS_SUCCESS; |
| 1880 | 0 | soap_fault.faultactor = NULL; |
| 1881 | 0 | soap_fault.detail = NULL; |
| 1882 | 0 | result = globus_service_session_serialize_fault_response( |
| 1883 | callback_handle->message, &soap_fault); | |
| 1884 | 0 | if(result != GLOBUS_SUCCESS) |
| 1885 | { | |
| 1886 | 0 | goto exit; |
| 1887 | } | |
| 1888 | ||
| 1889 | 0 | globus_soap_message_handle_set_attr( |
| 1890 | callback_handle->message, | |
| 1891 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1892 | globus_soap_message_attr_copy_string, | |
| 1893 | globus_libc_free, | |
| 1894 | WSADDRESSING_FAULT_NS); | |
| 1895 | } | |
| 1896 | else | |
| 1897 | { | |
| 1898 | 18 | result = globus_service_session_begin_response( |
| 1899 | callback_handle->message); | |
| 1900 | 18 | if(result != GLOBUS_SUCCESS) |
| 1901 | { | |
| 1902 | 0 | goto exit; |
| 1903 | } | |
| 1904 | ||
| 1905 | 18 | element_qname.local = "QueryResourcePropertiesResponse"; |
| 1906 | 18 | element_qname.Namespace = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"; |
| 1907 | ||
| 1908 | 18 | result = wsrp_QueryResourcePropertiesResponseType_serialize( |
| 1909 | &element_qname, | |
| 1910 | &QueryResourcePropertiesResponse, | |
| 1911 | callback_handle->message, | |
| 1912 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 1913 | 18 | if(result != GLOBUS_SUCCESS) |
| 1914 | { | |
| 1915 | 0 | goto exit; |
| 1916 | } | |
| 1917 | ||
| 1918 | 18 | result = globus_service_session_end_response( |
| 1919 | callback_handle->message); | |
| 1920 | 18 | if(result != GLOBUS_SUCCESS) |
| 1921 | { | |
| 1922 | 0 | goto exit; |
| 1923 | } | |
| 1924 | ||
| 1925 | 18 | wsrp_QueryResourcePropertiesResponseType_destroy_contents( |
| 1926 | &QueryResourcePropertiesResponse); | |
| 1927 | ||
| 1928 | 18 | globus_soap_message_handle_set_attr( |
| 1929 | callback_handle->message, | |
| 1930 | WSADDR_ACTION_RESPONSE_KEY, | |
| 1931 | globus_soap_message_attr_copy_string, | |
| 1932 | globus_libc_free, | |
| 1933 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/QueryResourcePropertiesResponse"); | |
| 1934 | } | |
| 1935 | ||
| 1936 | exit: | |
| 1937 | ||
| 1938 | 20 | callback_handle->callback( |
| 1939 | result, | |
| 1940 | callback_handle->args); | |
| 1941 | ||
| 1942 | 20 | globus_libc_free(callback_handle); |
| 1943 | ||
| 1944 | 20 | ResourcePropertiesTestServiceDebugExit(); |
| 1945 | } | |
| 1946 | ||
| 1947 | static | |
| 1948 | globus_result_t | |
| 1949 | QueryResourceProperties_invoke( | |
| 1950 | globus_service_engine_t engine, | |
| 1951 | globus_soap_message_handle_t message, | |
| 1952 | globus_service_response_t * response, | |
| 1953 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 1954 | void * args) | |
| 1955 | 20 | { |
| 1956 | 20 | QueryResourceProperties_callback_handle_t * callback_handle; |
| 1957 | 20 | globus_result_t result = GLOBUS_SUCCESS; |
| 1958 | 20 | GlobusFuncName(ResourcePropertiesTestPortType_QueryResourceProperties); |
| 1959 | 20 | ResourcePropertiesTestServiceDebugEnter(); |
| 1960 | ||
| 1961 | 20 | callback_handle = malloc(sizeof(QueryResourceProperties_callback_handle_t)); |
| 1962 | 20 | if(!callback_handle) |
| 1963 | { | |
| 1964 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 1965 | 0 | goto exit; |
| 1966 | } | |
| 1967 | 20 | callback_handle->engine = engine; |
| 1968 | 20 | callback_handle->message = message; |
| 1969 | 20 | callback_handle->callback = invoke_callback; |
| 1970 | 20 | callback_handle->args = args; |
| 1971 | ||
| 1972 | 20 | result = globus_callback_register_oneshot( |
| 1973 | NULL, | |
| 1974 | &globus_i_reltime_zero, | |
| 1975 | QueryResourceProperties_invoke_callback, | |
| 1976 | callback_handle); | |
| 1977 | ||
| 1978 | exit: | |
| 1979 | 20 | ResourcePropertiesTestServiceDebugExit(); |
| 1980 | 20 | return result; |
| 1981 | } | |
| 1982 | ||
| 1983 | ||
| 1984 | static | |
| 1985 | globus_result_t | |
| 1986 | QueryResourceProperties_fault_to_type( | |
| 1987 | const char * fault_type_name, | |
| 1988 | int * fault_type, | |
| 1989 | globus_xsd_type_info_t * fault_type_info) | |
| 1990 | 0 | { |
| 1991 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 1992 | ||
| 1993 | 0 | *fault_type_info = NULL; |
| 1994 | ||
| 1995 | 0 | *fault_type = QueryResourceProperties_lookup_fault_type(fault_type_name); |
| 1996 | ||
| 1997 | 0 | switch (*fault_type) |
| 1998 | { | |
| 1999 | case RESOURCEPROPERTIESTESTPORTTYPE_QUERYRESOURCEPROPERTIES_UNKNOWNQUERYEXPRESSIONDIALECTFAULT: | |
| 2000 | 0 | *fault_type_info = &wsrp_UnknownQueryExpressionDialectFaultType_info; |
| 2001 | 0 | break; |
| 2002 | ||
| 2003 | case RESOURCEPROPERTIESTESTPORTTYPE_QUERYRESOURCEPROPERTIES_RESOURCEUNKNOWNFAULT: | |
| 2004 | 0 | *fault_type_info = &wsrp_ResourceUnknownFaultType_info; |
| 2005 | 0 | break; |
| 2006 | ||
| 2007 | case RESOURCEPROPERTIESTESTPORTTYPE_QUERYRESOURCEPROPERTIES_QUERYEVALUATIONERRORFAULT: | |
| 2008 | 0 | *fault_type_info = &wsrp_QueryEvaluationErrorFaultType_info; |
| 2009 | 0 | break; |
| 2010 | ||
| 2011 | case RESOURCEPROPERTIESTESTPORTTYPE_QUERYRESOURCEPROPERTIES_INVALIDQUERYEXPRESSIONFAULT: | |
| 2012 | 0 | *fault_type_info = &wsrp_InvalidQueryExpressionFaultType_info; |
| 2013 | 0 | break; |
| 2014 | ||
| 2015 | case RESOURCEPROPERTIESTESTPORTTYPE_QUERYRESOURCEPROPERTIES_INVALIDRESOURCEPROPERTYQNAMEFAULT: | |
| 2016 | 0 | *fault_type_info = &wsrp_InvalidResourcePropertyQNameFaultType_info; |
| 2017 | 0 | break; |
| 2018 | ||
| 2019 | default: | |
| 2020 | 0 | result = ResourcePropertiesTestServiceErrorReturnedUnknownFault("QueryResourceProperties"); |
| 2021 | goto exit; | |
| 2022 | } | |
| 2023 | ||
| 2024 | exit: | |
| 2025 | 0 | return result; |
| 2026 | } | |
| 2027 | ||
| 2028 | ||
| 2029 | static | |
| 2030 | globus_service_operation_descriptor_t | |
| 2031 | QueryResourceProperties_operation_descriptor = | |
| 2032 | { | |
| 2033 | QueryResourceProperties_deserialize, | |
| 2034 | QueryResourceProperties_invoke, | |
| 2035 | ||
| 2036 | QueryResourceProperties_fault_to_type | |
| 2037 | ||
| 2038 | }; | |
| 2039 | ||
| 2040 | static | |
| 2041 | globus_operation_provider_descriptor_t QueryResourceProperties_descriptor = | |
| 2042 | { | |
| 2043 | &ResourcePropertiesTestPortType_QueryResourceProperties_op_qname, | |
| 2044 | "QueryResourceProperties", | |
| 2045 | (void *)ResourcePropertiesTestPortType_QueryResourceProperties_impl, | |
| 2046 | NULL | |
| 2047 | }; | |
| 2048 | ||
| 2049 | ||
| 2050 | xsd_QName ResourcePropertiesTestPortType_Destroy_op_qname = | |
| 2051 | { | |
| 2052 | "http://localhost:8080/wsrf/services/ResourcePropertiesTestService" | |
| 2053 | "Destroy" | |
| 2054 | }; | |
| 2055 | ||
| 2056 | xsd_QName ResourcePropertiesTestPortType_Destroy_input_qname = | |
| 2057 | { | |
| 2058 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", | |
| 2059 | "Destroy" | |
| 2060 | }; | |
| 2061 | ||
| 2062 | typedef globus_result_t (* Destroy_invoke_func_t) ( | |
| 2063 | globus_service_engine_t engine, | |
| 2064 | globus_soap_message_handle_t message, | |
| 2065 | globus_service_descriptor_t * descriptor, | |
| 2066 | wsrl_DestroyType * Destroy, | |
| 2067 | wsrl_DestroyResponseType * DestroyResponse, | |
| 2068 | const char ** fault_type_name, | |
| 2069 | void ** fault); | |
| 2070 | ||
| 2071 | typedef struct Destroy_callback_handle_s | |
| 2072 | { | |
| 2073 | globus_service_engine_t engine; | |
| 2074 | globus_soap_message_handle_t message; | |
| 2075 | globus_operation_invoke_callback_func_t callback; | |
| 2076 | void * args; | |
| 2077 | } Destroy_callback_handle_t; | |
| 2078 | ||
| 2079 | ||
| 2080 | const char * ResourcePropertiesTestPortType_Destroy_fault_strings[RESOURCEPROPERTIESTESTPORTTYPE_DESTROY_RESOURCENOTDESTROYEDFAULT] = | |
| 2081 | { | |
| 2082 | "Unknown", | |
| 2083 | "ResourceUnknownFault", | |
| 2084 | "ResourceNotDestroyedFault" | |
| 2085 | }; | |
| 2086 | ||
| 2087 | static | |
| 2088 | ResourcePropertiesTestPortType_Destroy_fault_t | |
| 2089 | Destroy_lookup_fault_type( | |
| 2090 | const char * fault_name) | |
| 2091 | 0 | { |
| 2092 | 0 | ResourcePropertiesTestPortType_Destroy_fault_t fault_type; |
| 2093 | 0 | GlobusFuncName(Destroy_lookup_fault_type); |
| 2094 | 0 | ResourcePropertiesTestServiceDebugEnter(); |
| 2095 | ||
| 2096 | 0 | globus_assert(fault_name); |
| 2097 | ||
| 2098 | 0 | if(!strcmp(fault_name, "ResourceUnknownFault")) |
| 2099 | { | |
| 2100 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_DESTROY_RESOURCEUNKNOWNFAULT; |
| 2101 | } | |
| 2102 | 0 | else if(!strcmp(fault_name, "ResourceNotDestroyedFault")) |
| 2103 | { | |
| 2104 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_DESTROY_RESOURCENOTDESTROYEDFAULT; |
| 2105 | } | |
| 2106 | else | |
| 2107 | { | |
| 2108 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_DESTROY_UNKNOWN_FAULT; |
| 2109 | } | |
| 2110 | ||
| 2111 | 0 | ResourcePropertiesTestServiceDebugExit(); |
| 2112 | 0 | return fault_type; |
| 2113 | } | |
| 2114 | ||
| 2115 | ||
| 2116 | ||
| 2117 | static | |
| 2118 | void | |
| 2119 | Destroy_deserialize_callback( | |
| 2120 | void * handle) | |
| 2121 | 40 | { |
| 2122 | 40 | Destroy_callback_handle_t * callback_handle; |
| 2123 | 40 | globus_result_t result = GLOBUS_SUCCESS; |
| 2124 | 40 | struct globus_soap_message_fault_s soap_fault; |
| 2125 | 40 | Destroy_invoke_func_t invoke_function; |
| 2126 | 40 | wsrl_DestroyType * Destroy = NULL; |
| 2127 | 40 | GlobusFuncName(Destroy_deserialize_callback); |
| 2128 | 40 | ResourcePropertiesTestServiceDebugEnter(); |
| 2129 | ||
| 2130 | 40 | callback_handle = (Destroy_callback_handle_t *) handle; |
| 2131 | ||
| 2132 | 40 | result = globus_operation_table_get_operation( |
| 2133 | ResourcePropertiesTestService_descriptor.operations, | |
| 2134 | "Destroy", | |
| 2135 | (void **)&invoke_function); | |
| 2136 | 40 | if(result != GLOBUS_SUCCESS) |
| 2137 | { | |
| 2138 | 0 | goto exit; |
| 2139 | } | |
| 2140 | ||
| 2141 | 40 | if(ResourcePropertiesTestService_descriptor.registry) |
| 2142 | { | |
| 2143 | 40 | globus_soap_message_handle_set_registry( |
| 2144 | callback_handle->message, | |
| 2145 | ResourcePropertiesTestService_descriptor.registry); | |
| 2146 | } | |
| 2147 | ||
| 2148 | 40 | result = wsrl_DestroyType_init( |
| 2149 | &Destroy); | |
| 2150 | 40 | if(result != GLOBUS_SUCCESS) |
| 2151 | { | |
| 2152 | 0 | goto exit; |
| 2153 | } | |
| 2154 | ||
| 2155 | 40 | result = wsrl_DestroyType_deserialize( |
| 2156 | &ResourcePropertiesTestPortType_Destroy_input_qname, | |
| 2157 | Destroy, | |
| 2158 | callback_handle->message, | |
| 2159 | 0); | |
| 2160 | 40 | if(result != GLOBUS_SUCCESS) |
| 2161 | { | |
| 2162 | 0 | goto exit; |
| 2163 | } | |
| 2164 | ||
| 2165 | 40 | result = globus_soap_message_handle_set_attr( |
| 2166 | callback_handle->message, | |
| 2167 | "DestroyOperationInputParameter", | |
| 2168 | wsrl_DestroyType_copy_wrapper, | |
| 2169 | wsrl_DestroyType_destroy_wrapper, | |
| 2170 | (void *)Destroy); | |
| 2171 | 40 | if(result != GLOBUS_SUCCESS) |
| 2172 | { | |
| 2173 | 40 | goto exit; |
| 2174 | } | |
| 2175 | ||
| 2176 | exit: | |
| 2177 | ||
| 2178 | 40 | if (Destroy != NULL) |
| 2179 | { | |
| 2180 | 40 | wsrl_DestroyType_destroy(Destroy); |
| 2181 | } | |
| 2182 | 40 | callback_handle->callback( |
| 2183 | result, | |
| 2184 | callback_handle->args); | |
| 2185 | ||
| 2186 | 40 | free(callback_handle); |
| 2187 | 40 | ResourcePropertiesTestServiceDebugExit(); |
| 2188 | } | |
| 2189 | ||
| 2190 | static | |
| 2191 | globus_result_t | |
| 2192 | Destroy_deserialize( | |
| 2193 | globus_service_engine_t engine, | |
| 2194 | globus_soap_message_handle_t message, | |
| 2195 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 2196 | void * args) | |
| 2197 | 40 | { |
| 2198 | 40 | Destroy_callback_handle_t * callback_handle; |
| 2199 | 40 | globus_result_t result = GLOBUS_SUCCESS; |
| 2200 | 40 | GlobusFuncName(Destroy_deserialize); |
| 2201 | 40 | ResourcePropertiesTestServiceDebugEnter(); |
| 2202 | ||
| 2203 | 40 | callback_handle = malloc(sizeof(Destroy_callback_handle_t)); |
| 2204 | 40 | globus_assert_string(callback_handle, |
| 2205 | "Memory allocation failed " | |
| 2206 | "for Destroy callback handle"); | |
| 2207 | ||
| 2208 | 40 | callback_handle->engine = engine; |
| 2209 | 40 | callback_handle->message = message; |
| 2210 | 40 | callback_handle->callback = invoke_callback; |
| 2211 | 40 | callback_handle->args = args; |
| 2212 | ||
| 2213 | 40 | result = globus_callback_register_oneshot( |
| 2214 | NULL, | |
| 2215 | &globus_i_reltime_zero, | |
| 2216 | Destroy_deserialize_callback, | |
| 2217 | callback_handle); | |
| 2218 | ||
| 2219 | 40 | ResourcePropertiesTestServiceDebugExit(); |
| 2220 | 40 | return result; |
| 2221 | } | |
| 2222 | ||
| 2223 | static | |
| 2224 | void | |
| 2225 | Destroy_invoke_callback( | |
| 2226 | void * handle) | |
| 2227 | 40 | { |
| 2228 | 40 | Destroy_callback_handle_t * callback_handle; |
| 2229 | 40 | globus_result_t result = GLOBUS_SUCCESS; |
| 2230 | 40 | struct globus_soap_message_fault_s soap_fault; |
| 2231 | 40 | Destroy_invoke_func_t invoke_function; |
| 2232 | 40 | wsrl_DestroyType * Destroy; |
| 2233 | 40 | wsrl_DestroyResponseType DestroyResponse; |
| 2234 | 40 | xsd_QName element_qname; |
| 2235 | 40 | const char * fault_type_name = NULL; |
| 2236 | 40 | ResourcePropertiesTestPortType_Destroy_fault_t fault_type = RESOURCEPROPERTIESTESTPORTTYPE_DESTROY_NOFAULT; |
| 2237 | 40 | void * fault = NULL; |
| 2238 | ||
| 2239 | 40 | GlobusFuncName(Destroy_invoke_callback); |
| 2240 | 40 | ResourcePropertiesTestServiceDebugEnter(); |
| 2241 | ||
| 2242 | 40 | callback_handle = (Destroy_callback_handle_t *) handle; |
| 2243 | ||
| 2244 | 40 | Destroy = globus_soap_message_handle_get_attr( |
| 2245 | callback_handle->message, | |
| 2246 | "DestroyOperationInputParameter"); | |
| 2247 | 40 | globus_assert(Destroy); |
| 2248 | ||
| 2249 | 40 | result = globus_operation_table_get_operation( |
| 2250 | ResourcePropertiesTestService_descriptor.operations, | |
| 2251 | "Destroy", | |
| 2252 | (void **)&invoke_function); | |
| 2253 | 40 | if(result != GLOBUS_SUCCESS) |
| 2254 | { | |
| 2255 | 0 | goto fault_exit; |
| 2256 | } | |
| 2257 | ||
| 2258 | ||
| 2259 | 40 | result = wsrl_DestroyResponseType_init_contents( |
| 2260 | &DestroyResponse); | |
| 2261 | 40 | if(result != GLOBUS_SUCCESS) |
| 2262 | { | |
| 2263 | 0 | goto fault_exit; |
| 2264 | } | |
| 2265 | ||
| 2266 | 40 | result = invoke_function( |
| 2267 | callback_handle->engine, | |
| 2268 | callback_handle->message, | |
| 2269 | &ResourcePropertiesTestService_descriptor, | |
| 2270 | Destroy, | |
| 2271 | &DestroyResponse, | |
| 2272 | &fault_type_name, | |
| 2273 | &fault); | |
| 2274 | ||
| 2275 | fault_exit: | |
| 2276 | ||
| 2277 | 40 | if(fault && fault_type_name) |
| 2278 | { | |
| 2279 | 0 | fault_type = Destroy_lookup_fault_type(fault_type_name); |
| 2280 | ||
| 2281 | 0 | result = globus_service_session_begin_response( |
| 2282 | callback_handle->message); | |
| 2283 | 0 | if(result != GLOBUS_SUCCESS) |
| 2284 | { | |
| 2285 | 0 | goto exit; |
| 2286 | } | |
| 2287 | ||
| 2288 | 0 | soap_fault.faultcode = "Server"; |
| 2289 | 0 | soap_fault.faultstring = |
| 2290 | "An error occurred while processing the message"; | |
| 2291 | 0 | soap_fault.faultactor = NULL; |
| 2292 | ||
| 2293 | 0 | switch(fault_type) |
| 2294 | { | |
| 2295 | ||
| 2296 | case RESOURCEPROPERTIESTESTPORTTYPE_DESTROY_RESOURCEUNKNOWNFAULT: | |
| 2297 | ||
| 2298 | 0 | xsd_any_init(&soap_fault.detail); |
| 2299 | 0 | soap_fault.detail->any_info = &wsrl_ResourceUnknownFaultType_info; |
| 2300 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 2301 | 0 | soap_fault.detail->element->local = "ResourceUnknownFault"; |
| 2302 | 0 | soap_fault.detail->element->Namespace = |
| 2303 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"; | |
| 2304 | 0 | soap_fault.detail->value = fault; |
| 2305 | 0 | break; |
| 2306 | ||
| 2307 | case RESOURCEPROPERTIESTESTPORTTYPE_DESTROY_RESOURCENOTDESTROYEDFAULT: | |
| 2308 | ||
| 2309 | 0 | xsd_any_init(&soap_fault.detail); |
| 2310 | 0 | soap_fault.detail->any_info = &wsrl_ResourceNotDestroyedFaultType_info; |
| 2311 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 2312 | 0 | soap_fault.detail->element->local = "ResourceNotDestroyedFault"; |
| 2313 | 0 | soap_fault.detail->element->Namespace = |
| 2314 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"; | |
| 2315 | 0 | soap_fault.detail->value = fault; |
| 2316 | 0 | break; |
| 2317 | ||
| 2318 | default: | |
| 2319 | 0 | result = ResourcePropertiesTestServiceErrorReturnedUnknownFault("Destroy"); |
| 2320 | 0 | goto exit; |
| 2321 | } | |
| 2322 | ||
| 2323 | 0 | result = globus_service_session_serialize_fault_response( |
| 2324 | callback_handle->message, &soap_fault); | |
| 2325 | 0 | if(result != GLOBUS_SUCCESS) |
| 2326 | { | |
| 2327 | 0 | goto exit; |
| 2328 | } | |
| 2329 | ||
| 2330 | 0 | soap_fault.detail->element->local = NULL; |
| 2331 | 0 | soap_fault.detail->element->Namespace = NULL; |
| 2332 | 0 | soap_fault.detail->any_info = NULL; |
| 2333 | 0 | xsd_any_destroy(soap_fault.detail); |
| 2334 | ||
| 2335 | 0 | globus_soap_message_handle_set_attr( |
| 2336 | callback_handle->message, | |
| 2337 | WSADDR_ACTION_RESPONSE_KEY, | |
| 2338 | globus_soap_message_attr_copy_string, | |
| 2339 | globus_libc_free, | |
| 2340 | WSADDRESSING_FAULT_NS); | |
| 2341 | } | |
| 2342 | 40 | else if(result != GLOBUS_SUCCESS) |
| 2343 | { | |
| 2344 | 0 | globus_result_t local_result; |
| 2345 | 0 | local_result = globus_service_session_begin_response( |
| 2346 | callback_handle->message); | |
| 2347 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 2348 | { | |
| 2349 | 0 | result = local_result; |
| 2350 | 0 | goto exit; |
| 2351 | } | |
| 2352 | ||
| 2353 | 0 | soap_fault.faultcode = "Server"; |
| 2354 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 2355 | globus_error_get(result)); | |
| 2356 | 0 | result = GLOBUS_SUCCESS; |
| 2357 | 0 | soap_fault.faultactor = NULL; |
| 2358 | 0 | soap_fault.detail = NULL; |
| 2359 | 0 | result = globus_service_session_serialize_fault_response( |
| 2360 | callback_handle->message, &soap_fault); | |
| 2361 | 0 | if(result != GLOBUS_SUCCESS) |
| 2362 | { | |
| 2363 | 0 | goto exit; |
| 2364 | } | |
| 2365 | ||
| 2366 | 0 | globus_soap_message_handle_set_attr( |
| 2367 | callback_handle->message, | |
| 2368 | WSADDR_ACTION_RESPONSE_KEY, | |
| 2369 | globus_soap_message_attr_copy_string, | |
| 2370 | globus_libc_free, | |
| 2371 | WSADDRESSING_FAULT_NS); | |
| 2372 | } | |
| 2373 | else | |
| 2374 | { | |
| 2375 | 40 | result = globus_service_session_begin_response( |
| 2376 | callback_handle->message); | |
| 2377 | 40 | if(result != GLOBUS_SUCCESS) |
| 2378 | { | |
| 2379 | 0 | goto exit; |
| 2380 | } | |
| 2381 | ||
| 2382 | 40 | element_qname.local = "DestroyResponse"; |
| 2383 | 40 | element_qname.Namespace = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"; |
| 2384 | ||
| 2385 | 40 | result = wsrl_DestroyResponseType_serialize( |
| 2386 | &element_qname, | |
| 2387 | &DestroyResponse, | |
| 2388 | callback_handle->message, | |
| 2389 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 2390 | 40 | if(result != GLOBUS_SUCCESS) |
| 2391 | { | |
| 2392 | 0 | goto exit; |
| 2393 | } | |
| 2394 | ||
| 2395 | 40 | result = globus_service_session_end_response( |
| 2396 | callback_handle->message); | |
| 2397 | 40 | if(result != GLOBUS_SUCCESS) |
| 2398 | { | |
| 2399 | 0 | goto exit; |
| 2400 | } | |
| 2401 | ||
| 2402 | 40 | wsrl_DestroyResponseType_destroy_contents( |
| 2403 | &DestroyResponse); | |
| 2404 | ||
| 2405 | 40 | globus_soap_message_handle_set_attr( |
| 2406 | callback_handle->message, | |
| 2407 | WSADDR_ACTION_RESPONSE_KEY, | |
| 2408 | globus_soap_message_attr_copy_string, | |
| 2409 | globus_libc_free, | |
| 2410 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/DestroyResponse"); | |
| 2411 | } | |
| 2412 | ||
| 2413 | exit: | |
| 2414 | ||
| 2415 | 40 | callback_handle->callback( |
| 2416 | result, | |
| 2417 | callback_handle->args); | |
| 2418 | ||
| 2419 | 40 | globus_libc_free(callback_handle); |
| 2420 | ||
| 2421 | 40 | ResourcePropertiesTestServiceDebugExit(); |
| 2422 | } | |
| 2423 | ||
| 2424 | static | |
| 2425 | globus_result_t | |
| 2426 | Destroy_invoke( | |
| 2427 | globus_service_engine_t engine, | |
| 2428 | globus_soap_message_handle_t message, | |
| 2429 | globus_service_response_t * response, | |
| 2430 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 2431 | void * args) | |
| 2432 | 40 | { |
| 2433 | 40 | Destroy_callback_handle_t * callback_handle; |
| 2434 | 40 | globus_result_t result = GLOBUS_SUCCESS; |
| 2435 | 40 | GlobusFuncName(ResourcePropertiesTestPortType_Destroy); |
| 2436 | 40 | ResourcePropertiesTestServiceDebugEnter(); |
| 2437 | ||
| 2438 | 40 | callback_handle = malloc(sizeof(Destroy_callback_handle_t)); |
| 2439 | 40 | if(!callback_handle) |
| 2440 | { | |
| 2441 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 2442 | 0 | goto exit; |
| 2443 | } | |
| 2444 | 40 | callback_handle->engine = engine; |
| 2445 | 40 | callback_handle->message = message; |
| 2446 | 40 | callback_handle->callback = invoke_callback; |
| 2447 | 40 | callback_handle->args = args; |
| 2448 | ||
| 2449 | 40 | result = globus_callback_register_oneshot( |
| 2450 | NULL, | |
| 2451 | &globus_i_reltime_zero, | |
| 2452 | Destroy_invoke_callback, | |
| 2453 | callback_handle); | |
| 2454 | ||
| 2455 | exit: | |
| 2456 | 40 | ResourcePropertiesTestServiceDebugExit(); |
| 2457 | 40 | return result; |
| 2458 | } | |
| 2459 | ||
| 2460 | ||
| 2461 | static | |
| 2462 | globus_result_t | |
| 2463 | Destroy_fault_to_type( | |
| 2464 | const char * fault_type_name, | |
| 2465 | int * fault_type, | |
| 2466 | globus_xsd_type_info_t * fault_type_info) | |
| 2467 | 0 | { |
| 2468 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 2469 | ||
| 2470 | 0 | *fault_type_info = NULL; |
| 2471 | ||
| 2472 | 0 | *fault_type = Destroy_lookup_fault_type(fault_type_name); |
| 2473 | ||
| 2474 | 0 | switch (*fault_type) |
| 2475 | { | |
| 2476 | case RESOURCEPROPERTIESTESTPORTTYPE_DESTROY_RESOURCEUNKNOWNFAULT: | |
| 2477 | 0 | *fault_type_info = &wsrl_ResourceUnknownFaultType_info; |
| 2478 | 0 | break; |
| 2479 | ||
| 2480 | case RESOURCEPROPERTIESTESTPORTTYPE_DESTROY_RESOURCENOTDESTROYEDFAULT: | |
| 2481 | 0 | *fault_type_info = &wsrl_ResourceNotDestroyedFaultType_info; |
| 2482 | 0 | break; |
| 2483 | ||
| 2484 | default: | |
| 2485 | 0 | result = ResourcePropertiesTestServiceErrorReturnedUnknownFault("Destroy"); |
| 2486 | goto exit; | |
| 2487 | } | |
| 2488 | ||
| 2489 | exit: | |
| 2490 | 0 | return result; |
| 2491 | } | |
| 2492 | ||
| 2493 | ||
| 2494 | static | |
| 2495 | globus_service_operation_descriptor_t | |
| 2496 | Destroy_operation_descriptor = | |
| 2497 | { | |
| 2498 | Destroy_deserialize, | |
| 2499 | Destroy_invoke, | |
| 2500 | ||
| 2501 | Destroy_fault_to_type | |
| 2502 | ||
| 2503 | }; | |
| 2504 | ||
| 2505 | static | |
| 2506 | globus_operation_provider_descriptor_t Destroy_descriptor = | |
| 2507 | { | |
| 2508 | &ResourcePropertiesTestPortType_Destroy_op_qname, | |
| 2509 | "Destroy", | |
| 2510 | (void *)ResourcePropertiesTestPortType_Destroy_impl, | |
| 2511 | NULL | |
| 2512 | }; | |
| 2513 | ||
| 2514 | ||
| 2515 | xsd_QName ResourcePropertiesTestPortType_SetTerminationTime_op_qname = | |
| 2516 | { | |
| 2517 | "http://localhost:8080/wsrf/services/ResourcePropertiesTestService" | |
| 2518 | "SetTerminationTime" | |
| 2519 | }; | |
| 2520 | ||
| 2521 | xsd_QName ResourcePropertiesTestPortType_SetTerminationTime_input_qname = | |
| 2522 | { | |
| 2523 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", | |
| 2524 | "SetTerminationTime" | |
| 2525 | }; | |
| 2526 | ||
| 2527 | typedef globus_result_t (* SetTerminationTime_invoke_func_t) ( | |
| 2528 | globus_service_engine_t engine, | |
| 2529 | globus_soap_message_handle_t message, | |
| 2530 | globus_service_descriptor_t * descriptor, | |
| 2531 | wsrl_SetTerminationTimeType * SetTerminationTime, | |
| 2532 | wsrl_SetTerminationTimeResponseType * SetTerminationTimeResponse, | |
| 2533 | const char ** fault_type_name, | |
| 2534 | void ** fault); | |
| 2535 | ||
| 2536 | typedef struct SetTerminationTime_callback_handle_s | |
| 2537 | { | |
| 2538 | globus_service_engine_t engine; | |
| 2539 | globus_soap_message_handle_t message; | |
| 2540 | globus_operation_invoke_callback_func_t callback; | |
| 2541 | void * args; | |
| 2542 | } SetTerminationTime_callback_handle_t; | |
| 2543 | ||
| 2544 | ||
| 2545 | const char * ResourcePropertiesTestPortType_SetTerminationTime_fault_strings[RESOURCEPROPERTIESTESTPORTTYPE_SETTERMINATIONTIME_UNABLETOSETTERMINATIONTIMEFAULT] = | |
| 2546 | { | |
| 2547 | "Unknown", | |
| 2548 | "TerminationTimeChangeRejectedFault", | |
| 2549 | "ResourceUnknownFault", | |
| 2550 | "UnableToSetTerminationTimeFault" | |
| 2551 | }; | |
| 2552 | ||
| 2553 | static | |
| 2554 | ResourcePropertiesTestPortType_SetTerminationTime_fault_t | |
| 2555 | SetTerminationTime_lookup_fault_type( | |
| 2556 | const char * fault_name) | |
| 2557 | 0 | { |
| 2558 | 0 | ResourcePropertiesTestPortType_SetTerminationTime_fault_t fault_type; |
| 2559 | 0 | GlobusFuncName(SetTerminationTime_lookup_fault_type); |
| 2560 | 0 | ResourcePropertiesTestServiceDebugEnter(); |
| 2561 | ||
| 2562 | 0 | globus_assert(fault_name); |
| 2563 | ||
| 2564 | 0 | if(!strcmp(fault_name, "TerminationTimeChangeRejectedFault")) |
| 2565 | { | |
| 2566 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_SETTERMINATIONTIME_TERMINATIONTIMECHANGEREJECTEDFAULT; |
| 2567 | } | |
| 2568 | 0 | else if(!strcmp(fault_name, "ResourceUnknownFault")) |
| 2569 | { | |
| 2570 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_SETTERMINATIONTIME_RESOURCEUNKNOWNFAULT; |
| 2571 | } | |
| 2572 | 0 | else if(!strcmp(fault_name, "UnableToSetTerminationTimeFault")) |
| 2573 | { | |
| 2574 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_SETTERMINATIONTIME_UNABLETOSETTERMINATIONTIMEFAULT; |
| 2575 | } | |
| 2576 | else | |
| 2577 | { | |
| 2578 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_SETTERMINATIONTIME_UNKNOWN_FAULT; |
| 2579 | } | |
| 2580 | ||
| 2581 | 0 | ResourcePropertiesTestServiceDebugExit(); |
| 2582 | 0 | return fault_type; |
| 2583 | } | |
| 2584 | ||
| 2585 | ||
| 2586 | ||
| 2587 | static | |
| 2588 | void | |
| 2589 | SetTerminationTime_deserialize_callback( | |
| 2590 | void * handle) | |
| 2591 | 0 | { |
| 2592 | 0 | SetTerminationTime_callback_handle_t * callback_handle; |
| 2593 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 2594 | 0 | struct globus_soap_message_fault_s soap_fault; |
| 2595 | 0 | SetTerminationTime_invoke_func_t invoke_function; |
| 2596 | 0 | wsrl_SetTerminationTimeType * SetTerminationTime = NULL; |
| 2597 | 0 | GlobusFuncName(SetTerminationTime_deserialize_callback); |
| 2598 | 0 | ResourcePropertiesTestServiceDebugEnter(); |
| 2599 | ||
| 2600 | 0 | callback_handle = (SetTerminationTime_callback_handle_t *) handle; |
| 2601 | ||
| 2602 | 0 | result = globus_operation_table_get_operation( |
| 2603 | ResourcePropertiesTestService_descriptor.operations, | |
| 2604 | "SetTerminationTime", | |
| 2605 | (void **)&invoke_function); | |
| 2606 | 0 | if(result != GLOBUS_SUCCESS) |
| 2607 | { | |
| 2608 | 0 | goto exit; |
| 2609 | } | |
| 2610 | ||
| 2611 | 0 | if(ResourcePropertiesTestService_descriptor.registry) |
| 2612 | { | |
| 2613 | 0 | globus_soap_message_handle_set_registry( |
| 2614 | callback_handle->message, | |
| 2615 | ResourcePropertiesTestService_descriptor.registry); | |
| 2616 | } | |
| 2617 | ||
| 2618 | 0 | result = wsrl_SetTerminationTimeType_init( |
| 2619 | &SetTerminationTime); | |
| 2620 | 0 | if(result != GLOBUS_SUCCESS) |
| 2621 | { | |
| 2622 | 0 | goto exit; |
| 2623 | } | |
| 2624 | ||
| 2625 | 0 | result = wsrl_SetTerminationTimeType_deserialize( |
| 2626 | &ResourcePropertiesTestPortType_SetTerminationTime_input_qname, | |
| 2627 | SetTerminationTime, | |
| 2628 | callback_handle->message, | |
| 2629 | 0); | |
| 2630 | 0 | if(result != GLOBUS_SUCCESS) |
| 2631 | { | |
| 2632 | 0 | goto exit; |
| 2633 | } | |
| 2634 | ||
| 2635 | 0 | result = globus_soap_message_handle_set_attr( |
| 2636 | callback_handle->message, | |
| 2637 | "SetTerminationTimeOperationInputParameter", | |
| 2638 | wsrl_SetTerminationTimeType_copy_wrapper, | |
| 2639 | wsrl_SetTerminationTimeType_destroy_wrapper, | |
| 2640 | (void *)SetTerminationTime); | |
| 2641 | 0 | if(result != GLOBUS_SUCCESS) |
| 2642 | { | |
| 2643 | 0 | goto exit; |
| 2644 | } | |
| 2645 | ||
| 2646 | exit: | |
| 2647 | ||
| 2648 | 0 | if (SetTerminationTime != NULL) |
| 2649 | { | |
| 2650 | 0 | wsrl_SetTerminationTimeType_destroy(SetTerminationTime); |
| 2651 | } | |
| 2652 | 0 | callback_handle->callback( |
| 2653 | result, | |
| 2654 | callback_handle->args); | |
| 2655 | ||
| 2656 | 0 | free(callback_handle); |
| 2657 | 0 | ResourcePropertiesTestServiceDebugExit(); |
| 2658 | } | |
| 2659 | ||
| 2660 | static | |
| 2661 | globus_result_t | |
| 2662 | SetTerminationTime_deserialize( | |
| 2663 | globus_service_engine_t engine, | |
| 2664 | globus_soap_message_handle_t message, | |
| 2665 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 2666 | void * args) | |
| 2667 | 0 | { |
| 2668 | 0 | SetTerminationTime_callback_handle_t * callback_handle; |
| 2669 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 2670 | 0 | GlobusFuncName(SetTerminationTime_deserialize); |
| 2671 | 0 | ResourcePropertiesTestServiceDebugEnter(); |
| 2672 | ||
| 2673 | 0 | callback_handle = malloc(sizeof(SetTerminationTime_callback_handle_t)); |
| 2674 | 0 | globus_assert_string(callback_handle, |
| 2675 | "Memory allocation failed " | |
| 2676 | "for SetTerminationTime callback handle"); | |
| 2677 | ||
| 2678 | 0 | callback_handle->engine = engine; |
| 2679 | 0 | callback_handle->message = message; |
| 2680 | 0 | callback_handle->callback = invoke_callback; |
| 2681 | 0 | callback_handle->args = args; |
| 2682 | ||
| 2683 | 0 | result = globus_callback_register_oneshot( |
| 2684 | NULL, | |
| 2685 | &globus_i_reltime_zero, | |
| 2686 | SetTerminationTime_deserialize_callback, | |
| 2687 | callback_handle); | |
| 2688 | ||
| 2689 | 0 | ResourcePropertiesTestServiceDebugExit(); |
| 2690 | 0 | return result; |
| 2691 | } | |
| 2692 | ||
| 2693 | static | |
| 2694 | void | |
| 2695 | SetTerminationTime_invoke_callback( | |
| 2696 | void * handle) | |
| 2697 | 0 | { |
| 2698 | 0 | SetTerminationTime_callback_handle_t * callback_handle; |
| 2699 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 2700 | 0 | struct globus_soap_message_fault_s soap_fault; |
| 2701 | 0 | SetTerminationTime_invoke_func_t invoke_function; |
| 2702 | 0 | wsrl_SetTerminationTimeType * SetTerminationTime; |
| 2703 | 0 | wsrl_SetTerminationTimeResponseType SetTerminationTimeResponse; |
| 2704 | 0 | xsd_QName element_qname; |
| 2705 | 0 | const char * fault_type_name = NULL; |
| 2706 | 0 | ResourcePropertiesTestPortType_SetTerminationTime_fault_t fault_type = RESOURCEPROPERTIESTESTPORTTYPE_SETTERMINATIONTIME_NOFAULT; |
| 2707 | 0 | void * fault = NULL; |
| 2708 | ||
| 2709 | 0 | GlobusFuncName(SetTerminationTime_invoke_callback); |
| 2710 | 0 | ResourcePropertiesTestServiceDebugEnter(); |
| 2711 | ||
| 2712 | 0 | callback_handle = (SetTerminationTime_callback_handle_t *) handle; |
| 2713 | ||
| 2714 | 0 | SetTerminationTime = globus_soap_message_handle_get_attr( |
| 2715 | callback_handle->message, | |
| 2716 | "SetTerminationTimeOperationInputParameter"); | |
| 2717 | 0 | globus_assert(SetTerminationTime); |
| 2718 | ||
| 2719 | 0 | result = globus_operation_table_get_operation( |
| 2720 | ResourcePropertiesTestService_descriptor.operations, | |
| 2721 | "SetTerminationTime", | |
| 2722 | (void **)&invoke_function); | |
| 2723 | 0 | if(result != GLOBUS_SUCCESS) |
| 2724 | { | |
| 2725 | 0 | goto fault_exit; |
| 2726 | } | |
| 2727 | ||
| 2728 | ||
| 2729 | 0 | result = wsrl_SetTerminationTimeResponseType_init_contents( |
| 2730 | &SetTerminationTimeResponse); | |
| 2731 | 0 | if(result != GLOBUS_SUCCESS) |
| 2732 | { | |
| 2733 | 0 | goto fault_exit; |
| 2734 | } | |
| 2735 | ||
| 2736 | 0 | result = invoke_function( |
| 2737 | callback_handle->engine, | |
| 2738 | callback_handle->message, | |
| 2739 | &ResourcePropertiesTestService_descriptor, | |
| 2740 | SetTerminationTime, | |
| 2741 | &SetTerminationTimeResponse, | |
| 2742 | &fault_type_name, | |
| 2743 | &fault); | |
| 2744 | ||
| 2745 | fault_exit: | |
| 2746 | ||
| 2747 | 0 | if(fault && fault_type_name) |
| 2748 | { | |
| 2749 | 0 | fault_type = SetTerminationTime_lookup_fault_type(fault_type_name); |
| 2750 | ||
| 2751 | 0 | result = globus_service_session_begin_response( |
| 2752 | callback_handle->message); | |
| 2753 | 0 | if(result != GLOBUS_SUCCESS) |
| 2754 | { | |
| 2755 | 0 | goto exit; |
| 2756 | } | |
| 2757 | ||
| 2758 | 0 | soap_fault.faultcode = "Server"; |
| 2759 | 0 | soap_fault.faultstring = |
| 2760 | "An error occurred while processing the message"; | |
| 2761 | 0 | soap_fault.faultactor = NULL; |
| 2762 | ||
| 2763 | 0 | switch(fault_type) |
| 2764 | { | |
| 2765 | ||
| 2766 | case RESOURCEPROPERTIESTESTPORTTYPE_SETTERMINATIONTIME_TERMINATIONTIMECHANGEREJECTEDFAULT: | |
| 2767 | ||
| 2768 | 0 | xsd_any_init(&soap_fault.detail); |
| 2769 | 0 | soap_fault.detail->any_info = &wsrl_TerminationTimeChangeRejectedFaultType_info; |
| 2770 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 2771 | 0 | soap_fault.detail->element->local = "TerminationTimeChangeRejectedFault"; |
| 2772 | 0 | soap_fault.detail->element->Namespace = |
| 2773 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"; | |
| 2774 | 0 | soap_fault.detail->value = fault; |
| 2775 | 0 | break; |
| 2776 | ||
| 2777 | case RESOURCEPROPERTIESTESTPORTTYPE_SETTERMINATIONTIME_RESOURCEUNKNOWNFAULT: | |
| 2778 | ||
| 2779 | 0 | xsd_any_init(&soap_fault.detail); |
| 2780 | 0 | soap_fault.detail->any_info = &wsrl_ResourceUnknownFaultType_info; |
| 2781 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 2782 | 0 | soap_fault.detail->element->local = "ResourceUnknownFault"; |
| 2783 | 0 | soap_fault.detail->element->Namespace = |
| 2784 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"; | |
| 2785 | 0 | soap_fault.detail->value = fault; |
| 2786 | 0 | break; |
| 2787 | ||
| 2788 | case RESOURCEPROPERTIESTESTPORTTYPE_SETTERMINATIONTIME_UNABLETOSETTERMINATIONTIMEFAULT: | |
| 2789 | ||
| 2790 | 0 | xsd_any_init(&soap_fault.detail); |
| 2791 | 0 | soap_fault.detail->any_info = &wsrl_UnableToSetTerminationTimeFaultType_info; |
| 2792 | 0 | xsd_QName_init(&soap_fault.detail->element); |
| 2793 | 0 | soap_fault.detail->element->local = "UnableToSetTerminationTimeFault"; |
| 2794 | 0 | soap_fault.detail->element->Namespace = |
| 2795 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"; | |
| 2796 | 0 | soap_fault.detail->value = fault; |
| 2797 | 0 | break; |
| 2798 | ||
| 2799 | default: | |
| 2800 | 0 | result = ResourcePropertiesTestServiceErrorReturnedUnknownFault("SetTerminationTime"); |
| 2801 | 0 | goto exit; |
| 2802 | } | |
| 2803 | ||
| 2804 | 0 | result = globus_service_session_serialize_fault_response( |
| 2805 | callback_handle->message, &soap_fault); | |
| 2806 | 0 | if(result != GLOBUS_SUCCESS) |
| 2807 | { | |
| 2808 | 0 | goto exit; |
| 2809 | } | |
| 2810 | ||
| 2811 | 0 | soap_fault.detail->element->local = NULL; |
| 2812 | 0 | soap_fault.detail->element->Namespace = NULL; |
| 2813 | 0 | soap_fault.detail->any_info = NULL; |
| 2814 | 0 | xsd_any_destroy(soap_fault.detail); |
| 2815 | ||
| 2816 | 0 | globus_soap_message_handle_set_attr( |
| 2817 | callback_handle->message, | |
| 2818 | WSADDR_ACTION_RESPONSE_KEY, | |
| 2819 | globus_soap_message_attr_copy_string, | |
| 2820 | globus_libc_free, | |
| 2821 | WSADDRESSING_FAULT_NS); | |
| 2822 | } | |
| 2823 | 0 | else if(result != GLOBUS_SUCCESS) |
| 2824 | { | |
| 2825 | 0 | globus_result_t local_result; |
| 2826 | 0 | local_result = globus_service_session_begin_response( |
| 2827 | callback_handle->message); | |
| 2828 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 2829 | { | |
| 2830 | 0 | result = local_result; |
| 2831 | 0 | goto exit; |
| 2832 | } | |
| 2833 | ||
| 2834 | 0 | soap_fault.faultcode = "Server"; |
| 2835 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 2836 | globus_error_get(result)); | |
| 2837 | 0 | result = GLOBUS_SUCCESS; |
| 2838 | 0 | soap_fault.faultactor = NULL; |
| 2839 | 0 | soap_fault.detail = NULL; |
| 2840 | 0 | result = globus_service_session_serialize_fault_response( |
| 2841 | callback_handle->message, &soap_fault); | |
| 2842 | 0 | if(result != GLOBUS_SUCCESS) |
| 2843 | { | |
| 2844 | 0 | goto exit; |
| 2845 | } | |
| 2846 | ||
| 2847 | 0 | globus_soap_message_handle_set_attr( |
| 2848 | callback_handle->message, | |
| 2849 | WSADDR_ACTION_RESPONSE_KEY, | |
| 2850 | globus_soap_message_attr_copy_string, | |
| 2851 | globus_libc_free, | |
| 2852 | WSADDRESSING_FAULT_NS); | |
| 2853 | } | |
| 2854 | else | |
| 2855 | { | |
| 2856 | 0 | result = globus_service_session_begin_response( |
| 2857 | callback_handle->message); | |
| 2858 | 0 | if(result != GLOBUS_SUCCESS) |
| 2859 | { | |
| 2860 | 0 | goto exit; |
| 2861 | } | |
| 2862 | ||
| 2863 | 0 | element_qname.local = "SetTerminationTimeResponse"; |
| 2864 | 0 | element_qname.Namespace = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"; |
| 2865 | ||
| 2866 | 0 | result = wsrl_SetTerminationTimeResponseType_serialize( |
| 2867 | &element_qname, | |
| 2868 | &SetTerminationTimeResponse, | |
| 2869 | callback_handle->message, | |
| 2870 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 2871 | 0 | if(result != GLOBUS_SUCCESS) |
| 2872 | { | |
| 2873 | 0 | goto exit; |
| 2874 | } | |
| 2875 | ||
| 2876 | 0 | result = globus_service_session_end_response( |
| 2877 | callback_handle->message); | |
| 2878 | 0 | if(result != GLOBUS_SUCCESS) |
| 2879 | { | |
| 2880 | 0 | goto exit; |
| 2881 | } | |
| 2882 | ||
| 2883 | 0 | wsrl_SetTerminationTimeResponseType_destroy_contents( |
| 2884 | &SetTerminationTimeResponse); | |
| 2885 | ||
| 2886 | 0 | globus_soap_message_handle_set_attr( |
| 2887 | callback_handle->message, | |
| 2888 | WSADDR_ACTION_RESPONSE_KEY, | |
| 2889 | globus_soap_message_attr_copy_string, | |
| 2890 | globus_libc_free, | |
| 2891 | "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/SetTerminationTimeResponse"); | |
| 2892 | } | |
| 2893 | ||
| 2894 | exit: | |
| 2895 | ||
| 2896 | 0 | callback_handle->callback( |
| 2897 | result, | |
| 2898 | callback_handle->args); | |
| 2899 | ||
| 2900 | 0 | globus_libc_free(callback_handle); |
| 2901 | ||
| 2902 | 0 | ResourcePropertiesTestServiceDebugExit(); |
| 2903 | } | |
| 2904 | ||
| 2905 | static | |
| 2906 | globus_result_t | |
| 2907 | SetTerminationTime_invoke( | |
| 2908 | globus_service_engine_t engine, | |
| 2909 | globus_soap_message_handle_t message, | |
| 2910 | globus_service_response_t * response, | |
| 2911 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 2912 | void * args) | |
| 2913 | 0 | { |
| 2914 | 0 | SetTerminationTime_callback_handle_t * callback_handle; |
| 2915 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 2916 | 0 | GlobusFuncName(ResourcePropertiesTestPortType_SetTerminationTime); |
| 2917 | 0 | ResourcePropertiesTestServiceDebugEnter(); |
| 2918 | ||
| 2919 | 0 | callback_handle = malloc(sizeof(SetTerminationTime_callback_handle_t)); |
| 2920 | 0 | if(!callback_handle) |
| 2921 | { | |
| 2922 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 2923 | 0 | goto exit; |
| 2924 | } | |
| 2925 | 0 | callback_handle->engine = engine; |
| 2926 | 0 | callback_handle->message = message; |
| 2927 | 0 | callback_handle->callback = invoke_callback; |
| 2928 | 0 | callback_handle->args = args; |
| 2929 | ||
| 2930 | 0 | result = globus_callback_register_oneshot( |
| 2931 | NULL, | |
| 2932 | &globus_i_reltime_zero, | |
| 2933 | SetTerminationTime_invoke_callback, | |
| 2934 | callback_handle); | |
| 2935 | ||
| 2936 | exit: | |
| 2937 | 0 | ResourcePropertiesTestServiceDebugExit(); |
| 2938 | 0 | return result; |
| 2939 | } | |
| 2940 | ||
| 2941 | ||
| 2942 | static | |
| 2943 | globus_result_t | |
| 2944 | SetTerminationTime_fault_to_type( | |
| 2945 | const char * fault_type_name, | |
| 2946 | int * fault_type, | |
| 2947 | globus_xsd_type_info_t * fault_type_info) | |
| 2948 | 0 | { |
| 2949 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 2950 | ||
| 2951 | 0 | *fault_type_info = NULL; |
| 2952 | ||
| 2953 | 0 | *fault_type = SetTerminationTime_lookup_fault_type(fault_type_name); |
| 2954 | ||
| 2955 | 0 | switch (*fault_type) |
| 2956 | { | |
| 2957 | case RESOURCEPROPERTIESTESTPORTTYPE_SETTERMINATIONTIME_TERMINATIONTIMECHANGEREJECTEDFAULT: | |
| 2958 | 0 | *fault_type_info = &wsrl_TerminationTimeChangeRejectedFaultType_info; |
| 2959 | 0 | break; |
| 2960 | ||
| 2961 | case RESOURCEPROPERTIESTESTPORTTYPE_SETTERMINATIONTIME_RESOURCEUNKNOWNFAULT: | |
| 2962 | 0 | *fault_type_info = &wsrl_ResourceUnknownFaultType_info; |
| 2963 | 0 | break; |
| 2964 | ||
| 2965 | case RESOURCEPROPERTIESTESTPORTTYPE_SETTERMINATIONTIME_UNABLETOSETTERMINATIONTIMEFAULT: | |
| 2966 | 0 | *fault_type_info = &wsrl_UnableToSetTerminationTimeFaultType_info; |
| 2967 | 0 | break; |
| 2968 | ||
| 2969 | default: | |
| 2970 | 0 | result = ResourcePropertiesTestServiceErrorReturnedUnknownFault("SetTerminationTime"); |
| 2971 | goto exit; | |
| 2972 | } | |
| 2973 | ||
| 2974 | exit: | |
| 2975 | 0 | return result; |
| 2976 | } | |
| 2977 | ||
| 2978 | ||
| 2979 | static | |
| 2980 | globus_service_operation_descriptor_t | |
| 2981 | SetTerminationTime_operation_descriptor = | |
| 2982 | { | |
| 2983 | SetTerminationTime_deserialize, | |
| 2984 | SetTerminationTime_invoke, | |
| 2985 | ||
| 2986 | SetTerminationTime_fault_to_type | |
| 2987 | ||
| 2988 | }; | |
| 2989 | ||
| 2990 | static | |
| 2991 | globus_operation_provider_descriptor_t SetTerminationTime_descriptor = | |
| 2992 | { | |
| 2993 | &ResourcePropertiesTestPortType_SetTerminationTime_op_qname, | |
| 2994 | "SetTerminationTime", | |
| 2995 | (void *)ResourcePropertiesTestPortType_SetTerminationTime_impl, | |
| 2996 | NULL | |
| 2997 | }; | |
| 2998 | ||
| 2999 | ||
| 3000 | xsd_QName ResourcePropertiesTestPortType_CreateResourcePropertiesTest_op_qname = | |
| 3001 | { | |
| 3002 | "http://localhost:8080/wsrf/services/ResourcePropertiesTestService" | |
| 3003 | "CreateResourcePropertiesTest" | |
| 3004 | }; | |
| 3005 | ||
| 3006 | xsd_QName ResourcePropertiesTestPortType_CreateResourcePropertiesTest_input_qname = | |
| 3007 | { | |
| 3008 | "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest", | |
| 3009 | "CreateResourcePropertiesTest" | |
| 3010 | }; | |
| 3011 | ||
| 3012 | typedef globus_result_t (* CreateResourcePropertiesTest_invoke_func_t) ( | |
| 3013 | globus_service_engine_t engine, | |
| 3014 | globus_soap_message_handle_t message, | |
| 3015 | globus_service_descriptor_t * descriptor, | |
| 3016 | rptest_CreateResourcePropertiesTestType * CreateResourcePropertiesTest, | |
| 3017 | rptest_CreateResourcePropertiesTestResponseType * CreateResourcePropertiesTestResponse, | |
| 3018 | const char ** fault_type_name, | |
| 3019 | void ** fault); | |
| 3020 | ||
| 3021 | typedef struct CreateResourcePropertiesTest_callback_handle_s | |
| 3022 | { | |
| 3023 | globus_service_engine_t engine; | |
| 3024 | globus_soap_message_handle_t message; | |
| 3025 | globus_operation_invoke_callback_func_t callback; | |
| 3026 | void * args; | |
| 3027 | } CreateResourcePropertiesTest_callback_handle_t; | |
| 3028 | ||
| 3029 | ||
| 3030 | const char * ResourcePropertiesTestPortType_CreateResourcePropertiesTest_fault_strings[RESOURCEPROPERTIESTESTPORTTYPE_CREATERESOURCEPROPERTIESTEST_UNKNOWN_FAULT] = | |
| 3031 | { | |
| 3032 | "Unknown" | |
| 3033 | ||
| 3034 | }; | |
| 3035 | ||
| 3036 | static | |
| 3037 | ResourcePropertiesTestPortType_CreateResourcePropertiesTest_fault_t | |
| 3038 | CreateResourcePropertiesTest_lookup_fault_type( | |
| 3039 | const char * fault_name) | |
| 3040 | 0 | { |
| 3041 | 0 | ResourcePropertiesTestPortType_CreateResourcePropertiesTest_fault_t fault_type; |
| 3042 | 0 | GlobusFuncName(CreateResourcePropertiesTest_lookup_fault_type); |
| 3043 | 0 | ResourcePropertiesTestServiceDebugEnter(); |
| 3044 | ||
| 3045 | 0 | globus_assert(fault_name); |
| 3046 | ||
| 3047 | ||
| 3048 | { | |
| 3049 | 0 | fault_type = RESOURCEPROPERTIESTESTPORTTYPE_CREATERESOURCEPROPERTIESTEST_UNKNOWN_FAULT; |
| 3050 | } | |
| 3051 | ||
| 3052 | 0 | ResourcePropertiesTestServiceDebugExit(); |
| 3053 | 0 | return fault_type; |
| 3054 | } | |
| 3055 | ||
| 3056 | ||
| 3057 | ||
| 3058 | static | |
| 3059 | void | |
| 3060 | CreateResourcePropertiesTest_deserialize_callback( | |
| 3061 | void * handle) | |
| 3062 | 40 | { |
| 3063 | 40 | CreateResourcePropertiesTest_callback_handle_t * callback_handle; |
| 3064 | 40 | globus_result_t result = GLOBUS_SUCCESS; |
| 3065 | 40 | struct globus_soap_message_fault_s soap_fault; |
| 3066 | 40 | CreateResourcePropertiesTest_invoke_func_t invoke_function; |
| 3067 | 40 | rptest_CreateResourcePropertiesTestType * CreateResourcePropertiesTest = NULL; |
| 3068 | 40 | GlobusFuncName(CreateResourcePropertiesTest_deserialize_callback); |
| 3069 | 40 | ResourcePropertiesTestServiceDebugEnter(); |
| 3070 | ||
| 3071 | 40 | callback_handle = (CreateResourcePropertiesTest_callback_handle_t *) handle; |
| 3072 | ||
| 3073 | 40 | result = globus_operation_table_get_operation( |
| 3074 | ResourcePropertiesTestService_descriptor.operations, | |
| 3075 | "CreateResourcePropertiesTest", | |
| 3076 | (void **)&invoke_function); | |
| 3077 | 40 | if(result != GLOBUS_SUCCESS) |
| 3078 | { | |
| 3079 | 0 | goto exit; |
| 3080 | } | |
| 3081 | ||
| 3082 | 40 | if(ResourcePropertiesTestService_descriptor.registry) |
| 3083 | { | |
| 3084 | 40 | globus_soap_message_handle_set_registry( |
| 3085 | callback_handle->message, | |
| 3086 | ResourcePropertiesTestService_descriptor.registry); | |
| 3087 | } | |
| 3088 | ||
| 3089 | 40 | result = rptest_CreateResourcePropertiesTestType_init( |
| 3090 | &CreateResourcePropertiesTest); | |
| 3091 | 40 | if(result != GLOBUS_SUCCESS) |
| 3092 | { | |
| 3093 | 0 | goto exit; |
| 3094 | } | |
| 3095 | ||
| 3096 | 40 | result = rptest_CreateResourcePropertiesTestType_deserialize( |
| 3097 | &ResourcePropertiesTestPortType_CreateResourcePropertiesTest_input_qname, | |
| 3098 | CreateResourcePropertiesTest, | |
| 3099 | callback_handle->message, | |
| 3100 | 0); | |
| 3101 | 40 | if(result != GLOBUS_SUCCESS) |
| 3102 | { | |
| 3103 | 0 | goto exit; |
| 3104 | } | |
| 3105 | ||
| 3106 | 40 | result = globus_soap_message_handle_set_attr( |
| 3107 | callback_handle->message, | |
| 3108 | "CreateResourcePropertiesTestOperationInputParameter", | |
| 3109 | rptest_CreateResourcePropertiesTestType_copy_wrapper, | |
| 3110 | rptest_CreateResourcePropertiesTestType_destroy_wrapper, | |
| 3111 | (void *)CreateResourcePropertiesTest); | |
| 3112 | 40 | if(result != GLOBUS_SUCCESS) |
| 3113 | { | |
| 3114 | 40 | goto exit; |
| 3115 | } | |
| 3116 | ||
| 3117 | exit: | |
| 3118 | ||
| 3119 | 40 | if (CreateResourcePropertiesTest != NULL) |
| 3120 | { | |
| 3121 | 40 | rptest_CreateResourcePropertiesTestType_destroy(CreateResourcePropertiesTest); |
| 3122 | } | |
| 3123 | 40 | callback_handle->callback( |
| 3124 | result, | |
| 3125 | callback_handle->args); | |
| 3126 | ||
| 3127 | 40 | free(callback_handle); |
| 3128 | 40 | ResourcePropertiesTestServiceDebugExit(); |
| 3129 | } | |
| 3130 | ||
| 3131 | static | |
| 3132 | globus_result_t | |
| 3133 | CreateResourcePropertiesTest_deserialize( | |
| 3134 | globus_service_engine_t engine, | |
| 3135 | globus_soap_message_handle_t message, | |
| 3136 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 3137 | void * args) | |
| 3138 | 40 | { |
| 3139 | 40 | CreateResourcePropertiesTest_callback_handle_t * callback_handle; |
| 3140 | 40 | globus_result_t result = GLOBUS_SUCCESS; |
| 3141 | 40 | GlobusFuncName(CreateResourcePropertiesTest_deserialize); |
| 3142 | 40 | ResourcePropertiesTestServiceDebugEnter(); |
| 3143 | ||
| 3144 | 40 | callback_handle = malloc(sizeof(CreateResourcePropertiesTest_callback_handle_t)); |
| 3145 | 40 | globus_assert_string(callback_handle, |
| 3146 | "Memory allocation failed " | |
| 3147 | "for CreateResourcePropertiesTest callback handle"); | |
| 3148 | ||
| 3149 | 40 | callback_handle->engine = engine; |
| 3150 | 40 | callback_handle->message = message; |
| 3151 | 40 | callback_handle->callback = invoke_callback; |
| 3152 | 40 | callback_handle->args = args; |
| 3153 | ||
| 3154 | 40 | result = globus_callback_register_oneshot( |
| 3155 | NULL, | |
| 3156 | &globus_i_reltime_zero, | |
| 3157 | CreateResourcePropertiesTest_deserialize_callback, | |
| 3158 | callback_handle); | |
| 3159 | ||
| 3160 | 40 | ResourcePropertiesTestServiceDebugExit(); |
| 3161 | 40 | return result; |
| 3162 | } | |
| 3163 | ||
| 3164 | static | |
| 3165 | void | |
| 3166 | CreateResourcePropertiesTest_invoke_callback( | |
| 3167 | void * handle) | |
| 3168 | 40 | { |
| 3169 | 40 | CreateResourcePropertiesTest_callback_handle_t * callback_handle; |
| 3170 | 40 | globus_result_t result = GLOBUS_SUCCESS; |
| 3171 | 40 | struct globus_soap_message_fault_s soap_fault; |
| 3172 | 40 | CreateResourcePropertiesTest_invoke_func_t invoke_function; |
| 3173 | 40 | rptest_CreateResourcePropertiesTestType * CreateResourcePropertiesTest; |
| 3174 | 40 | rptest_CreateResourcePropertiesTestResponseType CreateResourcePropertiesTestResponse; |
| 3175 | 40 | xsd_QName element_qname; |
| 3176 | 40 | const char * fault_type_name = NULL; |
| 3177 | 40 | ResourcePropertiesTestPortType_CreateResourcePropertiesTest_fault_t fault_type = RESOURCEPROPERTIESTESTPORTTYPE_CREATERESOURCEPROPERTIESTEST_NOFAULT; |
| 3178 | 40 | void * fault = NULL; |
| 3179 | ||
| 3180 | 40 | GlobusFuncName(CreateResourcePropertiesTest_invoke_callback); |
| 3181 | 40 | ResourcePropertiesTestServiceDebugEnter(); |
| 3182 | ||
| 3183 | 40 | callback_handle = (CreateResourcePropertiesTest_callback_handle_t *) handle; |
| 3184 | ||
| 3185 | 40 | CreateResourcePropertiesTest = globus_soap_message_handle_get_attr( |
| 3186 | callback_handle->message, | |
| 3187 | "CreateResourcePropertiesTestOperationInputParameter"); | |
| 3188 | 40 | globus_assert(CreateResourcePropertiesTest); |
| 3189 | ||
| 3190 | 40 | result = globus_operation_table_get_operation( |
| 3191 | ResourcePropertiesTestService_descriptor.operations, | |
| 3192 | "CreateResourcePropertiesTest", | |
| 3193 | (void **)&invoke_function); | |
| 3194 | 40 | if(result != GLOBUS_SUCCESS) |
| 3195 | { | |
| 3196 | 0 | goto fault_exit; |
| 3197 | } | |
| 3198 | ||
| 3199 | ||
| 3200 | 40 | result = rptest_CreateResourcePropertiesTestResponseType_init_contents( |
| 3201 | &CreateResourcePropertiesTestResponse); | |
| 3202 | 40 | if(result != GLOBUS_SUCCESS) |
| 3203 | { | |
| 3204 | 0 | goto fault_exit; |
| 3205 | } | |
| 3206 | ||
| 3207 | 40 | result = invoke_function( |
| 3208 | callback_handle->engine, | |
| 3209 | callback_handle->message, | |
| 3210 | &ResourcePropertiesTestService_descriptor, | |
| 3211 | CreateResourcePropertiesTest, | |
| 3212 | &CreateResourcePropertiesTestResponse, | |
| 3213 | &fault_type_name, | |
| 3214 | &fault); | |
| 3215 | ||
| 3216 | fault_exit: | |
| 3217 | ||
| 3218 | 40 | if(fault && fault_type_name) |
| 3219 | { | |
| 3220 | 0 | fault_type = CreateResourcePropertiesTest_lookup_fault_type(fault_type_name); |
| 3221 | ||
| 3222 | 0 | result = globus_service_session_begin_response( |
| 3223 | callback_handle->message); | |
| 3224 | 0 | if(result != GLOBUS_SUCCESS) |
| 3225 | { | |
| 3226 | 0 | goto exit; |
| 3227 | } | |
| 3228 | ||
| 3229 | 0 | soap_fault.faultcode = "Server"; |
| 3230 | 0 | soap_fault.faultstring = |
| 3231 | "An error occurred while processing the message"; | |
| 3232 | 0 | soap_fault.faultactor = NULL; |
| 3233 | ||
| 3234 | 0 | switch(fault_type) |
| 3235 | { | |
| 3236 | ||
| 3237 | default: | |
| 3238 | 0 | result = ResourcePropertiesTestServiceErrorReturnedUnknownFault("CreateResourcePropertiesTest"); |
| 3239 | 0 | goto exit; |
| 3240 | } | |
| 3241 | ||
| 3242 | 40 | result = globus_service_session_serialize_fault_response( |
| 3243 | callback_handle->message, &soap_fault); | |
| 3244 | 40 | if(result != GLOBUS_SUCCESS) |
| 3245 | { | |
| 3246 | 40 | goto exit; |
| 3247 | } | |
| 3248 | ||
| 3249 | 40 | soap_fault.detail->element->local = NULL; |
| 3250 | 40 | soap_fault.detail->element->Namespace = NULL; |
| 3251 | 40 | soap_fault.detail->any_info = NULL; |
| 3252 | 40 | xsd_any_destroy(soap_fault.detail); |
| 3253 | ||
| 3254 | 40 | globus_soap_message_handle_set_attr( |
| 3255 | callback_handle->message, | |
| 3256 | WSADDR_ACTION_RESPONSE_KEY, | |
| 3257 | globus_soap_message_attr_copy_string, | |
| 3258 | globus_libc_free, | |
| 3259 | WSADDRESSING_FAULT_NS); | |
| 3260 | } | |
| 3261 | 40 | else if(result != GLOBUS_SUCCESS) |
| 3262 | { | |
| 3263 | 0 | globus_result_t local_result; |
| 3264 | 0 | local_result = globus_service_session_begin_response( |
| 3265 | callback_handle->message); | |
| 3266 | 0 | if(local_result != GLOBUS_SUCCESS) |
| 3267 | { | |
| 3268 | 0 | result = local_result; |
| 3269 | 0 | goto exit; |
| 3270 | } | |
| 3271 | ||
| 3272 | 0 | soap_fault.faultcode = "Server"; |
| 3273 | 0 | soap_fault.faultstring = globus_error_print_friendly( |
| 3274 | globus_error_get(result)); | |
| 3275 | 0 | result = GLOBUS_SUCCESS; |
| 3276 | 0 | soap_fault.faultactor = NULL; |
| 3277 | 0 | soap_fault.detail = NULL; |
| 3278 | 0 | result = globus_service_session_serialize_fault_response( |
| 3279 | callback_handle->message, &soap_fault); | |
| 3280 | 0 | if(result != GLOBUS_SUCCESS) |
| 3281 | { | |
| 3282 | 0 | goto exit; |
| 3283 | } | |
| 3284 | ||
| 3285 | 0 | globus_soap_message_handle_set_attr( |
| 3286 | callback_handle->message, | |
| 3287 | WSADDR_ACTION_RESPONSE_KEY, | |
| 3288 | globus_soap_message_attr_copy_string, | |
| 3289 | globus_libc_free, | |
| 3290 | WSADDRESSING_FAULT_NS); | |
| 3291 | } | |
| 3292 | else | |
| 3293 | { | |
| 3294 | 40 | result = globus_service_session_begin_response( |
| 3295 | callback_handle->message); | |
| 3296 | 40 | if(result != GLOBUS_SUCCESS) |
| 3297 | { | |
| 3298 | 0 | goto exit; |
| 3299 | } | |
| 3300 | ||
| 3301 | 40 | element_qname.local = "CreateResourcePropertiesTestResponse"; |
| 3302 | 40 | element_qname.Namespace = "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest"; |
| 3303 | ||
| 3304 | 40 | result = rptest_CreateResourcePropertiesTestResponseType_serialize( |
| 3305 | &element_qname, | |
| 3306 | &CreateResourcePropertiesTestResponse, | |
| 3307 | callback_handle->message, | |
| 3308 | GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS); | |
| 3309 | 40 | if(result != GLOBUS_SUCCESS) |
| 3310 | { | |
| 3311 | 0 | goto exit; |
| 3312 | } | |
| 3313 | ||
| 3314 | 40 | result = globus_service_session_end_response( |
| 3315 | callback_handle->message); | |
| 3316 | 40 | if(result != GLOBUS_SUCCESS) |
| 3317 | { | |
| 3318 | 0 | goto exit; |
| 3319 | } | |
| 3320 | ||
| 3321 | 40 | rptest_CreateResourcePropertiesTestResponseType_destroy_contents( |
| 3322 | &CreateResourcePropertiesTestResponse); | |
| 3323 | ||
| 3324 | 40 | globus_soap_message_handle_set_attr( |
| 3325 | callback_handle->message, | |
| 3326 | WSADDR_ACTION_RESPONSE_KEY, | |
| 3327 | globus_soap_message_attr_copy_string, | |
| 3328 | globus_libc_free, | |
| 3329 | "http://www.globus.org/namespaces/2004/10/ResourcePropertiesTest/ResourcePropertiesTestPortType/CreateResourcePropertiesTestResponse"); | |
| 3330 | } | |
| 3331 | ||
| 3332 | exit: | |
| 3333 | ||
| 3334 | 40 | callback_handle->callback( |
| 3335 | result, | |
| 3336 | callback_handle->args); | |
| 3337 | ||
| 3338 | 40 | globus_libc_free(callback_handle); |
| 3339 | ||
| 3340 | 40 | ResourcePropertiesTestServiceDebugExit(); |
| 3341 | } | |
| 3342 | ||
| 3343 | static | |
| 3344 | globus_result_t | |
| 3345 | CreateResourcePropertiesTest_invoke( | |
| 3346 | globus_service_engine_t engine, | |
| 3347 | globus_soap_message_handle_t message, | |
| 3348 | globus_service_response_t * response, | |
| 3349 | globus_operation_invoke_callback_func_t invoke_callback, | |
| 3350 | void * args) | |
| 3351 | 40 | { |
| 3352 | 40 | CreateResourcePropertiesTest_callback_handle_t * callback_handle; |
| 3353 | 40 | globus_result_t result = GLOBUS_SUCCESS; |
| 3354 | 40 | GlobusFuncName(ResourcePropertiesTestPortType_CreateResourcePropertiesTest); |
| 3355 | 40 | ResourcePropertiesTestServiceDebugEnter(); |
| 3356 | ||
| 3357 | 40 | callback_handle = malloc(sizeof(CreateResourcePropertiesTest_callback_handle_t)); |
| 3358 | 40 | if(!callback_handle) |
| 3359 | { | |
| 3360 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 3361 | 0 | goto exit; |
| 3362 | } | |
| 3363 | 40 | callback_handle->engine = engine; |
| 3364 | 40 | callback_handle->message = message; |
| 3365 | 40 | callback_handle->callback = invoke_callback; |
| 3366 | 40 | callback_handle->args = args; |
| 3367 | ||
| 3368 | 40 | result = globus_callback_register_oneshot( |
| 3369 | NULL, | |
| 3370 | &globus_i_reltime_zero, | |
| 3371 | CreateResourcePropertiesTest_invoke_callback, | |
| 3372 | callback_handle); | |
| 3373 | ||
| 3374 | exit: | |
| 3375 | 40 | ResourcePropertiesTestServiceDebugExit(); |
| 3376 | 40 | return result; |
| 3377 | } | |
| 3378 | ||
| 3379 | ||
| 3380 | static | |
| 3381 | globus_result_t | |
| 3382 | CreateResourcePropertiesTest_fault_to_type( | |
| 3383 | const char * fault_type_name, | |
| 3384 | int * fault_type, | |
| 3385 | globus_xsd_type_info_t * fault_type_info) | |
| 3386 | 0 | { |
| 3387 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 3388 | ||
| 3389 | 0 | *fault_type_info = NULL; |
| 3390 | ||
| 3391 | 0 | *fault_type = CreateResourcePropertiesTest_lookup_fault_type(fault_type_name); |
| 3392 | ||
| 3393 | 0 | switch (*fault_type) |
| 3394 | { | |
| 3395 | default: | |
| 3396 | 0 | result = ResourcePropertiesTestServiceErrorReturnedUnknownFault("CreateResourcePropertiesTest"); |
| 3397 | 0 | goto exit; |
| 3398 | } | |
| 3399 | ||
| 3400 | exit: | |
| 3401 | 0 | return result; |
| 3402 | } | |
| 3403 | ||
| 3404 | ||
| 3405 | static | |
| 3406 | globus_service_operation_descriptor_t | |
| 3407 | CreateResourcePropertiesTest_operation_descriptor = | |
| 3408 | { | |
| 3409 | CreateResourcePropertiesTest_deserialize, | |
| 3410 | CreateResourcePropertiesTest_invoke, | |
| 3411 | ||
| 3412 | CreateResourcePropertiesTest_fault_to_type | |
| 3413 | ||
| 3414 | }; | |
| 3415 | ||
| 3416 | static | |
| 3417 | globus_operation_provider_descriptor_t CreateResourcePropertiesTest_descriptor = | |
| 3418 | { | |
| 3419 | &ResourcePropertiesTestPortType_CreateResourcePropertiesTest_op_qname, | |
| 3420 | "CreateResourcePropertiesTest", | |
| 3421 | (void *)ResourcePropertiesTestPortType_CreateResourcePropertiesTest_impl, | |
| 3422 | NULL | |
| 3423 | }; | |
| 3424 | ||
| 3425 | ||
| 3426 | ||
| 3427 | static xsd_QName ResourcePropertiesTestService_l_wsrp_GetResourceProperty_qname; | |
| 3428 | static xsd_QName ResourcePropertiesTestService_l_wsrp_GetMultipleResourceProperties_qname; | |
| 3429 | static xsd_QName ResourcePropertiesTestService_l_wsrp_SetResourceProperties_qname; | |
| 3430 | static xsd_QName ResourcePropertiesTestService_l_wsrp_QueryResourceProperties_qname; | |
| 3431 | static xsd_QName ResourcePropertiesTestService_l_wsrl_Destroy_qname; | |
| 3432 | static xsd_QName ResourcePropertiesTestService_l_wsrl_SetTerminationTime_qname; | |
| 3433 | static xsd_QName ResourcePropertiesTestService_l_wsnt_Subscribe_qname; | |
| 3434 | static xsd_QName ResourcePropertiesTestService_l_wsnt_GetCurrentMessage_qname; | |
| 3435 | ||
| 3436 | static | |
| 3437 | int | |
| 3438 | ResourcePropertiesTestService_activate() | |
| 3439 | 40 | { |
| 3440 | 40 | globus_result_t result = GLOBUS_SUCCESS; |
| 3441 | 40 | int rc = 0; |
| 3442 | 40 | GlobusFuncName(ResourcePropertiesTestService_activate); |
| 3443 | ||
| 3444 | 40 | rc = globus_module_activate(GLOBUS_COMMON_MODULE); |
| 3445 | 40 | if(rc != GLOBUS_SUCCESS) |
| 3446 | { | |
| 3447 | 0 | return rc; |
| 3448 | } | |
| 3449 | ||
| 3450 | 40 | GlobusDebugInit(RESOURCEPROPERTIESTESTSERVICE, INFO DEBUG TRACE WARN ERROR); |
| 3451 | ||
| 3452 | 40 | rc = globus_module_activate(GLOBUS_SOAP_MESSAGE_MODULE); |
| 3453 | 40 | if(rc != GLOBUS_SUCCESS) |
| 3454 | { | |
| 3455 | 0 | return rc; |
| 3456 | } | |
| 3457 | ||
| 3458 | 40 | ResourcePropertiesTestServiceDebugEnter(); |
| 3459 | ||
| 3460 | 40 | result = globus_module_activate(GLOBUS_WSRF_RESOURCE_MODULE); |
| 3461 | 40 | if (result != GLOBUS_SUCCESS) |
| 3462 | { | |
| 3463 | 0 | rc = (int) result; |
| 3464 | 0 | goto exit; |
| 3465 | } | |
| 3466 | ||
| 3467 | 40 | rc = globus_extension_activate( |
| 3468 | "globus_wsrp_GetResourceProperty_provider"); | |
| 3469 | 40 | if(rc != GLOBUS_SUCCESS) |
| 3470 | { | |
| 3471 | 0 | goto deactivate_resource_out; |
| 3472 | } | |
| 3473 | ||
| 3474 | 40 | rc = globus_extension_activate( |
| 3475 | "globus_wsrp_GetMultipleResourceProperties_provider"); | |
| 3476 | 40 | if (rc != GLOBUS_SUCCESS) |
| 3477 | { | |
| 3478 | 0 | goto deactivate_getrp; |
| 3479 | } | |
| 3480 | ||
| 3481 | 40 | rc = globus_extension_activate( |
| 3482 | "globus_wsrp_SetResourceProperties_provider"); | |
| 3483 | 40 | if (rc != GLOBUS_SUCCESS) |
| 3484 | { | |
| 3485 | 0 | goto deactivate_getmrp; |
| 3486 | } | |
| 3487 | ||
| 3488 | 40 | rc = globus_extension_activate( |
| 3489 | "globus_wsrp_QueryResourceProperties_provider"); | |
| 3490 | 40 | if (rc != GLOBUS_SUCCESS) |
| 3491 | { | |
| 3492 | 0 | goto deactivate_setrp; |
| 3493 | } | |
| 3494 | ||
| 3495 | 40 | rc = globus_extension_activate( |
| 3496 | "globus_wsrl_ImmediateResourceTermination_provider"); | |
| 3497 | 40 | if (rc != GLOBUS_SUCCESS) |
| 3498 | { | |
| 3499 | 0 | goto deactivate_queryrp; |
| 3500 | } | |
| 3501 | ||
| 3502 | 40 | rc = globus_extension_activate( |
| 3503 | "globus_wsrl_ScheduledResourceTermination_provider"); | |
| 3504 | 40 | if (rc != GLOBUS_SUCCESS) |
| 3505 | { | |
| 3506 | 0 | goto deactivate_irt; |
| 3507 | } | |
| 3508 | ||
| 3509 | 40 | rc = globus_extension_activate( |
| 3510 | "globus_wsnt_NotificationProducer_provider"); | |
| 3511 | 40 | if (rc != GLOBUS_SUCCESS) |
| 3512 | { | |
| 3513 | 0 | goto deactivate_srt; |
| 3514 | } | |
| 3515 | ||
| 3516 | 40 | if(GLOBUS_GLOBAL_TYPE_REGISTRY != NULL) |
| 3517 | { | |
| 3518 | 40 | result = ResourcePropertiesTestService_registry_add_types( |
| 3519 | GLOBUS_GLOBAL_TYPE_REGISTRY); | |
| 3520 | 40 | if(result != GLOBUS_SUCCESS) |
| 3521 | { | |
| 3522 | 0 | rc = (int) result; |
| 3523 | 0 | goto deactivate_nrt; |
| 3524 | } | |
| 3525 | } | |
| 3526 | ||
| 3527 | 40 | rc = globus_hashtable_init( |
| 3528 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 3529 | 10, | |
| 3530 | xsd_QName_hash, | |
| 3531 | xsd_QName_keyeq); | |
| 3532 | 40 | if(rc != GLOBUS_SUCCESS) |
| 3533 | { | |
| 3534 | 0 | goto clear_global_registry; |
| 3535 | } | |
| 3536 | ||
| 3537 | 40 | result = globus_xsd_type_registry_init( |
| 3538 | &ResourcePropertiesTestService_descriptor.registry); | |
| 3539 | 40 | if(result != GLOBUS_SUCCESS) |
| 3540 | { | |
| 3541 | 0 | rc = (int) result; |
| 3542 | 0 | goto destroy_op_mapper; |
| 3543 | } | |
| 3544 | ||
| 3545 | 40 | result = ResourcePropertiesTestService_registry_add_types( |
| 3546 | ResourcePropertiesTestService_descriptor.registry); | |
| 3547 | 40 | if(result != GLOBUS_SUCCESS) |
| 3548 | { | |
| 3549 | 0 | rc = (int) result; |
| 3550 | 0 | goto destroy_service_registry; |
| 3551 | } | |
| 3552 | ||
| 3553 | 40 | globus_mutex_init(&ResourcePropertiesTestService_descriptor.mutex, NULL); |
| 3554 | ||
| 3555 | 40 | rc = globus_hashtable_insert( |
| 3556 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 3557 | (void *)&ResourcePropertiesTestPortType_GetResourceProperty_input_qname, | |
| 3558 | (void *)&GetResourceProperty_operation_descriptor); | |
| 3559 | 40 | if(rc != GLOBUS_SUCCESS) |
| 3560 | { | |
| 3561 | 0 | goto remove_GetResourceProperty_op; |
| 3562 | } | |
| 3563 | ||
| 3564 | 40 | rc = globus_hashtable_insert( |
| 3565 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 3566 | (void *)&ResourcePropertiesTestPortType_GetMultipleResourceProperties_input_qname, | |
| 3567 | (void *)&GetMultipleResourceProperties_operation_descriptor); | |
| 3568 | 40 | if(rc != GLOBUS_SUCCESS) |
| 3569 | { | |
| 3570 | 0 | goto remove_GetMultipleResourceProperties_op; |
| 3571 | } | |
| 3572 | ||
| 3573 | 40 | rc = globus_hashtable_insert( |
| 3574 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 3575 | (void *)&ResourcePropertiesTestPortType_SetResourceProperties_input_qname, | |
| 3576 | (void *)&SetResourceProperties_operation_descriptor); | |
| 3577 | 40 | if(rc != GLOBUS_SUCCESS) |
| 3578 | { | |
| 3579 | 0 | goto remove_SetResourceProperties_op; |
| 3580 | } | |
| 3581 | ||
| 3582 | 40 | rc = globus_hashtable_insert( |
| 3583 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 3584 | (void *)&ResourcePropertiesTestPortType_QueryResourceProperties_input_qname, | |
| 3585 | (void *)&QueryResourceProperties_operation_descriptor); | |
| 3586 | 40 | if(rc != GLOBUS_SUCCESS) |
| 3587 | { | |
| 3588 | 0 | goto remove_QueryResourceProperties_op; |
| 3589 | } | |
| 3590 | ||
| 3591 | 40 | rc = globus_hashtable_insert( |
| 3592 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 3593 | (void *)&ResourcePropertiesTestPortType_Destroy_input_qname, | |
| 3594 | (void *)&Destroy_operation_descriptor); | |
| 3595 | 40 | if(rc != GLOBUS_SUCCESS) |
| 3596 | { | |
| 3597 | 0 | goto remove_Destroy_op; |
| 3598 | } | |
| 3599 | ||
| 3600 | 40 | rc = globus_hashtable_insert( |
| 3601 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 3602 | (void *)&ResourcePropertiesTestPortType_SetTerminationTime_input_qname, | |
| 3603 | (void *)&SetTerminationTime_operation_descriptor); | |
| 3604 | 40 | if(rc != GLOBUS_SUCCESS) |
| 3605 | { | |
| 3606 | 0 | goto remove_SetTerminationTime_op; |
| 3607 | } | |
| 3608 | ||
| 3609 | 40 | rc = globus_hashtable_insert( |
| 3610 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 3611 | (void *)&ResourcePropertiesTestPortType_CreateResourcePropertiesTest_input_qname, | |
| 3612 | (void *)&CreateResourcePropertiesTest_operation_descriptor); | |
| 3613 | 40 | if(rc != GLOBUS_SUCCESS) |
| 3614 | { | |
| 3615 | 0 | goto remove_CreateResourcePropertiesTest_op; |
| 3616 | } | |
| 3617 | ||
| 3618 | ||
| 3619 | 40 | result = globus_operation_table_init( |
| 3620 | &ResourcePropertiesTestService_descriptor.operations, | |
| 3621 | ResourcePropertiesTestService_service_qname.Namespace); | |
| 3622 | 40 | if(result != GLOBUS_SUCCESS) |
| 3623 | { | |
| 3624 | 0 | rc = (int) result; |
| 3625 | 0 | goto remove_all_ops; |
| 3626 | } | |
| 3627 | ||
| 3628 | ||
| 3629 | 40 | result = globus_extension_registry_add( |
| 3630 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3631 | (void *)&ResourcePropertiesTestPortType_GetResourceProperty_op_qname, | |
| 3632 | GlobusExtensionMyModule(ResourcePropertiesTestService), | |
| 3633 | (void *)&GetResourceProperty_descriptor); | |
| 3634 | 40 | if(result != GLOBUS_SUCCESS) |
| 3635 | { | |
| 3636 | 0 | rc = (int) result; |
| 3637 | 0 | goto remove_GetResourceProperty_op_provider; |
| 3638 | } | |
| 3639 | ||
| 3640 | 40 | result = globus_operation_table_add_default_provider( |
| 3641 | ResourcePropertiesTestService_descriptor.operations, | |
| 3642 | &ResourcePropertiesTestPortType_GetResourceProperty_op_qname, | |
| 3643 | &GetResourceProperty_descriptor); | |
| 3644 | 40 | if(result != GLOBUS_SUCCESS) |
| 3645 | { | |
| 3646 | 0 | rc = (int) result; |
| 3647 | 0 | goto remove_GetResourceProperty_op_provider; |
| 3648 | } | |
| 3649 | ||
| 3650 | 40 | result = globus_extension_registry_add( |
| 3651 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3652 | (void *)&ResourcePropertiesTestPortType_GetMultipleResourceProperties_op_qname, | |
| 3653 | GlobusExtensionMyModule(ResourcePropertiesTestService), | |
| 3654 | (void *)&GetMultipleResourceProperties_descriptor); | |
| 3655 | 40 | if(result != GLOBUS_SUCCESS) |
| 3656 | { | |
| 3657 | 0 | rc = (int) result; |
| 3658 | 0 | goto remove_GetMultipleResourceProperties_op_provider; |
| 3659 | } | |
| 3660 | ||
| 3661 | 40 | result = globus_operation_table_add_default_provider( |
| 3662 | ResourcePropertiesTestService_descriptor.operations, | |
| 3663 | &ResourcePropertiesTestPortType_GetMultipleResourceProperties_op_qname, | |
| 3664 | &GetMultipleResourceProperties_descriptor); | |
| 3665 | 40 | if(result != GLOBUS_SUCCESS) |
| 3666 | { | |
| 3667 | 0 | rc = (int) result; |
| 3668 | 0 | goto remove_GetMultipleResourceProperties_op_provider; |
| 3669 | } | |
| 3670 | ||
| 3671 | 40 | result = globus_extension_registry_add( |
| 3672 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3673 | (void *)&ResourcePropertiesTestPortType_SetResourceProperties_op_qname, | |
| 3674 | GlobusExtensionMyModule(ResourcePropertiesTestService), | |
| 3675 | (void *)&SetResourceProperties_descriptor); | |
| 3676 | 40 | if(result != GLOBUS_SUCCESS) |
| 3677 | { | |
| 3678 | 0 | rc = (int) result; |
| 3679 | 0 | goto remove_SetResourceProperties_op_provider; |
| 3680 | } | |
| 3681 | ||
| 3682 | 40 | result = globus_operation_table_add_default_provider( |
| 3683 | ResourcePropertiesTestService_descriptor.operations, | |
| 3684 | &ResourcePropertiesTestPortType_SetResourceProperties_op_qname, | |
| 3685 | &SetResourceProperties_descriptor); | |
| 3686 | 40 | if(result != GLOBUS_SUCCESS) |
| 3687 | { | |
| 3688 | 0 | rc = (int) result; |
| 3689 | 0 | goto remove_SetResourceProperties_op_provider; |
| 3690 | } | |
| 3691 | ||
| 3692 | 40 | result = globus_extension_registry_add( |
| 3693 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3694 | (void *)&ResourcePropertiesTestPortType_QueryResourceProperties_op_qname, | |
| 3695 | GlobusExtensionMyModule(ResourcePropertiesTestService), | |
| 3696 | (void *)&QueryResourceProperties_descriptor); | |
| 3697 | 40 | if(result != GLOBUS_SUCCESS) |
| 3698 | { | |
| 3699 | 0 | rc = (int) result; |
| 3700 | 0 | goto remove_QueryResourceProperties_op_provider; |
| 3701 | } | |
| 3702 | ||
| 3703 | 40 | result = globus_operation_table_add_default_provider( |
| 3704 | ResourcePropertiesTestService_descriptor.operations, | |
| 3705 | &ResourcePropertiesTestPortType_QueryResourceProperties_op_qname, | |
| 3706 | &QueryResourceProperties_descriptor); | |
| 3707 | 40 | if(result != GLOBUS_SUCCESS) |
| 3708 | { | |
| 3709 | 0 | rc = (int) result; |
| 3710 | 0 | goto remove_QueryResourceProperties_op_provider; |
| 3711 | } | |
| 3712 | ||
| 3713 | 40 | result = globus_extension_registry_add( |
| 3714 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3715 | (void *)&ResourcePropertiesTestPortType_Destroy_op_qname, | |
| 3716 | GlobusExtensionMyModule(ResourcePropertiesTestService), | |
| 3717 | (void *)&Destroy_descriptor); | |
| 3718 | 40 | if(result != GLOBUS_SUCCESS) |
| 3719 | { | |
| 3720 | 0 | rc = (int) result; |
| 3721 | 0 | goto remove_Destroy_op_provider; |
| 3722 | } | |
| 3723 | ||
| 3724 | 40 | result = globus_operation_table_add_default_provider( |
| 3725 | ResourcePropertiesTestService_descriptor.operations, | |
| 3726 | &ResourcePropertiesTestPortType_Destroy_op_qname, | |
| 3727 | &Destroy_descriptor); | |
| 3728 | 40 | if(result != GLOBUS_SUCCESS) |
| 3729 | { | |
| 3730 | 0 | rc = (int) result; |
| 3731 | 0 | goto remove_Destroy_op_provider; |
| 3732 | } | |
| 3733 | ||
| 3734 | 40 | result = globus_extension_registry_add( |
| 3735 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3736 | (void *)&ResourcePropertiesTestPortType_SetTerminationTime_op_qname, | |
| 3737 | GlobusExtensionMyModule(ResourcePropertiesTestService), | |
| 3738 | (void *)&SetTerminationTime_descriptor); | |
| 3739 | 40 | if(result != GLOBUS_SUCCESS) |
| 3740 | { | |
| 3741 | 0 | rc = (int) result; |
| 3742 | 0 | goto remove_SetTerminationTime_op_provider; |
| 3743 | } | |
| 3744 | ||
| 3745 | 40 | result = globus_operation_table_add_default_provider( |
| 3746 | ResourcePropertiesTestService_descriptor.operations, | |
| 3747 | &ResourcePropertiesTestPortType_SetTerminationTime_op_qname, | |
| 3748 | &SetTerminationTime_descriptor); | |
| 3749 | 40 | if(result != GLOBUS_SUCCESS) |
| 3750 | { | |
| 3751 | 0 | rc = (int) result; |
| 3752 | 0 | goto remove_SetTerminationTime_op_provider; |
| 3753 | } | |
| 3754 | ||
| 3755 | 40 | result = globus_extension_registry_add( |
| 3756 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3757 | (void *)&ResourcePropertiesTestPortType_CreateResourcePropertiesTest_op_qname, | |
| 3758 | GlobusExtensionMyModule(ResourcePropertiesTestService), | |
| 3759 | (void *)&CreateResourcePropertiesTest_descriptor); | |
| 3760 | 40 | if(result != GLOBUS_SUCCESS) |
| 3761 | { | |
| 3762 | 0 | rc = (int) result; |
| 3763 | 0 | goto remove_CreateResourcePropertiesTest_op_provider; |
| 3764 | } | |
| 3765 | ||
| 3766 | 40 | result = globus_operation_table_add_default_provider( |
| 3767 | ResourcePropertiesTestService_descriptor.operations, | |
| 3768 | &ResourcePropertiesTestPortType_CreateResourcePropertiesTest_op_qname, | |
| 3769 | &CreateResourcePropertiesTest_descriptor); | |
| 3770 | 40 | if(result != GLOBUS_SUCCESS) |
| 3771 | { | |
| 3772 | 0 | rc = (int) result; |
| 3773 | 0 | goto remove_CreateResourcePropertiesTest_op_provider; |
| 3774 | } | |
| 3775 | ||
| 3776 | 40 | result = globus_operation_table_add_provider( |
| 3777 | ResourcePropertiesTestService_descriptor.operations, | |
| 3778 | &ResourcePropertiesTestService_l_wsrp_GetResourceProperty_qname); | |
| 3779 | 40 | if (result != GLOBUS_SUCCESS) |
| 3780 | { | |
| 3781 | 0 | rc = (int) result; |
| 3782 | 0 | goto remove_op_providers; |
| 3783 | } | |
| 3784 | ||
| 3785 | 40 | result = globus_operation_table_add_provider( |
| 3786 | ResourcePropertiesTestService_descriptor.operations, | |
| 3787 | &ResourcePropertiesTestService_l_wsrp_GetMultipleResourceProperties_qname); | |
| 3788 | 40 | if (result != GLOBUS_SUCCESS) |
| 3789 | { | |
| 3790 | 0 | rc = (int) result; |
| 3791 | ||
| 3792 | 0 | goto remove_op_providers; |
| 3793 | } | |
| 3794 | ||
| 3795 | 40 | result = globus_operation_table_add_provider( |
| 3796 | ResourcePropertiesTestService_descriptor.operations, | |
| 3797 | &ResourcePropertiesTestService_l_wsrp_SetResourceProperties_qname); | |
| 3798 | 40 | if (result != GLOBUS_SUCCESS) |
| 3799 | { | |
| 3800 | 0 | rc = (int) result; |
| 3801 | ||
| 3802 | 0 | goto remove_op_providers; |
| 3803 | } | |
| 3804 | ||
| 3805 | 40 | result = globus_operation_table_add_provider( |
| 3806 | ResourcePropertiesTestService_descriptor.operations, | |
| 3807 | &ResourcePropertiesTestService_l_wsrp_QueryResourceProperties_qname); | |
| 3808 | 40 | if (result != GLOBUS_SUCCESS) |
| 3809 | { | |
| 3810 | 0 | rc = (int) result; |
| 3811 | ||
| 3812 | 0 | goto remove_op_providers; |
| 3813 | } | |
| 3814 | ||
| 3815 | 40 | result = globus_operation_table_add_provider( |
| 3816 | ResourcePropertiesTestService_descriptor.operations, | |
| 3817 | &ResourcePropertiesTestService_l_wsrl_Destroy_qname); | |
| 3818 | 40 | if (result != GLOBUS_SUCCESS) |
| 3819 | { | |
| 3820 | 0 | rc = (int) result; |
| 3821 | ||
| 3822 | 0 | goto remove_op_providers; |
| 3823 | } | |
| 3824 | ||
| 3825 | 40 | result = globus_operation_table_add_provider( |
| 3826 | ResourcePropertiesTestService_descriptor.operations, | |
| 3827 | &ResourcePropertiesTestService_l_wsrl_SetTerminationTime_qname); | |
| 3828 | 40 | if (result != GLOBUS_SUCCESS) |
| 3829 | { | |
| 3830 | 0 | rc = (int) result; |
| 3831 | ||
| 3832 | 0 | goto remove_op_providers; |
| 3833 | } | |
| 3834 | ||
| 3835 | 40 | result = globus_operation_table_add_provider( |
| 3836 | ResourcePropertiesTestService_descriptor.operations, | |
| 3837 | &ResourcePropertiesTestService_l_wsnt_Subscribe_qname); | |
| 3838 | 40 | if (result != GLOBUS_SUCCESS) |
| 3839 | { | |
| 3840 | 0 | rc = (int) result; |
| 3841 | ||
| 3842 | 0 | goto remove_op_providers; |
| 3843 | } | |
| 3844 | ||
| 3845 | 40 | result = globus_operation_table_add_provider( |
| 3846 | ResourcePropertiesTestService_descriptor.operations, | |
| 3847 | &ResourcePropertiesTestService_l_wsnt_GetCurrentMessage_qname); | |
| 3848 | 40 | if (result != GLOBUS_SUCCESS) |
| 3849 | { | |
| 3850 | 0 | rc = (int) result; |
| 3851 | ||
| 3852 | 0 | goto remove_op_providers; |
| 3853 | } | |
| 3854 | ||
| 3855 | 40 | rc = globus_extension_registry_add( |
| 3856 | GLOBUS_SERVICE_REGISTRY, | |
| 3857 | (void *)ResourcePropertiesTestService_descriptor.path, | |
| 3858 | GlobusExtensionMyModule(ResourcePropertiesTestService), | |
| 3859 | &ResourcePropertiesTestService_descriptor); | |
| 3860 | 40 | if(rc != GLOBUS_SUCCESS) |
| 3861 | { | |
| 3862 | 0 | goto remove_op_providers; |
| 3863 | } | |
| 3864 | ||
| 3865 | 40 | result = ResourcePropertiesTestService_init(&ResourcePropertiesTestService_descriptor); |
| 3866 | 40 | if(result != GLOBUS_SUCCESS) |
| 3867 | { | |
| 3868 | 0 | rc = (int) result; |
| 3869 | goto service_extension_remove; | |
| 3870 | } | |
| 3871 | ||
| 3872 | 0 | goto exit; |
| 3873 | ||
| 3874 | service_extension_remove: | |
| 3875 | 0 | globus_extension_registry_remove( |
| 3876 | GLOBUS_SERVICE_REGISTRY, | |
| 3877 | (void *)ResourcePropertiesTestService_descriptor.path); | |
| 3878 | remove_op_providers: | |
| 3879 | ||
| 3880 | 0 | globus_extension_registry_remove( |
| 3881 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3882 | (void *)&ResourcePropertiesTestPortType_GetResourceProperty_op_qname); | |
| 3883 | remove_GetResourceProperty_op_provider: | |
| 3884 | ||
| 3885 | 0 | globus_extension_registry_remove( |
| 3886 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3887 | (void *)&ResourcePropertiesTestPortType_GetMultipleResourceProperties_op_qname); | |
| 3888 | remove_GetMultipleResourceProperties_op_provider: | |
| 3889 | ||
| 3890 | 0 | globus_extension_registry_remove( |
| 3891 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3892 | (void *)&ResourcePropertiesTestPortType_SetResourceProperties_op_qname); | |
| 3893 | remove_SetResourceProperties_op_provider: | |
| 3894 | ||
| 3895 | 0 | globus_extension_registry_remove( |
| 3896 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3897 | (void *)&ResourcePropertiesTestPortType_QueryResourceProperties_op_qname); | |
| 3898 | remove_QueryResourceProperties_op_provider: | |
| 3899 | ||
| 3900 | 0 | globus_extension_registry_remove( |
| 3901 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3902 | (void *)&ResourcePropertiesTestPortType_Destroy_op_qname); | |
| 3903 | remove_Destroy_op_provider: | |
| 3904 | ||
| 3905 | 0 | globus_extension_registry_remove( |
| 3906 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3907 | (void *)&ResourcePropertiesTestPortType_SetTerminationTime_op_qname); | |
| 3908 | remove_SetTerminationTime_op_provider: | |
| 3909 | ||
| 3910 | 0 | globus_extension_registry_remove( |
| 3911 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 3912 | (void *)&ResourcePropertiesTestPortType_CreateResourcePropertiesTest_op_qname); | |
| 3913 | remove_CreateResourcePropertiesTest_op_provider: | |
| 3914 | ||
| 3915 | destroy_op_table: | |
| 3916 | 0 | globus_operation_table_destroy(ResourcePropertiesTestService_descriptor.operations); |
| 3917 | remove_all_ops: | |
| 3918 | ||
| 3919 | 0 | globus_hashtable_remove( |
| 3920 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 3921 | (void *)&ResourcePropertiesTestPortType_GetResourceProperty_input_qname); | |
| 3922 | remove_GetResourceProperty_op: | |
| 3923 | ||
| 3924 | 0 | globus_hashtable_remove( |
| 3925 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 3926 | (void *)&ResourcePropertiesTestPortType_GetMultipleResourceProperties_input_qname); | |
| 3927 | remove_GetMultipleResourceProperties_op: | |
| 3928 | ||
| 3929 | 0 | globus_hashtable_remove( |
| 3930 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 3931 | (void *)&ResourcePropertiesTestPortType_SetResourceProperties_input_qname); | |
| 3932 | remove_SetResourceProperties_op: | |
| 3933 | ||
| 3934 | 0 | globus_hashtable_remove( |
| 3935 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 3936 | (void *)&ResourcePropertiesTestPortType_QueryResourceProperties_input_qname); | |
| 3937 | remove_QueryResourceProperties_op: | |
| 3938 | ||
| 3939 | 0 | globus_hashtable_remove( |
| 3940 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 3941 | (void *)&ResourcePropertiesTestPortType_Destroy_input_qname); | |
| 3942 | remove_Destroy_op: | |
| 3943 | ||
| 3944 | 0 | globus_hashtable_remove( |
| 3945 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 3946 | (void *)&ResourcePropertiesTestPortType_SetTerminationTime_input_qname); | |
| 3947 | remove_SetTerminationTime_op: | |
| 3948 | ||
| 3949 | 0 | globus_hashtable_remove( |
| 3950 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 3951 | (void *)&ResourcePropertiesTestPortType_CreateResourcePropertiesTest_input_qname); | |
| 3952 | remove_CreateResourcePropertiesTest_op: | |
| 3953 | ||
| 3954 | destroy_mutex: | |
| 3955 | 0 | globus_mutex_destroy(&ResourcePropertiesTestService_descriptor.mutex); |
| 3956 | clear_service_registry: | |
| 3957 | 0 | ResourcePropertiesTestService_registry_remove_types( |
| 3958 | ResourcePropertiesTestService_descriptor.registry); | |
| 3959 | destroy_service_registry: | |
| 3960 | 0 | globus_xsd_type_registry_destroy(ResourcePropertiesTestService_descriptor.registry); |
| 3961 | destroy_op_mapper: | |
| 3962 | 0 | globus_hashtable_destroy(&ResourcePropertiesTestService_descriptor.op_mapper); |
| 3963 | clear_global_registry: | |
| 3964 | 0 | if(GLOBUS_GLOBAL_TYPE_REGISTRY != NULL) |
| 3965 | { | |
| 3966 | 0 | ResourcePropertiesTestService_registry_remove_types( |
| 3967 | GLOBUS_GLOBAL_TYPE_REGISTRY); | |
| 3968 | } | |
| 3969 | deactivate_nrt: | |
| 3970 | 0 | globus_extension_deactivate( |
| 3971 | "globus_wsnt_NotificationProducer_provider"); | |
| 3972 | deactivate_srt: | |
| 3973 | 0 | globus_extension_deactivate( |
| 3974 | "globus_wsrl_ScheduledResourceTermination_provider"); | |
| 3975 | deactivate_irt: | |
| 3976 | 0 | globus_extension_deactivate( |
| 3977 | "globus_wsrl_ImmediateResourceTermination_provider"); | |
| 3978 | deactivate_queryrp: | |
| 3979 | 0 | globus_extension_deactivate( |
| 3980 | "globus_wsrp_QueryResourceProperties_provider"); | |
| 3981 | deactivate_setrp: | |
| 3982 | 0 | globus_extension_deactivate("globus_wsrp_SetResourceProperties_provider"); |
| 3983 | deactivate_getmrp: | |
| 3984 | 0 | globus_extension_deactivate("globus_wsrp_GetMultipleResourceProperties_provider"); |
| 3985 | deactivate_getrp: | |
| 3986 | 0 | globus_extension_deactivate("globus_wsrp_GetResourceProperty_provider"); |
| 3987 | deactivate_resource_out: | |
| 3988 | 0 | globus_module_deactivate(GLOBUS_WSRF_RESOURCE_MODULE); |
| 3989 | ||
| 3990 | exit: | |
| 3991 | 40 | ResourcePropertiesTestServiceDebugExit(); |
| 3992 | 40 | return rc; |
| 3993 | } | |
| 3994 | ||
| 3995 | static | |
| 3996 | int | |
| 3997 | ResourcePropertiesTestService_deactivate() | |
| 3998 | 0 | { |
| 3999 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 4000 | 0 | int rc = 0; |
| 4001 | ||
| 4002 | 0 | result = ResourcePropertiesTestService_finalize(&ResourcePropertiesTestService_descriptor); |
| 4003 | 0 | if(result != GLOBUS_SUCCESS) |
| 4004 | { | |
| 4005 | 0 | return GLOBUS_FAILURE; |
| 4006 | } | |
| 4007 | ||
| 4008 | 0 | globus_extension_registry_remove( |
| 4009 | GLOBUS_SERVICE_REGISTRY, | |
| 4010 | (void *)ResourcePropertiesTestService_descriptor.path); | |
| 4011 | ||
| 4012 | 0 | globus_extension_registry_remove( |
| 4013 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4014 | (void *)&ResourcePropertiesTestPortType_GetResourceProperty_op_qname); | |
| 4015 | ||
| 4016 | 0 | globus_extension_registry_remove( |
| 4017 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4018 | (void *)&ResourcePropertiesTestPortType_GetMultipleResourceProperties_op_qname); | |
| 4019 | ||
| 4020 | 0 | globus_extension_registry_remove( |
| 4021 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4022 | (void *)&ResourcePropertiesTestPortType_SetResourceProperties_op_qname); | |
| 4023 | ||
| 4024 | 0 | globus_extension_registry_remove( |
| 4025 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4026 | (void *)&ResourcePropertiesTestPortType_QueryResourceProperties_op_qname); | |
| 4027 | ||
| 4028 | 0 | globus_extension_registry_remove( |
| 4029 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4030 | (void *)&ResourcePropertiesTestPortType_Destroy_op_qname); | |
| 4031 | ||
| 4032 | 0 | globus_extension_registry_remove( |
| 4033 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4034 | (void *)&ResourcePropertiesTestPortType_SetTerminationTime_op_qname); | |
| 4035 | ||
| 4036 | 0 | globus_extension_registry_remove( |
| 4037 | GLOBUS_OPERATION_PROVIDER_REGISTRY, | |
| 4038 | (void *)&ResourcePropertiesTestPortType_CreateResourcePropertiesTest_op_qname); | |
| 4039 | ||
| 4040 | 0 | globus_operation_table_destroy(ResourcePropertiesTestService_descriptor.operations); |
| 4041 | ||
| 4042 | ||
| 4043 | 0 | globus_hashtable_remove( |
| 4044 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 4045 | (void *)&ResourcePropertiesTestPortType_GetResourceProperty_input_qname); | |
| 4046 | ||
| 4047 | 0 | globus_hashtable_remove( |
| 4048 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 4049 | (void *)&ResourcePropertiesTestPortType_GetMultipleResourceProperties_input_qname); | |
| 4050 | ||
| 4051 | 0 | globus_hashtable_remove( |
| 4052 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 4053 | (void *)&ResourcePropertiesTestPortType_SetResourceProperties_input_qname); | |
| 4054 | ||
| 4055 | 0 | globus_hashtable_remove( |
| 4056 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 4057 | (void *)&ResourcePropertiesTestPortType_QueryResourceProperties_input_qname); | |
| 4058 | ||
| 4059 | 0 | globus_hashtable_remove( |
| 4060 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 4061 | (void *)&ResourcePropertiesTestPortType_Destroy_input_qname); | |
| 4062 | ||
| 4063 | 0 | globus_hashtable_remove( |
| 4064 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 4065 | (void *)&ResourcePropertiesTestPortType_SetTerminationTime_input_qname); | |
| 4066 | ||
| 4067 | 0 | globus_hashtable_remove( |
| 4068 | &ResourcePropertiesTestService_descriptor.op_mapper, | |
| 4069 | (void *)&ResourcePropertiesTestPortType_CreateResourcePropertiesTest_input_qname); | |
| 4070 | ||
| 4071 | ||
| 4072 | 0 | globus_mutex_destroy(&ResourcePropertiesTestService_descriptor.mutex); |
| 4073 | ||
| 4074 | 0 | ResourcePropertiesTestService_registry_remove_types( |
| 4075 | ResourcePropertiesTestService_descriptor.registry); | |
| 4076 | ||
| 4077 | 0 | globus_xsd_type_registry_destroy(ResourcePropertiesTestService_descriptor.registry); |
| 4078 | ||
| 4079 | 0 | globus_hashtable_destroy(&ResourcePropertiesTestService_descriptor.op_mapper); |
| 4080 | ||
| 4081 | 0 | if(GLOBUS_GLOBAL_TYPE_REGISTRY != NULL) |
| 4082 | { | |
| 4083 | 0 | ResourcePropertiesTestService_registry_remove_types( |
| 4084 | GLOBUS_GLOBAL_TYPE_REGISTRY); | |
| 4085 | } | |
| 4086 | ||
| 4087 | 0 | globus_extension_deactivate( |
| 4088 | "globus_wsnt_NotificationProducer_provider"); | |
| 4089 | 0 | globus_extension_deactivate( |
| 4090 | "globus_wsrl_ScheduledResourceTermination_provider"); | |
| 4091 | 0 | globus_extension_deactivate( |
| 4092 | "globus_wsrl_ImmediateResourceTermination_provider"); | |
| 4093 | 0 | globus_extension_deactivate( |
| 4094 | "globus_wsrp_QueryResourceProperties_provider"); | |
| 4095 | 0 | globus_extension_deactivate("globus_wsrp_SetResourceProperties_provider"); |
| 4096 | 0 | globus_extension_deactivate( |
| 4097 | "globus_wsrp_GetMultipleResourceProperties_provider"); | |
| 4098 | 0 | globus_extension_deactivate("globus_wsrp_GetResourceProperty_provider"); |
| 4099 | 0 | globus_module_deactivate(GLOBUS_WSRF_RESOURCE_MODULE); |
| 4100 | ||
| 4101 | 0 | rc = globus_module_deactivate(GLOBUS_SOAP_MESSAGE_MODULE); |
| 4102 | 0 | if(rc != GLOBUS_SUCCESS) |
| 4103 | { | |
| 4104 | 0 | return rc; |
| 4105 | } | |
| 4106 | ||
| 4107 | 0 | GlobusDebugDestroy(RESOURCEPROPERTIESTESTSERVICE); |
| 4108 | ||
| 4109 | 0 | rc = globus_module_deactivate(GLOBUS_COMMON_MODULE); |
| 4110 | 0 | if(rc != GLOBUS_SUCCESS) |
| 4111 | { | |
| 4112 | 0 | return rc; |
| 4113 | } | |
| 4114 | ||
| 4115 | 0 | return rc; |
| 4116 | } | |
| 4117 | ||
| 4118 | #define WSRP_NS "http://www.globus.org/docs.oasis-open.org" \ | |
| 4119 | "/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl" | |
| 4120 | ||
| 4121 | static xsd_QName ResourcePropertiesTestService_l_wsrp_GetResourceProperty_qname = | |
| 4122 | { | |
| 4123 | WSRP_NS, | |
| 4124 | "GetResourceProperty" | |
| 4125 | }; | |
| 4126 | ||
| 4127 | static xsd_QName ResourcePropertiesTestService_l_wsrp_GetMultipleResourceProperties_qname = | |
| 4128 | { | |
| 4129 | WSRP_NS, | |
| 4130 | "GetMultipleResourceProperties" | |
| 4131 | }; | |
| 4132 | ||
| 4133 | static xsd_QName ResourcePropertiesTestService_l_wsrp_SetResourceProperties_qname = | |
| 4134 | { | |
| 4135 | WSRP_NS, | |
| 4136 | "SetResourceProperties" | |
| 4137 | }; | |
| 4138 | ||
| 4139 | static xsd_QName ResourcePropertiesTestService_l_wsrp_QueryResourceProperties_qname = | |
| 4140 | { | |
| 4141 | WSRP_NS, | |
| 4142 | "QueryResourceProperties" | |
| 4143 | }; | |
| 4144 | ||
| 4145 | static xsd_QName ResourcePropertiesTestService_l_wsrl_Destroy_qname = | |
| 4146 | { | |
| 4147 | "http://www.globus.org/docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl", | |
| 4148 | "Destroy" | |
| 4149 | }; | |
| 4150 | ||
| 4151 | static xsd_QName ResourcePropertiesTestService_l_wsrl_SetTerminationTime_qname = | |
| 4152 | { | |
| 4153 | "http://www.globus.org/docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl", | |
| 4154 | "SetTerminationTime" | |
| 4155 | }; | |
| 4156 | ||
| 4157 | static xsd_QName ResourcePropertiesTestService_l_wsnt_Subscribe_qname = | |
| 4158 | { | |
| 4159 | "http://www.globus.org/docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl", | |
| 4160 | "Subscribe" | |
| 4161 | }; | |
| 4162 | ||
| 4163 | static xsd_QName ResourcePropertiesTestService_l_wsnt_GetCurrentMessage_qname = | |
| 4164 | { | |
| 4165 | "http://www.globus.org/docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl", | |
| 4166 | "GetCurrentMessage" |