| 1 | /* | |
| 2 | * Copyright 1999-2006 University of Chicago | |
| 3 | * | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | * See the License for the specific language governing permissions and | |
| 14 | * limitations under the License. | |
| 15 | */ | |
| 16 | ||
| 17 | ||
| 18 | /* | |
| 19 | * This file is automatically generated by the Globus WSDLtoC converter | |
| 20 | */ | |
| 21 | ||
| 22 | #include "globus_soap_message.h" | |
| 23 | #include "globus_handler.h" | |
| 24 | #include "globus_xio.h" | |
| 25 | #include "NotificationConsumerFactoryService_client.h" | |
| 26 | #include "globus_xsd_type_registry.h" | |
| 27 | #include "globus_soap_message_fault.h" | |
| 28 | #include "globus_soap_message_attrs.h" | |
| 29 | #include "globus_soap_message_markers.h" | |
| 30 | #include "globus_ws_addressing.h" | |
| 31 | ||
| 32 | static globus_list_t * NotificationConsumerFactoryService_l_extensions = NULL; | |
| 33 | static globus_mutex_t NotificationConsumerFactoryService_l_extensions_mutex; | |
| 34 | ||
| 35 | static | |
| 36 | int | |
| 37 | NotificationConsumerFactoryService_l_client_module_activate(); | |
| 38 | ||
| 39 | static | |
| 40 | int | |
| 41 | NotificationConsumerFactoryService_l_client_module_deactivate(); | |
| 42 | ||
| 43 | globus_module_descriptor_t | |
| 44 | NotificationConsumerFactoryService_i_module = | |
| 45 | { | |
| 46 | "NotificationConsumerFactoryService", | |
| 47 | NotificationConsumerFactoryService_l_client_module_activate, | |
| 48 | NotificationConsumerFactoryService_l_client_module_deactivate | |
| 49 | }; | |
| 50 | ||
| 51 | ||
| 52 | static | |
| 53 | void | |
| 54 | NotificationConsumerFactory_l_createNotificationConsumer_deserialize_fault( | |
| 55 | globus_soap_message_handle_t handle, | |
| 56 | const xsd_QName * fault_qname, | |
| 57 | int * fault_type); | |
| 58 | ||
| 59 | ||
| 60 | static | |
| 61 | globus_soap_client_operation_t NotificationConsumerFactory_l_createNotificationConsumer_operation = | |
| 62 | { | |
| 63 | { "http://wsrf.globus.org/core/tests/interop", "createNotificationConsumer" } , | |
| 64 | &createNotificationConsumerType_info, | |
| 65 | ||
| 66 | { "http://wsrf.globus.org/core/tests/interop", "createNotificationConsumerResponse" }, | |
| 67 | &wsa_EndpointReferenceType_info, | |
| 68 | ||
| 69 | "http://wsrf.globus.org/core/tests/interop/NotificationConsumerFactory/createNotificationConsumerRequest", | |
| 70 | ||
| 71 | "http://wsrf.globus.org/core/tests/interop/NotificationConsumerFactory/createNotificationConsumerResponse", | |
| 72 | ||
| 73 | ||
| 74 | NotificationConsumerFactory_l_createNotificationConsumer_deserialize_fault | |
| 75 | ||
| 76 | }; | |
| 77 | ||
| 78 | ||
| 79 | static | |
| 80 | int | |
| 81 | NotificationConsumerFactoryService_l_client_module_activate() | |
| 82 | 0 | { |
| 83 | 0 | int res = 0; |
| 84 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 85 | 0 | res = globus_module_activate(GLOBUS_SOAP_MESSAGE_MODULE); |
| 86 | 0 | if(res != GLOBUS_SUCCESS) |
| 87 | { | |
| 88 | 0 | return res; |
| 89 | } | |
| 90 | ||
| 91 | 0 | result = NotificationConsumerFactoryService_registry_add_types(GLOBUS_GLOBAL_TYPE_REGISTRY); |
| 92 | 0 | if(result != GLOBUS_SUCCESS) |
| 93 | { | |
| 94 | 0 | result = GlobusSoapMessageErrorFailedClientInit( |
| 95 | result, "NotificationConsumerFactoryService"); | |
| 96 | } | |
| 97 | ||
| 98 | ||
| 99 | 0 | globus_mutex_init(&NotificationConsumerFactoryService_l_extensions_mutex, NULL); |
| 100 | ||
| 101 | 0 | return res; |
| 102 | } | |
| 103 | ||
| 104 | static | |
| 105 | void | |
| 106 | NotificationConsumerFactoryService_l_extension_destroy( | |
| 107 | void * sym) | |
| 108 | 0 | { |
| 109 | 0 | char * symbol = (char *) sym; |
| 110 | ||
| 111 | 0 | globus_extension_deactivate(symbol); |
| 112 | 0 | globus_free(symbol); |
| 113 | 0 | } |
| 114 | ||
| 115 | static | |
| 116 | int | |
| 117 | NotificationConsumerFactoryService_l_client_module_deactivate() | |
| 118 | 0 | { |
| 119 | 0 | int res = 0; |
| 120 | ||
| 121 | 0 | globus_module_deactivate(GLOBUS_SOAP_MESSAGE_MODULE); |
| 122 | ||
| 123 | 0 | globus_mutex_lock(&NotificationConsumerFactoryService_l_extensions_mutex); |
| 124 | 0 | globus_list_destroy_all( |
| 125 | NotificationConsumerFactoryService_l_extensions, | |
| 126 | NotificationConsumerFactoryService_l_extension_destroy); | |
| 127 | 0 | NotificationConsumerFactoryService_l_extensions = NULL; |
| 128 | 0 | globus_mutex_unlock(&NotificationConsumerFactoryService_l_extensions_mutex); |
| 129 | 0 | globus_mutex_destroy(&NotificationConsumerFactoryService_l_extensions_mutex); |
| 130 | ||
| 131 | 0 | return res; |
| 132 | } | |
| 133 | ||
| 134 | /** | |
| 135 | * Initialize a client handle | |
| 136 | * @ingroup NotificationConsumerFactoryService_client_handle | |
| 137 | * Initialize new client handle state for use with operation-related functions. | |
| 138 | * | |
| 139 | * @param handle | |
| 140 | * Pointer to the handle to initialize. | |
| 141 | * @param attrs | |
| 142 | * Default attributes to use with this handle. This parameter may be NULL. | |
| 143 | * Certain atttributes may cause different handlers to be pushed onto the | |
| 144 | * default handler chain for this client. | |
| 145 | * @param handlers | |
| 146 | * Handle chain to use with this handle. This parameter may be NULL. | |
| 147 | * Typically the default handler chain used by this function is sufficient. | |
| 148 | */ | |
| 149 | globus_result_t | |
| 150 | NotificationConsumerFactoryService_client_init( | |
| 151 | NotificationConsumerFactoryService_client_handle_t * handle, | |
| 152 | globus_soap_message_attr_t attrs, | |
| 153 | globus_handler_chain_t chain) | |
| 154 | 0 | { |
| 155 | 0 | NotificationConsumerFactoryService_client_handle_t client_handle = NULL; |
| 156 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 157 | 0 | globus_handler_chain_t tmp_chain = NULL; |
| 158 | GlobusFuncName(NotificationConsumerFactoryService_client_init); | |
| 159 | 0 | GlobusSoapMessageDebugEnter(); |
| 160 | ||
| 161 | 0 | if (chain == NULL) |
| 162 | { | |
| 163 | 0 | globus_handler_chain_init(&tmp_chain); |
| 164 | ||
| 165 | 0 | if(attrs && |
| 166 | ((int)globus_soap_message_attr_get( | |
| 167 | attrs, | |
| 168 | GLOBUS_SOAP_MESSAGE_AUTHENTICATION_METHOD_KEY)) == | |
| 169 | GLOBUS_SOAP_MESSAGE_AUTH_SECURE_MESSAGE) | |
| 170 | { | |
| 171 | 0 | result = globus_extension_activate( |
| 172 | "globus_handler_ws_secure_message"); | |
| 173 | 0 | if(result != GLOBUS_SUCCESS) |
| 174 | { | |
| 175 | 0 | result = GlobusSoapMessageErrorFailedClientInit( |
| 176 | result, "NotificationConsumerFactory_createNotificationConsumer"); | |
| 177 | 0 | goto error; |
| 178 | } | |
| 179 | ||
| 180 | 0 | globus_mutex_lock(&NotificationConsumerFactoryService_l_extensions_mutex); |
| 181 | 0 | globus_list_insert( |
| 182 | &NotificationConsumerFactoryService_l_extensions, | |
| 183 | strdup("globus_handler_ws_secure_message")); | |
| 184 | 0 | globus_mutex_unlock(&NotificationConsumerFactoryService_l_extensions_mutex); |
| 185 | ||
| 186 | 0 | result = globus_handler_chain_push( |
| 187 | tmp_chain, | |
| 188 | GLOBUS_HANDLER_TYPE_ALL, | |
| 189 | "globus_handler_ws_secure_message_client"); | |
| 190 | 0 | if(result != GLOBUS_SUCCESS) |
| 191 | { | |
| 192 | 0 | result = GlobusSoapMessageErrorFailedClientInit( |
| 193 | result, "NotificationConsumerFactory_createNotificationConsumer"); | |
| 194 | 0 | goto error; |
| 195 | } | |
| 196 | } | |
| 197 | ||
| 198 | 0 | result = globus_extension_activate(GLOBUS_HANDLER_WS_ADDRESSING_LIB); |
| 199 | 0 | if(result != GLOBUS_SUCCESS) |
| 200 | { | |
| 201 | 0 | result = GlobusSoapMessageErrorFailedClientInit( |
| 202 | result, "NotificationConsumerFactory_createNotificationConsumer"); | |
| 203 | 0 | goto error; |
| 204 | } | |
| 205 | ||
| 206 | 0 | globus_mutex_lock(&NotificationConsumerFactoryService_l_extensions_mutex); |
| 207 | 0 | globus_list_insert( |
| 208 | &NotificationConsumerFactoryService_l_extensions, | |
| 209 | strdup(GLOBUS_HANDLER_WS_ADDRESSING_LIB)); | |
| 210 | 0 | globus_mutex_unlock(&NotificationConsumerFactoryService_l_extensions_mutex); |
| 211 | ||
| 212 | 0 | result = globus_handler_chain_push( |
| 213 | tmp_chain, | |
| 214 | GLOBUS_HANDLER_TYPE_REQUEST_ALL, | |
| 215 | GLOBUS_HANDLER_WS_ADDRESSING_CLIENT); | |
| 216 | 0 | if(result != GLOBUS_SUCCESS) |
| 217 | { | |
| 218 | 0 | result = GlobusSoapMessageErrorFailedClientInit( |
| 219 | result, "NotificationConsumerFactory_createNotificationConsumer"); | |
| 220 | 0 | goto error; |
| 221 | } | |
| 222 | ||
| 223 | 0 | result = globus_handler_chain_push( |
| 224 | tmp_chain, | |
| 225 | GLOBUS_HANDLER_TYPE_RESPONSE_ALL, | |
| 226 | GLOBUS_HANDLER_WS_ADDRESSING_CLIENT); | |
| 227 | 0 | if(result != GLOBUS_SUCCESS) |
| 228 | { | |
| 229 | 0 | result = GlobusSoapMessageErrorFailedClientInit( |
| 230 | result, "NotificationConsumerFactory_createNotificationConsumer"); | |
| 231 | 0 | goto error; |
| 232 | } | |
| 233 | ||
| 234 | 0 | chain = tmp_chain; |
| 235 | } | |
| 236 | ||
| 237 | 0 | result = globus_soap_client_handle_init( |
| 238 | handle, | |
| 239 | attrs, | |
| 240 | chain); | |
| 241 | ||
| 242 | 0 | GlobusSoapMessageDebugExit(); |
| 243 | 0 | return result; |
| 244 | ||
| 245 | 0 | error: |
| 246 | 0 | if (tmp_chain != NULL) |
| 247 | { | |
| 248 | 0 | globus_handler_chain_destroy(tmp_chain); |
| 249 | } | |
| 250 | 0 | if (client_handle != NULL) |
| 251 | { | |
| 252 | 0 | globus_free(client_handle); |
| 253 | } | |
| 254 | 0 | GlobusSoapMessageDebugExit(); |
| 255 | 0 | return result; |
| 256 | } | |
| 257 | /* NotificationConsumerFactoryService_client_init() */ | |
| 258 | ||
| 259 | /** | |
| 260 | * Destroy a client handle | |
| 261 | * @ingroup NotificationConsumerFactoryService_client_handle | |
| 262 | * | |
| 263 | * Destroys the state associated with this client handle. | |
| 264 | * | |
| 265 | * @param handle | |
| 266 | * Handle to destroy. | |
| 267 | */ | |
| 268 | void | |
| 269 | NotificationConsumerFactoryService_client_destroy( | |
| 270 | NotificationConsumerFactoryService_client_handle_t handle) | |
| 271 | 0 | { |
| 272 | 0 | globus_soap_client_handle_destroy(handle); |
| 273 | 0 | } |
| 274 | ||
| 275 | /** | |
| 276 | * Cancel the current operation associated with this handle. | |
| 277 | * @ingroup NotificationConsumerFactoryService_client_handle | |
| 278 | * | |
| 279 | * @param handle | |
| 280 | * Handle which has the operation to cancel. | |
| 281 | */ | |
| 282 | globus_result_t | |
| 283 | NotificationConsumerFactoryService_client_operation_cancel( | |
| 284 | NotificationConsumerFactoryService_client_handle_t handle) | |
| 285 | 0 | { |
| 286 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 287 | GlobusFuncName(NotificationConsumerFactoryService_client_message_cancel); | |
| 288 | 0 | GlobusSoapMessageDebugEnter(); |
| 289 | ||
| 290 | 0 | result = globus_soap_client_operation_cancel(handle); |
| 291 | ||
| 292 | 0 | return result; |
| 293 | } | |
| 294 | ||
| 295 | /** | |
| 296 | * Get handle's handler chain | |
| 297 | * @ingroup NotificationConsumerFactoryService_client_handle | |
| 298 | * | |
| 299 | * The handler chain contains information about which handlers (typically | |
| 300 | * SOAP header processors) will be invoked when a request is sent or a | |
| 301 | * response is received. Applications which want to add custom handlers at | |
| 302 | * run time may wish to push additional handlers onto this chain. | |
| 303 | * | |
| 304 | * @param handle | |
| 305 | * The handle to query. | |
| 306 | * @param handlers | |
| 307 | * A pointer to a handler chain which will be set to the handle's | |
| 308 | * chain. | |
| 309 | */ | |
| 310 | globus_result_t | |
| 311 | NotificationConsumerFactoryService_client_get_handler_chain( | |
| 312 | NotificationConsumerFactoryService_client_handle_t handle, | |
| 313 | globus_handler_chain_t * handlers) | |
| 314 | 0 | { |
| 315 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 316 | GlobusFuncName(NotificationConsumerFactoryService_client_get_handle_chain); | |
| 317 | 0 | GlobusSoapMessageDebugEnter(); |
| 318 | ||
| 319 | 0 | result = globus_soap_client_handle_get_handler_chain(handle, handlers); |
| 320 | ||
| 321 | 0 | GlobusSoapMessageDebugExit(); |
| 322 | 0 | return result; |
| 323 | } | |
| 324 | ||
| 325 | /** | |
| 326 | * Set a SOAP attribute on a handle | |
| 327 | * @ingroup NotificationConsumerFactoryService_client_handle | |
| 328 | * | |
| 329 | * Set a SOAP attribute on a handle. This can be used to change how | |
| 330 | * the SOAP engine will process operations sent via this handle. | |
| 331 | * | |
| 332 | * @param handle | |
| 333 | * The handle to modify. | |
| 334 | * @param prop_name | |
| 335 | * The attribute name. This should be one of the | |
| 336 | * <code>GLOBUS_SOAP_MESSAGE_*_KEY</code> values. | |
| 337 | * @param copy | |
| 338 | * A function to copy the value. This is required if @a value will go | |
| 339 | * out of scope. | |
| 340 | * @param destroy | |
| 341 | * A function to destroy a copy of the value. Required if @a copy is set. | |
| 342 | * @param value | |
| 343 | * The new value of the attribute. | |
| 344 | */ | |
| 345 | globus_result_t | |
| 346 | NotificationConsumerFactoryService_client_attr_set( | |
| 347 | NotificationConsumerFactoryService_client_handle_t handle, | |
| 348 | const char * prop_name, | |
| 349 | globus_soap_message_attr_copy_func_t copy, | |
| 350 | globus_soap_message_attr_destroy_func_t destroy, | |
| 351 | void * value) | |
| 352 | 0 | { |
| 353 | 0 | return globus_soap_client_handle_attr_set( |
| 354 | handle, | |
| 355 | prop_name, | |
| 356 | copy, | |
| 357 | destroy, | |
| 358 | value); | |
| 359 | } | |
| 360 | ||
| 361 | /** | |
| 362 | * Remove a SOAP attribute from a handle | |
| 363 | * @ingroup NotificationConsumerFactoryService_client_handle | |
| 364 | * | |
| 365 | * Remove a SOAP attribute on a handle. This can be used to change how | |
| 366 | * the SOAP engine will process operations sent via this handle. | |
| 367 | * | |
| 368 | * @param handle | |
| 369 | * The handle to modify. | |
| 370 | * @param prop_name | |
| 371 | * The attribute name. This should be one of the | |
| 372 | * <code>GLOBUS_SOAP_MESSAGE_*_KEY</code> values. | |
| 373 | * | |
| 374 | * @return | |
| 375 | * This function returns the current value of the attribute. | |
| 376 | */ | |
| 377 | void * | |
| 378 | NotificationConsumerFactoryService_client_attr_remove( | |
| 379 | NotificationConsumerFactoryService_client_handle_t handle, | |
| 380 | const char * prop_name) | |
| 381 | 0 | { |
| 382 | 0 | return globus_soap_client_handle_attr_remove( |
| 383 | handle, | |
| 384 | prop_name); | |
| 385 | } | |
| 386 | ||
| 387 | /** | |
| 388 | * Get a SOAP attribute from a handle | |
| 389 | * @ingroup NotificationConsumerFactoryService_client_handle | |
| 390 | * | |
| 391 | * Get the current value of a SOAP attribute set on a handle. | |
| 392 | * | |
| 393 | * @param handle | |
| 394 | * The handle to query. | |
| 395 | * @param prop_name | |
| 396 | * The attribute name. This should be one of the | |
| 397 | * <code>GLOBUS_SOAP_MESSAGE_*_KEY</code> values. | |
| 398 | * | |
| 399 | * @return | |
| 400 | * This function returns the current value of the attribute. | |
| 401 | */ | |
| 402 | void * | |
| 403 | NotificationConsumerFactoryService_client_attr_get( | |
| 404 | NotificationConsumerFactoryService_client_handle_t handle, | |
| 405 | const char * prop_name) | |
| 406 | 0 | { |
| 407 | 0 | return globus_soap_client_handle_attr_get( |
| 408 | handle, | |
| 409 | prop_name); | |
| 410 | } | |
| 411 | ||
| 412 | ||
| 413 | ||
| 414 | /** | |
| 415 | * Nonblocking operation request with EPR | |
| 416 | * @ingroup NotificationConsumerFactory_createNotificationConsumer_operation | |
| 417 | * Begin sending a request for the <code>createNotificationConsumer</code> operation on a | |
| 418 | * resource handled by the service named by the @a epr. When the operation | |
| 419 | * request has been sent, the @a callback function will be invoked. | |
| 420 | * | |
| 421 | * @param client_handle | |
| 422 | * The @link #NotificationConsumerFactoryService_client_handle_t client handle @endlink which | |
| 423 | * contains the state related to processing this operation. | |
| 424 | * @param epr | |
| 425 | * Endpoint Reference of the service and resource which will process | |
| 426 | * the operation. | |
| 427 | * @param input | |
| 428 | * Input parameter to the operation. | |
| 429 | * @param callback | |
| 430 | * Callback function which will be called once the request has been | |
| 431 | * sent | |
| 432 | * @param callback_arg | |
| 433 | * Application-specific pointer which will be passed to the callback. | |
| 434 | */ | |
| 435 | globus_result_t | |
| 436 | NotificationConsumerFactory_createNotificationConsumer_epr_register_request( | |
| 437 | NotificationConsumerFactoryService_client_handle_t client_handle, | |
| 438 | const wsa_EndpointReferenceType * epr, | |
| 439 | const createNotificationConsumerType * input, | |
| 440 | NotificationConsumerFactory_createNotificationConsumer_request_callback_func_t callback, | |
| 441 | void * callback_arg) | |
| 442 | 0 | { |
| 443 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 444 | ||
| 445 | 0 | globus_assert_string(epr, "NULL EndpointReference"); |
| 446 | 0 | globus_assert_string(epr->Address.base_value, |
| 447 | "NULL EndpointReference Address"); | |
| 448 | ||
| 449 | 0 | result = globus_soap_client_handle_attr_set( |
| 450 | client_handle, | |
| 451 | WSADDR_EPR_KEY, | |
| 452 | wsa_EndpointReferenceType_info.copy, | |
| 453 | wsa_EndpointReferenceType_info.destroy, | |
| 454 | (void *) epr); | |
| 455 | ||
| 456 | 0 | if (result != GLOBUS_SUCCESS) |
| 457 | { | |
| 458 | 0 | goto out; |
| 459 | } | |
| 460 | ||
| 461 | 0 | result = globus_soap_client_register_request( |
| 462 | client_handle, | |
| 463 | epr->Address.base_value, | |
| 464 | &NotificationConsumerFactory_l_createNotificationConsumer_operation, | |
| 465 | (void *) input, | |
| 466 | callback, | |
| 467 | callback_arg); | |
| 468 | ||
| 469 | 0 | out: |
| 470 | 0 | return result; |
| 471 | } | |
| 472 | ||
| 473 | /** | |
| 474 | * Nonblocking operation request | |
| 475 | * @ingroup NotificationConsumerFactory_createNotificationConsumer_operation | |
| 476 | * Begin sending a request for the <code>createNotificationConsumer</code> operation to | |
| 477 | * the service at @a endpoint. When the operation | |
| 478 | * request has been sent, the @a callback function will be invoked. | |
| 479 | * @param handle | |
| 480 | * The @link #NotificationConsumerFactoryService_client_handle_t client handle @endlink which | |
| 481 | * contains the state related to processing this operation. | |
| 482 | * @param endpoint | |
| 483 | * URI of the service endpoint to send the request to. | |
| 484 | * @param input | |
| 485 | * Input parameter to the operation. | |
| 486 | * @param callback | |
| 487 | * Callback function which will be called once the request has been | |
| 488 | * sent | |
| 489 | * @param callback_arg | |
| 490 | * Application-specific pointer which will be passed to the callback. | |
| 491 | */ | |
| 492 | globus_result_t | |
| 493 | NotificationConsumerFactory_createNotificationConsumer_register_request( | |
| 494 | NotificationConsumerFactoryService_client_handle_t client_handle, | |
| 495 | const char * endpoint, | |
| 496 | const createNotificationConsumerType * input, | |
| 497 | NotificationConsumerFactory_createNotificationConsumer_request_callback_func_t callback, | |
| 498 | void * callback_arg) | |
| 499 | 0 | { |
| 500 | 0 | return globus_soap_client_register_request( |
| 501 | client_handle, | |
| 502 | endpoint, | |
| 503 | &NotificationConsumerFactory_l_createNotificationConsumer_operation, | |
| 504 | (void *) input, | |
| 505 | callback, | |
| 506 | callback_arg); | |
| 507 | } | |
| 508 | ||
| 509 | ||
| 510 | ||
| 511 | static | |
| 512 | void | |
| 513 | NotificationConsumerFactory_l_createNotificationConsumer_deserialize_fault( | |
| 514 | globus_soap_message_handle_t handle, | |
| 515 | const xsd_QName * fault_qname, | |
| 516 | int * fault_type) | |
| 517 | 0 | { |
| 518 | 0 | *fault_type = NOTIFICATIONCONSUMERFACTORY_CREATENOTIFICATIONCONSUMER_NOFAULT; |
| 519 | ||
| 520 | 0 | if(fault_qname) |
| 521 | { | |
| 522 | ||
| 523 | { | |
| 524 | 0 | *fault_type = NOTIFICATIONCONSUMERFACTORY_CREATENOTIFICATIONCONSUMER_UNKNOWN_FAULT; |
| 525 | } | |
| 526 | } | |
| 527 | 0 | } |
| 528 | /* NotificationConsumerFactory_l_createNotificationConsumer_deserialize_fault() */ | |
| 529 | ||
| 530 | /** | |
| 531 | * Nonblocking operation response handling | |
| 532 | * @ingroup NotificationConsumerFactory_createNotificationConsumer_operation | |
| 533 | * Begin parsing the request for the <code>createNotificationConsumer</code> operation begun | |
| 534 | * by an earlier call to | |
| 535 | * NotificationConsumerFactory_createNotificationConsumer_register_request() or | |
| 536 | * NotificationConsumerFactory_createNotificationConsumer_epr_register_request(). Once the response has been parsed. | |
| 537 | * the @a callback function will be called to pass the result of the operation | |
| 538 | * to the application. | |
| 539 | * | |
| 540 | * @param client_handle | |
| 541 | * The @link #NotificationConsumerFactoryService_client_handle_t client handle @endlink which | |
| 542 | * contains the state related to processing this operation. | |
| 543 | * @param callback | |
| 544 | * Callback function which will be called once the response has been | |
| 545 | * processed. | |
| 546 | * @param callback_arg | |
| 547 | * Application-specific pointer which will be passed to the callback. | |
| 548 | */ | |
| 549 | globus_result_t | |
| 550 | NotificationConsumerFactory_createNotificationConsumer_register_response( | |
| 551 | NotificationConsumerFactoryService_client_handle_t client_handle, | |
| 552 | NotificationConsumerFactory_createNotificationConsumer_response_callback_func_t callback, | |
| 553 | void * callback_arg) | |
| 554 | 0 | { |
| 555 | 0 | return globus_soap_client_register_response( |
| 556 | client_handle, | |
| 557 | (globus_soap_client_response_callback_func_t) callback, | |
| 558 | callback_arg); | |
| 559 | } | |
| 560 | ||
| 561 | /** | |
| 562 | * Nonblocking operation invocation with EPR | |
| 563 | * @ingroup NotificationConsumerFactory_createNotificationConsumer_operation | |
| 564 | * | |
| 565 | * Begin processing a request for the createNotificationConsumer operation. The operation will | |
| 566 | * sent to the service named by the @a epr and after the response is received, | |
| 567 | * the @a callback function will be invoked. | |
| 568 | * | |
| 569 | * @param handle | |
| 570 | * The @link #NotificationConsumerFactoryService_client_handle_t client handle @endlink which | |
| 571 | * contains the state related to processing this operation. | |
| 572 | * @param epr | |
| 573 | * Endpoint Reference of the service and resource which will process | |
| 574 | * the operation. | |
| 575 | * @param input | |
| 576 | * Input parameter to the operation. | |
| 577 | * @param callback | |
| 578 | * Callback function which will be called once the operation has been | |
| 579 | * processed. | |
| 580 | * @param callback_arg | |
| 581 | * Application-specific pointer which will be passed to the callback. | |
| 582 | */ | |
| 583 | globus_result_t | |
| 584 | NotificationConsumerFactory_createNotificationConsumer_epr_register( | |
| 585 | NotificationConsumerFactoryService_client_handle_t handle, | |
| 586 | const wsa_EndpointReferenceType * epr, | |
| 587 | const createNotificationConsumerType * input, | |
| 588 | NotificationConsumerFactory_createNotificationConsumer_response_callback_func_t callback, | |
| 589 | void * callback_arg) | |
| 590 | 0 | { |
| 591 | globus_result_t result; | |
| 592 | ||
| 593 | 0 | result = globus_soap_client_handle_attr_set( |
| 594 | handle, | |
| 595 | WSADDR_EPR_KEY, | |
| 596 | wsa_EndpointReferenceType_info.copy, | |
| 597 | wsa_EndpointReferenceType_info.destroy, | |
| 598 | (void *) epr); | |
| 599 | ||
| 600 | 0 | if (result != GLOBUS_SUCCESS) |
| 601 | { | |
| 602 | 0 | goto out; |
| 603 | } | |
| 604 | ||
| 605 | 0 | result = globus_soap_client_operation_register( |
| 606 | handle, | |
| 607 | epr->Address.base_value, | |
| 608 | &NotificationConsumerFactory_l_createNotificationConsumer_operation, | |
| 609 | (void *) input, | |
| 610 | (globus_soap_client_response_callback_func_t) callback, | |
| 611 | callback_arg); | |
| 612 | 0 | out: |
| 613 | 0 | return result; |
| 614 | } | |
| 615 | ||
| 616 | /** | |
| 617 | * Nonblocking operation invocation | |
| 618 | * @ingroup NotificationConsumerFactory_createNotificationConsumer_operation | |
| 619 | * | |
| 620 | * Begin processing a request for the createNotificationConsumer operation. The operation will | |
| 621 | * sent to the service located at @a endpoint and after the response is | |
| 622 | * received, the @a callback function will be invoked. | |
| 623 | * | |
| 624 | * @param handle | |
| 625 | * The @link #NotificationConsumerFactoryService_client_handle_t client handle @endlink which | |
| 626 | * contains the state related to processing this operation. | |
| 627 | * @param endpoint | |
| 628 | * URI of the service endpoint to send the request to. | |
| 629 | * @param input | |
| 630 | * Input parameter to the operation. | |
| 631 | * @param callback | |
| 632 | * Callback function which will be called once the operation has been | |
| 633 | * processed. | |
| 634 | * @param callback_arg | |
| 635 | * Application-specific pointer which will be passed to the callback. | |
| 636 | */ | |
| 637 | globus_result_t | |
| 638 | NotificationConsumerFactory_createNotificationConsumer_register( | |
| 639 | NotificationConsumerFactoryService_client_handle_t handle, | |
| 640 | const char * endpoint, | |
| 641 | const createNotificationConsumerType * input, | |
| 642 | NotificationConsumerFactory_createNotificationConsumer_response_callback_func_t callback, | |
| 643 | void * callback_arg) | |
| 644 | 0 | { |
| 645 | 0 | return globus_soap_client_operation_register( |
| 646 | handle, | |
| 647 | endpoint, | |
| 648 | &NotificationConsumerFactory_l_createNotificationConsumer_operation, | |
| 649 | (void *) input, | |
| 650 | (globus_soap_client_response_callback_func_t) callback, | |
| 651 | callback_arg); | |
| 652 | } | |
| 653 | ||
| 654 | ||
| 655 | ||
| 656 | /** | |
| 657 | * Blocking operation invocation with EPR | |
| 658 | * @ingroup NotificationConsumerFactory_createNotificationConsumer_operation | |
| 659 | * | |
| 660 | * Request that an the createNotificationConsumer operation be invoked by the service and | |
| 661 | * resource named by the @a epr parameter. | |
| 662 | ||
| 663 | * If the result is <code>GLOBUS_SUCCESS</code>, then the | |
| 664 | * @a output parameter will be set to the result of the operation. | |
| 665 | * Otherwise, if the @a fault and @a fault_type parameters are non-NULL, | |
| 666 | * they indicate the SOAP fault type. If they are NULL, then some non-SOAP | |
| 667 | * error occurred, and the result's error type should be checked. | |
| 668 | ||
| 669 | * | |
| 670 | * @param handle | |
| 671 | * The @link #NotificationConsumerFactoryService_client_handle_t client handle @endlink which | |
| 672 | * contains the state related to processing this operation. | |
| 673 | * @param epr | |
| 674 | * Endpoint Reference of the service and resource which will process | |
| 675 | * the operation. | |
| 676 | * @param input | |
| 677 | * Input parameter to the operation. | |
| 678 | ||
| 679 | * @param output | |
| 680 | * The output of the operation, if the operation succeeded. | |
| 681 | * @param fault_type | |
| 682 | * The type of fault sent as a result of the operation, if the operation | |
| 683 | * failed. If the operation succeeded, this will be NULL. | |
| 684 | * @param fault | |
| 685 | * The fault element which was received, if the operation failed. | |
| 686 | * If the operation succeeded, this will be NULL. | |
| 687 | ||
| 688 | */ | |
| 689 | globus_result_t | |
| 690 | NotificationConsumerFactory_createNotificationConsumer_epr( | |
| 691 | NotificationConsumerFactoryService_client_handle_t handle, | |
| 692 | const wsa_EndpointReferenceType * epr, | |
| 693 | const createNotificationConsumerType * input, | |
| 694 | wsa_EndpointReferenceType * * output, | |
| 695 | NotificationConsumerFactory_createNotificationConsumer_fault_t * fault_type, | |
| 696 | xsd_any * * fault) | |
| 697 | 0 | { |
| 698 | globus_result_t result; | |
| 699 | ||
| 700 | 0 | result = globus_soap_client_handle_attr_set( |
| 701 | handle, | |
| 702 | WSADDR_EPR_KEY, | |
| 703 | wsa_EndpointReferenceType_info.copy, | |
| 704 | wsa_EndpointReferenceType_info.destroy, | |
| 705 | (void *) epr); | |
| 706 | ||
| 707 | 0 | if (result != GLOBUS_SUCCESS) |
| 708 | { | |
| 709 | 0 | goto out; |
| 710 | } | |
| 711 | 0 | result = globus_soap_client_operation( |
| 712 | handle, | |
| 713 | epr->Address.base_value, | |
| 714 | &NotificationConsumerFactory_l_createNotificationConsumer_operation, | |
| 715 | (void *) input, | |
| 716 | ||
| 717 | (void **) output, | |
| 718 | (int *) fault_type, | |
| 719 | fault | |
| 720 | ); | |
| 721 | 0 | out: |
| 722 | 0 | return result; |
| 723 | } | |
| 724 | ||
| 725 | /** | |
| 726 | * Blocking operation invocation | |
| 727 | * @ingroup NotificationConsumerFactory_createNotificationConsumer_operation | |
| 728 | * | |
| 729 | * Request that an the createNotificationConsumer operation be invoked by the service at | |
| 730 | * @a endpoint. | |
| 731 | ||
| 732 | * If the result is <code>GLOBUS_SUCCESS</code>, then the | |
| 733 | * @a output parameter will be set to the result of the operation. | |
| 734 | * Otherwise, if the @a fault and @a fault_type parameters are non-NULL, | |
| 735 | * they indicate the SOAP fault type. If they are NULL, then some non-SOAP | |
| 736 | * error occurred, and the result's error type should be checked. | |
| 737 | ||
| 738 | * | |
| 739 | * @param handle | |
| 740 | * The @link #NotificationConsumerFactoryService_client_handle_t client handle @endlink which | |
| 741 | * contains the state related to processing this operation. | |
| 742 | * @param endpoint | |
| 743 | * URI of the service endpoint to send the request to. | |
| 744 | * @param input | |
| 745 | * Input parameter to the operation. | |
| 746 | ||
| 747 | * @param output | |
| 748 | * The output of the operation, if the operation succeeded. | |
| 749 | * @param fault_type | |
| 750 | * The type of fault sent as a result of the operation, if the operation | |
| 751 | * failed. If the operation succeeded, this will be NULL. | |
| 752 | * @param fault | |
| 753 | * The fault element which was received, if the operation failed. | |
| 754 | * If the operation succeeded, this will be NULL. | |
| 755 | ||
| 756 | */ | |
| 757 | globus_result_t | |
| 758 | NotificationConsumerFactory_createNotificationConsumer( | |
| 759 | NotificationConsumerFactoryService_client_handle_t handle, | |
| 760 | const char * endpoint, | |
| 761 | const createNotificationConsumerType * input, | |
| 762 | wsa_EndpointReferenceType * * output, | |
| 763 | NotificationConsumerFactory_createNotificationConsumer_fault_t * fault_type, | |
| 764 | xsd_any * * fault) | |
| 765 | 0 | { |
| 766 | 0 | return globus_soap_client_operation( |
| 767 | handle, | |
| 768 | endpoint, | |
| 769 | &NotificationConsumerFactory_l_createNotificationConsumer_operation, | |
| 770 | (void *) input, | |
| 771 | ||
| 772 | (void *) output, | |
| 773 | (int *) fault_type, | |
| 774 | fault | |
| 775 | ); |