| 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 | #include "globus_i_service_engine.h" | |
| 18 | ||
| 19 | /** | |
| 20 | * @ingroup globus_service_engine | |
| 21 | * @internal | |
| 22 | * @retval GLOBUS_SUCCESS | |
| 23 | * @retval GLOBUS_SERVICE_ENGINE_ERROR_TYPE_SENDING_FAULT | |
| 24 | */ | |
| 25 | globus_result_t | |
| 26 | globus_service_session_serialize_fault_response( | |
| 27 | globus_soap_message_handle_t message, | |
| 28 | globus_soap_message_fault_t fault) | |
| 29 | 252 | { |
| 30 | 252 | globus_result_t result = GLOBUS_SUCCESS; |
| 31 | GlobusFuncName(globus_service_serialize_fault_response); | |
| 32 | 252 | GlobusServiceEngineDebugEnter(); |
| 33 | ||
| 34 | 252 | result = globus_soap_message_serialize_fault(message, fault); |
| 35 | 252 | if(result != GLOBUS_SUCCESS) |
| 36 | { | |
| 37 | 0 | result = GlobusServiceEngineErrorSendingFault(result); |
| 38 | 0 | goto exit; |
| 39 | } | |
| 40 | ||
| 41 | 252 | result = globus_service_session_end_response(message); |
| 42 | 252 | if(result != GLOBUS_SUCCESS) |
| 43 | { | |
| 44 | 0 | result = GlobusServiceEngineErrorSendingFault(result); |
| 45 | 0 | goto exit; |
| 46 | } | |
| 47 | ||
| 48 | 252 | exit: |
| 49 | ||
| 50 | 252 | GlobusServiceEngineDebugExit(); |
| 51 | 252 | return result; |
| 52 | } |