summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.am1
-rw-r--r--include/axis2_addr.h173
-rw-r--r--include/axis2_addr_mod.h77
-rw-r--r--include/axis2_any_content_type.h117
-rw-r--r--include/axis2_async_result.h98
-rw-r--r--include/axis2_callback.h263
-rw-r--r--include/axis2_callback_recv.h117
-rw-r--r--include/axis2_client.h44
-rw-r--r--include/axis2_conf.h822
-rw-r--r--include/axis2_conf_ctx.h327
-rw-r--r--include/axis2_conf_init.h74
-rw-r--r--include/axis2_const.h445
-rw-r--r--include/axis2_core_dll_desc.h68
-rw-r--r--include/axis2_core_utils.h113
-rw-r--r--include/axis2_ctx.h147
-rw-r--r--include/axis2_defines.h51
-rw-r--r--include/axis2_desc.h228
-rw-r--r--include/axis2_description.h148
-rw-r--r--include/axis2_disp.h174
-rw-r--r--include/axis2_endpoint_ref.h319
-rw-r--r--include/axis2_engine.h264
-rw-r--r--include/axis2_flow.h125
-rw-r--r--include/axis2_flow_container.h176
-rw-r--r--include/axis2_handler.h184
-rw-r--r--include/axis2_handler_desc.h274
-rw-r--r--include/axis2_http_accept_record.h117
-rw-r--r--include/axis2_http_client.h270
-rw-r--r--include/axis2_http_header.h110
-rw-r--r--include/axis2_http_out_transport_info.h250
-rw-r--r--include/axis2_http_request_line.h122
-rw-r--r--include/axis2_http_response_writer.h193
-rw-r--r--include/axis2_http_sender.h226
-rw-r--r--include/axis2_http_server.h66
-rw-r--r--include/axis2_http_simple_request.h229
-rw-r--r--include/axis2_http_simple_response.h337
-rw-r--r--include/axis2_http_status_line.h131
-rw-r--r--include/axis2_http_svr_thread.h121
-rw-r--r--include/axis2_http_transport.h1164
-rw-r--r--include/axis2_http_transport_sender.h59
-rw-r--r--include/axis2_http_transport_utils.h487
-rw-r--r--include/axis2_http_worker.h115
-rw-r--r--include/axis2_listener_manager.h136
-rw-r--r--include/axis2_module.h161
-rw-r--r--include/axis2_module_desc.h386
-rw-r--r--include/axis2_msg.h298
-rw-r--r--include/axis2_msg_ctx.h2098
-rw-r--r--include/axis2_msg_info_headers.h466
-rw-r--r--include/axis2_msg_recv.h268
-rw-r--r--include/axis2_op.h724
-rw-r--r--include/axis2_op_client.h445
-rw-r--r--include/axis2_op_ctx.h307
-rw-r--r--include/axis2_options.h848
-rw-r--r--include/axis2_out_transport_info.h115
-rw-r--r--include/axis2_phase.h352
-rw-r--r--include/axis2_phase_holder.h170
-rw-r--r--include/axis2_phase_meta.h89
-rw-r--r--include/axis2_phase_resolver.h275
-rw-r--r--include/axis2_phase_rule.h216
-rw-r--r--include/axis2_phases_info.h238
-rw-r--r--include/axis2_policy_include.h215
-rw-r--r--include/axis2_raw_xml_in_out_msg_recv.h59
-rw-r--r--include/axis2_relates_to.h129
-rw-r--r--include/axis2_simple_http_svr_conn.h204
-rw-r--r--include/axis2_stub.h200
-rw-r--r--include/axis2_svc.h1236
-rw-r--r--include/axis2_svc_client.h642
-rw-r--r--include/axis2_svc_ctx.h196
-rw-r--r--include/axis2_svc_grp.h368
-rw-r--r--include/axis2_svc_grp_ctx.h194
-rw-r--r--include/axis2_svc_name.h135
-rw-r--r--include/axis2_svc_skeleton.h182
-rw-r--r--include/axis2_svr_callback.h95
-rw-r--r--include/axis2_thread_mutex.h112
-rw-r--r--include/axis2_transport_in_desc.h329
-rw-r--r--include/axis2_transport_out_desc.h327
-rw-r--r--include/axis2_transport_receiver.h256
-rw-r--r--include/axis2_transport_sender.h173
-rw-r--r--include/axis2_util.h61
78 files changed, 21531 insertions, 0 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644
index 0000000..e7c4de3
--- /dev/null
+++ b/include/Makefile.am
@@ -0,0 +1 @@
+TESTS=
diff --git a/include/axis2_addr.h b/include/axis2_addr.h
new file mode 100644
index 0000000..32521bd
--- /dev/null
+++ b/include/axis2_addr.h
@@ -0,0 +1,173 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_ADDR_H
+#define AXIS2_ADDR_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * @defgroup axis2_addr WS-Addressing
+ * @ingroup axis2
+ * @{
+ * @}
+ */
+
+ /**
+ * @defgroup axis2_addr_consts WS-Addressing related constants
+ * @ingroup axis2_addr
+ * @{
+ */
+
+ /** @file axis2_addr.h */
+
+ /* ====================== Common Message Addressing Properties =========== */
+
+ /** WS-Addressing Message ID */
+#define AXIS2_WSA_MESSAGE_ID "MessageID"
+
+ /** WS-Addressing Relates To */
+#define AXIS2_WSA_RELATES_TO "RelatesTo"
+
+ /** WS-Addressing Relates To Relationship Type */
+#define AXIS2_WSA_RELATES_TO_RELATIONSHIP_TYPE "RelationshipType"
+
+ /** WS-Addressing To */
+#define AXIS2_WSA_TO "To"
+
+ /** WS-Addressing From */
+#define AXIS2_WSA_FROM "From"
+
+ /** WS-Addressing Reply To */
+#define AXIS2_WSA_REPLY_TO "ReplyTo"
+
+ /** WS-Addressing Fault To */
+#define AXIS2_WSA_FAULT_TO "FaultTo"
+
+ /** WS-Addressing Action */
+#define AXIS2_WSA_ACTION "Action"
+
+ /** WS-Addressing Mapping */
+#define AXIS2_WSA_MAPPING "wsamapping"
+
+ /* ====================== Common EPR Elements ============================ */
+
+ /** End Pointer Reference Address */
+#define EPR_ADDRESS "Address"
+
+ /** End Pointer Reference Reference Parameters */
+#define EPR_REFERENCE_PARAMETERS "ReferenceParameters"
+
+ /** End Pointer Reference Service Name */
+#define EPR_SERVICE_NAME "ServiceName"
+
+ /** End Pointer Reference Reference Properties */
+#define EPR_REFERENCE_PROPERTIES "ReferenceProperties"
+
+ /** End Pointer Reference Port Type */
+#define EPR_PORT_TYPE "PortType"
+
+ /** End Pointer Reference Port Name */
+#define EPR_SERVICE_NAME_PORT_NAME "PortName"
+
+ /* ====================== Addressing Submission Version Constants ======== */
+
+ /** WS-Addressing Namespace for Submission Version */
+#define AXIS2_WSA_NAMESPACE_SUBMISSION "http://schemas.xmlsoap.org/ws/2004/08/addressing"
+
+ /** WS-Addressing Relates To Relationship Type Default Value for Submission Version */
+#define AXIS2_WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE_SUBMISSION "wsa:Reply"
+
+ /** WS-Addressing Anonymous URL for Submission Version */
+#define AXIS2_WSA_ANONYMOUS_URL_SUBMISSION "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"
+
+ /** WS-Addressing None URL for Submission Version */
+#define AXIS2_WSA_NONE_URL_SUBMISSION "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/none"
+
+ /* =====================Addressing 1.0 Final Version Constants =========== */
+
+ /** WS-Addressing Namespace for 1.0 Final Version */
+#define AXIS2_WSA_NAMESPACE "http://www.w3.org/2005/08/addressing"
+
+ /** WS-Addressing Relates To Relationship Type Default Value for 1.0 Final Version */
+#define AXIS2_WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE "http://www.w3.org/2005/08/addressing/reply"
+
+ /** WS-Addressing Anonymous URL for 1.0 Final Version */
+#define AXIS2_WSA_ANONYMOUS_URL "http://www.w3.org/2005/08/addressing/anonymous"
+
+ /** WS-Addressing None URL for 1.0 Final Version */
+#define AXIS2_WSA_NONE_URL "http://www.w3.org/2005/08/addressing/none"
+
+ /* ======================================================================= */
+
+ /** WS-Addressing Is Reference Parameter Attribute */
+#define AXIS2_WSA_IS_REFERENCE_PARAMETER_ATTRIBUTE "IsReferenceParameter"
+
+ /** WS-Addressing Type Attribute Value */
+#define AXIS2_WSA_TYPE_ATTRIBUTE_VALUE "true"
+
+ /** WS-Addressing Interface Name */
+#define AXIS2_WSA_INTERFACE_NAME "InterfaceName"
+
+ /** WS-Addressing Service/Endpoint Name */
+#define AXIS2_WSA_SERVICE_NAME_ENDPOINT_NAME "EndpointName"
+
+ /** WS-Addressing Policies */
+#define AXIS2_WSA_POLICIES "Policies"
+
+ /** WS-Addressing Metadata */
+#define AXIS2_WSA_METADATA "Metadata"
+
+ /* ======================================================================= */
+
+ /** WS-Addressing Version */
+#define AXIS2_WSA_VERSION "WSAddressingVersion"
+
+ /** WS-Addressing Default Prefix */
+#define AXIS2_WSA_DEFAULT_PREFIX "wsa"
+
+ /** WS-Addressing Prefixes for faults*/
+#define AXIS2_WSA_PREFIX_FAULT_TO AXIS2_WSA_DEFAULT_PREFIX":"AXIS2_WSA_FAULT_TO
+
+ /** WS-Addressing Prefixes for faults*/
+#define AXIS2_WSA_PREFIX_REPLY_TO AXIS2_WSA_DEFAULT_PREFIX":"AXIS2_WSA_REPLY_TO
+
+ /** WS-Addressing Prefixes for faults*/
+#define AXIS2_WSA_PREFIX_TO AXIS2_WSA_DEFAULT_PREFIX":"AXIS2_WSA_TO
+
+ /** WS-Addressing Prefixes for faults*/
+#define AXIS2_WSA_PREFIX_MESSAGE_ID AXIS2_WSA_DEFAULT_PREFIX":"AXIS2_WSA_MESSAGE_ID
+
+ /** WS-Addressing Prefixes for faults*/
+#define AXIS2_WSA_PREFIX_ACTION AXIS2_WSA_DEFAULT_PREFIX":"AXIS2_WSA_ACTION
+
+ /* ======================================================================= */
+
+ /** WS-Addressing Param Service Group Context ID */
+#define PARAM_SERVICE_GROUP_CONTEXT_ID "ServiceGroupContextIdFromAddressing"
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_ADDR_H */
diff --git a/include/axis2_addr_mod.h b/include/axis2_addr_mod.h
new file mode 100644
index 0000000..be7ad00
--- /dev/null
+++ b/include/axis2_addr_mod.h
@@ -0,0 +1,77 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_ADDR_MOD_H
+#define AXIS2_ADDR_MOD_H
+
+ /**
+ * @defgroup axis2_mod_addr WS-Addressing Module
+ * @ingroup axis2
+ * @{
+ * @}
+ */
+
+ /**
+ * @defgroup axis2_addr_mod addressing module interface
+ * @ingroup axis2_mod_addr
+ * @{
+ */
+
+ /**
+ * @file axis2_addr_mod.h
+ */
+
+#include <axis2_handler.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define ADDR_IN_HANDLER "AddressingInHandler"
+#define ADDR_OUT_HANDLER "AddressingOutHandler"
+
+/**
+ * Creates Addressing in handler
+ * @param env pointer to environment struct
+ * @param name name of handler
+ * @return returns reference to handler created
+ */
+ AXIS2_EXTERN axis2_handler_t *AXIS2_CALL
+ axis2_addr_in_handler_create(
+ const axutil_env_t * env,
+ axutil_string_t * name);
+
+ /**
+ * Creates Addressing out handler
+ * @param env pointer to environment struct
+ * @param name name of handler
+ * @return returns reference to handler created
+ */
+ AXIS2_EXTERN axis2_handler_t *AXIS2_CALL
+ axis2_addr_out_handler_create(
+ const axutil_env_t * env,
+ axutil_string_t * name);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_ADDR_MOD_H */
diff --git a/include/axis2_any_content_type.h b/include/axis2_any_content_type.h
new file mode 100644
index 0000000..eff890f
--- /dev/null
+++ b/include/axis2_any_content_type.h
@@ -0,0 +1,117 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_ANY_CONTENT_TYPE_H
+#define AXIS2_ANY_CONTENT_TYPE_H
+
+/**
+ * @defgroup axis2_any_content_type any content type
+ * @ingroup axis2_addr
+ * any content type acts as a container for any type reference parameters that
+ * could be associated with an endpoint reference. The values in the map are
+ * stored in string format, with QNames as key values.
+ * @{
+ */
+
+/**
+ * @file axis2_any_content_type.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_const.h>
+#include <axutil_hash.h>
+#include <axutil_qname.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for axis2_any_content_type */
+ typedef struct axis2_any_content_type axis2_any_content_type_t;
+
+ /**
+ * Creates an instance of any content type struct.
+ * @param env pointer to environment struct
+ * @return pointer to the newly created any content type instance
+ */
+ AXIS2_EXTERN axis2_any_content_type_t *AXIS2_CALL
+ axis2_any_content_type_create(
+ const axutil_env_t * env);
+
+ /**
+ * Adds given value to content value map with given QName.
+ * @param any_content_type pointer to any content type struct
+ * @param env pointer to environment struct
+ * @param qname pointer to QName to be used as key
+ * @param value value string to be added
+ * @return AXIS2_SUCCESS on success else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_any_content_type_add_value(
+ axis2_any_content_type_t * any_content_type,
+ const axutil_env_t * env,
+ const axutil_qname_t * qname,
+ const axis2_char_t * value);
+
+ /**
+ * Gets the value corresponding to the given QName from the content
+ * value map.
+ * @param any_content_type pointer to any content type struct
+ * @param env pointer to environment struct
+ * @param qname pointer to QName of the corresponding value to be
+ * retrieved
+ * @return value string if present, else returns NULL
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_any_content_type_get_value(
+ const axis2_any_content_type_t * any_content_type,
+ const axutil_env_t * env,
+ const axutil_qname_t * qname);
+
+ /**
+ * Gets the map of all values.
+ * @param any_content_type pointer to any content type struct
+ * @param env pointer to environment struct
+ * @return pointer to hash table containing all values, returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_any_content_type_get_value_map(
+ const axis2_any_content_type_t * any_content_type,
+ const axutil_env_t * env);
+
+ /**
+ * Frees any content type struct.
+ * @param any_content_type pointer to any content type struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_any_content_type_free(
+ axis2_any_content_type_t * any_content_type,
+ const axutil_env_t * env);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_ANY_CONTENT_TYPE_H */
diff --git a/include/axis2_async_result.h b/include/axis2_async_result.h
new file mode 100644
index 0000000..bd6e3d3
--- /dev/null
+++ b/include/axis2_async_result.h
@@ -0,0 +1,98 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_ASYNC_RESULT_H
+#define AXIS2_ASYNC_RESULT_H
+
+/**
+ * @defgroup axis2_async_result async result
+ * @ingroup axis2_client_api
+ * async_result is used to capture the result of an asynchronous invocation.
+ * async_result stores the result in the form of a message context instance,
+ * the user can extract the resulting SOAP envelope from this message context.
+ * @{
+ */
+
+/**
+ * @file axis2_async_result.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_msg_ctx.h>
+#include <axiom_soap_envelope.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_async_result */
+ typedef struct axis2_async_result axis2_async_result_t;
+
+ /**
+ * Gets the SOAP envelope stored inside the resulting message context.
+ * @param async_result pointer to async result struct
+ * @param env pointer to environment struct
+ * @return pointer to the result SOAP envelope in the message context.
+ */
+ AXIS2_EXTERN axiom_soap_envelope_t *AXIS2_CALL
+ axis2_async_result_get_envelope(
+ axis2_async_result_t * async_result,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the result in the form of message context.
+ * @param async_result pointer to async result struct
+ * @param env pointer to environment struct
+ * @return pointer to result message context
+ */
+ AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
+ axis2_async_result_get_result(
+ axis2_async_result_t * async_result,
+ const axutil_env_t * env);
+
+ /**
+ * Frees the async result.
+ * @param async_result pointer to async result struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_async_result_free(
+ axis2_async_result_t * async_result,
+ const axutil_env_t * env);
+
+ /** Creates an async result struct to help deal with results of asynchronous
+ * invocations.
+ * @param env pointer to environment struct
+ * @param result pointer to result message context into which the resulting
+ * SOAP message is to be captured
+ * @return newly created async_result struct
+ */
+ AXIS2_EXTERN axis2_async_result_t *AXIS2_CALL
+ axis2_async_result_create(
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * result);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_ASYNC_RESULT_H */
diff --git a/include/axis2_callback.h b/include/axis2_callback.h
new file mode 100644
index 0000000..84d0906
--- /dev/null
+++ b/include/axis2_callback.h
@@ -0,0 +1,263 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_CALLBACK_H
+#define AXIS2_CALLBACK_H
+
+/**
+ * @defgroup axis2_callback callback
+ * @ingroup axis2_client_api
+ * callback represents the callback mechanisms to be used in case of asynchronous
+ * invocations. It holds the complete status of the invocation, the resulting
+ * SOAP envelope and also callback specific data. One can define a function
+ * to be called on complete of the callback as well as a function to be called
+ * on error.
+ * @{
+ */
+
+/**
+ * @file axis2_callback.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_async_result.h>
+#include <axiom_soap_envelope.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for axis2_callback */
+ typedef struct axis2_callback axis2_callback_t;
+
+ /** Type name for function pointer to be called on complete of callback */
+ typedef axis2_status_t AXIS2_CALL
+ axis2_on_complete_func_ptr(
+ axis2_callback_t *,
+ const axutil_env_t *);
+
+ /** Type name for function pointer to be called on error of callback */
+ typedef axis2_status_t AXIS2_CALL
+ axis2_on_error_func_ptr(
+ axis2_callback_t *,
+ const axutil_env_t *,
+ int);
+
+ /**
+ * This function is called once the asynchronous operation is successfully
+ * completed and the result is available.
+ * @param callback pointer to callback struct
+ * @param env pointer to environment struct
+ * @param result pointer to async result
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_callback_invoke_on_complete(
+ axis2_callback_t * callback,
+ const axutil_env_t * env,
+ axis2_async_result_t * result);
+
+ /**
+ * This function is called once the asynchronous operation fails and
+ * the failure code returns.
+ * @param callback pointer to callback struct
+ * @param env pointer to environment struct
+ * @param exception error code representing the error
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_callback_report_error(
+ axis2_callback_t * callback,
+ const axutil_env_t * env,
+ const int exception);
+
+ /**
+ * Gets the complete status for the callback. This method is useful
+ * for polling (busy waiting).
+ * e.g.
+ * <code>
+ * <pre>
+ * while(!axis2_callback_get_complete(callback, env)
+ * {
+ * sleep(10);
+ * }
+ * do whatever you need here
+ * </pre>
+ * </code>
+ * @param callback pointer to callback struct
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if callback is complete, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_callback_get_complete(
+ const axis2_callback_t * callback,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the complete status.
+ * @param callback pointer to callback struct
+ * @param env pointer to environment struct
+ * @param complete bool value representing the status
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_callback_set_complete(
+ axis2_callback_t * callback,
+ const axutil_env_t * env,
+ const axis2_bool_t complete);
+
+ /**
+ * Gets the resulting SOAP envelope.
+ * @param callback pointer to callback struct
+ * @param env pointer to environment struct
+ * @return result SOAP envelope if present, else NULL
+ */
+ AXIS2_EXTERN axiom_soap_envelope_t *AXIS2_CALL
+ axis2_callback_get_envelope(
+ const axis2_callback_t * callback,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the SOAP envelope.
+ * @param callback pointer to callback struct
+ * @param env pointer to environment struct
+ * @param envelope pointer to SOAP envelope
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_callback_set_envelope(
+ axis2_callback_t * callback,
+ const axutil_env_t * env,
+ axiom_soap_envelope_t * envelope);
+
+ /**
+ * Gets the resulting message context.
+ * @param callback pointer to callback struct
+ * @param env pointer to environment struct
+ * @return result message context if present, else NULL
+ */
+ AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
+ axis2_callback_get_msg_ctx(
+ const axis2_callback_t * callback,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the message context.
+ * @param callback pointer to callback struct
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_callback_set_msg_ctx(
+ axis2_callback_t * callback,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * Gets error code representing the error.
+ * @param callback pointer to callback struct
+ * @param env pointer to environment struct
+ * @return error code representing the error
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_callback_get_error(
+ const axis2_callback_t * callback,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the error code.
+ * @param callback pointer to callback struct
+ * @param env pointer to environment struct
+ * @param error error code representing the error
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_callback_set_error(
+ axis2_callback_t * callback,
+ const axutil_env_t * env,
+ const int error);
+
+ /**
+ * Sets the callback data.
+ * @param callback pointer to callback struct
+ * @param data pointer to data
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_callback_set_data(
+ axis2_callback_t * callback,
+ void *data);
+
+ /**
+ * Gets the callback data.
+ * @param callback pointer to callback struct
+ * @return pointer to callback data
+ */
+ AXIS2_EXTERN void *AXIS2_CALL
+ axis2_callback_get_data(
+ const axis2_callback_t * callback);
+
+ /**
+ * Sets the on complete callback function.
+ * @param callback pointer to callback struct
+ * @param f on complete callback function pointer
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_callback_set_on_complete(
+ axis2_callback_t * callback,
+ axis2_on_complete_func_ptr f);
+
+ /**
+ * Sets the on error callback function.
+ * @param callback pointer to callback struct
+ * @param f on error callback function pointer
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_callback_set_on_error(
+ axis2_callback_t * callback,
+ axis2_on_error_func_ptr f);
+
+ /**
+ * Frees callback struct.
+ * @param callback pointer to callback struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_callback_free(
+ axis2_callback_t * callback,
+ const axutil_env_t * env);
+
+ /**
+ * Creates a callback struct.
+ * @param env pointer to environment struct
+ * @return pointer to newly created callback struct
+ */
+ AXIS2_EXTERN axis2_callback_t *AXIS2_CALL
+ axis2_callback_create(
+ const axutil_env_t * env);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_CALL_BACK_H */
diff --git a/include/axis2_callback_recv.h b/include/axis2_callback_recv.h
new file mode 100644
index 0000000..0192c63
--- /dev/null
+++ b/include/axis2_callback_recv.h
@@ -0,0 +1,117 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_CALLBACK_RECV_H
+#define AXIS2_CALLBACK_RECV_H
+
+/**
+ * @defgroup axis2_callback_recv callback message receiver. This can be considered as a
+ * message receiver implementation for application client side which is similar to
+ * server side message receivers like raw_xml_in_out_msg_recv. Messages received by
+ * listener manager will finally end up here.
+ *
+ * @ingroup axis2_client_api
+ * callback message receiver, that is used as the message receiver in the
+ * operation in case of asynchronous invocation for receiving the result.
+ */
+
+/**
+ * @file axis2_axis2_callback_recv.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_msg_recv.h>
+#include <axis2_callback.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_callback_recv */
+ typedef struct axis2_callback_recv axis2_callback_recv_t;
+
+ /**
+ * Gets the base struct which is of type message receiver.
+ * @param callback_recv pointer to callback receiver struct
+ * @param env pointer to environment struct
+ * @return pointer to base message receiver struct
+ */
+ AXIS2_EXTERN axis2_msg_recv_t *AXIS2_CALL
+ axis2_callback_recv_get_base(
+ axis2_callback_recv_t * callback_recv,
+ const axutil_env_t * env);
+
+ /**
+ * Frees the callback receiver struct.
+ * @param callback_recv pointer to callback receiver struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_callback_recv_free(
+ axis2_callback_recv_t * callback_recv,
+ const axutil_env_t * env);
+
+ /**
+ * Adds a callback corresponding to given WSA message ID to message
+ * receiver.
+ * @param callback_recv pointer to callback receiver struct
+ * @param env pointer to environment struct
+ * @param msg_id message ID indicating which message the callback is
+ * supposed to deal with
+ * @param callback callback to be added. callback receiver assumes
+ * ownership of the callback
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_callback_recv_add_callback(
+ struct axis2_callback_recv *callback_recv,
+ const axutil_env_t * env,
+ const axis2_char_t * msg_id,
+ axis2_callback_t * callback);
+
+ /**
+ * Creates a callback receiver struct.
+ * @param env pointer to environment struct
+ * @return a pointer to newly created callback receiver struct,
+ * or NULL on error with error code set in environment's error
+ */
+ AXIS2_EXTERN axis2_callback_recv_t *AXIS2_CALL
+ axis2_callback_recv_create(
+ const axutil_env_t * env);
+
+ /** Gets the base message receiver. */
+#define AXIS2_CALLBACK_RECV_GET_BASE(callback_recv, env) \
+ axis2_callback_recv_get_base(callback_recv, env)
+
+ /** Frees callback message receiver. */
+#define AXIS2_CALLBACK_RECV_FREE(callback_recv, env) \
+ axis2_callback_recv_free(callback_recv, env)
+
+ /** Adds callback to callback message receiver. */
+#define AXIS2_CALLBACK_RECV_ADD_CALLBACK(callback_recv, env, msg_id, callback)\
+ axis2_callback_recv_add_callback(callback_recv, env, msg_id, callback)
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_CALLBACK_RECV_H */
diff --git a/include/axis2_client.h b/include/axis2_client.h
new file mode 100644
index 0000000..d31ab74
--- /dev/null
+++ b/include/axis2_client.h
@@ -0,0 +1,44 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_CLIENT_H
+#define AXIS2_CLIENT_H
+
+/**
+ * @file axis2_clinet.h
+ * @brief
+ */
+
+#include <axis2_async_result.h>
+#include <axis2_callback.h>
+#include <axis2_op_client.h>
+#include <axis2_options.h>
+#include <axis2_stub.h>
+#include <axis2_svc_client.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_CLIENT_H */
diff --git a/include/axis2_conf.h b/include/axis2_conf.h
new file mode 100644
index 0000000..f525603
--- /dev/null
+++ b/include/axis2_conf.h
@@ -0,0 +1,822 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_CONFIG_H
+#define AXIS2_CONFIG_H
+
+/**
+ * @defgroup axis2_engine engine
+ * @ingroup axis2
+ * @{
+ * @}
+ */
+
+/**
+ * @defgroup axis2_config configuration
+ * @ingroup axis2_engine
+ * Axis2 configuration captures all configuration information. Configuration
+ * information includes user preferences along with module and
+ * service information that is either statically configured using axis2.xml
+ * file, service.xml files and module.xml files or dynamically using the
+ * functions defined in the ops struct related to this conf struct.
+ * @{
+ */
+
+/**
+ * @file axis2_config.h
+ */
+
+#include <axutil_param_container.h>
+#include <axis2_svc_grp.h>
+#include <axis2_transport_in_desc.h>
+#include <axis2_transport_out_desc.h>
+#include <axutil_qname.h>
+#include <axutil_hash.h>
+#include <axis2_phases_info.h>
+#include <axis2_msg_recv.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_conf */
+ typedef struct axis2_conf axis2_conf_t;
+
+ struct axis2_msg_recv;
+ struct axis2_phases_info;
+ struct axis2_svc_grp;
+ struct axis2_svc;
+ struct axis2_op;
+ struct axis2_dep_engine;
+ struct axis2_desp;
+
+ /**
+ * Frees conf struct.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_conf_free(
+ axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Adds a service group to the configuration.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param svc_grp pointer to service group, conf takes over the
+ * ownership of the service group
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_add_svc_grp(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ struct axis2_svc_grp *svc_grp);
+
+ /**
+ * Gets a named service group.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param svc_grp_name name of the service group to be accessed
+ * @return pointer to service group with the given name if exists,
+ * else NULL. Returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_svc_grp *AXIS2_CALL
+ axis2_conf_get_svc_grp(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env,
+ const axis2_char_t * svc_grp_name);
+
+ /**
+ * Gets all service group added to conf.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return pointer to hash table containing the service groups, returns
+ * a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_conf_get_all_svc_grps(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Adds a service to configuration.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param svc pointer to service, conf takes over the ownership of the
+ * service
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_add_svc(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ struct axis2_svc *svc);
+
+ /**
+ * Gets a service with given name.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param svc_name service name string
+ * @return pointer to service with the given name if exists, else NULL.
+ * Returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_svc *AXIS2_CALL
+ axis2_conf_get_svc(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env,
+ const axis2_char_t * svc_name);
+
+ /**
+ * Removes the named service from configuration.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param name name of service to be removed
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_remove_svc(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ const axis2_char_t * name);
+
+ /**
+ * Adds a parameter to configuration.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param param pointer to parameter struct to be added
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_add_param(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ axutil_param_t * param);
+
+ /**
+ * Gets a parameter with the given name.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param name name of the parameter to be accessed
+ * @return pointer to parameter with the given name if exists, else NULL.
+ * Returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_param_t *AXIS2_CALL
+ axis2_conf_get_param(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env,
+ const axis2_char_t * name);
+
+ /**
+ * Gets all the parameters added to the configuration.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment
+ * @return pointer to array list containing parameters if exists,
+ * else NULL. Returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_conf_get_all_params(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Checks if the named parameter is locked.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param param_name name of the parameter
+ * @return AXIS2_TRUE if parameter is locked, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_conf_is_param_locked(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env,
+ const axis2_char_t * param_name);
+
+ /**
+ * Gets in transport corresponding to the given transport QName.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param qname QName of transport
+ * @return pointer to transport in description if exists,
+ * else NULL. Returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axis2_transport_in_desc_t *AXIS2_CALL
+
+ axis2_conf_get_transport_in(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env,
+ const AXIS2_TRANSPORT_ENUMS trans_enum);
+
+ /**
+ * Adds a transport in description.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param transport pointer to transport in description. conf assumes
+ * ownership of the struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_add_transport_in(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ axis2_transport_in_desc_t * transport,
+ const AXIS2_TRANSPORT_ENUMS trans_enum);
+
+ /**
+ * Gets out transport corresponding to the given transport QName.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment strcut
+ * @param qname pointer to transport qname
+ * @return pointer to transport out description if exists,
+ * else NULL. Returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axis2_transport_out_desc_t *AXIS2_CALL
+
+ axis2_conf_get_transport_out(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env,
+ const AXIS2_TRANSPORT_ENUMS trans_enum);
+
+ /**
+ * Adds a transport out description.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param transport pointer to transport out description. conf assumes
+ * ownership of the struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_add_transport_out(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ axis2_transport_out_desc_t * transport,
+ const AXIS2_TRANSPORT_ENUMS trans_enum);
+
+ /**
+ * Gets all in transports.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return hash table containing all transport in descriptions.
+ * Returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axis2_transport_in_desc_t **AXIS2_CALL
+
+ axis2_conf_get_all_in_transports(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Gets all out transports.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return hash table containing all transport out descriptions.
+ * Returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axis2_transport_out_desc_t **AXIS2_CALL
+
+ axis2_conf_get_all_out_transports(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Gets a module with given QName.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param qname pointer to qname
+ * @return module description corresponding to the given qname
+ */
+ AXIS2_EXTERN struct axis2_module_desc *AXIS2_CALL
+ axis2_conf_get_module(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env,
+ const axutil_qname_t * qname);
+
+ /**
+ * Gets the list of engaged modules.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return a pointer to the array list of engaged modules. Returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_conf_get_all_engaged_modules(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the in phases up to and including port dispatch phase.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return a pointer to the array list of in phases up to post dispatch
+ * inclusive. Returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_conf_get_in_phases_upto_and_including_post_dispatch(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the out flow. Out flow is a list of phases invoked in the out
+ * path of execution of the engine.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return a pointer to the array list of out flow phases. Returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_conf_get_out_flow(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the in fault flow. In fault flow is a list of phases invoked in
+ * the in path of execution, if some fault happens.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return a pointer to the array list of in fault flow phases. Returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_conf_get_in_fault_flow(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the out fault flow. Out fault flow is a list of phases invoked in
+ * the out path of execution, if some fault happens.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return a pointer to the array list of out fault flow phases. Returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_conf_get_out_fault_flow(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Gets faulty services. A faulty service is a service that does not
+ * meet the service configuration criteria or a service with errors in
+ * the service dynamic link library.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return a pointer to the hash table of faulty services. Returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_conf_get_all_faulty_svcs(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Gets faulty modules. A faulty module is a module that does not
+ * meet the module configuration criteria or a module with errors in
+ * the service dynamic link library.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return a pointer to the hash table of faulty modules. Returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_conf_get_all_faulty_modules(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Gets all the list of services loaded into configuration.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return a pointer to the hash table of services. Returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_conf_get_all_svcs(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Gets all the list of services that need to be loaded into configuration
+ * at the start up of the axis2 engine.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return a pointer to the hash table of services. Returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_conf_get_all_svcs_to_load(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Checks is the named module is engaged.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param module_name pointer to QName representing the module name
+ * @return AXIS2_TRUE if named module is engaged, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_conf_is_engaged(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ const axutil_qname_t * module_name);
+
+ /**
+ * Gets phases information struct.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return a pointer to the struct containing phases information.
+ * Returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_phases_info *AXIS2_CALL
+
+ axis2_conf_get_phases_info(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Sets phases information struct.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param phases_info pointer to phases_info struct. conf assumes
+ * ownership of the struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_set_phases_info(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ struct axis2_phases_info *phases_info);
+
+ /**
+ * Adds message receiver with the given key.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param key key string with which the message receive is to be added
+ * @param msg_recv pointer to message receiver
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_add_msg_recv(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ const axis2_char_t * key,
+ struct axis2_msg_recv *msg_recv);
+
+ /**
+ * Gets message receiver with the given key.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param key key string corresponding to the message receiver to
+ * be retrieved
+ * @return pointer to the message receiver with the given key if it
+ * exists, else null. Returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_msg_recv *AXIS2_CALL
+ axis2_conf_get_msg_recv(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env,
+ axis2_char_t * key);
+
+ /**
+ * Sets the list of out phases.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param out_phases pointer to array list of the phases. conf assumes
+ * ownership of the struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_set_out_phases(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ axutil_array_list_t * out_phases);
+
+ /**
+ * Gets the list of out phases.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return pointer to array list of out phases. Returns a reference,
+ * not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_conf_get_out_phases(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Sets fault phases for in path.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param list pointer to array list of phases
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_set_in_fault_phases(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ axutil_array_list_t * list);
+
+ /**
+ * Sets fault phases for out path.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param list pointer to array list of phases
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_set_out_fault_phases(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ axutil_array_list_t * list);
+
+ /**
+ * Gets all modules configured,
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return a pointer to hash table containing the list of modules.
+ * Returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_conf_get_all_modules(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Adds a module.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param module pointer to module struct to be added
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_add_module(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ struct axis2_module_desc *module);
+
+ /**
+ * Sets the default dispatchers.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_conf_set_default_dispatchers(
+ axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Sets a custom dispatching phase.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param dispatch pointer to phase to be dispatched
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_set_dispatch_phase(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ axis2_phase_t * dispatch);
+
+ /**
+ * Gets the repository location.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return returns repository location as a string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_conf_get_repo(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the repository location.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param axis2_repo repository location as a string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_set_repo(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ axis2_char_t * axis2_repo);
+
+
+ /**
+ * Gets the axis2.xml location.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @return returns repository location as a string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_conf_get_axis2_xml(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the axis2.xml location.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param axis2_xml repository location as a string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_set_axis2_xml(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ axis2_char_t * axis2_xml);
+
+ /**
+ * Engages the named module.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param module_ref pointer to the QName of the module to be engaged
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_engage_module(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ const axutil_qname_t * module_ref);
+
+ /**
+ * Sets the deployment engine.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param dep_engine pointer to dep_engine struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_set_dep_engine(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ struct axis2_dep_engine *dep_engine);
+
+ /**
+ * Gets the default module version for the named module.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param module_name module name string
+ * @return default module version as a string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+
+ axis2_conf_get_default_module_version(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env,
+ const axis2_char_t * module_name);
+
+ /**
+ * Gets the default module reference for the named module.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param module_name module name string
+ * @return pointer to the module description struct corresponding to
+ * the given name
+ */
+ AXIS2_EXTERN struct axis2_module_desc *AXIS2_CALL
+
+ axis2_conf_get_default_module(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env,
+ const axis2_char_t * module_name);
+
+ /**
+ * Adds a default module version for the named module.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param module_name name of the module
+ * @param module_version default version for the module
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_conf_add_default_module_version(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ const axis2_char_t * module_name,
+ const axis2_char_t * module_version);
+
+ /**
+ * Engages the module with the given version.
+ * @param conf pointer to conf struct
+ * @param env pointer to environment struct
+ * @param module_name name of the module to be engaged
+ * @param version_id version of the module to be engaged
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_conf_engage_module_with_version(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ const axis2_char_t * module_name,
+ const axis2_char_t * version_id);
+
+ /**
+ * Creates configuration struct.
+ * @param env pointer to environment struct
+ * @return pointer to newly created configuration
+ */
+ AXIS2_EXTERN axis2_conf_t *AXIS2_CALL
+ axis2_conf_create(
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_conf_get_enable_mtom(
+ axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_set_enable_mtom(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ axis2_bool_t enable_mtom);
+
+ /**
+ * set a flag to mark conf created by axis2.xml
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_conf_get_axis2_flag(
+ axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_set_axis2_flag(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ axis2_bool_t axis2_flag);
+
+ /*The following two methods are used in Rampart to
+ *check whether security is engaed. */
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_conf_get_enable_security(
+ axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_set_enable_security(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ axis2_bool_t enable_security);
+
+ AXIS2_EXTERN void *AXIS2_CALL
+ axis2_conf_get_security_context(
+ axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_set_security_context(
+ axis2_conf_t * conf,
+ const axutil_env_t * env,
+ void *security_context);
+
+ AXIS2_EXTERN axutil_param_container_t *AXIS2_CALL
+
+ axis2_conf_get_param_container(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ /**
+ * Gets base description.
+ * @param conf pointer to message
+ * @param env pointer to environment struct
+ * @return pointer to base description struct
+ */
+ AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+ axis2_conf_get_base(
+ const axis2_conf_t * conf,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axutil_array_list_t * AXIS2_CALL
+ axis2_conf_get_handlers(const axis2_conf_t * conf,
+ const axutil_env_t * env);
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_CONFIG_H */
diff --git a/include/axis2_conf_ctx.h b/include/axis2_conf_ctx.h
new file mode 100644
index 0000000..408e6a3
--- /dev/null
+++ b/include/axis2_conf_ctx.h
@@ -0,0 +1,327 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_CONF_CTX_H
+#define AXIS2_CONF_CTX_H
+
+/**
+ * @defgroup axis2_conf_ctx configuration context
+ * @ingroup axis2_context
+ * configuration context is the holder for all the state information
+ * related to configuration. It holds all the service group context, service
+ * context and operation context that exists within an engine instance.
+ * An engine instance has only one configuration context associated with it
+ * (Singleton pattern).
+ * @{
+ */
+
+/**
+ * @file axis2_conf_ctx.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_hash.h>
+#include <axutil_env.h>
+#include <axis2_ctx.h>
+#include <axis2_svc_grp_ctx.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_conf_ctx */
+ typedef struct axis2_conf_ctx axis2_conf_ctx_t;
+
+ struct axis2_conf;
+
+ /**
+ * Creates a configuration context struct instance.
+ * @param env pointer to environment struct
+ * @param conf pointer to configuration, configuration context assumes
+ * ownership of the configuration
+ * @return pointer to newly created configuration context
+ */
+ AXIS2_EXTERN axis2_conf_ctx_t *AXIS2_CALL
+ axis2_conf_ctx_create(
+ const axutil_env_t * env,
+ struct axis2_conf *conf);
+
+ /**
+ * Sets the configuration associated with the engine instance.
+ * @param conf_ctx pointer to configuration context
+ * @param env pointer to environment struct
+ * @param conf pointer to configuration
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_ctx_set_conf(
+ axis2_conf_ctx_t * conf_ctx,
+ const axutil_env_t * env,
+ struct axis2_conf *conf);
+
+ /**
+ * Gets the base struct, which is of type context
+ * @param conf_ctx pointer to configuration context
+ * @param env pointer to environment struct
+ * @return pointer to context struct, returns a reference not a cloned
+ * copy
+ */
+ AXIS2_EXTERN axis2_ctx_t *AXIS2_CALL
+ axis2_conf_ctx_get_base(
+ const axis2_conf_ctx_t * conf_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the configuration of the engine.
+ * @param conf_ctx pointer to configuration context
+ * @param env pointer to environment struct
+ * @return pointer to configuration struct, returns a reference not a
+ * cloned copy
+ */
+ AXIS2_EXTERN axis2_conf_t *AXIS2_CALL
+ axis2_conf_ctx_get_conf(
+ const axis2_conf_ctx_t * conf_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the hash map of operation context instances.
+ * @param conf_ctx pointer to configuration context
+ * @param env pointer to environment struct
+ * @return pointer to hash map containing all operation contexts
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_conf_ctx_get_op_ctx_map(
+ const axis2_conf_ctx_t * conf_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the hash map of service context instances.
+ * @param conf_ctx pointer to configuration context
+ * @param env pointer to environment struct
+ * @return pointer to hash map containing all service contexts
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_conf_ctx_get_svc_ctx_map(
+ const axis2_conf_ctx_t * conf_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the hash map of service group context instances.
+ * @param conf_ctx pointer to configuration context
+ * @param env pointer to environment struct
+ * @return pointer to hash map containing all service group contexts
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_conf_ctx_get_svc_grp_ctx_map(
+ const axis2_conf_ctx_t * conf_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Registers an operation context with the given message ID.
+ * @param conf_ctx pointer to configuration context
+ * @param env pointer to environment struct
+ * @param message_id message id related to the operation context
+ * @param op_ctx pointer to operation context, conf context assumes
+ * ownership of the operation context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_ctx_register_op_ctx(
+ axis2_conf_ctx_t * conf_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * message_id,
+ axis2_op_ctx_t * op_ctx);
+
+ /**
+ * Gets operation context corresponding to the given message ID.
+ * @param conf_ctx pointer to configuration context
+ * @param env pointer to environment struct
+ * @param message_id message ID related to the operation to be retrieved
+ * @return pointer to operation context related to the given message ID
+ */
+ AXIS2_EXTERN axis2_op_ctx_t *AXIS2_CALL
+ axis2_conf_ctx_get_op_ctx(
+ const axis2_conf_ctx_t * conf_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * message_id);
+
+ /**
+ * Registers a service context with the given service ID.
+ * @param conf_ctx pointer t configuration context
+ * @param env pointer to environment struct
+ * @param svc_id ID of the service to be added
+ * @param svc_ctx pointer to service context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_ctx_register_svc_ctx(
+ axis2_conf_ctx_t * conf_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * svc_id,
+ axis2_svc_ctx_t * svc_ctx);
+
+ /**
+ * Gets service context with the given service ID
+ * @param conf_ctx pointer to configuration context
+ * @param env pointer to environment struct
+ * @param svc_id service ID
+ * @return pointer to service context with the given service ID
+ */
+ AXIS2_EXTERN struct axis2_svc_ctx *AXIS2_CALL
+ axis2_conf_ctx_get_svc_ctx(
+ const axis2_conf_ctx_t * conf_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * svc_id);
+
+ /**
+ * Registers a service group context with the given service group ID.
+ * @param conf_ctx pointer to configuration context
+ * @param env pointer to environment struct
+ * @param svc_grp_id service group id
+ * @param svc_grp_ctx pointer to service group context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_ctx_register_svc_grp_ctx(
+ axis2_conf_ctx_t * conf_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * svc_grp_id,
+ axis2_svc_grp_ctx_t * svc_grp_ctx);
+
+ /**
+ * Gets service group with the given service group ID.
+ * @param conf_ctx pointer to configuration context
+ * @param env pointer to environment struct
+ * @param svc_grp_id service group id
+ * @return pointer to service group context with the given ID
+ */
+ AXIS2_EXTERN axis2_svc_grp_ctx_t *AXIS2_CALL
+ axis2_conf_ctx_get_svc_grp_ctx(
+ const axis2_conf_ctx_t * conf_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * svc_grp_id);
+
+ /**
+ * Gets the root working directory. It is in this directory that the
+ * axis2.xml configuration file is located. The services and modules
+ * sub folders too are located in this directory.
+ * @param conf_ctx pointer to configuration context
+ * @param env pointer to environment struct
+ * @return pointer to string containing the root folder name
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_conf_ctx_get_root_dir(
+ const axis2_conf_ctx_t * conf_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the root working directory. It is in this directory that the
+ * axis2.xml configuration file is located. The services and modules
+ * sub folders too are located in this directory.
+ * @param conf_ctx pointer to configuration context
+ * @param env pointer to environment struct
+ * @param path string containing the path of root directory
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_ctx_set_root_dir(
+ axis2_conf_ctx_t * conf_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * path);
+
+ /**
+ * Initializes the configuration context. Within this function, it would
+ * initialize all the service group context, service context and
+ * operation context instances stored within configuration context.
+ * @param conf_ctx pointer to configuration context
+ * @param env pointer to environment struct
+ * @param conf pointer to configuration struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_ctx_init(
+ axis2_conf_ctx_t * conf_ctx,
+ const axutil_env_t * env,
+ axis2_conf_t * conf);
+
+ /**
+ * Frees configuration context struct.
+ * @param conf_ctx pointer to configuration context
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_conf_ctx_free(
+ axis2_conf_ctx_t * conf_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * This method fills the context hierarchy (service group, service and
+ * operation contexts that is) for the service and operation found in
+ * the given message context. If the context hierarchy is not already
+ * built it will create the contexts and build the context hierarchy.
+ * @param conf_ctx pointer to configuration context
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context with service and operation
+ * for which the context hierarchy is to be built set
+ * @return pointer to the service group context, which is the root of
+ * the context hierarchy for given service and operation
+ */
+ AXIS2_EXTERN axis2_svc_grp_ctx_t *AXIS2_CALL
+ axis2_conf_ctx_fill_ctxs(
+ axis2_conf_ctx_t * conf_ctx,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * Sets a property with the given key.
+ * @param ctx pointer to context struct
+ * @param env pointer to environment struct
+ * @param key key string to store the property with
+ * @param value pointer to property to be stored, context assumes the
+ * ownership of the property
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_conf_ctx_set_property(
+ axis2_conf_ctx_t *conf_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * key,
+ axutil_property_t * value);
+
+ /**
+ * Gets the property with the given key.
+ * @param ctx pointer to context struct
+ * @param env pointer to environment struct
+ * @param key key string
+ * @return pointer to property struct corresponding to the given key
+ */
+ AXIS2_EXTERN axutil_property_t *AXIS2_CALL
+ axis2_conf_ctx_get_property(
+ const axis2_conf_ctx_t * conf_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * key);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_CONF_CTX_H */
diff --git a/include/axis2_conf_init.h b/include/axis2_conf_init.h
new file mode 100644
index 0000000..8884987
--- /dev/null
+++ b/include/axis2_conf_init.h
@@ -0,0 +1,74 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_CONF_INIT_H
+#define AXIS2_CONF_INIT_H
+
+/** @defgroup axis2_conf_init configuration initilizing functions
+ * @ingroup axis2_deployment
+ * @{
+ */
+
+#include <axutil_env.h>
+#include <axutil_utils_defines.h>
+#include <axis2_conf_ctx.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * Builds the configuration for the Server
+ * @param env Pointer to environment struct. MUST NOT be NULL
+ * @param repo_name repository name
+ * @return pointer to an instance of configuration context properly initialized
+ */
+ AXIS2_EXTERN axis2_conf_ctx_t *AXIS2_CALL
+ axis2_build_conf_ctx(
+ const axutil_env_t * env,
+ const axis2_char_t * repo_name);
+
+ /**
+ * Builds the configuration for the Server using axis2.xml file.
+ * @param env Pointer to environment struct. MUST NOT be NULL
+ * @param file path of the axis2.xml file
+ * @return pointer to an instance of configuration context properly initialized
+ */
+ AXIS2_EXTERN axis2_conf_ctx_t *AXIS2_CALL
+ axis2_build_conf_ctx_with_file(
+ const axutil_env_t * env,
+ const axis2_char_t * file);
+
+ /**
+ * Builds the Configuration for the Client
+ * @param env Pointer to environment struct. MUST NOT be NULL
+ * @param axis2_home axis2 home for client.
+ * @return pointer to an instance of configuration context properly initialized
+ */
+ AXIS2_EXTERN axis2_conf_ctx_t *AXIS2_CALL
+ axis2_build_client_conf_ctx(
+ const axutil_env_t * env,
+ const axis2_char_t * axis2_home);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_CONF_INIT_H */
diff --git a/include/axis2_const.h b/include/axis2_const.h
new file mode 100644
index 0000000..1923bab
--- /dev/null
+++ b/include/axis2_const.h
@@ -0,0 +1,445 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_CONST_H
+#define AXIS2_CONST_H
+
+/**
+ * @file axis2.h
+ * @brief Axis2c specific global declarations
+ */
+
+#include <axutil_env.h>
+#include <axutil_utils.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** @defgroup axis2 Axis2/C project
+ * @{
+ * @}
+ */
+
+ /** \mainpage Axis2/C API Documentation
+ *
+ * \section intro_sec Introduction
+ *
+ * This is the API documetation of Axis2/C, a SOAP engine written in C.
+ * This implementation is based on the popular Axis2 architecture.
+ * <p>We welcome your feedback on this implementation and documentation.
+ * Please send your feedback to <a href="mailto:axis-c-user@ws.apache.org">
+ * axis-c-user@ws.apache.org</a> and please remember to prefix the subject
+ * of the mail with [Axis2].
+ *
+ */
+
+ /******************************************************************************/
+
+ /********************Axis2 specific constants**********************************/
+
+ /******************************************************************************/
+
+ /**
+ * Field SOAP_STYLE_RPC_ENCODED
+ */
+#define AXIOM_SOAP_STYLE_RPC_ENCODED 1000
+
+ /**
+ * Field SOAP_STYLE_RPC_LITERAL
+ */
+
+ /*#define AXIOM_SOAP_STYLE_RPC_LITERAL 1001 */
+
+ /**
+ * Field SOAP_STYLE_DOC_LITERAL_WRAPPED
+ */
+#define AXIOM_SOAP_STYLE_DOC_LITERAL_WRAPPED 1002
+
+#define AXIS2_SCOPE "scope"
+
+ /**
+ * Field APPLICATION_SCOPE
+ */
+#define AXIS2_APPLICATION_SCOPE "application"
+
+ /**
+ * Field SESSION_SCOPE
+ */
+#define AXIS2_SESSION_SCOPE "session"
+
+ /**
+ * Field GLOBAL_SCOPE
+ */
+#define AXIS2_MESSAGE_SCOPE "message"
+
+ /**
+ * Field PHASE_SERVICE
+ */
+#define AXIS2_PHASE_SERVICE "service"
+
+ /**
+ * Field PHASE_TRANSPORT
+ */
+#define AXIS2_PHASE_TRANSPORT "transport"
+
+ /**
+ * Field PHASE_GLOBAL
+ */
+#define AXIS2_PHASE_GLOBAL "global"
+
+ /**
+ * Field SESSION_CONTEXT_PROPERTY
+ */
+#define AXIS2_SESSION_CONTEXT_PROPERTY "SessionContext"
+
+ /**
+ * TRANSPORT constants
+ */
+#define AXIS2_TRANSPORT_HTTP "http"
+#define AXIS2_TRANSPORT_SMTP "smtp"
+#define AXIS2_TRANSPORT_TCP "tcp"
+#define AXIS2_TRANSPORT_XMPP "xmpp"
+#define AXIS2_TRANSPORT_HTTPS "https"
+#define AXIS2_TRANSPORT_AMQP "amqp"
+#define AXIS2_TRANSPORT_UDP "soap.udp"
+ typedef enum
+ {
+ AXIS2_TRANSPORT_ENUM_HTTP = 0,
+ AXIS2_TRANSPORT_ENUM_SMTP,
+ AXIS2_TRANSPORT_ENUM_TCP,
+ AXIS2_TRANSPORT_ENUM_XMPP,
+ AXIS2_TRANSPORT_ENUM_HTTPS,
+ AXIS2_TRANSPORT_ENUM_AMQP,
+ AXIS2_TRANSPORT_ENUM_UDP,
+ AXIS2_TRANSPORT_ENUM_MAX
+ } AXIS2_TRANSPORT_ENUMS;
+
+ /** Service URL prefix */
+#ifndef AXIS2_REQUEST_URL_PREFIX
+#define AXIS2_REQUEST_URL_PREFIX "/services"
+#endif
+
+#define AXIS2_LISTSERVICES "listServices"
+
+#define AXIS2_LIST_SERVICE_FOR_MODULE_ENGAMNET "listop"
+
+ /**
+ * List service for admin page
+ */
+#define AXIS2_ADMIN_LISTSERVICES "listService"
+
+#define AXIS2_LIST_MODULES "listModules"
+
+#define AXIS2_LIST_GLOABLLY_ENGAGED_MODULES "globalModules"
+
+#define AXIS2_LIST_PHASES "listPhases"
+
+#define AXIS2_ENGAGE_GLOBAL_MODULE "engagingglobally"
+#define AXIS2_ENGAGE_MODULE_TO_SERVICE "engageToService"
+
+#define AXIS2_ENGAGE_MODULE_TO_SERVICE_GROUP "engageToServiceGroup"
+
+#define AXIS2_ADMIN_LOGIN "adminlogin"
+
+#define AXIS2_LIST_CONTEXTS "listContexts"
+#define AXIS2_LOGOUT "logout"
+
+#define AXIS2_VIEW_GLOBAL_HANDLERS "viewGlobalHandlers"
+#define AXIS2_SELECT_SERVICE "selectService"
+#define AXIS2_EDIR_SERVICE_PARA "editServicepara"
+#define AXIS2_SELECT_SERVICE_FOR_PARA_EDIT "selectServiceParaEdit"
+#define AXIS2_VIEW_SERVICE_HANDLERS "viewServiceHandlers"
+#define AXIS2_LIST_SERVIC_GROUPS "listServciceGroups"
+
+ /**
+ * Field SERVICE_MAP
+ */
+#define AXIS2_SERVICE_MAP "servicemap"
+#define AXIS2_SERVICE_GROUP_MAP "serviceGroupmap"
+
+#define AXIS2_CONFIG_CONTEXT "config_context"
+#define AXIS2_ACTION_MAPPING "actionMapping"
+#define AXIS2_OUTPUT_ACTION_MAPPING "outputActionMapping"
+#define AXI2_FAULT_ACTION_MAPPING "faultActionMapping"
+
+#define AXIS2_SERVICE "service"
+
+#define AXIS2_OPEARTION_MAP "opmap"
+
+ /**
+ * Field Available modules
+ */
+#define AXIS2_MODULE_MAP "modulemap"
+
+#define AXIS2_SELECT_SERVICE_TYPE "SELECT_SERVICE_TYPE"
+
+#define AXIS2_GLOBAL_HANDLERS "axisconfig"
+#define AXIS2_SERVICE_HANDLERS "serviceHandlers"
+
+#define AXIS2_PHASE_LIST "phaseList"
+
+#define AXIS2_LIST_OPS_FOR_THE_SERVICE "listOperations"
+
+#define AXIS2_REMOVE_SERVICE "removeService"
+
+#define AXIS2_ENGAGE_STATUS "engagestatus"
+
+ /**
+ * Errorness servcie
+ */
+#define AXIS2_ERROR_SERVICE_MAP "errprservicemap"
+#define AXIS2_ERROR_MODULE_MAP "errormodulesmap"
+
+#define AXIS2_IS_FAULTY "Fault"
+
+#define AXIS2_MODULE_ADDRESSING "addressing"
+
+#define AXIS2_USE_SEPARATE_LISTENER "use_listener"
+
+#define AXIS2_USER_NAME "userName"
+#define AXIS2_PASSWORD "password"
+
+ /**
+ * Field SINGLE_SERVICE
+ */
+#define AXIS2_SINGLE_SERVICE "singleservice"
+#define AXIS2_WSDL_CONTENT "wsdl"
+#define AXIS2_REQUEST_WSDL "?wsdl"
+
+#define AXIS2_STYLE_RPC "rpc"
+#define AXIS2_STYLE_DOC "doc"
+#define AXIS2_STYLE_MSG "msg"
+
+ typedef enum axis2_wsdl_msg_labels
+ {
+ AXIS2_WSDL_MESSAGE_LABEL_IN = 0,
+ AXIS2_WSDL_MESSAGE_LABEL_OUT,
+ AXIS2_WSDL_MESSAGE_LABEL_MAX
+ } axis2_wsdl_msg_labels_t;
+
+ /*********************Message Exchange Pattern Constants***********************/
+
+ /**
+ * Field MEP_URI_IN_ONLY
+ */
+#define AXIS2_MEP_URI_IN_ONLY "http://www.w3.org/2004/08/wsdl/in-only"
+
+#define AXIS2_MEP_URI_IN_ONLY_WSDL2 "http://www.w3.org/ns/wsdl/in-only"
+
+#define AXIS2_MEP_CONSTANT_IN_ONLY 10
+
+ /**
+ * Field MEP_URI_ROBUST_IN_ONLY
+ */
+#define AXIS2_MEP_URI_ROBUST_IN_ONLY "http://www.w3.org/2004/08/wsdl/robust-in-only"
+#define AXIS2_MEP_URI_ROBUST_IN_ONLY_WSDL2 "http://www.w3.org/wsdl/robust-in-only"
+
+
+#define AXIS2_MEP_CONSTANT_ROBUST_IN_ONLY 11
+
+ /**
+ * Field MEP_URI_IN_OUT
+ */
+#define AXIS2_MEP_URI_IN_OUT "http://www.w3.org/2004/08/wsdl/in-out"
+
+#define AXIS2_MEP_URI_IN_OUT_WSDL2 "http://www.w3.org/ns/wsdl/in-out"
+
+#define AXIS2_MEP_CONSTANT_IN_OUT 12
+
+ /**
+ * Field MEP_URI_IN_OPTIONAL_OUT
+ */
+#define AXIS2_MEP_URI_IN_OPTIONAL_OUT "http://www.w3.org/2004/08/wsdl/in-opt-out"
+
+#define AXIS2_MEP_URI_IN_OPTIONAL_OUT_WSDL2 "http://www.w3.org/wsdl/in-opt-out"
+
+#define AXIS2_MEP_CONSTANT_IN_OPTIONAL_OUT 13
+
+ /**
+ * Field MEP_URI_OUT_ONLY
+ */
+#define AXIS2_MEP_URI_OUT_ONLY "http://www.w3.org/2004/08/wsdl/out-only"
+
+#define AXIS2_MEP_URI_OUT_ONLY_WSDL2 "http://www.w3.org/wsdl/out-only"
+
+#define AXIS2_MEP_CONSTANT_OUT_ONLY 14
+
+ /**
+ * Field MEP_URI_ROBUST_OUT_ONLY
+ */
+#define AXIS2_MEP_URI_ROBUST_OUT_ONLY "http://www.w3.org/2004/08/wsdl/robust-out-only"
+
+#define AXIS2_MEP_URI_ROBUST_OUT_ONLY_WSDL2 "http://www.w3.org/wsdl/robust-out-only"
+
+#define AXIS2_MEP_CONSTANT_ROBUST_OUT_ONLY 15
+
+ /**
+ * Field MEP_URI_OUT_IN
+ */
+#define AXIS2_MEP_URI_OUT_IN "http://www.w3.org/2004/08/wsdl/out-in"
+
+#define AXIS2_MEP_URI_OUT_IN_WSDL2 "http://www.w3.org/wsdl/out-in"
+
+#define AXIS2_MEP_CONSTANT_OUT_IN 16
+
+ /**
+ * Field MEP_URI_OUT_OPTIONL_IN
+ */
+#define AXIS2_MEP_URI_OUT_OPTIONAL_IN "http://www.w3.org/2004/08/wsdl/out-opt-in"
+
+#define AXIS2_MEP_URI_OUT_OPTIONAL_IN_WSDL2 "http://www.w3.org/wsdl/out-opt-in"
+
+#define AXIS2_MEP_CONSTANT_OUT_OPTIONAL_IN 17
+
+#define AXIS2_MEP_CONSTANT_INVALID -1
+
+ /**
+ * Field WSDL_MESSAGE_DIRECTION_IN
+ */
+#define AXIS2_WSDL_MESSAGE_DIRECTION_IN "in"
+
+ /**
+ * Field WSDL_MESSAGE_DIRECTION_OUT
+ */
+#define AXIS2_WSDL_MESSAGE_DIRECTION_OUT "out"
+
+ /**
+ * Field AXIS2_REST_HTTP_LOCATION
+ */
+#define AXIS2_REST_HTTP_LOCATION "RESTLocation"
+
+ /**
+ * Field AXIS2_REST_HTTP_METHOD
+ */
+#define AXIS2_REST_HTTP_METHOD "RESTMethod"
+
+ /**
+ * Field AXIS2_DEFAULT_REST_HTTP_METHOD
+ */
+#define AXIS2_DEFAULT_REST_HTTP_METHOD "defaultRESTMethod"
+
+ /**
+ * Field METHOD_NAME_ESCAPE_CHARACTOR
+ */
+
+ /* static const char METHOD_NAME_ESCAPE_CHARACTOR '?' */
+
+#define AXIS2_LOGGED "Logged"
+
+ /* static const char SERVICE_NAME_SPLIT_CHAR':' */
+
+ /*********************Configuration *******************************************/
+
+#define AXIS2_ENABLE_REST "enableREST"
+#define AXIS2_ENABLE_REST_THROUGH_GET "restThroughGet"
+
+#define AXIS2_FORCE_PROXY_AUTH "forceProxyAuth"
+#define AXIS2_FORCE_HTTP_AUTH "forceHTTPAuth"
+
+#define AXIS2_PROXY_AUTH_TYPE "proxyAuthType"
+#define AXIS2_HTTP_AUTH_TYPE "HTTPAuthType"
+
+ /**
+ * Constant for Testing Proxy Authentication
+ */
+#define AXIS2_TEST_PROXY_AUTH "testProxyAuth"
+
+ /**
+ * Constant for Testing HTTP Authentication
+ */
+#define AXIS2_TEST_HTTP_AUTH "testHTTPAuth"
+
+ /* add xml declaration */
+#define AXIS2_XML_DECLARATION "xml-declaration"
+#define AXIS2_ADD_XML_DECLARATION "insert"
+
+ /* globally enable MTOM */
+#define AXIS2_ENABLE_MTOM "enableMTOM"
+#define AXIS2_ATTACHMENT_DIR "attachmentDIR"
+#define AXIS2_MTOM_BUFFER_SIZE "MTOMBufferSize"
+#define AXIS2_MTOM_MAX_BUFFERS "MTOMMaxBuffers"
+#define AXIS2_MTOM_CACHING_CALLBACK "MTOMCachingCallback"
+#define AXIS2_MTOM_SENDING_CALLBACK "MTOMSendingCallback"
+#define AXIS2_ENABLE_MTOM_SERVICE_CALLBACK "EnableMTOMServiceCallback"
+
+ /* op_ctx persistance */
+#define AXIS2_PERSIST_OP_CTX "persistOperationContext"
+
+#define AXIS2_EXPOSE_HEADERS "exposeHeaders"
+
+ /******************************************************************************/
+
+#define AXIS2_VALUE_TRUE "true"
+#define AXIS2_VALUE_FALSE "false"
+#define AXIS2_CONTAINER_MANAGED "ContainerManaged"
+#define AXIS2_RESPONSE_WRITTEN "CONTENT_WRITTEN"
+
+#define AXIS2_TESTING_PATH "target/test-resources/"
+
+#define AXIS2_TESTING_REPOSITORY "target/test-resources/samples"
+
+ /* Indicate whether the axis2 service should be loaded at start up */
+#define AXIS2_LOAD_SVC_STARTUP "loadServiceAtStartup"
+
+ /*************************** REST_WITH_GET ************************************/
+
+#define AXIS2_GET_PARAMETER_OP "op"
+#define AXIS2_GET_PARAMETER_URL "http://ws.apache.org/goGetWithREST"
+
+ /******************************************************************************/
+
+#define AXIS2_NAMESPACE_PREFIX "axis2"
+#define AXIS2_NAMESPACE_URI "http://ws.apache.org/namespaces/axis2"
+
+#define AXIS2_SVC_GRP_ID "ServiceGroupId"
+
+#define AXIS2_RESPONSE_SOAP_ENVELOPE "Axis2ResponseEnvelope"
+#define AXIS2_HANDLER_ALREADY_VISITED "handler_already_visited"
+#define AXIS2_IS_SVR_SIDE "axis2_is_svr_side"
+
+#define AXIS2_SERVICE_DIR "servicesDir"
+#define AXIS2_MODULE_DIR "moduleDir"
+
+#define AXIS2_MESSAGE_ID_PREFIX "urn:uuid:"
+
+/** Name of anonymous service */
+#define AXIS2_ANON_SERVICE "__ANONYMOUS_SERVICE__"
+
+/** out-only MEP operation name */
+#define AXIS2_ANON_OUT_ONLY_OP "__OPERATION_OUT_ONLY__"
+
+/** out-only robust MEP operation name */
+#define AXIS2_ANON_ROBUST_OUT_ONLY_OP "__OPERATION_ROBUST_OUT_ONLY__"
+
+/** out-in MEP operation name */
+#define AXIS2_ANON_OUT_IN_OP "__OPERATION_OUT_IN__"
+
+/** wsdl location in repo*/
+#define AXIS2_WSDL_LOCATION_IN_REPO "woden"
+
+#define AXIS2_SVC_CLIENT_CLOSED "closed"
+
+#define AXIS2_STATISTICS_COUNT_ARG "stat_count_arg"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_CONST_H */
diff --git a/include/axis2_core_dll_desc.h b/include/axis2_core_dll_desc.h
new file mode 100644
index 0000000..e87f8ec
--- /dev/null
+++ b/include/axis2_core_dll_desc.h
@@ -0,0 +1,68 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_CORE_DLL_DESC_H
+#define AXIS2_CORE_DLL_DESC_H
+
+/**
+ * @file axis2_core_dll_desc.h
+ * @brief Axis2 Core dll_desc interface
+ */
+
+#include <axutil_dll_desc.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * @defgroup axis2_core_dll_desc Core DLL description
+ * @ingroup axis2_core_utils
+ * @{
+ */
+
+ /*
+ * For DLL Types, starting index is 10000, and ending
+ * index is 10999, this is for unique indexing purposes.
+ * Indexes 10000-10099 are reserved for Axis2 Core.
+ */
+
+ /* service dll */
+ #define AXIS2_SVC_DLL 10000
+
+ /* handler dll */
+ #define AXIS2_HANDLER_DLL 10001
+
+ /* message receiver dll */
+ #define AXIS2_MSG_RECV_DLL 10002
+
+ /* module dll */
+ #define AXIS2_MODULE_DLL 10003
+
+ /* transport receiver dll */
+ #define AXIS2_TRANSPORT_RECV_DLL 10004
+
+ /* transport sender dll */
+ #define AXIS2_TRANSPORT_SENDER_DLL 10005
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_CORE_DLL_DESC_H */
diff --git a/include/axis2_core_utils.h b/include/axis2_core_utils.h
new file mode 100644
index 0000000..6071771
--- /dev/null
+++ b/include/axis2_core_utils.h
@@ -0,0 +1,113 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_CORE_UTILS_H
+#define AXIS2_CORE_UTILS_H
+
+#include <axis2_const.h>
+#include <axis2_defines.h>
+#include <axutil_error.h>
+#include <axutil_env.h>
+#include <axis2_msg_ctx.h>
+#include <axis2_op.h>
+#include <axutil_qname.h>
+#include <axis2_core_dll_desc.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ struct axis2_conf;
+
+ /**
+ * @defgroup axis2_core_utils Core Utils
+ * @ingroup axis2_core_utils
+ * @{
+ */
+ AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
+
+ axis2_core_utils_create_out_msg_ctx(
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * in_msg_ctx);
+
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_core_utils_reset_out_msg_ctx(
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * out_msg_ctx);
+
+ AXIS2_EXTERN axutil_qname_t *AXIS2_CALL
+
+ axis2_core_utils_get_module_qname(
+ const axutil_env_t * env,
+ const axis2_char_t * name,
+ const axis2_char_t * version);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_core_utils_calculate_default_module_version(
+ const axutil_env_t * env,
+ axutil_hash_t * modules_map,
+ struct axis2_conf *axis_conf);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_core_utils_get_module_name(
+ const axutil_env_t * env,
+ axis2_char_t * module_name);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+
+ axis2_core_utils_get_module_version(
+ const axutil_env_t * env,
+ axis2_char_t * module_name);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_core_utils_is_latest_mod_ver(
+ const axutil_env_t * env,
+ axis2_char_t * module_ver,
+ axis2_char_t * current_def_ver);
+
+ AXIS2_EXTERN axis2_op_t *AXIS2_CALL
+ axis2_core_utils_get_rest_op_with_method_and_location(axis2_svc_t *svc,
+ const axutil_env_t *env,
+ const axis2_char_t *method,
+ const axis2_char_t *location,
+ axutil_array_list_t *param_keys,
+ axutil_array_list_t *param_values);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_core_utils_prepare_rest_mapping (
+ const axutil_env_t * env,
+ axis2_char_t * url,
+ axutil_hash_t *rest_map,
+ axis2_op_t *op_desc);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_core_utils_free_rest_map (
+ const axutil_env_t * env,
+ axutil_hash_t *rest_map);
+
+
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_CORE_UTILS_H */
diff --git a/include/axis2_ctx.h b/include/axis2_ctx.h
new file mode 100644
index 0000000..0165ae3
--- /dev/null
+++ b/include/axis2_ctx.h
@@ -0,0 +1,147 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_CTX_H
+#define AXIS2_CTX_H
+
+/**
+ * @defgroup axis2_context Context Hierarchy
+ * @ingroup axis2
+ * @{
+ * @}
+ */
+
+/**
+ * @defgroup axis2_ctx context
+ * @ingroup axis2_context
+ * context is the base struct of all the context related structs. This struct
+ * encapsulates the common operations and data for all context types. All the
+ * context types, configuration, service group, service and operation has the
+ * base of type context.
+ * @{
+ */
+
+/**
+ * @file axis2_ctx.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_hash.h>
+#include <axutil_env.h>
+#include <axutil_property.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_ctx */
+ typedef struct axis2_ctx axis2_ctx_t;
+
+ /**
+ * Creates a context struct.
+ * @param env pointer to environment struct
+ * @return pointer to newly created context
+ */
+ AXIS2_EXTERN axis2_ctx_t *AXIS2_CALL
+ axis2_ctx_create(
+ const axutil_env_t * env);
+
+ /**
+ * Sets a property with the given key.
+ * @param ctx pointer to context struct
+ * @param env pointer to environment struct
+ * @param key key string to store the property with
+ * @param value pointer to property to be stored, context assumes the
+ * ownership of the property
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_ctx_set_property(
+ struct axis2_ctx *ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * key,
+ axutil_property_t * value);
+
+ /**
+ * Gets the property with the given key.
+ * @param ctx pointer to context struct
+ * @param env pointer to environment struct
+ * @param key key string
+ * @return pointer to property struct corresponding to the given key
+ */
+ AXIS2_EXTERN axutil_property_t *AXIS2_CALL
+ axis2_ctx_get_property(
+ const axis2_ctx_t * ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * key);
+
+ /**
+ * Gets the non-persistent map of properties.
+ * @param ctx pointer to context struct
+ * @param env pointer to environment struct
+ * @return pointer to the hash map which stores the non-persistent
+ * properties
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_ctx_get_property_map(
+ const axis2_ctx_t * ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets all properties stored within context.
+ * @param ctx pointer to context struct
+ * @param env pointer to environment struct
+ * @return pointer to hash table containing all properties
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_ctx_get_all_properties(
+ const axis2_ctx_t * ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Frees context struct.
+ * @param ctx pointer to context struct
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_ctx_free(
+ axis2_ctx_t * ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets non-persistent map of properties.
+ * @param ctx pointer to context struct
+ * @param env pointer to environment struct
+ * @param map pointer to hash map, context assumes ownership of the map
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_ctx_set_property_map(
+ struct axis2_ctx *ctx,
+ const axutil_env_t * env,
+ axutil_hash_t * map);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_CTX_H */
diff --git a/include/axis2_defines.h b/include/axis2_defines.h
new file mode 100644
index 0000000..aa3e203
--- /dev/null
+++ b/include/axis2_defines.h
@@ -0,0 +1,51 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_DEFINES_H
+#define AXIS2_DEFINES_H
+
+/**
+ * @file axis2_defines.h
+ * @brief Useful definitions, which may have platform concerns
+ */
+
+#include <stddef.h>
+#include <axutil_utils_defines.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Axis2 in flow */
+#define AXIS2_IN_FLOW 1
+
+ /** Axis2 out flow */
+#define AXIS2_OUT_FLOW 2
+
+ /** Axis2 fault in flow */
+#define AXIS2_FAULT_IN_FLOW 3
+
+ /** Axis2 fault out flow */
+#define AXIS2_FAULT_OUT_FLOW 4
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_DEFINES_H */
diff --git a/include/axis2_desc.h b/include/axis2_desc.h
new file mode 100644
index 0000000..fe2e9db
--- /dev/null
+++ b/include/axis2_desc.h
@@ -0,0 +1,228 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_DESC_H
+#define AXIS2_DESC_H
+
+/**
+ * @defgroup axis2_description description
+ * @ingroup axis2_desc
+ * Base struct of description hierarchy. Encapsulates common data and functions
+ * of the description hierarchy.
+ * @{
+ */
+
+/**
+ * @file axis2_desc.h
+ */
+
+#include <axutil_param_container.h>
+#include <axutil_hash.h>
+#include <axis2_description.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name of struct axis2_desc */
+ typedef struct axis2_desc axis2_desc_t;
+
+ struct axis2_policy_include;
+ struct axis2_msg;
+
+ /**
+ * Creates a description struct instance.
+ * @param env pointer to environment struct
+ * @return pointer to newly created description
+ */
+ AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+ axis2_desc_create(
+ const axutil_env_t * env);
+
+ /**
+ * Frees description struct.
+ * @param desc pointer to description
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_desc_free(
+ axis2_desc_t * desc,
+ const axutil_env_t * env);
+
+ /**
+ * Adds given parameter to the list of parameters.
+ * @param desc pointer to description
+ * @param env pointer to environment struct
+ * @param param pointer to parameter
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_desc_add_param(
+ axis2_desc_t * desc,
+ const axutil_env_t * env,
+ axutil_param_t * param);
+
+ /**
+ * Gets named parameter.
+ * @param desc pointer to description
+ * @param env pointer to environment struct
+ * @param param_name parameter name string
+ * @return pointer to named parameter, NULL if it does not exist
+ */
+ AXIS2_EXTERN axutil_param_t *AXIS2_CALL
+ axis2_desc_get_param(
+ const axis2_desc_t * desc,
+ const axutil_env_t * env,
+ const axis2_char_t * param_name);
+
+ /**
+ * Gets all parameters stored in description.
+ * @param desc pointer to description
+ * @param env pointer to environment struct
+ * @return pointer to array list containing the list of parameters
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_desc_get_all_params(
+ const axis2_desc_t * desc,
+ const axutil_env_t * env);
+
+ /**
+ * Checks if a named parameter is locked.
+ * @param desc pointer to description
+ * @param env pointer to environment struct
+ * @param param_name parameter name string
+ * @return AXIS2_TRUE if parameter is locked, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_desc_is_param_locked(
+ const axis2_desc_t * desc,
+ const axutil_env_t * env,
+ const axis2_char_t * param_name);
+
+ /**
+ * Adds child to the description. The type of children is based on the
+ * level of the description hierarchy. As an example, service has
+ * children of type operation, service group has children of type
+ * service
+ * @param desc pointer to description
+ * @param env pointer to environment struct
+ * @param key key with which the child is to be added
+ * @param child child to be added
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_desc_add_child(
+ const axis2_desc_t * desc,
+ const axutil_env_t * env,
+ const axis2_char_t * key,
+ const struct axis2_msg *child);
+
+ /**
+ * Gets all children.
+ * @param desc pointer to description
+ * @param env pointer to environment struct
+ * @return pointer to hash map containing children
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_desc_get_all_children(
+ const axis2_desc_t * desc,
+ const axutil_env_t * env);
+
+ /**
+ * Gets child with given key.
+ * @param desc pointer to description
+ * @param env pointer to environment struct
+ * @param key key with which the child is stored
+ * @return pointer to child, returned as a void* value, need to cast to
+ * correct type
+ */
+ AXIS2_EXTERN void *AXIS2_CALL
+ axis2_desc_get_child(
+ const axis2_desc_t * desc,
+ const axutil_env_t * env,
+ const axis2_char_t * key);
+
+ /**
+ * Removes the named child.
+ * @param desc pointer to description
+ * @param env pointer to environment struct
+ * @param key key that represents the child to be removed
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_desc_remove_child(
+ const axis2_desc_t * desc,
+ const axutil_env_t * env,
+ const axis2_char_t * key);
+
+ /**
+ * Sets parent description.
+ * @param desc pointer to description
+ * @param env pointer to environment struct
+ * @param parent pointer to parent description
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_desc_set_parent(
+ axis2_desc_t * desc,
+ const axutil_env_t * env,
+ axis2_desc_t * parent);
+
+ /**
+ * Gets parent description.
+ * @param desc pointer to description
+ * @param env pointer to environment struct
+ * @return parent pointer to parent description
+ */
+ AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+ axis2_desc_get_parent(
+ const axis2_desc_t * desc,
+ const axutil_env_t * env);
+
+ /**
+ * Sets policy include
+ * @param desc pointer to description
+ * @param env pointer to environment struct
+ * @param policy_include policy include to be added to description
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_desc_set_policy_include(
+ axis2_desc_t * desc,
+ const axutil_env_t * env,
+ struct axis2_policy_include *policy_include);
+
+ /**
+ * Gets policy include
+ * @param desc pointer to description
+ * @param env pointer to environment struct
+ * @return returns policy include that was added to description
+ * @sa axis2_policy_include
+ */
+ AXIS2_EXTERN struct axis2_policy_include *AXIS2_CALL
+ axis2_desc_get_policy_include(
+ axis2_desc_t * desc,
+ const axutil_env_t * env);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_DESC_H */
diff --git a/include/axis2_description.h b/include/axis2_description.h
new file mode 100644
index 0000000..3186a8c
--- /dev/null
+++ b/include/axis2_description.h
@@ -0,0 +1,148 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_DESCRIPTION_H
+#define AXIS2_DESCRIPTION_H
+
+#include <axis2_const.h>
+#include <axutil_error.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axutil_allocator.h>
+#include <axutil_string.h>
+#include <axutil_hash.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * @defgroup axis2_desc description
+ * @ingroup axis2
+ * @{
+ * @}
+ */
+
+ /**
+ * @defgroup axis2_desc_constants description related constants
+ * @ingroup axis2_desc
+ * @{
+ */
+
+ /**
+ * @file axis2_description.h
+ */
+
+
+ /*********************************** Constansts *******************************/
+
+ /**
+ * Field EXECUTION_CHAIN_KEY
+ */
+#define AXIS2_EXECUTION_CHAIN_KEY "EXECUTION_CHAIN_KEY"
+
+ /**
+ * Field EXECUTION_OUT_CHAIN_KEY
+ */
+#define AXIS2_EXECUTION_OUT_CHAIN_KEY "EXECUTION_OUT_CHAIN_KEY"
+
+ /**
+ * Field EXECUTION_FAULT_CHAIN_KEY
+ */
+#define AXIS2_EXECUTION_FAULT_CHAIN_KEY "EXECUTION_FAULT_CHAIN_KEY"
+
+ /**
+ * Field MODULEREF_KEY
+ */
+#define AXIS2_MODULEREF_KEY "MODULEREF_KEY"
+
+ /**
+ * Field OP_KEY
+ */
+#define AXIS2_OP_KEY "OP_KEY"
+
+ /**
+ * Field CLASSLOADER_KEY
+ */
+#define AXIS2_CLASSLOADER_KEY "CLASSLOADER_KEY"
+
+ /**
+ * Field CONTEXTPATH_KEY
+ */
+#define AXIS2_CONTEXTPATH_KEY "CONTEXTPATH_KEY"
+
+ /**
+ * Field PROVIDER_KEY
+ */
+#define AXIS2_MESSAGE_RECEIVER_KEY "PROVIDER_KEY"
+
+ /**
+ * Field STYLE_KEY
+ */
+#define AXIS2_STYLE_KEY "STYLE_KEY"
+
+ /**
+ * Field PARAMETER_KEY
+ */
+#define AXIS2_PARAMETER_KEY "PARAMETER_KEY"
+
+ /**
+ * Field IN_FLOW_KEY
+ */
+#define AXIS2_IN_FLOW_KEY "IN_FLOW_KEY"
+
+ /**
+ * Field OUT_FLOW_KEY
+ */
+#define AXIS2_OUT_FLOW_KEY "OUT_FLOW_KEY"
+
+ /**
+ * Field IN_FAULTFLOW_KEY
+ */
+#define AXIS2_IN_FAULTFLOW_KEY "IN_FAULTFLOW_KEY"
+
+ /**
+ * Field OUT_FAULTFLOW_KEY
+ */
+#define AXIS2_OUT_FAULTFLOW_KEY "OUT_FAULTFLOW_KEY"
+
+ /**
+ * Field PHASES_KEY
+ */
+#define AXIS2_PHASES_KEY "PHASES_KEY"
+
+ /**
+ * Field SERVICE_CLASS
+ */
+#define AXIS2_SERVICE_CLASS "ServiceClass"
+
+ /**
+ * Field SERVICE_CLASS_NAME
+ */
+#define AXIS2_SERVICE_CLASS_NAME "SERVICE_CLASS_NAME"
+
+ /******************************************************************************/
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_DESCRIPTION_H */
diff --git a/include/axis2_disp.h b/include/axis2_disp.h
new file mode 100644
index 0000000..2f801b8
--- /dev/null
+++ b/include/axis2_disp.h
@@ -0,0 +1,174 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_DISP_H
+#define AXIS2_DISP_H
+
+/**
+ * @defgroup axis2_disp dispatcher
+ * @ingroup axis2_engine
+ * dispatcher is responsible for finding the service and operation for a given
+ * invocation. A Web service request would contain information that help
+ * locate the service and the operation serving the request. This information
+ * could be in various formats, and hence the mechanism to find the requested
+ * service and operation based on the available information could too vary.
+ * Hence there can be various types on dispatches involved in a dispatching
+ * phase of the engine, that implements the API given in this header.
+ * @{
+ */
+
+/**
+ * @file axis2_disp.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_string.h>
+#include <axis2_handler.h>
+#include <axis2_svc.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define AXIS2_DISP_NAMESPACE "http://axis.ws.apache.org"
+
+ /** Type name for struct axis2_disp */
+ typedef struct axis2_disp axis2_disp_t;
+
+ /**
+ * Gets the base struct which is of type handler.
+ * @param disp pointer to dispatcher
+ * @param env pointer to environment struct
+ * @return pointer to base handler struct. Returns a reference, not a
+ * cloned copy
+ */
+ AXIS2_EXTERN axis2_handler_t *AXIS2_CALL
+ axis2_disp_get_base(
+ const axis2_disp_t * disp,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the name of the dispatcher.
+ * @param disp pointer to dispatcher
+ * @param env pointer to environment struct
+ * @return pointer to name. Returns a reference, not a
+ * cloned copy
+ */
+ AXIS2_EXTERN axutil_string_t *AXIS2_CALL
+ axis2_disp_get_name(
+ const axis2_disp_t * disp,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the name of the dispatcher.
+ * @param disp pointer to dispatcher
+ * @param env pointer to environment struct
+ * @param name pointer to name, dispatcher assumes ownership of the
+ * name struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_disp_set_name(
+ axis2_disp_t * disp,
+ const axutil_env_t * env,
+ axutil_string_t * name);
+
+ /**
+ * Frees dispatcher struct.
+ * @param disp pointer to dispatcher
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_disp_free(
+ axis2_disp_t * disp,
+ const axutil_env_t * env);
+
+ /**
+ * Creates a dispatcher struct instance.
+ * @param env pointer to environment struct
+ * @param name pointer to QName. QName is cloned by create method.
+ * @return pointer to newly created dispatcher
+ */
+ AXIS2_EXTERN axis2_disp_t *AXIS2_CALL
+ axis2_disp_create(
+ const axutil_env_t * env,
+ const axutil_string_t * name);
+
+ axis2_status_t AXIS2_CALL
+ axis2_disp_find_svc_and_op(
+ struct axis2_handler *handler,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx *msg_ctx);
+
+ /**
+ * Creates a WS-Addressing based dispatcher.
+ * @param env pointer to environment struct
+ * @return pointer to the newly created dispatcher with find_svc and find_op
+ * methods implemented based on WS-Addressing
+ */
+ AXIS2_EXTERN axis2_disp_t *AXIS2_CALL
+ axis2_addr_disp_create(
+ const axutil_env_t * env);
+
+ /**
+ * Creates a request URI based dispatcher.
+ * @param env pointer to environment struct
+ * @return pointer to the newly created dispatcher with find_svc and find_op
+ * methods implemented based on request URI processing.
+ */
+ AXIS2_EXTERN axis2_disp_t *AXIS2_CALL
+ axis2_req_uri_disp_create(
+ const axutil_env_t * env);
+
+ /**
+ * Creates a REST based dispatcher.
+ * @param env pointer to environment struct
+ * @return pointer to the newly created dispatcher with find_svc and find_op
+ * methods implemented based on REST processing.
+ */
+ AXIS2_EXTERN axis2_disp_t *AXIS2_CALL
+ axis2_rest_disp_create(
+ const axutil_env_t * env);
+
+ /**
+ * Creates a SOAP body based dispatcher.
+ * @param env pointer to environment struct
+ * @return pointer to the newly created dispatcher with find_svc and find_op
+ * methods implemented based on SOAP body processing.
+ */
+ AXIS2_EXTERN axis2_disp_t *AXIS2_CALL
+ axis2_soap_body_disp_create(
+ const axutil_env_t * env);
+
+ /**
+ * Creates a SOAP action based dispatcher.
+ * @param env pointer to environment struct
+ * @return pointer to the newly created dispatcher with find_svc and find_op
+ * methods implemented based on SOAP action processing
+ */
+ AXIS2_EXTERN axis2_disp_t *AXIS2_CALL
+ axis2_soap_action_disp_create(
+ const axutil_env_t * env);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_DISP_H */
diff --git a/include/axis2_endpoint_ref.h b/include/axis2_endpoint_ref.h
new file mode 100644
index 0000000..cb9dfe0
--- /dev/null
+++ b/include/axis2_endpoint_ref.h
@@ -0,0 +1,319 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_ENDPOINT_REF_H
+#define AXIS2_ENDPOINT_REF_H
+
+/**
+ * @defgroup axis2_endpoint_ref endpoint reference
+ * @ingroup axis2_addr
+ * endpoint reference represent an endpoint address in WS-Addressing.
+ * In addition to the endpoint address, it also encapsulates meta data,
+ * reference attributes and the service hosted at the given endpoint.
+ * In addition to the addressing related implementation, the endpoint reference
+ * struct is used across core code-base to represent endpoints.
+ * @{
+ */
+
+/**
+ * @file axis2_endpoint_ref.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_const.h>
+#include <axutil_array_list.h>
+#include <axis2_any_content_type.h>
+#include <axis2_svc_name.h>
+#include <axiom_node.h>
+#include <axiom_attribute.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_endpoint_ref */
+ typedef struct axis2_endpoint_ref axis2_endpoint_ref_t;
+
+ /**
+ * Creates endpoint reference struct.
+ * @param env pointer to environment struct
+ * @param address endpoint address string
+ * @return pointer to newly created endpoint reference
+ */
+ AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
+ axis2_endpoint_ref_create(
+ const axutil_env_t * env,
+ const axis2_char_t * address);
+
+ /**
+ * Frees the endpoint_ref given as a void pointer. This method would cast the
+ * void parameter to an endpoint_ref pointer and then call free method.
+ * @param endpoint_ref pointer to endpoint_ref as a void pointer
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ void AXIS2_CALL
+ axis2_endpoint_ref_free_void_arg(
+ void *endpoint_ref,
+ const axutil_env_t * env);
+
+ /**
+ * Gets endpoint address. Address URI identifies the endpoint.
+ * This may be a network address or a logical address.
+ * @param endpoint_ref pointer to endpoint reference struct
+ * @param env pointer to environment struct
+ * @return endpoint address string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_endpoint_ref_get_address(
+ const axis2_endpoint_ref_t * endpoint_ref,
+ const axutil_env_t * env);
+
+ /**
+ * Sets endpoint address. Address URI identifies the endpoint.
+ * This may be a network address or a logical address.
+ * @param endpoint_ref pointer to endpoint reference struct
+ * @param env pointer to environment struct
+ * @param address address string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_endpoint_ref_set_address(
+ axis2_endpoint_ref_t * endpoint_ref,
+ const axutil_env_t * env,
+ const axis2_char_t * address);
+
+ /**
+ * Gets interface QName. QName represents the primary portType of
+ * the endpoint being conveyed.
+ * @param endpoint_ref pointer to endpoint reference struct
+ * @param env pointer to environment struct
+ * @return pointer to interface QName, returns a reference, not a cloned
+ * copy
+ */
+ AXIS2_EXTERN const axutil_qname_t *AXIS2_CALL
+ axis2_endpoint_ref_get_interface_qname(
+ const axis2_endpoint_ref_t * endpoint_ref,
+ const axutil_env_t * env);
+
+ /**
+ * Sets interface QName. QName represents the primary portType of
+ * the endpoint being conveyed.
+ * @param endpoint_ref pointer to endpoint reference struct
+ * @param env pointer to environment struct
+ * @param interface_qname pointer to interface QName, this method creates
+ * a clone of the QName
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_endpoint_ref_set_interface_qname(
+ axis2_endpoint_ref_t * endpoint_ref,
+ const axutil_env_t * env,
+ const axutil_qname_t * interface_qname);
+
+ /**
+ * Gets reference parameter list. A reference may contain a number
+ * of individual parameters which are associated with the endpoint
+ * to facilitate a particular interaction. Reference parameters
+ * are element information items that are named by QName and are
+ * required to properly interact with the endpoint.
+ * @param endpoint_ref pointer to endpoint reference struct
+ * @param env pointer to environment struct
+ * @return pointer to array list containing all reference parameters,
+ * returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_endpoint_ref_get_ref_param_list(
+ const axis2_endpoint_ref_t * endpoint_ref,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the list of metadata. An endpoint can have different associated
+ * metadata such as WSDL, XML Schema, and WS-Policy policies.
+ * @param endpoint_ref pointer to endpoint reference struct
+ * @param env pointer to environment struct
+ * @return pointer to array list containing metadata, returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_endpoint_ref_get_metadata_list(
+ const axis2_endpoint_ref_t * endpoint_ref,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the list of reference attributes.
+ * @param endpoint_ref pointer to endpoint reference struct
+ * @param env pointer to environment struct
+ * @return pointer to array list containing reference attributes,
+ * returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_endpoint_ref_get_ref_attribute_list(
+ const axis2_endpoint_ref_t * endpoint_ref,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the list of metadata attributes.
+ * @param endpoint_ref pointer to endpoint reference struct
+ * @param env pointer to environment struct
+ * @return pointer to array list containing metadata attributes,
+ * returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_endpoint_ref_get_metadata_attribute_list(
+ const axis2_endpoint_ref_t * endpoint_ref,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the list of extensions. Extensions are a mechanism to allow
+ * additional elements to be specified in association with the endpoint.
+ * @param endpoint_ref pointer to endpoint reference struct
+ * @param env pointer to environment struct
+ * @return pointer to array list containing extensions,
+ * returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_endpoint_ref_get_extension_list(
+ const axis2_endpoint_ref_t * endpoint_ref,
+ const axutil_env_t * env);
+
+ /**
+ * Adds a reference parameter in the form of an AXIOM node.
+ * @param endpoint_ref pointer to endpoint reference struct
+ * @param env pointer to environment struct
+ * @param ref_param_node pointer to AXIOM node representing reference
+ * parameter, endpoint reference does not assume the ownership of
+ * the node
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_endpoint_ref_add_ref_param(
+ axis2_endpoint_ref_t * endpoint_ref,
+ const axutil_env_t * env,
+ axiom_node_t * ref_param_node);
+
+ /**
+ * Adds metadata in the form of an AXIOM node. An endpoint can have
+ * different associated metadata such as WSDL, XML Schema and
+ * WS-Policy policies.
+ * @param endpoint_ref pointer to endpoint reference struct
+ * @param env pointer to environment struct
+ * @param metadata_node AXIOM node representing metadata,
+ * endpoint reference does not assume the ownership of the node
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_endpoint_ref_add_metadata(
+ axis2_endpoint_ref_t * endpoint_ref,
+ const axutil_env_t * env,
+ axiom_node_t * metadata_node);
+
+ /**
+ * Adds a reference attribute in the form of an AXIOM attribute.
+ * @param endpoint_ref pointer to endpoint reference struct
+ * @param env pointer to environment struct
+ * @param attr AXIOM attribute representing reference attribute,
+ * endpoint reference does not assume the ownership of the attribute
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_endpoint_ref_add_ref_attribute(
+ axis2_endpoint_ref_t * endpoint_ref,
+ const axutil_env_t * env,
+ axiom_attribute_t * attr);
+
+ /**
+ * Adds a meta attribute in the form of an AXIOM attribute.
+ * @param endpoint_ref pointer to endpoint reference struct
+ * @param env pointer to environment struct
+ * @param attr AXIOM attribute representing meta attribute,
+ * endpoint reference does not assume the ownership of the attribute
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_endpoint_ref_add_metadata_attribute(
+ axis2_endpoint_ref_t * endpoint_ref,
+ const axutil_env_t * env,
+ axiom_attribute_t * attr);
+
+ /**
+ * Adds an extension in the form of an AXIOM node.
+ * @param endpoint_ref pointer to endpoint reference struct
+ * @param env pointer to environment struct
+ * @param extension_node pointer to AXIOM node representing extension,
+ * endpoint reference does not assume the ownership of the node
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_endpoint_ref_add_extension(
+ axis2_endpoint_ref_t * endpoint_ref,
+ const axutil_env_t * env,
+ axiom_node_t * extension_node);
+
+ /**
+ * Gets service name. An endpoint in WS-Addressing has a QName
+ * identifying the WSDL service element that contains the definition
+ * of the endpoint being conveyed. The service name provides a link
+ * to a full description of the service endpoint.
+ * @param endpoint_ref pointer to endpoint reference struct
+ * @param env pointer to environment struct
+ * @return pointer to service name struct, returns a reference, not
+ * a cloned copy
+ */
+ AXIS2_EXTERN axis2_svc_name_t *AXIS2_CALL
+ axis2_endpoint_ref_get_svc_name(
+ const axis2_endpoint_ref_t * endpoint_ref,
+ const axutil_env_t * env);
+
+ /**
+ * Sets service name. An endpoint in WS-Addressing has a QName
+ * identifying the WSDL service element that contains the definition
+ * of the endpoint being conveyed. The service name provides a link
+ * to a full description of the service endpoint.
+ * @param endpoint_ref pointer to endpoint reference struct
+ * @param env pointer to environment struct
+ * @param svc_name pointer to service name struct, endpoint assumes
+ * ownership of the struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_endpoint_ref_set_svc_name(
+ axis2_endpoint_ref_t * endpoint_ref,
+ const axutil_env_t * env,
+ axis2_svc_name_t * svc_name);
+
+ /**
+ * Frees endpoint reference struct.
+ * @param endpoint_ref pointer to endpoint reference struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_endpoint_ref_free(
+ axis2_endpoint_ref_t * endpoint_ref,
+ const axutil_env_t * env);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_ENDPOINT_REF_H */
diff --git a/include/axis2_engine.h b/include/axis2_engine.h
new file mode 100644
index 0000000..9433d48
--- /dev/null
+++ b/include/axis2_engine.h
@@ -0,0 +1,264 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_ENGINE_H
+#define AXIS2_ENGINE_H
+
+/**
+ * @defgroup axis2_engine engine
+ * @ingroup axis2_engine
+ * engine has the send and receive functions that is the heart when providing
+ * and consuming services. In Axis2 SOAP engine architecture, all the others
+ * parts are build around the concept of the engine. There is only one engine
+ * for both the server side and the client side, and the engine is not aware of
+ * if it is invoked as an client or a service. engine supports both synchronous
+ * and asynchronous messaging modes based on send and receive functions.
+ * @{
+ */
+
+/**
+ * @file axis2_engine.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_array_list.h>
+#include <axutil_env.h>
+#include <axis2_conf_ctx.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_engine */
+ typedef struct axis2_engine axis2_engine_t;
+
+ struct axiom_soap_fault;
+
+ /**
+ * This methods represents the out flow of the Axis engine both at the
+ * server side as well as the client side. In this function, the
+ * execution chain is created using the phases of the out flow.
+ * All handlers at each out flow phase, which are ordered in the
+ * deployment time are invoked in sequence here.
+ * @param engine pointer to engine
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context representing current state
+ * that is used when sending message
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_engine_send(
+ axis2_engine_t * engine,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * This methods represents the in flow of the Axis engine, both at the
+ * server side as well as the client side. In this function, the
+ * execution chain is created using the phases of the in flow.
+ * All handlers at each in flow phase, which are ordered in the
+ * deployment time are invoked in sequence here.
+ * @param engine pointer to engine
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context representing current state
+ * that is used in receiving message
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_engine_receive(
+ axis2_engine_t * engine,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * Sends a SOAP fault.
+ * @param engine pointer to engine
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context that contains details of
+ * fault state
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_engine_send_fault(
+ axis2_engine_t * engine,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * This is invoked when a SOAP fault is received.
+ * @param engine pointer to engine
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context representing that contains
+ * the details of receive state
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_engine_receive_fault(
+ axis2_engine_t * engine,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * Creates a message context that represents the fault state based on
+ * current processing state.
+ * @param engine pointer to engine
+ * @param env pointer to environment struct
+ * @param processing_context pointer to message context representing
+ * current processing context
+ * @param code_value pointer to a string containing fault code
+ * @param reason_text pointer to a string containing reason of the fault
+ * @return pointer to message context representing the fault state
+ */
+ AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
+
+ axis2_engine_create_fault_msg_ctx(
+ axis2_engine_t * engine,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * processing_context,
+ const axis2_char_t * code_value,
+ const axis2_char_t * reason_text);
+
+ /**
+ * Invokes the phases in the given array list of phases. The list of
+ * phases could be representing one of the flows. The two possible
+ * flows are in flow and out flow. Both of those flows can also have
+ * fault related representations, in fault flow and out fault flow.
+ * Invoking a phase triggers the invocation of handlers the phase
+ * contain.
+ * @param engine pointer to engine
+ * @param env pointer to environment struct
+ * @param phases pointer to phases
+ * @param msg_ctx pointer to message context containing current state
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_engine_invoke_phases(
+ axis2_engine_t * engine,
+ const axutil_env_t * env,
+ axutil_array_list_t * phases,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * Resumes phase invocation. While invoking the phases, one of the
+ * handlers in any phase could determine to pause the invocation.
+ * Often pausing happens to wait till some state is reached or some
+ * task is complete. Once paused, the invocation has to be resumed
+ * using this function, which will resume the invocation from the paused
+ * handler in the paused phase and will continue till it is paused
+ * again or it completes invoking all the remaining handlers in the
+ * remaining phases.
+ * @param engine pointer to engine
+ * @param env pointer to environment struct
+ * @param phases pointer to phases
+ * @param msg_ctx pointer to message context containing current paused
+ * state
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_engine_resume_invocation_phases(
+ axis2_engine_t * engine,
+ const axutil_env_t * env,
+ axutil_array_list_t * phases,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * Gets sender's SOAP fault code.
+ * @param engine pointer to engine
+ * @param env pointer to environment struct
+ * @param soap_namespace pointer to SOAP namespace
+ * @return pointer to SOAP fault code string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+
+ axis2_engine_get_sender_fault_code(
+ const axis2_engine_t * engine,
+ const axutil_env_t * env,
+ const axis2_char_t * soap_namespace);
+
+ /**
+ * Gets receiver's SOAP fault code.
+ * @param engine pointer to engine
+ * @param env pointer to environment struct
+ * @param soap_namespace pointer to soap namespace
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+
+ axis2_engine_get_receiver_fault_code(
+ const axis2_engine_t * engine,
+ const axutil_env_t * env,
+ const axis2_char_t * soap_namespace);
+
+ /**
+ * Frees engine struct.
+ * @param engine pointer to engine
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_engine_free(
+ axis2_engine_t * engine,
+ const axutil_env_t * env);
+
+ /**
+ * Resumes receive operation. It could be the case that receive was
+ * paused by one of the in flow handlers. In such a situation, this
+ * method could be used to resume the receive operation.
+ * @param engine pointer to engine
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_engine_resume_receive(
+ axis2_engine_t * engine,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * Resumes send operation. It could be the case that send was
+ * paused by one of the out flow handlers. In such a situation, this
+ * method could be used to resume the send operation.
+ * @param engine pointer to engine
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_engine_resume_send(
+ axis2_engine_t * engine,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * Creates en engine struct instance.
+ * @param env pointer to environment struct
+ * @param conf_ctx pointer to configuration context struct
+ * @return pointer to newly created engine struct
+ */
+ AXIS2_EXTERN axis2_engine_t *AXIS2_CALL
+ axis2_engine_create(
+ const axutil_env_t * env,
+ axis2_conf_ctx_t * conf_ctx);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_ENGINE_H */
diff --git a/include/axis2_flow.h b/include/axis2_flow.h
new file mode 100644
index 0000000..3bb2bde
--- /dev/null
+++ b/include/axis2_flow.h
@@ -0,0 +1,125 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_FLOW_H
+#define AXIS2_FLOW_H
+
+/**
+ * @defgroup axis2_flow flow
+ * @ingroup axis2_desc
+ * flow is a collection of handlers. This struct encapsulates the concept
+ * of an execution flow in the engine.
+ * @{
+ */
+
+/**
+ * @file axis2_flow.h
+ */
+
+#include <axis2_const.h>
+#include <axutil_error.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axutil_allocator.h>
+#include <axutil_string.h>
+#include <axutil_array_list.h>
+#include <axis2_handler_desc.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_flow */
+ typedef struct axis2_flow axis2_flow_t;
+
+ /**
+ * Creates flow struct.
+ * @param env pointer to environment struct
+ * @return pointer to newly created flow
+ */
+ AXIS2_EXTERN axis2_flow_t *AXIS2_CALL
+ axis2_flow_create(
+ const axutil_env_t * env);
+
+ /**
+ * Frees flow struct.
+ * @param flow pointer to flow
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_flow_free(
+ axis2_flow_t * flow,
+ const axutil_env_t * env);
+
+ /**
+ * Adds a handler description to flow.
+ * @param flow pointer to flow
+ * @param env pointer to environment struct
+ * @param handler pointer to handler description
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_flow_add_handler(
+ axis2_flow_t * flow,
+ const axutil_env_t * env,
+ axis2_handler_desc_t * handler);
+
+ /**
+ * Gets handler description at given index.
+ * @param flow pointer to flow
+ * @param env pointer to environment struct
+ * @param index index of the handler
+ * @return pointer to handler description
+ */
+ AXIS2_EXTERN axis2_handler_desc_t *AXIS2_CALL
+ axis2_flow_get_handler(
+ const axis2_flow_t * flow,
+ const axutil_env_t * env,
+ const int index);
+
+ /**
+ * Gets handler count.
+ * @param flow pointer to flow
+ * @param env pointer to environment struct
+ * @return handler count
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_flow_get_handler_count(
+ const axis2_flow_t * flow,
+ const axutil_env_t * env);
+
+ /**
+ * Frees flow passed as void pointer. This method would cast the void
+ * pointer to appropriate type and then call free method.
+ * @param flow pointer to flow
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_flow_free_void_arg(
+ void *flow,
+ const axutil_env_t * env);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_FLOW_H */
diff --git a/include/axis2_flow_container.h b/include/axis2_flow_container.h
new file mode 100644
index 0000000..ecc5fb6
--- /dev/null
+++ b/include/axis2_flow_container.h
@@ -0,0 +1,176 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_FLOW_CONTAINER_H
+#define AXIS2_FLOW_CONTAINER_H
+
+/**
+ * @defgroup axis2_flow_container flow container
+ * @ingroup axis2_desc
+ * Flow container is the encapsulating struct for all the four flows. The four flows
+ * possible are in flow, out flow, in fault flow and out fault flow.
+ * @{
+ */
+
+/**
+ * @file axis2_flow_container.h
+ */
+
+#include <axis2_const.h>
+#include <axutil_error.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axutil_allocator.h>
+#include <axutil_string.h>
+#include <axutil_array_list.h>
+#include <axis2_flow.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_flow_container */
+ typedef struct axis2_flow_container axis2_flow_container_t;
+
+ /**
+ * Frees flow container.
+ * @param flow_container pointer to flow container
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_flow_container_free(
+ axis2_flow_container_t * flow_container,
+ const axutil_env_t * env);
+
+ /**
+ * Gets in flow.
+ * @param flow_container pointer to flow container
+ * @param env pointer to environment struct
+ * @return pointer to in flow, returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axis2_flow_t *AXIS2_CALL
+ axis2_flow_container_get_in_flow(
+ const axis2_flow_container_t * flow_container,
+ const axutil_env_t * env);
+
+ /**
+ * Sets in flow.
+ * @param flow_container pointer to flow container
+ * @param env pointer to environment struct
+ * @param in_flow pointer to in flow struct, flow container assumes
+ * ownership of struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_flow_container_set_in_flow(
+ axis2_flow_container_t * flow_container,
+ const axutil_env_t * env,
+ axis2_flow_t * in_flow);
+
+ /**
+ * Gets out flow.
+ * @param flow_container pointer to flow container
+ * @param env pointer to environment struct
+ * @return out flow, returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axis2_flow_t *AXIS2_CALL
+ axis2_flow_container_get_out_flow(
+ const axis2_flow_container_t * flow_container,
+ const axutil_env_t * env);
+
+ /**
+ * Sets out flow.
+ * @param flow_container pointer to flow container
+ * @param env pointer to environment struct
+ * @param out_flow pointer to out flow, flow container assumes
+ * ownership of struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_flow_container_set_out_flow(
+ axis2_flow_container_t * flow_container,
+ const axutil_env_t * env,
+ axis2_flow_t * out_flow);
+
+ /**
+ * Gets fault in flow.
+ * @param flow_container pointer to flow container
+ * @param env pointer to environment struct
+ * @return fault in flow, returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axis2_flow_t *AXIS2_CALL
+ axis2_flow_container_get_fault_in_flow(
+ const axis2_flow_container_t * flow_container,
+ const axutil_env_t * env);
+
+ /**
+ * Sets fault in flow.
+ * @param flow_container pointer to flow container
+ * @param env pointer to environment struct
+ * @param falut_in_flow pointer to falut in flow, flow container assumes
+ * ownership of struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_flow_container_set_fault_in_flow(
+ axis2_flow_container_t * flow_container,
+ const axutil_env_t * env,
+ axis2_flow_t * falut_in_flow);
+
+ /**
+ * Gets fault out flow.
+ * @param flow_container pointer to flow container
+ * @param env pointer to environment struct
+ * @return fault out flow, returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axis2_flow_t *AXIS2_CALL
+ axis2_flow_container_get_fault_out_flow(
+ const axis2_flow_container_t * flow_container,
+ const axutil_env_t * env);
+
+ /**
+ * Sets fault out flow.
+ * @param flow_container pointer to flow container
+ * @param env pointer to environment struct
+ * @param fault_out_flow pointer to fault out flow, flow container assumes
+ * ownership of struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_flow_container_set_fault_out_flow(
+ axis2_flow_container_t * flow_container,
+ const axutil_env_t * env,
+ axis2_flow_t * fault_out_flow);
+
+ /**
+ * Creates flow container struct.
+ * @param env pointer to environment struct
+ * @return pointer to newly created flow container
+ */
+ AXIS2_EXTERN axis2_flow_container_t *AXIS2_CALL
+ axis2_flow_container_create(
+ const axutil_env_t * env);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_FLOW_CONTAINER_H */
diff --git a/include/axis2_handler.h b/include/axis2_handler.h
new file mode 100644
index 0000000..49cf9d0
--- /dev/null
+++ b/include/axis2_handler.h
@@ -0,0 +1,184 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HANDLER_H
+#define AXIS2_HANDLER_H
+
+/**
+ * @defgroup axis2_handler handler
+ * @ingroup axis2_handler
+ * handler is the smallest unit of execution in the Axis2 engine's execution flow.
+ * The engine could have two flows, the in-flow and out-flow. A flow is a
+ * collection of phases and a phase in turn is a collection of handlers.
+ * handlers are configured in relation to modules. A module is a point of
+ * extension in the Axis2 engine and a module would have one or more handlers
+ * defined in its configuration. The module configuration defines the phases
+ * each handler is attached to. A handler is invoked when the phase within which
+ * it lives is invoked. handler is stateless and it is using the message context
+ * that the state information is captures across invocations.
+ * @{
+ */
+
+/**
+ * @file axis2_handler.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_qname.h>
+#include <axutil_param.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_handler */
+ typedef struct axis2_handler axis2_handler_t;
+
+ struct axis2_handler_desc;
+ struct axis2_msg_ctx;
+
+ typedef axis2_status_t(
+ AXIS2_CALL
+ * AXIS2_HANDLER_INVOKE) (
+ axis2_handler_t * handler,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx * msg_ctx);
+
+ /**
+ * Free handler struct.
+ * @param handler pointer to handler
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_handler_free(
+ axis2_handler_t * handler,
+ const axutil_env_t * env);
+
+ /**
+ * Initializes the handler with the information form handler description.
+ * @param handler pointer to handler
+ * @param env pointer to environment struct
+ * @param handler_desc pointer to handler description related to the handler
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_handler_init(
+ axis2_handler_t * handler,
+ const axutil_env_t * env,
+ struct axis2_handler_desc *handler_desc);
+
+ /**
+ * Invoke is called to do the actual work assigned to the handler.
+ * The phase that owns the handler is responsible for calling invoke
+ * on top of the handler. Those structs that implement the interface
+ * of the handler should implement the logic for invoke and assign the
+ * respective function pointer to invoke operation of the ops struct.
+ * @param handler pointer to handler
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_handler_invoke(
+ axis2_handler_t * handler,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx *msg_ctx);
+
+ /**
+ * Gets QName.
+ * @param handler pointer to handler
+ * @param env pointer to environment struct
+ * @return pointer to QName of the handler
+ */
+ AXIS2_EXTERN const axutil_string_t *AXIS2_CALL
+ axis2_handler_get_name(
+ const axis2_handler_t * handler,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the named parameter.
+ * @param handler pointer to handler
+ * @param env pointer to environment struct
+ * @param name name of the parameter to be accessed
+ */
+ AXIS2_EXTERN axutil_param_t *AXIS2_CALL
+ axis2_handler_get_param(
+ const axis2_handler_t * handler,
+ const axutil_env_t * env,
+ const axis2_char_t * name);
+
+ /**
+ * Gets the handler description related to the handler.
+ * @param handler pointer to handler
+ * @param env pointer to environment struct
+ * @return pointer to handler description struct related to handler
+ */
+ AXIS2_EXTERN struct axis2_handler_desc *AXIS2_CALL
+
+ axis2_handler_get_handler_desc(
+ const axis2_handler_t * handler,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_handler_set_invoke(
+ axis2_handler_t * handler,
+ const axutil_env_t * env,
+ AXIS2_HANDLER_INVOKE func);
+
+ /**
+ * Function pointer defining the creates syntax for a handler struct instance.
+ * @param env pointer to environment struct
+ * @param pointer to qname
+ * @return pointer to newly created handler struct
+ */
+ typedef axis2_handler_t *(
+ AXIS2_CALL
+ * AXIS2_HANDLER_CREATE_FUNC)(
+ const axutil_env_t * env,
+ const axutil_string_t * name);
+
+ /**
+ * Creates handler struct instance.
+ * @param env pointer to environment struct
+ * @return pointer to newly created handler struct
+ */
+ AXIS2_EXTERN axis2_handler_t *AXIS2_CALL
+ axis2_handler_create(
+ const axutil_env_t * env);
+
+ /**
+ * Creates a handler with invoke method implemented to fill in the service
+ * and operation context information.
+ * @param env pointer to environment struct
+ * @param qname pointer to qname, this is cloned within create method
+ * @return pointer to newly created handler struct
+ */
+ AXIS2_EXTERN axis2_handler_t *AXIS2_CALL
+ axis2_ctx_handler_create(
+ const axutil_env_t * env,
+ const axutil_string_t * qname);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_HANDLER_H */
diff --git a/include/axis2_handler_desc.h b/include/axis2_handler_desc.h
new file mode 100644
index 0000000..b807508
--- /dev/null
+++ b/include/axis2_handler_desc.h
@@ -0,0 +1,274 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HANDLER_DESC_H
+#define AXIS2_HANDLER_DESC_H
+
+/**
+ * @defgroup axis2_handler_desc handler description
+ * @ingroup axis2_desc
+ * handler description captures information on a handler. Each handler in the
+ * system has an associated handler description. Deployment engine would create
+ * handler descriptions based on configuration information. When handlers are
+ * loaded from shared libraries, the information captured in handler description
+ * would be used.
+ * @{
+ */
+
+/**
+ * @file axis2_handler_desc.h
+ */
+
+#include <axutil_utils_defines.h>
+#include <axutil_qname.h>
+#include <axutil_param.h>
+#include <axutil_param_container.h>
+#include <axis2_phase_rule.h>
+#include <axis2_handler.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_handler_desc */
+ typedef struct axis2_handler_desc axis2_handler_desc_t;
+
+ /**
+ * Gets QName.
+ * @param handler_desc pointer to handler description
+ * @param env pointer to environment struct
+ * @return pointer to QName, returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN const axutil_string_t *AXIS2_CALL
+ axis2_handler_desc_get_name(
+ const axis2_handler_desc_t * handler_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Sets QName.
+ * @param handler_desc pointer to handler description
+ * @param env pointer to environment struct
+ * @param name pointer to string representing handler name
+ * of QName
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_handler_desc_set_name(
+ axis2_handler_desc_t * handler_desc,
+ const axutil_env_t * env,
+ axutil_string_t * name);
+
+ /**
+ * Gets phase rules.
+ * @param handler_desc pointer to handler description
+ * @param env pointer to environment struct
+ * @return pointer to phase rule struct containing phase rules
+ */
+ AXIS2_EXTERN axis2_phase_rule_t *AXIS2_CALL
+ axis2_handler_desc_get_rules(
+ const axis2_handler_desc_t * handler_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Sets phase rules.
+ * @param handler_desc pointer to handler description
+ * @param env pointer to environment struct
+ * @param phase_rule pointer to phase rule struct, handler description
+ * assumes ownership of the struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_handler_desc_set_rules(
+ axis2_handler_desc_t * handler_desc,
+ const axutil_env_t * env,
+ axis2_phase_rule_t * phase_rule);
+
+ /**
+ * Gets named parameter.
+ * @param handler_desc pointer to handler description
+ * @param env pointer to environment struct
+ * @param name parameter name string
+ * @return pointer to parameter if found, else NULL. Return a reference
+ * not a cloned copy
+ */
+ AXIS2_EXTERN axutil_param_t *AXIS2_CALL
+ axis2_handler_desc_get_param(
+ const axis2_handler_desc_t * handler_desc,
+ const axutil_env_t * env,
+ const axis2_char_t * name);
+
+ /**
+ * Adds given parameter to the parameter list.
+ * @param handler_desc pointer to handler description
+ * @param env pointer to environment struct
+ * @param param pointer to param
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_handler_desc_add_param(
+ axis2_handler_desc_t * handler_desc,
+ const axutil_env_t * env,
+ axutil_param_t * param);
+
+ /**
+ * Gets all parameters stored within handler description.
+ * @param handler_desc pointer to handler description
+ * @param env pointer to environment struct
+ * @return pointer to array list containing parameters, returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_handler_desc_get_all_params(
+ const axis2_handler_desc_t * handler_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Checks if the named parameter is locked at any level
+ * @param handler_desc pointer to handler description
+ * @param env pointer to environment struct
+ * @param param_name parameter name string
+ * @return AXIS2_TRUE if the parameter is locked, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_handler_desc_is_param_locked(
+ const axis2_handler_desc_t * handler_desc,
+ const axutil_env_t * env,
+ const axis2_char_t * param_name);
+
+ /**
+ * Gets the handler associated with the handler description.
+ * @param handler_desc pointer to handler description
+ * @param env pointer to environment struct
+ * @return pointer to handler, returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axis2_handler_t *AXIS2_CALL
+ axis2_handler_desc_get_handler(
+ const axis2_handler_desc_t * handler_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the handler associated with the handler description.
+ * @param handler_desc pointer to handler description
+ * @param env pointer to environment struct
+ * @param handler pointer to handler, handler description assumes
+ * the ownership of the handler
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_handler_desc_set_handler(
+ axis2_handler_desc_t * handler_desc,
+ const axutil_env_t * env,
+ axis2_handler_t * handler);
+
+ /**
+ * Gets the class name. Class name is the name of the shared library
+ * file that contains the implementation of the handler.
+ * @param handler_desc pointer to handler description
+ * @param env pointer to environment struct
+ * @return class name string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_handler_desc_get_class_name(
+ const axis2_handler_desc_t * handler_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the class name. Class name is the name of the shared library
+ * file that contains the implementation of the handler.
+ * @param handler_desc pointer to handler description
+ * @param env pointer to environment struct
+ * @param class_name class name string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_handler_desc_set_class_name(
+ axis2_handler_desc_t * handler_desc,
+ const axutil_env_t * env,
+ const axis2_char_t * class_name);
+
+ /**
+ * Gets the parent. Parent of handler description is of type parameter
+ * container.
+ * @param handler_desc pointer to handler description
+ * @param env pointer to environment struct
+ * @return pointer to parent parameter container, returns a reference,
+ * not a cloned copy
+ */
+ AXIS2_EXTERN axutil_param_container_t *AXIS2_CALL
+ axis2_handler_desc_get_parent(
+ const axis2_handler_desc_t * handler_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the parent. Parent of handler description is of type parameter
+ * container.
+ * @param handler_desc pointer to handler description
+ * @param env pointer to environment struct
+ * @param parent pointer to parent parameter container struct, handler
+ * description assumes ownership of struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_handler_desc_set_parent(
+ axis2_handler_desc_t * handler_desc,
+ const axutil_env_t * env,
+ axutil_param_container_t * parent);
+
+ /**
+ * Frees handler description.
+ * @param handler_desc pointer to handler description
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_handler_desc_free(
+ axis2_handler_desc_t * handler_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the param container.
+ * @param handler_desc pointer to handler description
+ * @param env pointer to environment struct
+ * @return pointer to parameter container, returns a reference,
+ * not a cloned copy
+ */
+ AXIS2_EXTERN axutil_param_container_t *AXIS2_CALL
+ axis2_handler_desc_get_param_container(
+ const axis2_handler_desc_t * handler_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Creates handler description struct instance.
+ * @param env pointer to env pointer to environment struct
+ * @param name pointer to string representing handler name, can be NULL, create function
+ * clones this
+ * @return pointer to newly created handler description struct
+ */
+ AXIS2_EXTERN axis2_handler_desc_t *AXIS2_CALL
+ axis2_handler_desc_create(
+ const axutil_env_t * env,
+ axutil_string_t * name);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_HANDLER_DESC_H */
diff --git a/include/axis2_http_accept_record.h b/include/axis2_http_accept_record.h
new file mode 100644
index 0000000..3ddb068
--- /dev/null
+++ b/include/axis2_http_accept_record.h
@@ -0,0 +1,117 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HTTP_ACCEPT_RECORD_H
+#define AXIS2_HTTP_ACCEPT_RECORD_H
+
+/**
+ * @defgroup axis2_http_accept_record HTTP Accept record
+ * @ingroup axis2_core_trans_http
+ * @{
+ */
+
+/**
+ * @file axis2_http_accept_record.h
+ * @brief Axis2 HTTP Accept record
+ */
+
+#include <axis2_const.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_http_accept_record */
+ typedef struct axis2_http_accept_record axis2_http_accept_record_t;
+
+ /**
+ * Gets quality factor of accept record
+ * @param accept_record pointer to accept record
+ * @param env pointer to environment struct
+ * @return quality factor between 0 and 1 (1 meaning maximum
+ * and 0 meaning minimum)
+ */
+ AXIS2_EXTERN float AXIS2_CALL
+ axis2_http_accept_record_get_quality_factor(
+ const axis2_http_accept_record_t * accept_record,
+ const axutil_env_t * env);
+
+ /**
+ * Gets name of accept record
+ * @param accept_record pointer to accept record
+ * @param env pointer to environment struct
+ * @return name of accept record
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_accept_record_get_name(
+ const axis2_http_accept_record_t * accept_record,
+ const axutil_env_t * env);
+
+ /**
+ * Gets level of accept record
+ * @param accept_record pointer to accept record
+ * @param env pointer to environment struct
+ * @return level of accept record (1 meaning highest).
+ * A return value of -1 indicates that no level is
+ * associated.
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_http_accept_record_get_level(
+ const axis2_http_accept_record_t * accept_record,
+ const axutil_env_t * env);
+
+ /**
+ * Gets string representation of accept record
+ * @param accept_record pointer to accept record
+ * @param env pointer to environment struct
+ * @return created accept record string
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_accept_record_to_string(
+ axis2_http_accept_record_t * accept_record,
+ const axutil_env_t * env);
+
+ /**
+ * Frees accept record
+ * @param accept_record pointer to accept record
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_accept_record_free(
+ axis2_http_accept_record_t * accept_record,
+ const axutil_env_t * env);
+
+ /**
+ * Creates accept record
+ * @param env pointer to environment struct
+ * @param str pointer to str
+ * @return created accept record
+ */
+ AXIS2_EXTERN axis2_http_accept_record_t *AXIS2_CALL
+ axis2_http_accept_record_create(
+ const axutil_env_t * env,
+ const axis2_char_t * str);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_HTTP_ACCEPT_RECORD_H */
diff --git a/include/axis2_http_client.h b/include/axis2_http_client.h
new file mode 100644
index 0000000..fbad8d4
--- /dev/null
+++ b/include/axis2_http_client.h
@@ -0,0 +1,270 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_HTTP_CLIENT_H
+#define AXIS2_HTTP_CLIENT_H
+
+/**
+ * @defgroup axis2_http_client http client
+ * @ingroup axis2_core_trans_http
+ * Description
+ * @{
+ */
+
+/**
+ * @file axis2_http_client.h
+ * @brief axis2 HTTP Header name:value pair implementation
+ */
+
+#include <axis2_const.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_http_simple_response.h>
+#include <axis2_http_simple_request.h>
+#include <axutil_url.h>
+
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_http_client */
+ typedef struct axis2_http_client axis2_http_client_t;
+
+ /**
+ * @param client pointer to client
+ * @param env pointer to environment struct
+ * @param request pointer to request
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_client_send(
+ axis2_http_client_t * client,
+ const axutil_env_t * env,
+ axis2_http_simple_request_t * request,
+ axis2_char_t * ssl_pp);
+
+ /**
+ * @param client pointer to client
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_http_client_recieve_header(
+ axis2_http_client_t * client,
+ const axutil_env_t * env);
+
+ /**
+ * @param client pointer to client
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_http_simple_response_t *AXIS2_CALL
+
+ axis2_http_client_get_response(
+ const axis2_http_client_t * client,
+ const axutil_env_t * env);
+
+ /**
+ * @param client pointer to client
+ * @param env pointer to environment struct
+ * @param url pointer to url
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_client_set_url(
+ axis2_http_client_t * client,
+ const axutil_env_t * env,
+ axutil_url_t * url);
+
+ /**
+ * @param client pointer to client
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axutil_url_t *AXIS2_CALL
+ axis2_http_client_get_url(
+ const axis2_http_client_t * client,
+ const axutil_env_t * env);
+
+ /**
+ * @param client pointer to client
+ * @param env pointer to environment struct
+ * @param timeout_ms
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_client_set_timeout(
+ axis2_http_client_t * client,
+ const axutil_env_t * env,
+ int timeout_ms);
+
+ /**
+ * @param client pointer to client
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_http_client_get_timeout(
+ const axis2_http_client_t * client,
+ const axutil_env_t * env);
+
+ /**
+ * @param client pointer to client
+ * @param env pointer to environment struct
+ * @param proxy_host pointer to proxy host
+ * @param proxy_port
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_client_set_proxy(
+ axis2_http_client_t * client,
+ const axutil_env_t * env,
+ axis2_char_t * proxy_host,
+ int proxy_port);
+
+ /**
+ * @param client pointer to client
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_client_get_proxy(
+ const axis2_http_client_t * client,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_client_connect_ssl_host(
+ axis2_http_client_t * client,
+ const axutil_env_t * env,
+ axis2_char_t * host,
+ int port);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_client_set_dump_input_msg(
+ axis2_http_client_t * client,
+ const axutil_env_t * env,
+ axis2_bool_t dump_input_msg);
+
+ /**
+ * @param client pointer to client
+ * @param env pointer to environment struct
+ * @param server_cert server certificate
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_client_set_server_cert(
+ axis2_http_client_t * client,
+ const axutil_env_t * env,
+ axis2_char_t * server_cert);
+
+ /**
+ * @param client pointer to client
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_client_get_server_cert(
+ const axis2_http_client_t * client,
+ const axutil_env_t * env);
+
+ /**
+ * @param client pointer to client
+ * @param env pointer to environment struct
+ * @param key_file chain file containing
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_client_set_key_file(
+ axis2_http_client_t * client,
+ const axutil_env_t * env,
+ axis2_char_t * key_file);
+
+ /**
+ * @param client pointer to client
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_client_get_key_file(
+ const axis2_http_client_t * client,
+ const axutil_env_t * env);
+
+ /**
+ * @param client pointer to client
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_client_free(
+ axis2_http_client_t * client,
+ const axutil_env_t * env);
+
+ /**
+ * @param env pointer to environment struct
+ * @param url pointer to url
+ */
+ AXIS2_EXTERN axis2_http_client_t *AXIS2_CALL
+ axis2_http_client_create(
+ const axutil_env_t * env,
+ axutil_url_t * url);
+
+ /**
+ * Free http_client passed as void pointer. This will be
+ * cast into appropriate type and then pass the cast object
+ * into the http_client structure's free method
+ * @param client
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_client_free_void_arg(
+ void *client,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_client_set_mime_parts(
+ axis2_http_client_t * client,
+ const axutil_env_t * env,
+ axutil_array_list_t *mime_parts);
+
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_http_client_get_mime_parts(
+ const axis2_http_client_t * client,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_client_set_doing_mtom(
+ axis2_http_client_t * client,
+ const axutil_env_t * env,
+ axis2_bool_t doing_mtom);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_http_client_get_doing_mtom(
+ const axis2_http_client_t * client,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_client_set_mtom_sending_callback_name(
+ axis2_http_client_t * client,
+ const axutil_env_t * env,
+ axis2_char_t *callback_name);
+
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_HTTP_CLIENT_H */
diff --git a/include/axis2_http_header.h b/include/axis2_http_header.h
new file mode 100644
index 0000000..c79ab50
--- /dev/null
+++ b/include/axis2_http_header.h
@@ -0,0 +1,110 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_HTTP_HEADER_H
+#define AXIS2_HTTP_HEADER_H
+
+/**
+ * @defgroup axis2_http_header http header
+ * @ingroup axis2_core_trans_http
+ * Description
+ * @{
+ */
+
+/**
+ * @file axis2_http_header.h
+ * @brief axis2 HTTP Header name:value pair implementation
+ */
+
+#include <axis2_const.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_http_header */
+ typedef struct axis2_http_header axis2_http_header_t;
+
+ /**
+ * @param header pointer to header
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_header_to_external_form(
+ axis2_http_header_t * header,
+ const axutil_env_t * env);
+
+ /**
+ * @param header pointer to header
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_header_get_name(
+ const axis2_http_header_t * header,
+ const axutil_env_t * env);
+
+ /**
+ * @param header pointer to header
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_header_get_value(
+ const axis2_http_header_t * header,
+ const axutil_env_t * env);
+
+ /**
+ * @param header pointer to header
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_header_free(
+ axis2_http_header_t * header,
+ const axutil_env_t * env);
+
+ /**
+ * @param env pointer to environment struct
+ * @param name pointer to name
+ * @param value pointer to value
+ */
+ AXIS2_EXTERN axis2_http_header_t *AXIS2_CALL
+ axis2_http_header_create(
+ const axutil_env_t * env,
+ const axis2_char_t * name,
+ const axis2_char_t * value);
+
+ /**
+ * Creates http header object from a string having format "header_name: header_value"
+ * (e.g. "SOAPAction: urn:hello")
+ * @param env pointer to environment struct
+ * @param str pointer to str
+ */
+ AXIS2_EXTERN axis2_http_header_t *AXIS2_CALL
+ axis2_http_header_create_by_str(
+ const axutil_env_t * env,
+ const axis2_char_t * str);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_HTTP_HEADER_H */
diff --git a/include/axis2_http_out_transport_info.h b/include/axis2_http_out_transport_info.h
new file mode 100644
index 0000000..7ba4b94
--- /dev/null
+++ b/include/axis2_http_out_transport_info.h
@@ -0,0 +1,250 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_HTTP_OUT_TRANSPORT_INFO_H
+#define AXIS2_HTTP_OUT_TRANSPORT_INFO_H
+
+/**
+ * @defgroup axis2_http_out_transport_info http out transport info
+ * @ingroup axis2_core_trans_http
+ * Description
+ * @{
+ */
+
+/**
+ * @file axis2_http_out_transport_info.h
+ * @brief axis2 HTTP Out Transport Info
+ */
+
+#include <axis2_const.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_http_simple_response.h>
+#include <axis2_out_transport_info.h>
+#include <axis2_transport_receiver.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_http_out_transport_info */
+ typedef struct axis2_http_out_transport_info
+ axis2_http_out_transport_info_t;
+
+ struct axis2_http_out_transport_info
+ {
+ axis2_out_transport_info_t out_transport;
+ axis2_http_simple_response_t *response;
+ axis2_transport_receiver_t *server;
+ axis2_char_t *encoding;
+
+ axis2_status_t(
+ AXIS2_CALL
+ * set_content_type)(
+ axis2_http_out_transport_info_t * info,
+ const axutil_env_t * env,
+ const axis2_char_t * content_type);
+
+ axis2_status_t(
+ AXIS2_CALL
+ * set_char_encoding)(
+ axis2_http_out_transport_info_t * info,
+ const axutil_env_t * env,
+ const axis2_char_t * encoding);
+
+ axis2_status_t(
+ AXIS2_CALL
+ * set_cookie_header)(
+ axis2_http_out_transport_info_t * info,
+ const axutil_env_t * env,
+ const axis2_char_t * cookie_header);
+
+ axis2_status_t(
+ AXIS2_CALL
+ * set_session)(
+ axis2_http_out_transport_info_t * info,
+ const axutil_env_t * env,
+ const axis2_char_t * session_id,
+ const axis2_char_t * session_value);
+
+ void(
+ AXIS2_CALL
+ * free_function)(
+ axis2_http_out_transport_info_t * info,
+ const axutil_env_t * env);
+ };
+
+ /**
+ * @param info pointer to info
+ * @param env pointer to environment struct
+ * @param content_type pointer to content type
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+
+ axis2_http_out_transport_info_set_content_type(
+ axis2_http_out_transport_info_t * info,
+ const axutil_env_t * env,
+ const axis2_char_t * content_type);
+
+ /**
+ * @param info pointer to info
+ * @param env pointer to environment struct
+ * @param encoding pointer to encoding
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_out_transport_info_set_char_encoding(
+ axis2_http_out_transport_info_t * info,
+ const axutil_env_t * env,
+ const axis2_char_t * encoding);
+
+ /**
+ * @param info pointer to info
+ * @param env pointer to environment struct
+ * @param cookie_header pointer to cookie_header
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_out_transport_info_set_cookie_header(
+ axis2_http_out_transport_info_t * info,
+ const axutil_env_t * env,
+ const axis2_char_t * cookie_header);
+
+ /** @param info pointer to info
+ * @param env pointer to environment struct
+ * @param session_str pointer to session string
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_out_transport_info_set_session(
+ axis2_http_out_transport_info_t * info,
+ const axutil_env_t * env,
+ const axis2_char_t * session_id,
+ const axis2_char_t * session_value);
+
+
+ /**
+ * @param out_transport_info pointer to out transport info
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_out_transport_info_free(
+ axis2_http_out_transport_info_t * out_transport_info,
+ const axutil_env_t * env);
+
+ /**
+ * @param env pointer to environment struct
+ * @param response pointer to response
+ */
+ AXIS2_EXTERN axis2_http_out_transport_info_t *AXIS2_CALL
+
+ axis2_http_out_transport_info_create(
+ const axutil_env_t * env,
+ axis2_http_simple_response_t * response);
+
+ /**
+ * Free http_out_transport_info passed as void pointer. This will be
+ * cast into appropriate type and then pass the cast object
+ * into the http_out_transport_info structure's free method
+ * @param transport_info pointer to transport info
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_out_transport_info_free_void_arg(
+ void *transport_info,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN void AXIS2_CALL
+
+ axis2_http_out_transport_info_set_char_encoding_func(
+ axis2_http_out_transport_info_t * out_transport_info,
+ const axutil_env_t * env,
+ axis2_status_t(AXIS2_CALL
+ * set_encoding)
+ (axis2_http_out_transport_info_t *,
+ const axutil_env_t *,
+ const axis2_char_t *));
+
+ AXIS2_EXTERN void AXIS2_CALL
+
+ axis2_http_out_transport_info_set_content_type_func(
+ axis2_http_out_transport_info_t * out_transport_info,
+ const axutil_env_t * env,
+ axis2_status_t(AXIS2_CALL
+ *
+ set_content_type)(axis2_http_out_transport_info_t *,
+ const axutil_env_t *,
+ const axis2_char_t *));
+
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_out_transport_info_set_cookie_header_func(
+ axis2_http_out_transport_info_t * out_transport_info,
+ const axutil_env_t * env,
+ axis2_status_t(AXIS2_CALL
+ *
+ set_cookie_header)(axis2_http_out_transport_info_t *,
+ const axutil_env_t *,
+ const axis2_char_t *));
+
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_out_transport_info_set_session_func(
+ axis2_http_out_transport_info_t * out_transport_info,
+ const axutil_env_t * env,
+ axis2_status_t(AXIS2_CALL
+ *
+ set_session)(axis2_http_out_transport_info_t *,
+ const axutil_env_t *,
+ const axis2_char_t *,
+ const axis2_char_t *));
+
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_out_transport_info_set_free_func(
+ axis2_http_out_transport_info_t * out_transport_info,
+ const axutil_env_t * env,
+ void(AXIS2_CALL
+ * free_function)(axis2_http_out_transport_info_t *,
+ const axutil_env_t *));
+
+ /** Set content type. */
+#define AXIS2_HTTP_OUT_TRANSPORT_INFO_SET_CONTENT_TYPE(out_transport_info, \
+ env, content_type) axis2_http_out_transport_info_set_content_type (out_transport_info, env, content_type)
+
+ /** Set char encoding. */
+#define AXIS2_HTTP_OUT_TRANSPORT_INFO_SET_CHAR_ENCODING(out_transport_info,\
+ env, encoding) axis2_http_out_transport_info_set_char_encoding(out_transport_info, env, encoding)
+
+ /** Set cookie_header. */
+#define AXIS2_HTTP_OUT_TRANSPORT_INFO_SET_COOKIE_HEADER(out_transport_info, \
+ env, cookie_header) axis2_http_out_transport_info_set_cookie_header (out_transport_info, env, cookie_header)
+
+ /** Set session. */
+#define AXIS2_HTTP_OUT_TRANSPORT_INFO_SET_SESSION(out_transport_info, \
+ env, session_id, session_value) axis2_http_out_transport_info_set_session (out_transport_info, env, session_id, session_value)
+
+ /** Free. */
+#define AXIS2_HTTP_OUT_TRANSPORT_INFO_FREE(out_transport_info, env)\
+ axis2_http_out_transport_info_free(out_transport_info, env)
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_HTTP_OUT_TRANSPORT_INFO_H */
diff --git a/include/axis2_http_request_line.h b/include/axis2_http_request_line.h
new file mode 100644
index 0000000..4d1ef00
--- /dev/null
+++ b/include/axis2_http_request_line.h
@@ -0,0 +1,122 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_HTTP_REQUEST_LINE_H
+#define AXIS2_HTTP_REQUEST_LINE_H
+
+/**
+ * @defgroup axis2_http_request_line http request line
+ * @ingroup axis2_core_trans_http
+ * @{
+ */
+
+/**
+ * @file axis2_http_request_line.h
+ * @brief axis2 HTTP Request Line
+ */
+
+#include <axis2_const.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_http_request_line */
+ typedef struct axis2_http_request_line axis2_http_request_line_t;
+
+ /**
+ * @param request_line pointer to request line
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_request_line_get_method(
+ const axis2_http_request_line_t * request_line,
+ const axutil_env_t * env);
+
+ /**
+ * @param request_line pointer to request line
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+
+ axis2_http_request_line_get_http_version(
+ const axis2_http_request_line_t * request_line,
+ const axutil_env_t * env);
+
+ /**
+ * @param request_line pointer to request line
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_request_line_get_uri(
+ const axis2_http_request_line_t * request_line,
+ const axutil_env_t * env);
+
+ /**
+ * @param request_line pointer to request line
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_request_line_to_string(
+ axis2_http_request_line_t * request_line,
+ const axutil_env_t * env);
+
+ /**
+ * @param request_line pointer to request line
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_request_line_free(
+ axis2_http_request_line_t * request_line,
+ const axutil_env_t * env);
+
+ /**
+ * @param env pointer to environment struct
+ * @param method pointer to method
+ * @param uri pointer to uri
+ * @param http_version pointer to http version
+ */
+ AXIS2_EXTERN axis2_http_request_line_t *AXIS2_CALL
+
+ axis2_http_request_line_create(
+ const axutil_env_t * env,
+ const axis2_char_t * method,
+ const axis2_char_t * uri,
+ const axis2_char_t * http_version);
+
+ /**
+ * Parses a line "<http method> <uri location> <http version>CRLF" and creates http_request_line
+ * object. E.g "POST /axis2/services/echo HTTP/1.1\r\n"
+ * @param env pointer to environment struct
+ * @param str pointer to the line to be parsed
+ * @return created object if success. NULL otherwise
+ */
+ AXIS2_EXTERN axis2_http_request_line_t *AXIS2_CALL
+ axis2_http_request_line_parse_line(
+ const axutil_env_t * env,
+ const axis2_char_t * str);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_HTTP_REQUEST_LINE_H */
diff --git a/include/axis2_http_response_writer.h b/include/axis2_http_response_writer.h
new file mode 100644
index 0000000..08c5c6c
--- /dev/null
+++ b/include/axis2_http_response_writer.h
@@ -0,0 +1,193 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_HTTP_RESPONSE_WRITER_H
+#define AXIS2_HTTP_RESPONSE_WRITER_H
+
+/**
+ * @defgroup axis2_http_response_writer http response writer
+ * @ingroup axis2_core_trans_http
+ * @{
+ */
+
+/**
+ * @file axis2_http_response_writer.h
+ * @brief axis2 Response Writer
+ */
+
+#include <axis2_const.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axutil_stream.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_http_response_writer */
+ typedef struct axis2_http_response_writer axis2_http_response_writer_t;
+
+ /**
+ * @param response_writer pointer to response writer
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+
+ axis2_http_response_writer_get_encoding(
+ const axis2_http_response_writer_t * response_writer,
+ const axutil_env_t * env);
+
+ /**
+ * @param response_writer pointer to response writer
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_response_writer_close(
+ axis2_http_response_writer_t * response_writer,
+ const axutil_env_t * env);
+
+ /**
+ * @param response_writer pointer to response writer
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_response_writer_flush(
+ axis2_http_response_writer_t * response_writer,
+ const axutil_env_t * env);
+
+ /**
+ * @param response_writer pointer to response writer
+ * @param env pointer to environment struct
+ * @param c
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_response_writer_write_char(
+ axis2_http_response_writer_t * response_writer,
+ const axutil_env_t * env,
+ char c);
+
+ /**
+ * @param response_writer pointer to response writer
+ * @param env pointer to environment struct
+ * @param buf pointer to buf
+ * @param offset
+ * @param len
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_response_writer_write_buf(
+ axis2_http_response_writer_t * response_writer,
+ const axutil_env_t * env,
+ char *buf,
+ int offset,
+ axis2_ssize_t len);
+
+ /**
+ * @param response_writer pointer to response writer
+ * @param env pointer to environment struct
+ * @param str pointer to str
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_response_writer_print_str(
+ axis2_http_response_writer_t * response_writer,
+ const axutil_env_t * env,
+ const char *str);
+
+ /**
+ * @param response_writer pointer to response writer
+ * @param env pointer to environment struct
+ * @param i
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_response_writer_print_int(
+ axis2_http_response_writer_t * response_writer,
+ const axutil_env_t * env,
+ int i);
+
+ /**
+ * @param response_writer pointer to response writer
+ * @param env pointer to environment struct
+ * @param str pointer to str
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_response_writer_println_str(
+ axis2_http_response_writer_t * response_writer,
+ const axutil_env_t * env,
+ const char *str);
+
+ /**
+ * @param response_writer pointer to response writer
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_response_writer_println(
+ axis2_http_response_writer_t * response_writer,
+ const axutil_env_t * env);
+
+ /**
+ * @param response_writer pointer to response writer
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_response_writer_free(
+ axis2_http_response_writer_t * response_writer,
+ const axutil_env_t * env);
+
+ /**
+ * @param env pointer to environment struct
+ * @param stream pointer to stream
+ */
+ AXIS2_EXTERN axis2_http_response_writer_t *AXIS2_CALL
+
+ axis2_http_response_writer_create(
+ const axutil_env_t * env,
+ axutil_stream_t * stream);
+
+ /**
+ * @param env pointer to environment struct
+ * @param stream pointer to stream
+ * @param encoding pointer to encoding
+ */
+ AXIS2_EXTERN axis2_http_response_writer_t *AXIS2_CALL
+
+ axis2_http_response_writer_create_with_encoding(
+ const axutil_env_t * env,
+ axutil_stream_t * stream,
+ const axis2_char_t * encoding);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_HTTP_RESPONSE_WRITER_H */
diff --git a/include/axis2_http_sender.h b/include/axis2_http_sender.h
new file mode 100644
index 0000000..d2ee5e7
--- /dev/null
+++ b/include/axis2_http_sender.h
@@ -0,0 +1,226 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HTTP_SENDER_H
+#define AXIS2_HTTP_SENDER_H
+
+/**
+ * @ingroup axis2_core_transport_http
+ * @{
+ */
+
+/**
+ * @file axis2_http_sender.h
+ * @brief axis2 SOAP over HTTP sender
+ */
+
+#include <axis2_const.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_msg_ctx.h>
+#include <axiom_output.h>
+#include <axis2_http_simple_response.h>
+#include <axiom_soap_envelope.h>
+#include <axis2_http_simple_request.h>
+
+#ifdef AXIS2_LIBCURL_ENABLED
+#include <curl/curl.h>
+#endif
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_http_sender_ */
+ typedef struct axis2_http_sender axis2_http_sender_t;
+
+ /**
+ * @param sender sender
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ * @param out out
+ * @param str_url str url
+ * @param soap_action pointer to soap action
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_sender_send(
+ axis2_http_sender_t * sender,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx,
+ axiom_soap_envelope_t * out,
+ const axis2_char_t * str_url,
+ const axis2_char_t * soap_action);
+
+ void AXIS2_CALL
+ axis2_http_sender_util_add_header(
+ const axutil_env_t * env,
+ axis2_http_simple_request_t * request,
+ axis2_char_t * header_name,
+ const axis2_char_t * header_value);
+
+#ifdef AXIS2_LIBCURL_ENABLED
+ typedef struct axis2_libcurl axis2_libcurl_t;
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_libcurl_http_send(
+ axis2_libcurl_t * curl,
+ axis2_http_sender_t * sender,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx,
+ axiom_soap_envelope_t * out,
+ const axis2_char_t * str_url,
+ const axis2_char_t * soap_action);
+#endif
+
+ /**
+ * @param sender sender
+ * @param env pointer to environment struct
+ * @param chunked chunked
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_sender_set_chunked(
+ axis2_http_sender_t * sender,
+ const axutil_env_t * env,
+ axis2_bool_t chunked);
+
+ /**
+ * @param sender sender
+ * @param env pointer to environment struct
+ * @param om_output om output
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_sender_set_om_output(
+ axis2_http_sender_t * sender,
+ const axutil_env_t * env,
+ axiom_output_t * om_output);
+
+ /**
+ * @param sender sender
+ * @param env pointer to environment struct
+ * @param version pointer to version
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_sender_set_http_version(
+ axis2_http_sender_t * sender,
+ const axutil_env_t * env,
+ axis2_char_t * version);
+
+ /**
+ * @param sender sender
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_sender_free(
+ axis2_http_sender_t * sender,
+ const axutil_env_t * env);
+
+ /**
+ * @param sender soap over http sender
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ * @param response pointer to response
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_sender_get_header_info(
+ axis2_http_sender_t * sender,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx,
+ axis2_http_simple_response_t * response);
+
+ /**
+ * @param sender soap over http sender
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ * @param response pointer to response
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_sender_process_response(
+ axis2_http_sender_t * sender,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx,
+ axis2_http_simple_response_t * response);
+
+ /**
+ * @param sender soap over http sender
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_sender_get_timeout_values(
+ axis2_http_sender_t * sender,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_sender_get_param_string(
+ axis2_http_sender_t * sender,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_sender_set_keep_alive(
+ axis2_http_sender_t * sender,
+ const axutil_env_t * env,
+ axis2_bool_t keep_alive);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_http_sender_get_keep_alive(
+ axis2_http_sender_t * sender,
+ const axutil_env_t * env);
+
+ /**
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_http_sender_t *AXIS2_CALL
+ axis2_http_sender_create(
+ const axutil_env_t * env);
+
+ /** Send. */
+#define AXIS2_HTTP_SENDER_SEND(sender, env, msg_ctx, output, url,soap_action)\
+ axis2_http_sender_send(sender, env, msg_ctx,output, url, soap_action)
+
+ /** Set chunked. */
+#define AXIS2_HTTP_SENDER_SET_CHUNKED(sender, env, chunked) \
+ axis2_http_sender_set_chunked(sender, env, chunked)
+
+ /** Set om output. */
+#define AXIS2_HTTP_SENDER_SET_OM_OUTPUT(sender, env, om_output) \
+ axis2_http_sender_set_om_output (sender, env, om_output)
+
+ /** Set http version. */
+#define AXIS2_HTTP_SENDER_SET_HTTP_VERSION(sender, env, version)\
+ axis2_http_sender_set_http_version (sender, env, version)
+
+ /** Frees the soap over http sender. */
+#define AXIS2_HTTP_SENDER_FREE(sender, env) \
+ axis2_http_sender_free(sender, env)
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_HTTP_SENDER_H */
diff --git a/include/axis2_http_server.h b/include/axis2_http_server.h
new file mode 100644
index 0000000..4e31344
--- /dev/null
+++ b/include/axis2_http_server.h
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HTTP_SERVER_H
+#define AXIS2_HTTP_SERVER_H
+
+/**
+ * @defgroup axis2_http_server http server
+ * @ingroup axis2_core_trans_http
+ * @{
+ */
+
+/**
+ * @file axis2_http_server.h
+ * @brief axis2 HTTP Server implementation
+ */
+
+#include <axis2_const.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_conf_ctx.h>
+#include <axis2_transport_receiver.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ AXIS2_EXTERN axis2_transport_receiver_t *AXIS2_CALL
+ axis2_http_server_create(
+ const axutil_env_t * env,
+ const axis2_char_t * repo,
+ const int port);
+
+ AXIS2_EXTERN axis2_transport_receiver_t *AXIS2_CALL
+ axis2_http_server_create_with_file(
+ const axutil_env_t * env,
+ const axis2_char_t * file,
+ const int port);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_server_stop(
+ axis2_transport_receiver_t * server,
+ const axutil_env_t * env);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_HTTP_SERVER_H */
diff --git a/include/axis2_http_simple_request.h b/include/axis2_http_simple_request.h
new file mode 100644
index 0000000..cb2b8b5
--- /dev/null
+++ b/include/axis2_http_simple_request.h
@@ -0,0 +1,229 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_HTTP_SIMPLE_REQUEST_H
+#define AXIS2_HTTP_SIMPLE_REQUEST_H
+
+/**
+ * @defgroup axis2_http_simple_request http simple request
+ * @ingroup axis2_core_trans_http
+ * @{
+ */
+
+/**
+ * @file axis2_http_simple_request.h
+ * @brief axis2 HTTP Simple Request
+ */
+
+#include <axis2_const.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_http_request_line.h>
+#include <axis2_http_header.h>
+#include <axutil_stream.h>
+#include <axutil_array_list.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_http_simple_request */
+ typedef struct axis2_http_simple_request axis2_http_simple_request_t;
+
+ /**
+ * @param simple_request pointer to simple request
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_http_request_line_t *AXIS2_CALL
+
+ axis2_http_simple_request_get_request_line(
+ const axis2_http_simple_request_t * simple_request,
+ const axutil_env_t * env);
+
+ /**
+ * @param simple_request pointer to simple request
+ * @param env pointer to environment struct
+ * @param request_line pointer to request line
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_simple_request_set_request_line(
+ axis2_http_simple_request_t * simple_request,
+ const axutil_env_t * env,
+ axis2_http_request_line_t * request_line);
+
+ /**
+ * @param simple_request pointer to simple request
+ * @param env pointer to environment struct
+ * @param name pointer to name
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+
+ axis2_http_simple_request_contains_header(
+ axis2_http_simple_request_t * simple_request,
+ const axutil_env_t * env,
+ const axis2_char_t * name);
+
+ /**
+ * @param simple_request pointer to simple request
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_http_simple_request_get_headers(
+ const axis2_http_simple_request_t * simple_request,
+ const axutil_env_t * env);
+
+ /**
+ * @param simple_request pointer to simple request
+ * @param env pointer to environment struct
+ * @param str pointer to str
+ */
+ AXIS2_EXTERN axis2_http_header_t *AXIS2_CALL
+
+ axis2_http_simple_request_get_first_header(
+ const axis2_http_simple_request_t * simple_request,
+ const axutil_env_t * env,
+ const axis2_char_t * str);
+
+ /**
+ * @param simple_request pointer to simple request
+ * @param env pointer to environment struct
+ * @param str pointer to str
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_simple_request_remove_headers(
+ axis2_http_simple_request_t * simple_request,
+ const axutil_env_t * env,
+ const axis2_char_t * str);
+
+ /**
+ * @param simple_request pointer to simple request
+ * @param env pointer to environment struct
+ * @param header pointer to header
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_simple_request_add_header(
+ axis2_http_simple_request_t * simple_request,
+ const axutil_env_t * env,
+ axis2_http_header_t * header);
+
+ /**
+ * @param simple_request pointer to simple request
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+
+ axis2_http_simple_request_get_content_type(
+ const axis2_http_simple_request_t * simple_request,
+ const axutil_env_t * env);
+
+ /**
+ * @param simple_request pointer to simple request
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+
+ axis2_http_simple_request_get_charset(
+ const axis2_http_simple_request_t * simple_request,
+ const axutil_env_t * env);
+
+ /**
+ * @param simple_request pointer to simple request
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_ssize_t AXIS2_CALL
+
+ axis2_http_simple_request_get_content_length(
+ const axis2_http_simple_request_t * simple_request,
+ const axutil_env_t * env);
+
+ /**
+ * @param simple_request pointer to simple request
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axutil_stream_t *AXIS2_CALL
+
+ axis2_http_simple_request_get_body(
+ const axis2_http_simple_request_t * simple_request,
+ const axutil_env_t * env);
+
+ /**
+ * @param simple_request pointer to simple request
+ * @param env pointer to environment struct
+ * @param buf double pointer to buf
+ */
+ AXIS2_EXTERN axis2_ssize_t AXIS2_CALL
+
+ axis2_http_simple_request_get_body_bytes(
+ const axis2_http_simple_request_t * simple_request,
+ const axutil_env_t * env,
+ char **buf);
+
+ /**
+ * @param simple_request pointer to simple request
+ * @param env pointer to environment struct
+ * @param str pointer to str
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_simple_request_set_body_string(
+ axis2_http_simple_request_t * simple_request,
+ const axutil_env_t * env,
+ void *str,
+ unsigned int str_len);
+
+ /**
+ * @param simple_request pointer to simple request
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_simple_request_free(
+ axis2_http_simple_request_t * simple_request,
+ const axutil_env_t * env);
+
+ /**
+ * @param env pointer to environment struct
+ * @param request_line pointer to request line
+ * @param http_headers double pointer to http headers
+ * @param http_hdr_count
+ * @param content pointer to content
+ */
+ AXIS2_EXTERN axis2_http_simple_request_t *AXIS2_CALL
+
+ axis2_http_simple_request_create(
+ const axutil_env_t * env,
+ axis2_http_request_line_t * request_line,
+ axis2_http_header_t ** http_headers,
+ axis2_ssize_t http_hdr_count,
+ axutil_stream_t * content);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_HTTP_SIMPLE_REQUEST_H */
diff --git a/include/axis2_http_simple_response.h b/include/axis2_http_simple_response.h
new file mode 100644
index 0000000..052e9cd
--- /dev/null
+++ b/include/axis2_http_simple_response.h
@@ -0,0 +1,337 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HTTP_SIMPLE_RESPONSE_H
+#define AXIS2_HTTP_SIMPLE_RESPONSE_H
+
+/**
+ * @defgroup axis2_http_simple_response http simple response
+ * @ingroup axis2_core_trans_http
+ * @{
+ */
+
+/**
+ * @file axis2_simple_http_response.h
+ * @brief axis2 HTTP Simple Response
+ */
+
+#include <axis2_const.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axutil_array_list.h>
+#include <axis2_http_status_line.h>
+#include <axis2_http_header.h>
+#include <axutil_stream.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_http_simple_response */
+ typedef struct axis2_http_simple_response axis2_http_simple_response_t;
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ * @param http_ver pointer to http_ver
+ * @param status_code pointer to status code
+ * @param phrase pointer to phrase
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_simple_response_set_status_line(
+ struct axis2_http_simple_response *simple_response,
+ const axutil_env_t * env,
+ const axis2_char_t * http_ver,
+ const int status_code,
+ const axis2_char_t * phrase);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+
+ axis2_http_simple_response_get_phrase(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_http_simple_response_get_status_code(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+
+ axis2_http_simple_response_get_http_version(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+
+ axis2_http_simple_response_get_status_line(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ * @param name pointer to name
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+
+ axis2_http_simple_response_contains_header(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env,
+ const axis2_char_t * name);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_http_simple_response_get_headers(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_http_simple_response_extract_headers(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ * @param str pointer to str
+ */
+ AXIS2_EXTERN axis2_http_header_t *AXIS2_CALL
+
+ axis2_http_simple_response_get_first_header(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env,
+ const axis2_char_t * str);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ * @param str pointer to str
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_simple_response_remove_headers(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env,
+ const axis2_char_t * str);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ * @param header pointer to header
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_simple_response_set_header(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env,
+ axis2_http_header_t * header);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ * @param headers double pointer to headers
+ * @param array_size
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_simple_response_set_headers(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env,
+ axis2_http_header_t ** headers,
+ axis2_ssize_t array_size);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+
+ axis2_http_simple_response_get_charset(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_ssize_t AXIS2_CALL
+
+ axis2_http_simple_response_get_content_length(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+
+ axis2_http_simple_response_get_content_type(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ * @param str pointer to str
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_simple_response_set_body_string(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env,
+ axis2_char_t * str);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ * @param stream pointer to stream
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_http_simple_response_set_body_stream(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env,
+ axutil_stream_t * stream);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axutil_stream_t *AXIS2_CALL
+
+ axis2_http_simple_response_get_body(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ * @param buf double pointer to buf
+ */
+ AXIS2_EXTERN axis2_ssize_t AXIS2_CALL
+
+ axis2_http_simple_response_get_body_bytes(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env,
+ axis2_char_t ** buf);
+
+ /**
+ * @param simple_response pointer to simple response struct
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_simple_response_free(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env);
+
+ /**
+ * @param env pointer to environment struct
+ * @param status_line pointer to status line
+ * @param http_headers double pointer to http_headers
+ * @param http_hdr_count
+ * @param content pointer to content
+ */
+ AXIS2_EXTERN axis2_http_simple_response_t *AXIS2_CALL
+
+ axis2_http_simple_response_create(
+ const axutil_env_t * env,
+ axis2_http_status_line_t * status_line,
+ const axis2_http_header_t ** http_headers,
+ const axis2_ssize_t http_hdr_count,
+ axutil_stream_t * content);
+
+ /**
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_http_simple_response_t *AXIS2_CALL
+
+ axis2_http_simple_response_create_default(
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_http_simple_response_get_mime_parts(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_simple_response_set_mime_parts(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env,
+ axutil_array_list_t *mime_parts);
+
+ axis2_status_t AXIS2_CALL
+ axis2_http_simple_response_set_http_version(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env,
+ axis2_char_t *http_version);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_simple_response_get_mtom_sending_callback_name(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env);
+
+ void AXIS2_EXTERN AXIS2_CALL
+ axis2_http_simple_response_set_mtom_sending_callback_name(
+ axis2_http_simple_response_t * simple_response,
+ const axutil_env_t * env,
+ axis2_char_t *mtom_sending_callback_name);
+
+
+
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_HTTP_SIMPLE_RESPONSE_H */
diff --git a/include/axis2_http_status_line.h b/include/axis2_http_status_line.h
new file mode 100644
index 0000000..4480bdf
--- /dev/null
+++ b/include/axis2_http_status_line.h
@@ -0,0 +1,131 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HTTP_STATUS_LINE_H
+#define AXIS2_HTTP_STATUS_LINE_H
+
+/**
+ * @defgroup axis2_http_status_line http status line
+ * @ingroup axis2_core_trans_http
+ * @{
+ */
+
+/**
+ * @file axis2_http_status_line.h
+ * @brief axis2 HTTP Status Line
+ */
+
+#include <axis2_const.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_http_status_line */
+ typedef struct axis2_http_status_line axis2_http_status_line_t;
+
+ /**
+ * @param status_line pointer to status line
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_http_status_line_get_status_code(
+ const axis2_http_status_line_t * status_line,
+ const axutil_env_t * env);
+
+ /**
+ * @param status_line pointer to status line
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+
+ axis2_http_status_line_get_http_version(
+ const axis2_http_status_line_t * status_line,
+ const axutil_env_t * env);
+
+ /**
+ * @param status_line pointer to status line
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+
+ axis2_http_status_line_get_reason_phrase(
+ const axis2_http_status_line_t * status_line,
+ const axutil_env_t * env);
+
+ /**
+ * @param status_line pointer to status line
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+
+ axis2_http_status_line_starts_with_http(
+ axis2_http_status_line_t * status_line,
+ const axutil_env_t * env);
+
+ /**
+ * @param status_line pointer to status line
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_status_line_to_string(
+ axis2_http_status_line_t * status_line,
+ const axutil_env_t * env);
+
+ /**
+ * @param status_line pointer to status line
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_status_line_free(
+ axis2_http_status_line_t * status_line,
+ const axutil_env_t * env);
+
+ /**
+ * @param env pointer to environment struct
+ * @param str pointer to str
+ */
+ AXIS2_EXTERN axis2_http_status_line_t *AXIS2_CALL
+ axis2_http_status_line_create(
+ const axutil_env_t * env,
+ const axis2_char_t * str);
+
+ AXIS2_EXTERN axis2_http_status_line_t *AXIS2_CALL
+ axis2_http_status_line_create_with_values(
+ const axutil_env_t * env,
+ const axis2_char_t * http_ver,
+ const int status_code,
+ const axis2_char_t * phrase);
+
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_status_line_set_http_version(
+ axis2_http_status_line_t * status_line,
+ const axutil_env_t * env,
+ axis2_char_t *http_version);
+
+
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_HTTP_STATUS_LINE_H */
diff --git a/include/axis2_http_svr_thread.h b/include/axis2_http_svr_thread.h
new file mode 100644
index 0000000..12fe115
--- /dev/null
+++ b/include/axis2_http_svr_thread.h
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HTTP_SVR_THREAD_H
+#define AXIS2_HTTP_SVR_THREAD_H
+
+/**
+ * @defgroup axis2_http_svr_thread http server thread
+ * @ingroup axis2_core_trans_http
+ * @{
+ */
+
+/**
+ * @file axis2_http_svr_thread.h
+ * @brief axis2 HTTP server listening thread implementation
+ */
+
+#include <axis2_const.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_http_worker.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axist_http_svr_thread */
+ typedef struct axis2_http_svr_thread axis2_http_svr_thread_t;
+
+ /**
+ * @param svr_thread pointer to server thread
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_svr_thread_run(
+ axis2_http_svr_thread_t * svr_thread,
+ const axutil_env_t * env);
+
+ /**
+ * @param svr_thread pointer to server thread
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_svr_thread_destroy(
+ axis2_http_svr_thread_t * svr_thread,
+ const axutil_env_t * env);
+
+ /**
+ * @param svr_thread pointer to server thread
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_http_svr_thread_get_local_port(
+ const axis2_http_svr_thread_t * svr_thread,
+ const axutil_env_t * env);
+
+ /**
+ * @param svr_thread pointer to server thread
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_http_svr_thread_is_running(
+ axis2_http_svr_thread_t * svr_thread,
+ const axutil_env_t * env);
+
+ /**
+ * @param svr_thread pointer to server thread
+ * @param env pointer to environment struct
+ * @param worker pointer to worker
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_svr_thread_set_worker(
+ axis2_http_svr_thread_t * svr_thread,
+ const axutil_env_t * env,
+ axis2_http_worker_t * worker);
+
+ /**
+ * @param svr_thread pointer to server thread
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_svr_thread_free(
+ axis2_http_svr_thread_t * svr_thread,
+ const axutil_env_t * env);
+
+ /**
+ * @param env pointer to environment struct
+ * @param port
+ */
+ AXIS2_EXTERN axis2_http_svr_thread_t *AXIS2_CALL
+ axis2_http_svr_thread_create(
+ const axutil_env_t * env,
+ int port);
+
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_http_svr_thread_get_listen_socket(
+ axis2_http_svr_thread_t *svr_thread,
+ const axutil_env_t *env);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_HTTP_SVR_THREAD_H */
diff --git a/include/axis2_http_transport.h b/include/axis2_http_transport.h
new file mode 100644
index 0000000..25f6e97
--- /dev/null
+++ b/include/axis2_http_transport.h
@@ -0,0 +1,1164 @@
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain count copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_HTTP_TRANSPORT_H
+#define AXIS2_HTTP_TRANSPORT_H
+
+#include <axis2_const.h>
+#include <axutil_version.h>
+#include <axiom_mime_const.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** @defgroup axis2_core_trans_http http transport
+ * @ingroup axis2_transport
+ * Description.
+ * @{
+ */
+
+ /**
+ * @defgroup axis2_core_transport_http core http transport
+ * @ingroup axis2_core_trans_http
+ * @{
+ */
+
+ /**
+ * @brief HTTP protocol and message context constants.
+ *
+ */
+ #define AXIS2_HTTP_OUT_TRANSPORT_INFO "HTTPOutTransportInfo"
+
+ /**
+ * CARRIAGE RETURN AND LINE FEED
+ */
+ #define AXIS2_HTTP_CRLF AXIS2_CRLF
+
+ /**
+ * PROTOCOL_VERSION
+ */
+ #define AXIS2_HTTP_PROTOCOL_VERSION "PROTOCOL"
+
+ /**
+ * REQUEST_URI
+ */
+ #define AXIS2_HTTP_REQUEST_URI "REQUEST_URI"
+
+ /**
+ * RESPONSE_CODE
+ */
+ #define AXIS2_HTTP_RESPONSE_CODE "RESPONSE_CODE"
+
+ /**
+ * RESPONSE_WORD
+ */
+ #define AXIS2_HTTP_RESPONSE_WORD "RESPONSE_WORD"
+
+ /*
+ * RESPONSE_CONTINUE_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_CONTINUE_CODE_VAL 100
+
+ /*
+ * RESPONSE_OK_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_OK_CODE_VAL 200
+
+ /*
+ * RESPONSE_CREATED_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_CREATED_CODE_VAL 201
+
+ /**
+ * RESPONSE_ACK_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_ACK_CODE_VAL 202
+
+ /**
+ * RESPONSE_NON_AUTHORITATIVE_INFO_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_NON_AUTHORITATIVE_INFO_CODE_VAL 203
+
+ /**
+ * RESPONSE_NO_CONTENT_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_NO_CONTENT_CODE_VAL 204
+
+ /**
+ * RESPONSE_RESET_CONTENT_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_RESET_CONTENT_CODE_VAL 205
+
+ /**
+ * RESPONSE_MULTIPLE_CHOICES_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_MULTIPLE_CHOICES_CODE_VAL 300
+
+ /**
+ * RESPONSE_MOVED_PERMANENTLY_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_MOVED_PERMANENTLY_CODE_VAL 301
+
+ /**
+ * RESPONSE_SEE_OTHER_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_SEE_OTHER_CODE_VAL 303
+
+ /**
+ * RESPONSE_NOT_MODIFIED_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_NOT_MODIFIED_CODE_VAL 304
+
+ /**
+ * RESPONSE_TEMPORARY_REDIRECT_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_TEMPORARY_REDIRECT_CODE_VAL 307
+
+ /**
+ * RESPONSE_BAD_REQUEST_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_BAD_REQUEST_CODE_VAL 400
+
+ /**
+ * RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL 401
+
+ /**
+ * RESPONSE_HTTP_FORBIDDEN_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_FORBIDDEN_CODE_VAL 403
+
+
+ /**
+ * RESPONSE_NOT_FOUND_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_NOT_FOUND_CODE_VAL 404
+
+ /**
+ * RESPONSE_METHOD_NOT_ALLOWED_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_METHOD_NOT_ALLOWED_CODE_VAL 405
+
+ /**
+ * RESPONSE_NOT_ACCEPTABLE_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_NOT_ACCEPTABLE_CODE_VAL 406
+
+ /**
+ * RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL 407
+
+ /**
+ * RESPONSE_REQUEST_TIMEOUT_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_REQUEST_TIMEOUT_CODE_VAL 408
+
+ /**
+ * RESPONSE_CONFLICT_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_CONFLICT_CODE_VAL 409
+
+ /**
+ * RESPONSE_GONE_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_GONE_CODE_VAL 410
+
+ /**
+ * RESPONSE_LENGTH_REQUIRED_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_LENGTH_REQUIRED_CODE_VAL 411
+
+ /**
+ * RESPONSE_PRECONDITION_FAILED_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_PRECONDITION_FAILED_CODE_VAL 412
+
+ /**
+ * RESPONSE_REQUEST_ENTITY_TOO_LARGE_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_REQUEST_ENTITY_TOO_LARGE_CODE_VAL 413
+
+ /**
+ * RESPONSE_INTERNAL_SERVER_ERROR_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_INTERNAL_SERVER_ERROR_CODE_VAL 500
+
+ /**
+ * RESPONSE_NOT_IMPLEMENTED_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_NOT_IMPLEMENTED_CODE_VAL 501
+
+ /**
+ * RESPONSE_SERVICE_UNAVAILABLE_CODE_VAL
+ */
+ #define AXIS2_HTTP_RESPONSE_SERVICE_UNAVAILABLE_CODE_VAL 503
+
+ /**
+ * RESPONSE_CONTINUE_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_CONTINUE_CODE_NAME "Continue"
+
+ /**
+ * RESPONSE_OK_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_OK_CODE_NAME "OK"
+
+ /*
+ * RESPONSE_CREATED_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_CREATED_CODE_NAME "Created"
+
+ /**
+ * RESPONSE_ACK_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_ACK_CODE_NAME "Accepted"
+
+ /**
+ * RESPONSE_NO_CONTENT_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_NO_CONTENT_CODE_NAME "No Content"
+
+ /**
+ * RESPONSE_NON_AUTHORITATIVE_INFO_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_NON_AUTHORITATIVE_INFO_CODE_NAME "Non-Authoritative Information"
+
+ /**
+ * RESPONSE_RESET_CONTENT_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_RESET_CONTENT_CODE_NAME "Reset Content"
+
+ /**
+ * RESPONSE_MULTIPLE_CHOICES_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_MULTIPLE_CHOICES_CODE_NAME "Multiple Choices"
+
+ /**
+ * RESPONSE_MOVED_PERMANENTLY_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_MOVED_PERMANENTLY_CODE_NAME "Moved Permanently"
+
+ /**
+ * RESPONSE_SEE_OTHER_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_SEE_OTHER_CODE_NAME "See Other"
+
+ /**
+ * RESPONSE_NOT_MODIFIED_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_NOT_MODIFIED_CODE_NAME "Not Modified"
+
+ /**
+ * RESPONSE_TEMPORARY_REDIRECT_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_TEMPORARY_REDIRECT_CODE_NAME "Temporary Redirect"
+
+ /**
+ * RESPONSE_BAD_REQUEST_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_BAD_REQUEST_CODE_NAME "Bad Request"
+
+ /**
+ * RESPONSE_HTTP_UNAUTHORIZED_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_NAME "Unauthorized"
+
+
+ /**
+ * RESPONSE_HTTP_FORBIDDEN_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_HTTP_FORBIDDEN_CODE_NAME "Forbidden"
+
+ /**
+ * RESPONSE_NOT_FOUND_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_NOT_FOUND_CODE_NAME "Not Found"
+
+ /**
+ * RESPONSE_METHOD_NOT_ALLOWED_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_METHOD_NOT_ALLOWED_CODE_NAME "Method Not Allowed"
+
+ /**
+ * RESPONSE_NOT_ACCEPTABLE_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_NOT_ACCEPTABLE_CODE_NAME "Not Acceptable"
+
+ /**
+ * RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_NAME "Proxy Authentication Required"
+
+ /**
+ * RESPONSE_REQUEST_TIMEOUT_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_REQUEST_TIMEOUT_CODE_NAME "Request Timeout"
+
+ /**
+ * RESPONSE_CONFLICT_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_CONFLICT_CODE_NAME "Conflict"
+
+ /**
+ * RESPONSE_GONE_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_GONE_CODE_NAME "Gone"
+
+ /**
+ * RESPONSE_LENGTH_REQUIRED_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_LENGTH_REQUIRED_CODE_NAME "Length Required"
+
+ /**
+ * RESPONSE_PRECONDITION_FAILED_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_PRECONDITION_FAILED_CODE_NAME "Precondition Failed"
+
+ /**
+ * RESPONSE_REQUEST_ENTITY_TOO_LARGE_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_REQUEST_ENTITY_TOO_LARGE_CODE_NAME "Request Entity Too Large"
+
+ /**
+ * RESPONSE_INTERNAL_SERVER_ERROR_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_INTERNAL_SERVER_ERROR_CODE_NAME "Internal Server Error"
+
+ /**
+ * RESPONSE_NOT_IMPLEMENTED_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_NOT_IMPLEMENTED_CODE_NAME "Not Implemented"
+
+ /**
+ * RESPONSE_SERVICE_UNAVAILABLE_CODE_NAME
+ */
+ #define AXIS2_HTTP_RESPONSE_SERVICE_UNAVAILABLE_CODE_NAME "Service Unavailable"
+
+ /**
+ * SOCKET
+ */
+ #define AXIS2_SOCKET "SOCKET"
+
+ /**
+ * HEADER_PROTOCOL_10
+ */
+ #define AXIS2_HTTP_HEADER_PROTOCOL_10 "HTTP/1.0"
+
+ /**
+ * HEADER_PROTOCOL_11
+ */
+ #define AXIS2_HTTP_HEADER_PROTOCOL_11 "HTTP/1.1"
+
+ /**
+ * CHAR_SET_ENCODING
+ */
+ #define AXIS2_HTTP_CHAR_SET_ENCODING "charset"
+
+ /**
+ * HEADER_POST
+ */
+ #define AXIS2_HTTP_POST "POST"
+
+ /**
+ * HEADER_GET
+ */
+ #define AXIS2_HTTP_GET "GET"
+
+ /**
+ * HEADER_HEAD
+ */
+ #define AXIS2_HTTP_HEAD "HEAD"
+
+ /**
+ * HEADER_PUT
+ */
+ #define AXIS2_HTTP_PUT "PUT"
+
+ /**
+ * HEADER_DELETE
+ */
+ #define AXIS2_HTTP_DELETE "DELETE"
+
+ /**
+ * HEADER_HOST
+ */
+ #define AXIS2_HTTP_HEADER_HOST "Host"
+
+ /**
+ * HEADER_CONTENT_DESCRIPTION
+ */
+ #define AXIS2_HTP_HEADER_CONTENT_DESCRIPTION "Content-Description"
+
+ /**
+ * HEADER_CONTENT_TYPE
+ */
+ #define AXIS2_HTTP_HEADER_CONTENT_TYPE "Content-Type"
+ #define AXIS2_HTTP_HEADER_CONTENT_TYPE_ "Content-Type: "
+
+ /**
+ *USER DEFINED HEADER CONTENT TYPE
+ */
+
+ #define AXIS2_USER_DEFINED_HTTP_HEADER_CONTENT_TYPE "User_Content_Type"
+
+ /**
+ * HEADER_CONTENT_TYPE
+ */
+ #define AXIS2_HTTP_HEADER_CONTENT_TYPE_MIME_BOUNDARY "boundary"
+
+ /**
+ * HEADER_CONTENT_TRANSFER_ENCODING
+ */
+ #define AXIS2_HTTP_HEADER_CONTENT_TRANSFER_ENCODING \
+ "Content-Transfer-Encoding"
+
+ /**
+ * HEADER_CONTENT_LENGTH
+ */
+ #define AXIS2_HTTP_HEADER_CONTENT_LENGTH "Content-Length"
+
+ /**
+ * HEADER_CONTENT_LANGUAGE
+ */
+ #define AXIS2_HTTP_HEADER_CONTENT_LANGUAGE "Content-Language"
+
+ #define AXIS2_HTTP_HEADER_CONTENT_LENGTH_ "Content-Length: "
+
+ /**
+ * HEADER_CONTENT_LOCATION
+ */
+ #define AXIS2_HTTP_HEADER_CONTENT_LOCATION "Content-Location"
+
+ /**
+ * HEADER_CONTENT_ID
+ */
+ #define AXIS2_HTTP_HEADER_CONTENT_ID "Content-Id"
+
+ /**
+ * HEADER_SOAP_ACTION
+ */
+ #define AXIS2_HTTP_HEADER_SOAP_ACTION "SOAPAction"
+ #define AXIS2_HTTP_HEADER_SOAP_ACTION_ "SOAPAction: "
+
+ /**
+ * HEADER_AUTHORIZATION
+ */
+ #define AXIS2_HTTP_HEADER_AUTHORIZATION "Authorization"
+
+ /**
+ * HEADER_WWW_AUTHENTICATE
+ */
+ #define AXIS2_HTTP_HEADER_WWW_AUTHENTICATE "WWW-Authenticate"
+
+ /**
+ * HEADER_PROXY_AUTHENTICATE
+ */
+ #define AXIS2_HTTP_HEADER_PROXY_AUTHENTICATE "Proxy-Authenticate"
+
+ /**
+ * HEADER_PROXY_AUTHORIZATION
+ */
+ #define AXIS2_HTTP_HEADER_PROXY_AUTHORIZATION "Proxy-Authorization"
+
+ /**
+ * AUTHORIZATION_REQUEST_PARAM_REALM
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_PARAM_REALM "realm"
+
+ /**
+ * AUTHORIZATION_REQUEST_PARAM_DOMAIN
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_PARAM_DOMAIN "domain"
+
+ /**
+ * AUTHORIZATION_REQUEST_PARAM_NONCE
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_PARAM_NONCE "nonce"
+
+ /**
+ * AUTHORIZATION_REQUEST_PARAM_OPAQUE
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_PARAM_OPAQUE "opaque"
+
+ /**
+ * AUTHORIZATION_REQUEST_PARAM_STALE
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_PARAM_STALE "stale"
+
+ /**
+ * AUTHORIZATION_REQUEST_PARAM_ALGORITHM
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_PARAM_ALGORITHM "algorithm"
+
+ /**
+ * AUTHORIZATION_REQUEST_PARAM_QOP
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_PARAM_QOP "qop"
+
+ /**
+ * AUTHORIZATION_REQUEST_PARAM_USERNAME
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_PARAM_USERNAME "username"
+
+ /**
+ * AUTHORIZATION_REQUEST_PARAM_URI
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_PARAM_URI "uri"
+
+ /**
+ * AUTHORIZATION_REQUEST_PARAM_RESPONSE
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_PARAM_RESPONSE "response"
+
+ /**
+ * AUTHORIZATION_REQUEST_PARAM_NONCE_COUNT
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_PARAM_NONCE_COUNT "nc"
+
+ /**
+ * AUTHORIZATION_REQUEST_PARAM_CLIENT_NONCE
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_PARAM_CLIENT_NONCE "cnonce"
+
+ /**
+ * AUTHORIZATION_REQUEST_DEFAULT_CLIENT_NONCE
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_DEFAULT_CLIENT_NONCE "00000001"
+
+ /**
+ * AUTHORIZATION_REQUEST_QOP_OPTION_AUTH
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_QOP_OPTION_AUTH "auth"
+
+ /**
+ * AUTHORIZATION_REQUEST_QOP_OPTION_AUTH_INT
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_QOP_OPTION_AUTH_INT "auth-int"
+
+ /**
+ * AUTHORIZATION_REQUEST_STALE_STATE_TRUE
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_STALE_STATE_TRUE "true"
+
+ /**
+ * AUTHORIZATION_REQUEST_STALE_STATE_FALSE
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_STALE_STATE_FALSE "false"
+
+ /**
+ * AUTHORIZATION_REQUEST_ALGORITHM_MD5
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_ALGORITHM_MD5 "MD5"
+
+ /**
+ * AUTHORIZATION_REQUEST_ALGORITHM_MD5_SESS
+ */
+ #define AXIS2_HTTP_AUTHORIZATION_REQUEST_ALGORITHM_MD5_SESS "MD5-sess"
+
+ /**
+ * HEADER_EXPECT
+ */
+ #define AXIS2_HTTP_HEADER_EXPECT "Expect"
+
+ /**
+ * HEADER_EXPECT_100_Continue
+ */
+ #define AXIS2_HTTP_HEADER_EXPECT_100_CONTINUE "100-continue"
+
+ /**
+ * HEADER_USER_AGENT
+ */
+ #define AXIS2_HTTP_HEADER_USER_AGENT "User-Agent"
+
+ /**
+ * HEADER_USER_AGENT_AXIS2C
+ */
+ #define AXIS2_HTTP_HEADER_USER_AGENT_AXIS2C "User-Agent: Axis2C/" AXIS2_VERSION_STRING
+
+ /**
+ * HEADER_SERVER
+ */
+ #define AXIS2_HTTP_HEADER_SERVER "Server"
+
+ /**
+ * HEADER_DATE
+ */
+ #define AXIS2_HTTP_HEADER_DATE "Date"
+
+ /**
+ * HEADER_SERVER_AXIS2C
+ */
+ #define AXIS2_HTTP_HEADER_SERVER_AXIS2C "Axis2C/" AXIS2_VERSION_STRING
+
+ #define AXIS2_HTTP_HEADER_ACCEPT_ "Accept: "
+
+ #define AXIS2_HTTP_HEADER_EXPECT_ "Expect: "
+
+ /**
+ * HEADER_CACHE_CONTROL
+ */
+ #define AXIS2_HTTP_HEADER_CACHE_CONTROL "Cache-Control"
+
+ /**
+ * HEADER_CACHE_CONTROL_NOCACHE
+ */
+ #define AXIS2_HTTP_HEADER_CACHE_CONTROL_NOCACHE "no-cache"
+
+ /**
+ * HEADER_PRAGMA
+ */
+ #define AXIS2_HTTP_HEADER_PRAGMA "Pragma"
+
+ /**
+ * HEADER_LOCATION
+ */
+ #define AXIS2_HTTP_HEADER_LOCATION "Location"
+
+ /**
+ * REQUEST_HEADERS
+ */
+ #define AXIS2_HTTP_REQUEST_HEADERS "HTTP-Request-Headers"
+
+ /**
+ * RESPONSE_HEADERS
+ */
+ #define AXIS2_HTTP_RESPONSE_HEADERS "HTTP-Response-Headers"
+
+ /* http 1.1 */
+
+ /**
+ * HEADER_TRANSFER_ENCODING
+ */
+ #define AXIS2_HTTP_HEADER_TRANSFER_ENCODING "Transfer-Encoding"
+
+ /**
+ * HEADER_TRANSFER_ENCODING_CHUNKED
+ */
+ #define AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED "chunked"
+
+ /**
+ * HEADER_CONNECTION
+ */
+ #define AXIS2_HTTP_HEADER_CONNECTION "Connection"
+
+#define AXIS2_HTTP_CONNECTION_MAP "connection_map"
+
+ /**
+ * HEADER_CONNECTION_CLOSE
+ */
+ #define AXIS2_HTTP_HEADER_CONNECTION_CLOSE "close"
+
+ /**
+ * HEADER_CONNECTION_KEEPALIVE
+ */
+ #define AXIS2_HTTP_HEADER_CONNECTION_KEEPALIVE "Keep-Alive"
+
+ #define AXIS2_TRANPORT_IS_APPLICATION_CLIENT_SIDE "is_app_client_side"
+ /**
+ * HEADER_ACCEPT
+ */
+ #define AXIS2_HTTP_HEADER_ACCEPT "Accept"
+
+ /**
+ * HEADER_ACCEPT_CHARSET
+ */
+ #define AXIS2_HTTP_HEADER_ACCEPT_CHARSET "Accept-Charset"
+
+ /**
+ * AXIS2_HTTP_HEADER_ACCEPT_LANGUAGE
+ */
+ #define AXIS2_HTTP_HEADER_ACCEPT_LANGUAGE "Accept-Language"
+
+ /**
+ * HEADER_ALLOW
+ */
+ #define AXIS2_HTTP_HEADER_ALLOW "Allow"
+
+ /**
+ * HEADER_ACCEPT_ALL
+ */
+ #define AXIS2_HTTP_HEADER_ACCEPT_ALL "*/*"
+
+ /**
+ * HEADER_ACCEPT_TEXT_ALL
+ */
+ #define AXIS2_HTTP_HEADER_ACCEPT_TEXT_ALL "text/*"
+
+ /**
+ * HEADER_ACCEPT_TEXT_PLAIN
+ */
+ #define AXIS2_HTTP_HEADER_ACCEPT_TEXT_PLAIN "text/plain"
+
+ /**
+ * HEADER_ACCEPT_TEXT_HTML
+ */
+ #define AXIS2_HTTP_HEADER_ACCEPT_TEXT_HTML "text/html"
+
+ /**
+ * HEADER APPLICATION_XML
+ */
+ #define AXIS2_HTTP_HEADER_ACCEPT_APPLICATION_XML "application/xml"
+
+ /**
+ * HEADER_ACCEPT_TEXT_XML
+ */
+ #define AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML "text/xml"
+
+ /**
+ * HEADER_ACCEPT_APPL_SOAP
+ */
+ #define AXIS2_HTTP_HEADER_ACCEPT_APPL_SOAP "application/soap+xml"
+
+ /**
+ * HEADER_ACCEPT_X_WWW_FORM_URLENCODED
+ */
+ #define AXIS2_HTTP_HEADER_ACCEPT_X_WWW_FORM_URLENCODED "application/x-www-form-urlencoded"
+
+ /**
+ * HEADER XOP XML
+ */
+ #define AXIS2_HTTP_HEADER_ACCEPT_XOP_XML AXIOM_MIME_TYPE_XOP_XML
+
+ /**
+ * HEADER_ACCEPT_MULTIPART_RELATED
+ */
+ #define AXIS2_HTTP_HEADER_ACCEPT_MULTIPART_RELATED AXIOM_MIME_TYPE_MULTIPART_RELATED
+
+ /**
+ * HEADER_ACCEPT_APPLICATION_DIME
+ */
+ #define AXIS2_HTTP_HEADER_ACCEPT_APPLICATION_DIME "application/dime"
+
+ /**
+ * Cookie headers
+ */
+ #define AXIS2_HTTP_HEADER_COOKIE "Cookie"
+
+ /**
+ * HEADER_COOKIE2
+ */
+ #define AXIS2_HTTP_HEADER_COOKIE2 "Cookie2"
+
+ /**
+ * HEADER_SET_COOKIE
+ */
+ #define AXIS2_HTTP_HEADER_SET_COOKIE "Set-Cookie"
+
+ /**
+ * HEADER_SET_COOKIE2
+ */
+ #define AXIS2_HTTP_HEADER_SET_COOKIE2 "Set-Cookie2"
+
+ /**
+ * HTTP header field values
+ */
+ #define AXIS2_HTTP_HEADER_DEFAULT_CHAR_ENCODING "iso-8859-1"
+
+ /**
+ * REPONSE_HTTP_OK
+ */
+ #define AXIS2_HTTP_RESPONSE_OK "200 OK"
+
+ /**
+ * RESPONSE_HTTP_NOCONTENT
+ */
+ #define AXIS2_HTTP_RESPONSE_NOCONTENT "202 OK";
+
+ /**
+ * RESPONSE_HTTP_UNAUTHORIZED
+ */
+ #define AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED "401 Unauthorized"
+
+
+ /**
+ * RESPONSE_HTTP_FORBIDDEN
+ */
+ #define AXIS2_HTTP_RESPONSE_HTTP_FORBIDDEN "403 Forbidden"
+
+ /**
+ * RESPONSE_PROXY_AUTHENTICATION_REQUIRED
+ */
+ #define AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED "407 Proxy Authentication Required"
+
+ /**
+ * RESPONSE_BAD_REQUEST
+ */
+ #define AXIS2_HTTP_RESPONSE_BAD_REQUEST "400 Bad Request"
+
+ /**
+ * RESPONSE_HTTP_INTERNAL_SERVER_ERROR
+ */
+ #define AXIS2_HTTP_RESPONSE_INTERNAL_SERVER_ERROR "500 Internal Server Error"
+
+ /**
+ * HTTP_REQ_TYPE
+ */
+ #define AXIS2_HTTP_REQ_TYPE "HTTP_REQ_TYPE"
+
+ /**
+ * SO_TIMEOUT
+ */
+ #define AXIS2_HTTP_SO_TIMEOUT "SO_TIMEOUT"
+
+ /**
+ * CONNECTION_TIMEOUT
+ */
+ #define AXIS2_HTTP_CONNECTION_TIMEOUT "CONNECTION_TIMEOUT"
+
+ /**
+ * DEFAULT_SO_TIMEOUT
+ */
+ #define AXIS2_HTTP_DEFAULT_SO_TIMEOUT 60000
+
+ /**
+ * DEFAULT_CONNECTION_TIMEOUT
+ */
+ #define AXIS2_HTTP_DEFAULT_CONNECTION_TIMEOUT 60000
+
+ #define AXIS2_HTTP_PROXY "PROXY"
+
+ /**
+ * ISO-8859-1 encoding
+ */
+ #define AXIS2_HTTP_ISO_8859_1 "ISO-8859-1"
+
+ /**
+ * Default charset in content
+ */
+ #define AXIS2_HTTP_DEFAULT_CONTENT_CHARSET "ISO-8859-1"
+
+ /**
+ * Field TRANSPORT_HTTP
+ */
+ #define AXIS2_TRANSPORT_HTTP "http"
+
+ /**
+ * Msg context response written key
+ */
+ #define AXIS2_RESPONSE_WRITTEN "CONTENT_WRITTEN"
+
+ /**
+ * Content type for MTOM
+ */
+ #define MTOM_RECIVED_CONTENT_TYPE "MTOM_RECEIVED"
+
+ /**
+ * Constant for HTTP authentication
+ */
+ #define AXIS2_HTTP_AUTHENTICATION "HTTP-Authentication"
+
+ /**
+ * Constant for HTTP authentication username
+ */
+ #define AXIS2_HTTP_AUTHENTICATION_USERNAME "username"
+
+ /**
+ * Constant for HTTP authentication password
+ */
+ #define AXIS2_HTTP_AUTHENTICATION_PASSWORD "password"
+
+ /**
+ * Constant for HTTP proxy
+ */
+ #define AXIS2_HTTP_PROXY "PROXY"
+
+ /**
+ * Constant for HTTP proxy host
+ */
+ #define AXIS2_HTTP_PROXY_HOST "proxy_host"
+
+ /**
+ * Constant for HTTP proxy port
+ */
+ #define AXIS2_HTTP_PROXY_PORT "proxy_port"
+
+ /**
+ * Constant for HTTP proxy username
+ */
+ #define AXIS2_HTTP_PROXY_USERNAME "proxy_username"
+
+ /**
+ * Constant for HTTP proxy password
+ */
+ #define AXIS2_HTTP_PROXY_PASSWORD "proxy_password"
+
+
+ #define AXIS2_HTTP_PROXY_API "PROXY_API"
+
+ /**
+ * Constant for HTTP method
+ */
+ #define AXIS2_HTTP_METHOD "HTTP_METHOD"
+
+ /**
+ * Constant for SSL Server Certificate
+ */
+ #define AXIS2_SSL_SERVER_CERT "SERVER_CERT"
+
+ /**
+ * Constant for SSL Key File
+ */
+ #define AXIS2_SSL_KEY_FILE "KEY_FILE"
+
+ /**
+ * Constant for SSL Passphrase
+ */
+ #define AXIS2_SSL_PASSPHRASE "SSL_PASSPHRASE"
+
+ /**
+ * Constant for SSL verify server host property name
+ *
+ * 2 - certificate name must match intended host name
+ * 1 - certificate must have any Common Name
+ * 0 - do not check certificate name
+ *
+ * Only used with libcurl.
+ */
+ #define AXIS2_SSL_VERIFY_HOST "SSL_VERIFY_HOST"
+
+ /**
+ * Constant for SSL verify server certificate property name
+ *
+ * AXIS2_TRUE - verify certificate is authentic
+ * AXIS2_FALSE - do not check certificate
+ *
+ * Only used with libcurl.
+ */
+ #define AXIS2_SSL_VERIFY_PEER "SSL_VERIFY_PEER"
+
+
+ /**
+ * HTTP authentication username property name
+ */
+ #define AXIS2_HTTP_AUTH_UNAME "HTTP_AUTH_USERNAME"
+
+ /**
+ * HTTP authentication password property name
+ */
+ #define AXIS2_HTTP_AUTH_PASSWD "HTTP_AUTH_PASSWD"
+
+ /**
+ * Proxy authentication username property name
+ */
+ #define AXIS2_PROXY_AUTH_UNAME "PROXY_AUTH_USERNAME"
+
+ /**
+ * Proxy authentication password property name
+ */
+ #define AXIS2_PROXY_AUTH_PASSWD "PROXY_AUTH_PASSWD"
+
+
+ /* #define AXIS2_HTTP_AUTH_TYPE "HTTP_AUTH_TYPE"*/
+
+ /**
+ * HTTP "Basic" authentication
+ */
+ #define AXIS2_HTTP_AUTH_TYPE_BASIC "Basic"
+
+ /**
+ * HTTP "Digest" authentication
+ */
+ #define AXIS2_HTTP_AUTH_TYPE_DIGEST "Digest"
+
+ /**
+ * Proxy "Basic" authentication
+ */
+ #define AXIS2_PROXY_AUTH_TYPE_BASIC "Basic"
+
+ /**
+ * Proxy "Digest" authentication
+ */
+ #define AXIS2_PROXY_AUTH_TYPE_DIGEST "Digest"
+
+
+ /**
+ *HTTP Transport Level Error
+ */
+ #define AXIS2_HTTP_TRANSPORT_ERROR "http_transport_error"
+
+ /**
+ *415 Unsupported media Type
+ */
+ #define AXIS2_HTTP_UNSUPPORTED_MEDIA_TYPE "415 Unsupported Media Type\r\n"
+
+ /**
+ *Constant for HTTP headers that user specify, Those headers will
+ *provided as property to the message context.
+ */
+ #define AXIS2_TRANSPORT_HEADER_PROPERTY "HTTP_HEADER_PROPERTY"
+
+ /**
+ * Default session duration
+ */
+#define AXIS2_TRANSPORT_SESSION_EXPIRE_DURATION 60 /* seconds */
+ /**
+ * When a service need session it need to set a hash table into message context.
+ */
+#define AXIS2_TRANSPORT_SESSION_TABLE "session-table"
+
+#define AXIS2_TRANSPORT_SESSION_ID "session_id"
+#define AXIS2_TRANSPORT_SESSION_MAP "session_map"
+
+#define AXIS2_TRANSPORT_URL_HTTPS "HTTPS"
+
+ #define AXIS2_Q_MARK_STR "?"
+
+ #define AXIS2_Q_MARK '?'
+
+ #define AXIS2_H_MARK '#'
+
+ #define AXIS2_ALL "ALL"
+
+ #define AXIS2_USER_AGENT "Axis2C/" AXIS2_VERSION_STRING
+
+ #define AXIS2_AND_SIGN "&"
+
+ #define AXIS2_ESC_DOUBLE_QUOTE '\"'
+
+ #define AXIS2_ESC_DOUBLE_QUOTE_STR "\""
+
+ #define AXIS2_ESC_SINGLE_QUOTE '\''
+
+ #define AXIS2_DOUBLE_QUOTE '"'
+
+ #define AXIS2_ESC_NULL '\0'
+
+ #define AXIS2_SEMI_COLON_STR ";"
+
+ #define AXIS2_SEMI_COLON ';'
+
+ #define AXIS2_COLON ':'
+
+ #define AXIS2_COLON_STR ":"
+
+ #define AXIS2_CONTENT_TYPE_ACTION ";action=\""
+
+ #define AXIS2_CONTENT_TYPE_CHARSET ";charset="
+
+ #define AXIS2_CHARSET "charset"
+
+ #define AXIS2_PORT_STRING "port"
+
+ #define AXIS2_DEFAULT_HOST_ADDRESS "127.0.0.1"
+
+ #define AXIS2_DEFAULT_SVC_PATH "/axis2/services/"
+
+ #define AXIS2_HTTP_PROTOCOL "http"
+
+ #define AXIS2_HTTP "HTTP"
+
+ #define AXIS2_SPACE_COMMA " ,"
+
+ #define AXIS2_COMMA ','
+
+ #define AXIS2_Q 'q'
+
+ #define AXIS2_EQ_N_SEMICOLON " =;"
+
+ #define AXIS2_LEVEL "level"
+
+ #define AXIS2_SPACE_SEMICOLON " ;"
+
+ #define AXIS2_SPACE ' '
+
+ #define AXIS2_RETURN '\r'
+
+ #define AXIS2_NEW_LINE '\n'
+
+ #define AXIS2_F_SLASH '/'
+
+ #define AXIS2_B_SLASH '\\'
+
+ #define AXIS2_EQ '='
+
+ #define AXIS2_AND '&'
+
+ #define AXIS2_PERCENT '%'
+
+ #define AXIS2_HTTP_SERVER " (Simple Axis2 HTTP Server)"
+
+ #define AXIS2_COMMA_SPACE_STR ", "
+
+ #define AXIS2_SPACE_TAB_EQ " \t="
+
+ #define AXIS2_ACTION "action"
+
+ /* Error Messages */
+
+ #define AXIS2_HTTP_NOT_FOUND "<html><head><title>404 Not Found</title></head>\
+ <body><h2>Not Found</h2><p>The requested URL was not found on this server.\
+</p></body></html>"
+
+
+ #define AXIS2_HTTP_NOT_IMPLEMENTED "<html><head><title>501 Not Implemented\
+</title></head><body><h2>Not Implemented</h2><p>The requested Method is not\
+implemented on this server.</p></body></html>"
+
+
+ #define AXIS2_HTTP_INTERNAL_SERVER_ERROR "<html><head><title>500 Internal Server\
+ Error</title></head><body><h2>Internal Server Error</h2><p>The server \
+encountered an unexpected condition which prevented it from fulfilling the \
+request.</p></body></html>"
+
+
+ #define AXIS2_HTTP_METHOD_NOT_ALLOWED "<html><head><title>405 Method Not Allowed\
+</title></head><body><h2>Method Not Allowed</h2><p>The requested method is not\
+allowed for this URL.</p></body></html>"
+
+ #define AXIS2_HTTP_NOT_ACCEPTABLE "<html><head><title>406 Not Acceptable\
+</title></head><body><h2>Not Acceptable</h2><p>An appropriate representation of \
+the requested resource could not be found on this server.</p></body></html>"
+
+ #define AXIS2_HTTP_BAD_REQUEST "<html><head><title>400 Bad Request</title>\
+</head><body><h2>Bad Request</h2><p>Your client sent a request that this server\
+ could not understand.</p></body></html>"
+
+ #define AXIS2_HTTP_REQUEST_TIMEOUT "<html><head><title>408 Request Timeout\
+</title></head><body><h2>Request Timeout</h2><p>Cannot wait any longer for \
+the HTTP request from the client.</p></body></html>"
+
+ #define AXIS2_HTTP_CONFLICT "<html><head><title>409 Conflict</title></head>\
+<body><h2>Conflict</h2><p>The client attempted to put the server\'s resources\
+ into an invalid state.</p></body></html>"
+
+ #define AXIS2_HTTP_GONE "<html><head><title>410 Gone</title></head><body>\
+<h2>Gone</h2><p>The requested resource is no longer available on this server.\
+</p></body></html>"
+
+ #define AXIS2_HTTP_PRECONDITION_FAILED "<html><head><title>412 Precondition \
+Failed</title></head><body><h2>Precondition Failed</h2><p>A precondition for\
+ the requested URL failed.</p></body></html>"
+
+ #define AXIS2_HTTP_TOO_LARGE "<html><head><title>413 Request Entity Too Large\
+</title></head><body><h2>Request Entity Too Large</h2><p>The data provided in\
+ the request is too large or the requested resource does not allow request \
+data.</p></body></html>"
+
+ #define AXIS2_HTTP_SERVICE_UNAVILABLE "<html><head><title>503 Service \
+Unavailable</title></head><body><h2>Service Unavailable</h2><p>The service\
+ is temporarily unable to serve your request.</p></body></html>"
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_HTTP_TRANSPORT_H */
diff --git a/include/axis2_http_transport_sender.h b/include/axis2_http_transport_sender.h
new file mode 100644
index 0000000..4c8dab8
--- /dev/null
+++ b/include/axis2_http_transport_sender.h
@@ -0,0 +1,59 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HTTP_TRANSPORT_SENDER_H
+#define AXIS2_HTTP_TRANSPORT_SENDER_H
+
+/**
+ * @defgroup axis2_http_transport_sender http transport sender
+ * @ingroup axis2_core_trans_http
+ * @{
+ */
+
+/**
+ * @file axis2_http_transport_sender.h
+ * @brief axis2 HTTP Transport Sender (Handler) implementation
+ */
+
+#include <axis2_const.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_msg_ctx.h>
+#include <axis2_conf_ctx.h>
+#include <axis2_transport_out_desc.h>
+#include <axis2_transport_sender.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_transport_sender_t *AXIS2_CALL
+
+ axis2_http_transport_sender_create(
+ const axutil_env_t * env);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_HTTP_TRANSPORT_SENDER_H */
diff --git a/include/axis2_http_transport_utils.h b/include/axis2_http_transport_utils.h
new file mode 100644
index 0000000..9cf7563
--- /dev/null
+++ b/include/axis2_http_transport_utils.h
@@ -0,0 +1,487 @@
+/*
+ * Licensedo to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HTTP_TRANSPORT_UTILS_H
+#define AXIS2_HTTP_TRANSPORT_UTILS_H
+
+#define AXIS2_MTOM_OUTPUT_BUFFER_SIZE 1024
+
+/**
+ * @ingroup axis2_core_transport_http
+ * @{
+ */
+
+/**
+ * @file axis2_http_transport_utils.h
+ * @brief axis2 HTTP Transport Utility functions
+ * This file includes functions that handles soap and rest request
+ * that comes to the engine via HTTP protocol.
+ */
+
+#include <axis2_const.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axiom_stax_builder.h>
+#include <axis2_msg_ctx.h>
+#include <axis2_conf_ctx.h>
+#include <axutil_hash.h>
+#include <axiom_element.h>
+#include <axutil_stream.h>
+#include <axiom_soap_envelope.h>
+#include <axutil_http_chunked_stream.h>
+#include <axis2_http_out_transport_info.h>
+#include <axutil_url.h>
+#include <axiom_mtom_sending_callback.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef enum axis2_http_method_types
+ {
+ AXIS2_HTTP_METHOD_GET = 0,
+ AXIS2_HTTP_METHOD_POST,
+ AXIS2_HTTP_METHOD_HEAD,
+ AXIS2_HTTP_METHOD_PUT,
+ AXIS2_HTTP_METHOD_DELETE
+ }axis2_http_method_types_t;
+
+
+ typedef struct axis2_http_transport_in
+ {
+ /** HTTP Content type */
+ axis2_char_t *content_type;
+ /** HTTP Content length */
+ int content_length;
+ /** Input message context */
+ axis2_msg_ctx_t *msg_ctx;
+
+ /** soap action */
+ axis2_char_t *soap_action;
+
+ /** complete request uri */
+ axis2_char_t *request_uri;
+
+ /** Input stream */
+ axutil_stream_t *in_stream;
+
+ /** remote request ip corresponds to CGI header REMOTE_ADDR */
+ axis2_char_t *remote_ip;
+
+ /** server port */
+ axis2_char_t *svr_port;
+
+ /** HTTP transfer encoding header value */
+ axis2_char_t *transfer_encoding;
+
+ /** HTTP Accept header */
+ axis2_char_t *accept_header;
+
+ /** HTTP Accept language header */
+ axis2_char_t *accept_language_header;
+
+ /** HTTP accept charset header */
+ axis2_char_t *accept_charset_header;
+ /** H&TTP METHOD Should be one of AXIS2_HTTP_METHOD_GET | AXIS2_HTTP_METHOD_POST |"
+ AXIS2_HTTP_METHOD_HEAD | AXIS2_HTTP_METHOD_PUT | AXIS2_HTTP_METHOD_DELETE" */
+ int request_method;
+ /** out transport */
+ axis2_http_out_transport_info_t *out_transport_info;
+ /** this is for serving services html */
+ axis2_char_t *request_url_prefix;
+
+ }axis2_http_transport_in_t;
+
+ typedef struct axis2_http_transport_out
+ {
+ /** HTTP Status code string */
+ axis2_char_t *http_status_code_name;
+ /** HTTP Status code value */
+ int http_status_code;
+ /** Out message context */
+ axis2_msg_ctx_t *msg_ctx;
+ /** Response data */
+ void *response_data;
+ /** HTTP content type */
+ axis2_char_t *content_type;
+ /** Response data length */
+ int response_data_length;
+ /** content language */
+ axis2_char_t *content_language;
+ /** output headers list */
+ axutil_array_list_t *output_headers;
+
+ }axis2_http_transport_out_t;
+
+ /**
+ * size of the key stored in the session file
+ */
+ #define AXIS2_TRANSPORT_SESSION_KEY_SIZE 64
+ /**
+ * size of the value stored in the session file
+ */
+ #define AXIS2_TRANSPORT_SESSION_VALUE_SIZE 256
+ typedef struct axis2_session_file_record
+ {
+ axis2_char_t key[AXIS2_TRANSPORT_SESSION_KEY_SIZE];
+ axis2_char_t value[AXIS2_TRANSPORT_SESSION_VALUE_SIZE];
+ } axis2_session_file_record_t;
+
+ /**
+ * This will retrieve the session table, set by a service or a module and store it in a session
+ * file named with the unique session id, generated here in. Then it return the Set-Cookie http
+ * header with value containing session id and session expire time.
+ * @param env, environments
+ * @param msg_ctx
+ * @return cookie_header
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_transport_utils_get_session(
+ const axutil_env_t *env,
+ axis2_msg_ctx_t *msg_ctx);
+
+ /**
+ * When the transport receive a Cookie header it calls this function. This will retrieve the
+ * stored session info from the file related to the id value of the cookie. It also check
+ * whether the session has timeout by comparing the session expire time contained in the cookie
+ * value with the expire time contained in the file. If session expired then it return nothing.
+ * If session is still valid it put the values in a hash table and set it into message context.
+ * @param env, environments
+ * @param id
+ * @param msg_ctx
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_transport_utils_set_session(
+ const axutil_env_t *env,
+ axis2_msg_ctx_t *msg_ctx,
+ axis2_char_t *session_str);
+
+ /**
+ * After receiving Set-Cookie header in client side store it
+ * @param env, environments
+ * @param msg_ctx
+ * @param cookie
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_transport_utils_store_cookie(
+ const axutil_env_t *env,
+ axis2_msg_ctx_t *msg_ctx,
+ axis2_char_t *cookie);
+
+ /**
+ * Read from cookie store before sending from client side
+ * @param env, environments
+ * @param msg_ctx
+ * @return cookie string
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_transport_utils_read_from_cookie_store(
+ const axutil_env_t *env,
+ axis2_msg_ctx_t *msg_ctx);
+
+ /**
+ * Initialize the axis2_http_tranport_in_t. Before using this structure users should
+ * initialize it using this method.
+ * @param in a pointer to a axis2_http_tranport_in_t
+ * @param env, environments
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_transport_utils_transport_in_init(axis2_http_transport_in_t *in,
+ const axutil_env_t *env);
+
+ /**
+ * Uninitialize the axis2_http_tranport_in_t. Before using this structure users should
+ * initialize it using this method.
+ * @param in a pointer to a axis2_http_tranport_in_t
+ * @param env, environments
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_transport_utils_transport_in_uninit(axis2_http_transport_in_t *request,
+ const axutil_env_t *env);
+
+ /**
+ * Initialize the axis2_http_tranport_out_t. Before using this structure users should
+ * initialize it using this method.
+ * @param out a pointer to a axis2_http_tranport_out_t
+ * @param env, environments
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_transport_utils_transport_out_init(axis2_http_transport_out_t *out,
+ const axutil_env_t *env);
+
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_transport_utils_transport_out_uninit(axis2_http_transport_out_t *response,
+ const axutil_env_t *env);
+ /**
+ * This methods provides the HTTP request handling functionality using axis2 for server side
+ * HTTP modules.
+ * @param env, environments
+ * @param conf_ctx, Instance of axis2_conf_ctx_t
+ * @param request, populated instance of axis2_http_transport_in_t struct
+ * @param response, an instance of axis2_http_transport_out_t struct
+ * @returns AXIS2_SUCCESS on success, AXIS2_FAILURE Otherwise
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_transport_utils_process_request(
+ const axutil_env_t *env,
+ axis2_conf_ctx_t *conf_ctx,
+ axis2_http_transport_in_t *request,
+ axis2_http_transport_out_t *response);
+
+
+
+ /**
+ * This function handles the HTTP POST request that comes to the axis2 engine.
+ * The request can be either a SOAP request OR a REST request.
+ * @param env, axutil_env_t instance
+ * @param msg_ctx, Input message context. (an instance of axis2_msg_ctx_t struct.)
+ * @param in_stream, This is the input message content represented as an axutil_stream instance.
+ * A callback function will be used to read as required from the stream with in the engine.
+ * @param out_stream, This is the output stream. The outgoing message contents is represented as
+ * an instance of axutil_stream
+ * @param content_type, HTTP content type. This value should not be null.
+ * @param content_length, HTTP Content length value.
+ * @param soap_action_header, SOAPAction header value. This is only required in case of SOAP 1.1.
+ * For SOAP 1.2 , the action header will be within the ContentType header and
+ * this method is able to obtain the extract the action header value from content type.
+ * @param request_uri, This is the HTTP request uri. Should not be null.
+ * @returns AXIS2_SUCCESS on success, AXIS2_FAILURE Otherwise
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_transport_utils_process_http_post_request(
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx,
+ axutil_stream_t * in_stream,
+ axutil_stream_t * out_stream,
+ const axis2_char_t * content_type,
+ const int content_length,
+ axutil_string_t * soap_action_header,
+ const axis2_char_t * request_uri);
+
+
+ /**
+ * This method handles the HTTP put request. Parameters are similar to that of post_request
+ * method.
+ * @param env, environment
+ * @param msg_ctx, in message context.
+ * @param in_stream, input stream
+ * @param out_stream, output stream.
+ * @param content_type, HTTP ContentType header value
+ * @param content_length, HTTP Content length value
+ * @param soap_action_header, SOAP Action header value
+ * @param request_uri, request uri
+ * @returns AXIS2_SUCCESS on success, AXIS2_FAILURE Otherwise
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_transport_utils_process_http_put_request(
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx,
+ axutil_stream_t * in_stream,
+ axutil_stream_t * out_stream,
+ const axis2_char_t * content_type,
+ const int content_length,
+ axutil_string_t * soap_action_header,
+ const axis2_char_t * request_uri);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_http_transport_utils_process_http_get_request(
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx,
+ axutil_stream_t * in_stream,
+ axutil_stream_t * out_stream,
+ const axis2_char_t * content_type,
+ axutil_string_t * soap_action_header,
+ const axis2_char_t * request_uri,
+ axis2_conf_ctx_t * conf_ctx,
+ axutil_hash_t * request_params);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+
+ axis2_http_transport_utils_process_http_head_request(
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx,
+ axutil_stream_t * in_stream,
+ axutil_stream_t * out_stream,
+ const axis2_char_t * content_type,
+ axutil_string_t * soap_action_header,
+ const axis2_char_t * request_uri,
+ axis2_conf_ctx_t * conf_ctx,
+ axutil_hash_t * request_params);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+
+ axis2_http_transport_utils_process_http_delete_request(
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx,
+ axutil_stream_t * in_stream,
+ axutil_stream_t * out_stream,
+ const axis2_char_t * content_type,
+ axutil_string_t * soap_action_header,
+ const axis2_char_t * request_uri,
+ axis2_conf_ctx_t * conf_ctx,
+ axutil_hash_t * request_params);
+
+ AXIS2_EXTERN axiom_stax_builder_t *AXIS2_CALL
+
+ axis2_http_transport_utils_select_builder_for_mime(
+ const axutil_env_t * env,
+ axis2_char_t * request_uri,
+ axis2_msg_ctx_t * msg_ctx,
+ axutil_stream_t * in_stream,
+ axis2_char_t * content_type);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+
+ axis2_http_transport_utils_do_write_mtom(
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+
+ axis2_http_transport_utils_get_request_params(
+ const axutil_env_t * env,
+ axis2_char_t * request_uri);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_transport_utils_get_not_found(
+ const axutil_env_t * env,
+ axis2_conf_ctx_t * conf_ctx);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_transport_utils_get_not_implemented(
+ const axutil_env_t * env,
+ axis2_conf_ctx_t * conf_ctx);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_transport_utils_get_method_not_allowed(
+ const axutil_env_t * env,
+ axis2_conf_ctx_t * conf_ctx);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_transport_utils_get_not_acceptable(
+ const axutil_env_t * env,
+ axis2_conf_ctx_t * conf_ctx);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_transport_utils_get_bad_request(
+ const axutil_env_t * env,
+ axis2_conf_ctx_t * conf_ctx);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_transport_utils_get_request_timeout(
+ const axutil_env_t * env,
+ axis2_conf_ctx_t * conf_ctx);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_transport_utils_get_conflict(
+ const axutil_env_t * env,
+ axis2_conf_ctx_t * conf_ctx);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_transport_utils_get_gone(
+ const axutil_env_t * env,
+ axis2_conf_ctx_t * conf_ctx);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_transport_utils_get_precondition_failed(
+ const axutil_env_t * env,
+ axis2_conf_ctx_t * conf_ctx);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_transport_utils_get_request_entity_too_large(
+ const axutil_env_t * env,
+ axis2_conf_ctx_t * conf_ctx);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_transport_utils_get_service_unavailable(
+ const axutil_env_t * env,
+ axis2_conf_ctx_t * conf_ctx);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_transport_utils_get_internal_server_error(
+ const axutil_env_t * env,
+ axis2_conf_ctx_t * conf_ctx);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+
+ axis2_http_transport_utils_get_services_html(
+ const axutil_env_t * env,
+ axis2_conf_ctx_t * conf_ctx);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+
+ axis2_http_transport_utils_get_services_static_wsdl(
+ const axutil_env_t * env,
+ axis2_conf_ctx_t * conf_ctx,
+ axis2_char_t * request_url);
+
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+
+ axis2_http_transport_utils_get_request_params(
+ const axutil_env_t * env,
+ axis2_char_t * request_uri);
+
+ AXIS2_EXTERN axiom_soap_envelope_t *AXIS2_CALL
+
+ axis2_http_transport_utils_create_soap_msg(
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx,
+ const axis2_char_t * soap_ns_uri);
+
+ AXIS2_EXTERN axutil_array_list_t* AXIS2_CALL
+ axis2_http_transport_utils_process_accept_headers(
+ const axutil_env_t *env,
+ axis2_char_t *accept_value);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_transport_utils_send_mtom_message(
+ axutil_http_chunked_stream_t * chunked_stream,
+ const axutil_env_t * env,
+ axutil_array_list_t *mime_parts,
+ axis2_char_t *sending_callback_name);
+
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_transport_utils_destroy_mime_parts(
+ axutil_array_list_t *mime_parts,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN void *AXIS2_CALL
+ axis2_http_transport_utils_initiate_callback(
+ const axutil_env_t *env,
+ axis2_char_t *callback_name,
+ void *user_param,
+ axiom_mtom_sending_callback_t **callback);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL axis2_http_transport_utils_is_callback_required(
+ const axutil_env_t *env,
+ axutil_array_list_t *mime_parts);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_http_transport_utils_get_session_id_from_cookie(
+ const axutil_env_t *env,
+ axis2_char_t *cookie);
+
+
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_HTTP_TRANSPORT_UTILS_H */
diff --git a/include/axis2_http_worker.h b/include/axis2_http_worker.h
new file mode 100644
index 0000000..84bcc4b
--- /dev/null
+++ b/include/axis2_http_worker.h
@@ -0,0 +1,115 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HTTP_WORKER_H
+#define AXIS2_HTTP_WORKER_H
+
+/**
+ * @defgroup axis2_http_worker http worker
+ * @ingroup axis2_core_trans_http
+ * @{
+ */
+
+/**
+ * @file axis2_http_worker.h
+ * @brief axis2 HTTP Worker
+ */
+
+#include <axis2_const.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_simple_http_svr_conn.h>
+#include <axis2_http_simple_response.h>
+#include <axis2_http_simple_request.h>
+#include <axis2_conf_ctx.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_http_worker */
+ typedef struct axis2_http_worker axis2_http_worker_t;
+
+ /**
+ * @param http_worker pointer to http worker
+ * @param env pointer to environment struct
+ * @param svr_conn pointer to svr conn
+ * @param simple_request pointer to simple request
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_http_worker_process_request(
+ axis2_http_worker_t * http_worker,
+ const axutil_env_t * env,
+ axis2_simple_http_svr_conn_t * svr_conn,
+ axis2_http_simple_request_t * simple_request);
+
+ /**
+ * @param http_worker pointer to http worker
+ * @param env pointer to environment struct
+ * @param port
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_worker_set_svr_port(
+ axis2_http_worker_t * http_worker,
+ const axutil_env_t * env,
+ int port);
+
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_worker_set_is_application_client_side(
+ axis2_http_worker_t *http_worker,
+ const axutil_env_t *env,
+ axis2_bool_t application_client_side);
+
+ /**
+ * @param http_worker pointer to http worker
+ * @param env pointer to environment strut
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_worker_free(
+ axis2_http_worker_t * http_worker,
+ const axutil_env_t * env);
+
+ /**
+ * @param env pointer to environment struct
+ * @param conf_ctx pointer to configuration context
+ */
+ AXIS2_EXTERN axis2_http_worker_t *AXIS2_CALL
+ axis2_http_worker_create(
+ const axutil_env_t * env,
+ axis2_conf_ctx_t * conf_ctx);
+
+ /*#define AXIS2_HTTP_WORKER_PROCESS_REQUEST(http_worker, env, svr_conn,\
+ simple_request) axis2_http_worker_process_request(\
+ http_worker, env, svr_conn, simple_request)
+
+ #define AXIS2_HTTP_WORKER_SET_SVR_PORT(http_worker, env, port) \
+ axis2_http_worker_set_svr_port(http_worker, env, port)
+
+ #define AXIS2_HTTP_WORKER_FREE(http_worker, env) \
+ axis2_http_worker_free(http_worker, env)
+ */
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_HTTP_WORKER_H */
diff --git a/include/axis2_listener_manager.h b/include/axis2_listener_manager.h
new file mode 100644
index 0000000..c16f5be
--- /dev/null
+++ b/include/axis2_listener_manager.h
@@ -0,0 +1,136 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_LISTENER_MANAGER_H
+#define AXIS2_LISTENER_MANAGER_H
+
+/**
+ * @defgroup axis2_listener_manager listener manager
+ * @ingroup axis2_core_context
+ * listener manager manages the listeners in case of dual channel invocations.
+ * In case of a dual channel invocation, request is sent along one channel
+ * and the response is received on another channel. When the response is
+ * expected to be received along another transport channel, it has to be
+ * made sure that the listener socket is up in anticipation of the response
+ * and also that listener must be closed once the response is received.
+ * listener manager is responsible for dealing with these tasks.
+ * @{
+ */
+
+/**
+ * @file axis2_listener_manager.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_conf_ctx.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_listener_manager */
+ typedef struct axis2_listener_manager axis2_listener_manager_t;
+
+ /**
+ * Ensures that the named transport's listener is started. Starts a listener
+ * if it is not already started. Only one listener would be started for a given
+ * transport.
+ * @param listener_manager pointer to listener manager struct
+ * @param env pointer to environment struct
+ * @param transport name of the transport
+ * @param conf_ctx configuration context to pick transport info for the
+ * named transport
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_listener_manager_make_sure_started(
+ axis2_listener_manager_t * listener_manager,
+ const axutil_env_t * env,
+ const AXIS2_TRANSPORT_ENUMS transport,
+ axis2_conf_ctx_t * conf_ctx);
+
+ /**
+ * Stops the named listener transport.
+ * @param listener_manager pointer to listener manager struct
+ * @param env pointer to environment struct
+ * @param transport name of the transport whose listener is to be stopped
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_listener_manager_stop(
+ axis2_listener_manager_t * listener_manager,
+ const axutil_env_t * env,
+ const AXIS2_TRANSPORT_ENUMS transport);
+
+ /**
+ * Gets reply to end point reference. The engine will direct the
+ * response for the message to this reply to address.
+ * @param listener_manager pointer to listener manager struct
+ * @param env pointer to environment struct
+ * @param svc_name name of the service for which the epr is to be returned
+ * @param transport name of the transport corresponding to the endpoint
+ * @return a pointer to endpoint reference struct representing the reply
+ * endpoint
+ */
+ AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
+ axis2_listener_manager_get_reply_to_epr(
+ const axis2_listener_manager_t * listener_manager,
+ const axutil_env_t * env,
+ const axis2_char_t * svc_name,
+ const AXIS2_TRANSPORT_ENUMS transport);
+
+ /**
+ * Gets the configuration context that holds information on the transports
+ * managed by the listener manager.
+ * @param listener_manager pointer to listener manager struct
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_conf_ctx_t *AXIS2_CALL
+ axis2_listener_manager_get_conf_ctx(
+ const axis2_listener_manager_t * listener_manager,
+ const axutil_env_t * env);
+
+ /**
+ * Frees listener manager struct.
+ * @param listener_manager pointer to listener manager struct
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_listener_manager_free(
+ axis2_listener_manager_t * listener_manager,
+ const axutil_env_t * env);
+
+ /**
+ * Creates a listener manager struct instance.
+ * @param env pointer to environment struct
+ * @return a pointer to newly created listener manager struct,
+ * or NULL on error with error code set in environment's error
+ */
+ AXIS2_EXTERN axis2_listener_manager_t *AXIS2_CALL
+ axis2_listener_manager_create(
+ const axutil_env_t * env);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_LISTENER_MANAGER_H */
diff --git a/include/axis2_module.h b/include/axis2_module.h
new file mode 100644
index 0000000..625c9ea
--- /dev/null
+++ b/include/axis2_module.h
@@ -0,0 +1,161 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+#ifndef AXIS2_MODULE_H
+#define AXIS2_MODULE_H
+
+/**
+ * @defgroup axis2_module module
+ * @ingroup axis2_desc
+ * Every module provides an implementation of struct interface. Modules are in
+ * one of two states: "available" or "initialized". All modules that the run-time
+ * detects (from the repository modules directory) are said to be in the
+ * "available" state. If some service indicates a dependency on this
+ * module then the module is initialized (once for the life time of the system)
+ * and the state changes to "initialized".
+ * Any module which is in the "initialized" state can be engaged as needed
+ * by the engine to respond to a message. Module engagement is done by
+ * deployment engine using module.xml.
+ * @{
+ */
+
+/**
+ * @file axis2_module.h
+ */
+
+#include <axis2_const.h>
+#include <axutil_error.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axutil_allocator.h>
+#include <axutil_string.h>
+#include <axis2_conf.h>
+#include <axis2_module_desc.h>
+#include <axutil_hash.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for axis2_module_ops */
+ typedef struct axis2_module_ops axis2_module_ops_t;
+
+ /** Type name for axis2_module_ops */
+ typedef struct axis2_module axis2_module_t;
+
+ struct axis2_conf;
+
+ /**
+ * Struct containing operations available on a module.
+ * \n
+ * 1. init
+ * \n
+ * 2. shutdown
+ * \n
+ * 3. fill_handler_create_func_map
+ * \n
+ * are the three operations presently available.
+ */
+ struct axis2_module_ops
+ {
+
+ /**
+ * Initializes module.
+ * @param module pointer to module struct
+ * @param env pointer to environment struct
+ * @param conf_ctx pointer to configuration context
+ * @param module_desc module description
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ axis2_status_t(
+ AXIS2_CALL
+ * init)(
+ axis2_module_t * module,
+ const axutil_env_t * env,
+ struct axis2_conf_ctx * conf_ctx,
+ axis2_module_desc_t * module_desc);
+
+ /**
+ * Shutdowns module.
+ * @param module pointer to module struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ axis2_status_t(
+ AXIS2_CALL
+ * shutdown)(
+ axis2_module_t * module,
+ const axutil_env_t * env);
+
+ /**
+ * Fills the hash map of handler create functions for the module.
+ * @param module pointer to module struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ axis2_status_t(
+ AXIS2_CALL
+ * fill_handler_create_func_map)(
+ axis2_module_t * module,
+ const axutil_env_t * env);
+
+ };
+
+ /**
+ * Struct representing a module.
+ */
+ struct axis2_module
+ {
+
+ /** operations of module */
+ const axis2_module_ops_t *ops;
+
+ /** hash map of handler create functions */
+ axutil_hash_t *handler_create_func_map;
+ };
+
+ /**
+ * Creates module struct.
+ * @param env pointer to environment struct
+ * @return pointer to newly created module
+ */
+ AXIS2_EXTERN axis2_module_t *AXIS2_CALL
+ axis2_module_create(
+ const axutil_env_t * env);
+
+ /** Initializes module.
+ @sa axis2_module_ops#init */
+#define axis2_module_init(module, env, conf_ctx, module_desc) \
+ ((module)->ops->init (module, env, conf_ctx, module_desc))
+
+ /** Shutdowns module.
+ @sa axis2_module_ops#shutdown */
+#define axis2_module_shutdown(module, env) \
+ ((module)->ops->shutdown (module, env))
+
+ /** Fills handler create function map.
+ @sa axis2_module_ops#fill_handler_create_func_map */
+#define axis2_module_fill_handler_create_func_map(module, env) \
+ ((module)->ops->fill_handler_create_func_map (module, env))
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_MODULE_H */
diff --git a/include/axis2_module_desc.h b/include/axis2_module_desc.h
new file mode 100644
index 0000000..611fd92
--- /dev/null
+++ b/include/axis2_module_desc.h
@@ -0,0 +1,386 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_MODULE_DESC_H
+#define AXIS2_MODULE_DESC_H
+
+/**
+ * @defgroup axis2_module_desc module description
+ * @ingroup axis2_desc
+ * module holds information about a module. This information includes module
+ * parameters and handler information.
+ * Modules are available to all services if axis2.xml has a module reference
+ * entry. Alternatively, a module could be made available to selected services
+ * by including a module reference entry in services.xml.
+ * @{
+ */
+
+/**
+ * @file axis2_module_desc.h
+ */
+
+#include <axis2_const.h>
+#include <axutil_error.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axutil_allocator.h>
+#include <axutil_string.h>
+#include <axutil_array_list.h>
+#include <axutil_param_container.h>
+#include <axis2_flow_container.h>
+#include <axutil_param.h>
+#include <axis2_op.h>
+#include <axis2_conf.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_module_desc */
+ typedef struct axis2_module_desc axis2_module_desc_t;
+
+ struct axis2_op;
+ struct axis2_conf;
+
+ /**
+ * Frees module description.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_module_desc_free(
+ axis2_module_desc_t * module_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Gets flow representing in flow.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @return pointer to flow that represents in flow, returns a reference
+ * not a cloned copy
+ */
+ AXIS2_EXTERN axis2_flow_t *AXIS2_CALL
+ axis2_module_desc_get_in_flow(
+ const axis2_module_desc_t * module_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Sets flow representing in flow.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @param in_flow pointer to flow representing in flow, module assumes
+ * ownership of flow
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_module_desc_set_in_flow(
+ axis2_module_desc_t * module_desc,
+ const axutil_env_t * env,
+ axis2_flow_t * in_flow);
+
+ /**
+ * Gets flow representing out flow.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @return pointer to flow that represents out flow, returns a reference
+ * not a cloned copy
+ */
+ AXIS2_EXTERN axis2_flow_t *AXIS2_CALL
+ axis2_module_desc_get_out_flow(
+ const axis2_module_desc_t * module_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Sets flow representing out flow.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @param out_flow pointer to flow representing out flow, module assumes
+ * ownership of flow
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_module_desc_set_out_flow(
+ axis2_module_desc_t * module_desc,
+ const axutil_env_t * env,
+ axis2_flow_t * out_flow);
+
+ /**
+ * Gets flow representing fault in flow.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @return pointer to flow that represents fault in flow, returns a reference
+ * not a cloned copy
+ */
+ AXIS2_EXTERN axis2_flow_t *AXIS2_CALL
+ axis2_module_desc_get_fault_in_flow(
+ const axis2_module_desc_t * module_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Sets flow representing fault in flow.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @param falut_in_flow pointer to flow representing fault in flow,
+ * module assumes ownership of flow
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_module_desc_set_fault_in_flow(
+ axis2_module_desc_t * module_desc,
+ const axutil_env_t * env,
+ axis2_flow_t * falut_in_flow);
+
+ /**
+ * Gets flow representing fault out flow.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @return pointer to flow that represents fault out flow, returns a
+ * reference not a cloned copy
+ */
+ AXIS2_EXTERN axis2_flow_t *AXIS2_CALL
+ axis2_module_desc_get_fault_out_flow(
+ const axis2_module_desc_t * module_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Sets flow representing fault out flow.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @param fault_out_flow pointer to flow representing fault out flow,
+ * module assumes ownership of flow
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_module_desc_set_fault_out_flow(
+ axis2_module_desc_t * module_desc,
+ const axutil_env_t * env,
+ axis2_flow_t * fault_out_flow);
+
+ /**
+ * Gets module QName.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @return pointer to QName
+ */
+ AXIS2_EXTERN const axutil_qname_t *AXIS2_CALL
+ axis2_module_desc_get_qname(
+ const axis2_module_desc_t * module_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Sets module QName.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @param qname pointer to qname
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_module_desc_set_qname(
+ axis2_module_desc_t * module_desc,
+ const axutil_env_t * env,
+ const axutil_qname_t * qname);
+
+ /**
+ * Adds given operation to module.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @param op pointer to operation, module assumes ownership of operation
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_module_desc_add_op(
+ axis2_module_desc_t * module_desc,
+ const axutil_env_t * env,
+ struct axis2_op *op);
+
+ /**
+ * Gets all operations associated with module.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @return pointer to hash map containing the operations
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_module_desc_get_all_ops(
+ const axis2_module_desc_t * module_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Gets parent which is of type configuration.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @return pointer to configuration, returns a reference not a
+ * cloned copy
+ */
+ AXIS2_EXTERN struct axis2_conf *AXIS2_CALL
+ axis2_module_desc_get_parent(
+ const axis2_module_desc_t * module_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Sets parent which is of type configuration.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @param parent pointer to parent configuration, module does not assume
+ * the ownership of configuration
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_module_desc_set_parent(
+ axis2_module_desc_t * module_desc,
+ const axutil_env_t * env,
+ struct axis2_conf *parent);
+
+ /**
+ * Adds parameter to module description.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @param param pointer to parameter struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_module_desc_add_param(
+ axis2_module_desc_t * module_desc,
+ const axutil_env_t * env,
+ axutil_param_t * param);
+
+ /**
+ * Gets parameter with given name.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @param name parameter name string
+ * @return pointer to parameter corresponding to given name
+ */
+ AXIS2_EXTERN axutil_param_t *AXIS2_CALL
+ axis2_module_desc_get_param(
+ const axis2_module_desc_t * module_desc,
+ const axutil_env_t * env,
+ const axis2_char_t * name);
+
+ /**
+ * Gets all parameters associated with module.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @return pointer to array list containing all parameters
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_module_desc_get_all_params(
+ const axis2_module_desc_t * module_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Checks if a given parameter is locked.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @param param_name parameter name string
+ * @return AXIS2_TRUE if named parameter is locked, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_module_desc_is_param_locked(
+ const axis2_module_desc_t * module_desc,
+ const axutil_env_t * env,
+ const axis2_char_t * param_name);
+
+ /**
+ * Gets module associated with module description.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @return pointer to module
+ */
+ AXIS2_EXTERN struct axis2_module *AXIS2_CALL
+ axis2_module_desc_get_module(
+ const axis2_module_desc_t * module_desc,
+ const axutil_env_t * env);
+
+ /**
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @param module pointer to module, module description assumes ownership
+ * of module
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_module_desc_set_module(
+ axis2_module_desc_t * module_desc,
+ const axutil_env_t * env,
+ struct axis2_module *module);
+
+ /**
+ * Gets the container having all params.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @return pointer to param container
+ * @sa axutil_param_container
+ */
+ AXIS2_EXTERN axutil_param_container_t *AXIS2_CALL
+ axis2_module_desc_get_param_container(
+ const axis2_module_desc_t * module_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the container having all flows.
+ * @param module_desc pointer to module description
+ * @param env pointer to environment struct
+ * @return pointer to param container
+ * @sa axis2_flow_container
+ */
+ AXIS2_EXTERN axis2_flow_container_t *AXIS2_CALL
+ axis2_module_desc_get_flow_container(
+ const axis2_module_desc_t * module_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Creates module description struct instance.
+ * @param env pointer to environment struct
+ * @return pointer to newly created module description
+ */
+ AXIS2_EXTERN axis2_module_desc_t *AXIS2_CALL
+ axis2_module_desc_create(
+ const axutil_env_t * env);
+
+ /**
+ * Creates module description struct instance with given QName.
+ * @param env pointer to environment struct
+ * @param qname pointer to QName
+ * @return pointer to newly created module description
+ */
+ AXIS2_EXTERN axis2_module_desc_t *AXIS2_CALL
+ axis2_module_desc_create_with_qname(
+ const axutil_env_t * env,
+ const axutil_qname_t * qname);
+
+ /**
+ * Frees module description passed as void pointer. This method will cast
+ * the void pointer parameter into appropriate type and then call module
+ * description free method on top of that pointer.
+ * @param module_desc pointer to module description as a void pointer
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_module_desc_free_void_arg(
+ void *module_desc,
+ const axutil_env_t * env);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_MODULE_DESC_H */
diff --git a/include/axis2_msg.h b/include/axis2_msg.h
new file mode 100644
index 0000000..aace1ed
--- /dev/null
+++ b/include/axis2_msg.h
@@ -0,0 +1,298 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_MSG_H
+#define AXIS2_MSG_H
+
+/**
+ * @defgroup axis2_msg message
+ * @ingroup axis2_desc
+ * message represents a message in a WSDL. It captures SOAP headers related to
+ * a given message, the direction as well as the phases to be invoked along
+ * the flow. Based on the message direction, there could be only one flow
+ * associated with a message.
+ * @{
+ */
+
+/**
+ * @file axis2_msg.h
+ */
+
+#include <axutil_param_container.h>
+#include <axis2_op.h>
+#include <axutil_array_list.h>
+#include <axis2_description.h>
+#include <axis2_phase_meta.h>
+
+ /** Message of IN flow */
+#define AXIS2_MSG_IN "in"
+
+ /** Message of OUT flow */
+#define AXIS2_MSG_OUT "out"
+
+ /** Message of IN FAULT flow */
+#define AXIS2_MSG_IN_FAULT "InFaultMessage"
+
+ /** Message of OUT FAULT flow */
+#define AXIS2_MSG_OUT_FAULT "OutFaultMessage"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_msg */
+ typedef struct axis2_msg axis2_msg_t;
+
+ /**
+ * Creates message struct instance.
+ * @param env pointer to environment struct
+ * @return pointer to newly created message
+ */
+ AXIS2_EXTERN axis2_msg_t *AXIS2_CALL
+ axis2_msg_create(
+ const axutil_env_t * env);
+
+ /**
+ * Frees message.
+ * @param msg pointer to message
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_msg_free(
+ axis2_msg_t * msg,
+ const axutil_env_t * env);
+
+ /**
+ * Adds a parameter.
+ * @param msg pointer to message
+ * @param env pointer to environment struct
+ * @param param pointer to parameter, message assumes ownership of
+ * parameter
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_add_param(
+ axis2_msg_t * msg,
+ const axutil_env_t * env,
+ axutil_param_t * param);
+
+ /**
+ * Gets the named parameter.
+ * @param msg pointer to message
+ * @param env pointer to environment struct
+ * @param name parameter name string
+ * @return pointer to parameter corresponding to the same name, returns
+ * a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_param_t *AXIS2_CALL
+ axis2_msg_get_param(
+ const axis2_msg_t * msg,
+ const axutil_env_t * env,
+ const axis2_char_t * name);
+
+ /**
+ * Gets all parameters stored in message.
+ * @param msg pointer to message
+ * @param env pointer to environment struct
+ * @return pointer to list of parameters, returns a reference, not a
+ * cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_msg_get_all_params(
+ const axis2_msg_t * msg,
+ const axutil_env_t * env);
+
+ /**
+ * Checks if the named parameter is locked.
+ * @param msg pointer to message
+ * @param env pointer to environment struct
+ * @param param_name parameter name string
+ * @return AXIS2_TRUE if the parameter is locked, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_is_param_locked(
+ axis2_msg_t * msg,
+ const axutil_env_t * env,
+ const axis2_char_t * param_name);
+
+ /**
+ * Sets parent. Parent of a message is of type operation.
+ * @param msg pointer to message
+ * @param env pointer to environment struct
+ * @param op pointer to parent operation, message does not assume
+ * ownership of parent
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_set_parent(
+ axis2_msg_t * msg,
+ const axutil_env_t * env,
+ axis2_op_t * op);
+
+ /**
+ * Gets parent. Parent of a message is of type operation.
+ * @param msg pointer to message
+ * @param env pointer to environment struct
+ * @return pointer to parent operation, returns a reference, not a
+ * cloned copy
+ */
+ AXIS2_EXTERN axis2_op_t *AXIS2_CALL
+ axis2_msg_get_parent(
+ const axis2_msg_t * msg,
+ const axutil_env_t * env);
+
+ /**
+ * Gets flow of execution associated with the message.
+ * @param msg pointer to message
+ * @param env pointer to environment struct
+ * @return pointer to array list containing the list of phases
+ * representing the flow
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_msg_get_flow(
+ const axis2_msg_t * msg,
+ const axutil_env_t * env);
+
+ /**
+ * Sets flow of execution associated with the message.
+ * @param msg pointer to message
+ * @param env pointer to environment struct
+ * @param flow pointer to array list of phases representing the flow,
+ * message assumes ownership of flow
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_set_flow(
+ axis2_msg_t * msg,
+ const axutil_env_t * env,
+ axutil_array_list_t * flow);
+
+ /**
+ * Gets direction of message.
+ * @param msg pointer to message
+ * @param env pointer to environment struct
+ * @return direction string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_msg_get_direction(
+ const axis2_msg_t * msg,
+ const axutil_env_t * env);
+
+ /**
+ * Sets direction of message.
+ * @param msg pointer to message
+ * @param env pointer to environment struct
+ * @param direction pointer to direction
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_set_direction(
+ axis2_msg_t * msg,
+ const axutil_env_t * env,
+ const axis2_char_t * direction);
+
+ /**
+ * Gets QName representing message.
+ * @param msg pointer to message
+ * @param env pointer to environment struct
+ * @return pointer to QName, returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN const axutil_qname_t *AXIS2_CALL
+ axis2_msg_get_element_qname(
+ const axis2_msg_t * msg,
+ const axutil_env_t * env);
+
+ /**
+ * Sets QName representing message.
+ * @param msg pointer to message
+ * @param env pointer to environment struct
+ * @param element_qname pointer to QName representing message, this
+ * function creates a clone of QName
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_set_element_qname(
+ axis2_msg_t * msg,
+ const axutil_env_t * env,
+ const axutil_qname_t * element_qname);
+
+ /**
+ * Gets message name.
+ * @param msg pointer to message
+ * @param env pointer to environment struct
+ * @return message name string.
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_msg_get_name(
+ const axis2_msg_t * msg,
+ const axutil_env_t * env);
+
+ /**
+ * Sets message name.
+ * @param msg pointer to message
+ * @param env pointer to environment struct
+ * @param name message name string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_set_name(
+ axis2_msg_t * msg,
+ const axutil_env_t * env,
+ const axis2_char_t * name);
+
+ /**
+ * Gets base description.
+ * @param msg pointer to message
+ * @param env pointer to environment struct
+ * @return pointer to base description struct
+ */
+ AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+ axis2_msg_get_base(
+ const axis2_msg_t * msg,
+ const axutil_env_t * env);
+
+ /**
+ * Gets container of parameters belonging to message.
+ * @param msg pointer to message
+ * @param env pointer to environment struct
+ * @return returns container of parameters
+ * @sa axutil_param_container
+ */
+ AXIS2_EXTERN axutil_param_container_t *AXIS2_CALL
+ axis2_msg_get_param_container(
+ const axis2_msg_t * msg,
+ const axutil_env_t * env);
+
+ /**
+ * Increments the reference count to this oject
+ * @param msg pointer to message
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_increment_ref(
+ axis2_msg_t * msg,
+ const axutil_env_t * env);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_MSG_H */
diff --git a/include/axis2_msg_ctx.h b/include/axis2_msg_ctx.h
new file mode 100644
index 0000000..b1d4d0f
--- /dev/null
+++ b/include/axis2_msg_ctx.h
@@ -0,0 +1,2098 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_MSG_CTX_H
+#define AXIS2_MSG_CTX_H
+
+/**
+ * @defgroup axis2_msg_ctx message context
+ * @ingroup axis2_context
+ * message context captures all state information related to a message
+ * invocation. It holds information on the service and operation to be invoked
+ * as well as context hierarchy information related to the service and operation.
+ * It also has information on transports, that are to be used in invocation. The
+ * phase information is kept, along with the phase at which message invocation was
+ * paused as well as the handler in the phase from which the invocation is to be
+ * resumed. message context would hold the request SOAP message along the out
+ * path and would capture response along the in path.
+ * message context also has information on various engine specific information,
+ * such as if it should be doing MTOM, REST.
+ * As message context is inherited form context, it has the capability of
+ * storing user defined properties.
+ * @{
+ */
+
+/**
+ * @file axis2_msg_ctx.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_ctx.h>
+#include <axis2_relates_to.h>
+#include <axutil_param.h>
+#include <axis2_handler_desc.h>
+#include <axutil_qname.h>
+#include <axutil_stream.h>
+#include <axis2_msg_info_headers.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** transport headers */
+#define AXIS2_TRANSPORT_HEADERS "AXIS2_TRANSPORT_HEADERS"
+
+ /** transport in */
+#define AXIS2_TRANSPORT_OUT "AXIS2_TRANSPORT_OUT"
+
+ /** transport out */
+#define AXIS2_TRANSPORT_IN "AXIS2_TRANSPORT_IN"
+
+ /** character set encoding */
+#define AXIS2_CHARACTER_SET_ENCODING "AXIS2_CHARACTER_SET_ENCODING"
+
+ /** UTF_8; This is the 'utf-8' value for AXIS2_CHARACTER_SET_ENCODING property */
+#define AXIS2_UTF_8 "UTF-8"
+
+ /** UTF_16; This is the 'utf-16' value for AXIS2_CHARACTER_SET_ENCODING property */
+#define AXIS2_UTF_16 "utf-16"
+
+ /** default char set encoding; This is the default value for AXIS2_CHARACTER_SET_ENCODING property */
+#define AXIS2_DEFAULT_CHAR_SET_ENCODING "UTF-8"
+
+ /** transport succeeded */
+#define AXIS2_TRANSPORT_SUCCEED "AXIS2_TRANSPORT_SUCCEED"
+
+ /** HTTP Client */
+#define AXIS2_HTTP_CLIENT "AXIS2_HTTP_CLIENT"
+
+ /** Transport URL */
+#define AXIS2_TRANSPORT_URL "TransportURL"
+
+ /** PEER IP Address of Server */
+#define AXIS2_SVR_PEER_IP_ADDR "peer_ip_addr"
+
+ /* Message flows */
+
+ /* In flow */
+
+ /*#define AXIS2_IN_FLOW 1*/
+
+ /* In fault flow */
+
+ /*#define AXIS2_IN_FAULT_FLOW 2*/
+
+ /* Out flow */
+
+ /*#define AXIS2_OUT_FLOW 3*/
+
+ /* Out fault flow */
+
+ /*#define AXIS2_OUT_FAULT_FLOW 4*/
+
+ /** Type name for struct axis2_msg_ctx */
+ typedef struct axis2_msg_ctx axis2_msg_ctx_t;
+
+ struct axis2_svc;
+ struct axis2_op;
+
+ struct axis2_conf_ctx;
+ struct axis2_svc_grp_ctx;
+ struct axis2_svc_ctx;
+ struct axis2_op_ctx;
+ struct axis2_conf;
+ struct axiom_soap_envelope;
+ struct axis2_options;
+ struct axis2_transport_in_desc;
+ struct axis2_transport_out_desc;
+ struct axis2_out_transport_info;
+
+ /** Type name for pointer to a function to find a service */
+ typedef struct axis2_svc *(
+ AXIS2_CALL
+ * AXIS2_MSG_CTX_FIND_SVC) (
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /** Type name for pointer to a function to find an operation in a service */
+ typedef struct axis2_op *(
+ AXIS2_CALL
+ * AXIS2_MSG_CTX_FIND_OP) (
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ struct axis2_svc * svc);
+
+ /**
+ * Creates a message context struct instance.
+ * @param env pointer to environment struct
+ * @param conf_ctx pointer to configuration context struct, message context
+ * does not assume the ownership of the struct
+ * @param transport_in_desc pointer to transport in description struct,
+ * message context does not assume the ownership of the struct
+ * @param transport_out_desc pointer to transport out description struct,
+ * message context does not assume the ownership of the struct
+ * @return pointer to newly created message context instance
+ */
+ AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
+ axis2_msg_ctx_create(
+ const axutil_env_t * env,
+ struct axis2_conf_ctx *conf_ctx,
+ struct axis2_transport_in_desc *transport_in_desc,
+ struct axis2_transport_out_desc *transport_out_desc);
+
+ /**
+ * Gets the base, which is of type context.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to base context struct
+ */
+ AXIS2_EXTERN axis2_ctx_t *AXIS2_CALL
+ axis2_msg_ctx_get_base(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets parent. Parent of a message context is of type operation
+ * context.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to operation context which is the parent
+ */
+ AXIS2_EXTERN struct axis2_op_ctx *AXIS2_CALL
+ axis2_msg_ctx_get_parent(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets parent. Parent of a message context is of type operation
+ * context.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param parent pointer to parent operation context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_parent(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ struct axis2_op_ctx *parent);
+
+ /**
+ * Frees message context.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_msg_ctx_free(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Initializes the message context. Based on the transport, service and
+ * operation qnames set on top of message context, correct instances of
+ * those struct instances would be extracted from configuration and
+ * set within message context.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param conf pointer to configuration
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_init(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ struct axis2_conf *conf);
+
+ /**
+ * Gets WS-Addressing fault to address. Fault to address tells where to
+ * send the fault in case there is an error.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to endpoint reference struct representing the fault
+ * to address, returns a reference not a cloned copy
+ */
+ AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
+ axis2_msg_ctx_get_fault_to(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets WS-Addressing from endpoint. From address tells where the
+ * request came from.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to endpoint reference struct representing the from
+ * address, returns a reference not a cloned copy
+ */
+ AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
+ axis2_msg_ctx_get_from(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Checks if there is a SOAP fault on in flow.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if there is an in flow fault, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_ctx_get_in_fault_flow(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the SOAP envelope. This SOAP envelope could be either request
+ * SOAP envelope or the response SOAP envelope, based on the state
+ * the message context is in.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to SOAP envelope stored within message context
+ */
+ AXIS2_EXTERN struct axiom_soap_envelope *AXIS2_CALL
+ axis2_msg_ctx_get_soap_envelope(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the SOAP envelope of the response.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to response SOAP envelope stored within message context
+ */
+ AXIS2_EXTERN struct axiom_soap_envelope *AXIS2_CALL
+ axis2_msg_ctx_get_response_soap_envelope(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets fault SOAP envelope.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to fault SOAP envelope stored within message context
+ */
+ AXIS2_EXTERN struct axiom_soap_envelope *AXIS2_CALL
+ axis2_msg_ctx_get_fault_soap_envelope(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets message ID.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param msg_id
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_msg_id(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axis2_char_t * msg_id);
+
+ /**
+ * Gets message ID.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return message ID string corresponding to the message the message
+ * context is related to
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_msg_ctx_get_msg_id(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets process fault status.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if process fault is on, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_ctx_get_process_fault(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets relates to information for the message context.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to relates to struct
+ */
+ AXIS2_EXTERN axis2_relates_to_t *AXIS2_CALL
+ axis2_msg_ctx_get_relates_to(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets WS-Addressing reply to endpoint. Reply to address tells where
+ * the the response should be sent to.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to endpoint reference struct representing the reply
+ * to address, returns a reference not a cloned copy
+ */
+ AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
+ axis2_msg_ctx_get_reply_to(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Checks if it is on the server side that the message is being dealt
+ * with, or on the client side.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if it is server side, AXIS2_FALSE if it is client
+ * side
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_ctx_get_server_side(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets WS-Addressing to endpoint. To address tells where message should
+ * be sent to.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to endpoint reference struct representing the
+ * to address, returns a reference not a cloned copy
+ */
+ AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
+ axis2_msg_ctx_get_to(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets WS-Addressing fault to endpoint. Fault to address tells where
+ * the fault message should be sent when there is an error.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param reference pointer to endpoint reference representing fault to
+ * address. message context assumes the ownership of endpoint struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_fault_to(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axis2_endpoint_ref_t * reference);
+
+ /**
+ * Sets WS-Addressing from endpoint. From address tells where
+ * the message came from.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param reference pointer to endpoint reference representing from
+ * address. message context assumes the ownership of endpoint struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_from(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axis2_endpoint_ref_t * reference);
+
+ /**
+ * Sets in fault flow status.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param in_fault_flow AXIS2_TRUE if there is a fault on in path,
+ * else AXIS2_FALSE
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_in_fault_flow(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_bool_t in_fault_flow);
+
+ /**
+ * Sets SOAP envelope. The fact that if it is the request SOAP envelope
+ * or that of response depends on the current status represented by
+ * message context.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param soap_envelope pointer to SOAP envelope, message context
+ * assumes ownership of SOAP envelope
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_soap_envelope(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ struct axiom_soap_envelope *soap_envelope);
+
+ /**
+ * Sets response SOAP envelope.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param soap_envelope pointer to SOAP envelope, message context
+ * assumes ownership of SOAP envelope
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_response_soap_envelope(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ struct axiom_soap_envelope *soap_envelope);
+
+ /**
+ * Sets fault SOAP envelope.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param soap_envelope pointer to SOAP envelope, message context
+ * assumes ownership of SOAP envelope
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_fault_soap_envelope(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ struct axiom_soap_envelope *soap_envelope);
+
+ /**
+ * Sets message ID.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param message_id message ID string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_message_id(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * message_id);
+
+ /**
+ * Sets process fault bool value.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param process_fault AXIS2_TRUE if SOAP faults are to be processed,
+ * else AXIS2_FALSE
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_process_fault(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_bool_t process_fault);
+
+ /**
+ * Sets relates to struct.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param reference pointer to relates to struct, message context
+ * assumes ownership of the struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_relates_to(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axis2_relates_to_t * reference);
+
+ /**
+ * Sets WS-Addressing reply to address indicating the location to which
+ * the reply would be sent.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param reference pointer to endpoint reference representing reply to
+ * address
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_reply_to(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axis2_endpoint_ref_t * reference);
+
+ /**
+ * Sets the bool value indicating if it is the server side or the
+ * client side.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param server_side AXIS2_TRUE if it is server side, AXIS2_FALSE if it
+ * is client side
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_server_side(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_bool_t server_side);
+
+ /**
+ * Sets WS-Addressing to address.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param reference pointer to endpoint reference struct representing
+ * the address where the request should be sent to. message context
+ * assumes ownership of endpoint struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_to(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axis2_endpoint_ref_t * reference);
+
+ /**
+ * Gets the bool value indicating if it is required to have a new thread
+ * for the invocation, or if the same thread of execution could be used.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if new thread is required, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_ctx_get_new_thread_required(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the bool value indicating if it is required to have a new thread
+ * for the invocation, or if the same thread of execution could be used.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param new_thread_required AXIS2_TRUE if a new thread is required,
+ * else AXIS2_FALSE
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_new_thread_required(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_bool_t new_thread_required);
+
+ /**
+ * Sets WS-Addressing action.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param action_uri WSA action URI string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_wsa_action(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * action_uri);
+
+ /**
+ * Gets WS-Addressing action.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to WSA action URI string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_msg_ctx_get_wsa_action(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets WS-Addressing message ID.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param message_id pointer to message ID string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_wsa_message_id(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * message_id);
+
+ /**
+ * Gets WS-Addressing message ID.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return WSA message ID string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_msg_ctx_get_wsa_message_id(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets WS-Addressing message information headers.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to message information headers struct with
+ * WS-Addressing information. Returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axis2_msg_info_headers_t *AXIS2_CALL
+ axis2_msg_ctx_get_msg_info_headers(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the bool value indicating the paused status. It is possible
+ * to pause the engine invocation by any handler. By calling this method
+ * one can find out if some handler has paused the invocation.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if message context is paused, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_ctx_get_paused(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the bool value indicating the paused status of invocation.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param paused paused
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_paused(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_bool_t paused);
+
+ /**
+ * Gets the bool value indicating the keep alive status. It is possible
+ * to keep alive the message context by any handler. By calling this method
+ * one can see whether it is possible to clean the message context.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if message context is keep alive, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_ctx_is_keep_alive(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the bool value indicating the keep alive status of invocation.
+ * By setting this one can indicate the engine not to clean the message
+ * context.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param keep_alive keep alive
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_keep_alive(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_bool_t keep_alive);
+
+ /**
+ * Gets transport in description.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to transport in description struct, returns a
+ * reference not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_transport_in_desc *AXIS2_CALL
+ axis2_msg_ctx_get_transport_in_desc(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets transport out description.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to transport out description struct, returns a
+ * reference not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_transport_out_desc *AXIS2_CALL
+ axis2_msg_ctx_get_transport_out_desc(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets transport in description.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param transport_in_desc pointer to transport in description struct,
+ * message context does not assume the ownership of the struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_transport_in_desc(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ struct axis2_transport_in_desc *transport_in_desc);
+
+ /**
+ * Sets transport out description.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param transport_out_desc pointer to transport out description,
+ * message context does not assume the ownership of the struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_transport_out_desc(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ struct axis2_transport_out_desc *transport_out_desc);
+
+ /**
+ * Gets operation context related to the operation that this message
+ * context is related to.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to operation context struct
+ */
+ AXIS2_EXTERN struct axis2_op_ctx *AXIS2_CALL
+ axis2_msg_ctx_get_op_ctx(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets operation context related to the operation that this message
+ * context is related to.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param op_ctx pointer to operation context, message context does not
+ * assume the ownership of operation context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_op_ctx(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ struct axis2_op_ctx *op_ctx);
+
+ /**
+ * Gets the bool value indicating the output written status.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if output is written, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_ctx_get_output_written(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the bool value indicating the output written status.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param output_written AXIS2_TRUE if output is written, else AXIS2_FALSE
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_output_written(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_bool_t output_written);
+
+ /**
+ * Gets the HTTP Method that relates to the service that is
+ * related to the message context.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return HTTP Method string, returns a reference,
+ * not a cloned copy
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_msg_ctx_get_rest_http_method(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the HTTP Method that relates to the service that is
+ * related to the message context.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param rest_http_method HTTP Method string, msg_ctx does not assume
+ * ownership of rest_http_method.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_rest_http_method(
+ struct axis2_msg_ctx * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * rest_http_method);
+
+ /**
+ * Gets the ID of service context that relates to the service that is
+ * related to the message context.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return service context ID string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_msg_ctx_get_svc_ctx_id(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the ID of service context that relates to the service that is
+ * related to the message context.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param svc_ctx_id The service context ID string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_svc_ctx_id(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * svc_ctx_id);
+
+ /**
+ * Gets configuration context.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to configuration context
+ */
+ AXIS2_EXTERN struct axis2_conf_ctx *AXIS2_CALL
+ axis2_msg_ctx_get_conf_ctx(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets service context that relates to the service that the message
+ * context is related to.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to message context struct
+ */
+ AXIS2_EXTERN struct axis2_svc_ctx *AXIS2_CALL
+ axis2_msg_ctx_get_svc_ctx(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets configuration context.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param conf_ctx pointer to configuration context struct, message
+ * context does not assume the ownership of struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_conf_ctx(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ struct axis2_conf_ctx *conf_ctx);
+
+ /**
+ * Sets service context.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param svc_ctx pointer to service context struct, message
+ * context does not assume the ownership of struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_svc_ctx(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ struct axis2_svc_ctx *svc_ctx);
+
+ /**
+ * Sets message information headers.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param msg_info_headers pointer to message information headers,
+ * message context assumes the ownership of the struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_msg_info_headers(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axis2_msg_info_headers_t * msg_info_headers);
+
+ /**
+ * Gets configuration descriptor parameter with given key. This method
+ * recursively search the related description hierarchy for the parameter
+ * with given key until it is found or the parent of the description
+ * hierarchy is reached. The order of search is as follows:
+ * \n
+ * 1. search in operation description, if its there return
+ * \n
+ * 2. if the parameter is not found in operation or operation is NULL,
+ * search in service
+ * \n
+ * 3. if the parameter is not found in service or service is NULL search
+ * in configuration
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param key parameter key
+ * @return pointer to parameter struct corresponding to the given key
+ */
+ AXIS2_EXTERN axutil_param_t *AXIS2_CALL
+ axis2_msg_ctx_get_parameter(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * key);
+
+ /**
+ * Gets parameters related to a named module and a given handler
+ * description. The order of searching for parameter is as follows:
+ * \n
+ * 1. search in module configuration stored inside corresponding operation
+ * description if its there
+ * \n
+ * 2. search in corresponding operation if its there
+ * \n
+ * 3. search in module configurations stored inside corresponding
+ * service description if its there
+ * \n
+ * 4. search in corresponding service description if its there
+ * \n
+ * 5. search in module configurations stored inside configuration
+ * \n
+ * 6. search in configuration for parameters
+ * \n
+ * 7. get the corresponding module and search for the parameters
+ * \n
+ * 8. search in handler description for the parameter
+ * @param msg_ctx pointer to message context
+ * @param env pointer to environment struct
+ * @param key parameter key
+ * @param module_name name of the module
+ * @param handler_desc pointer to handler description
+ * @return pointer to parameter
+ */
+ AXIS2_EXTERN axutil_param_t *AXIS2_CALL
+ axis2_msg_ctx_get_module_parameter(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * key,
+ const axis2_char_t * module_name,
+ axis2_handler_desc_t * handler_desc);
+
+ /**
+ * Gets property corresponding to the given key.
+ * @param msg_ctx pointer to message context
+ * @param env pointer to environment struct
+ * @param key key string with which the property is stored
+ * @return pointer to property struct
+ */
+ AXIS2_EXTERN axutil_property_t *AXIS2_CALL
+ axis2_msg_ctx_get_property(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * key);
+
+ /**
+ * Gets property value corresponding to the property given key.
+ * @param msg_ctx pointer to message context
+ * @param env pointer to environment struct
+ * @param property_str key string with which the property is stored
+ * @return pointer to property struct
+ */
+ AXIS2_EXTERN void *AXIS2_CALL
+ axis2_msg_ctx_get_property_value(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * property_str);
+
+ /**
+ * Sets property with given key.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param key key string
+ * @param value property to be stored
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_property(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * key,
+ axutil_property_t * value);
+
+ /**
+ * Gets the QName of the handler at which invocation was paused.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to QName of the paused handler
+ */
+ AXIS2_EXTERN const axutil_string_t *AXIS2_CALL
+ axis2_msg_ctx_get_paused_handler_name(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the name of the phase at which the invocation was paused.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return name string of the paused phase.
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_msg_ctx_get_paused_phase_name(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the name of the phase at which the invocation was paused.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param paused_phase_name paused phase name string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_paused_phase_name(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * paused_phase_name);
+
+ /**
+ * Gets SOAP action.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return SOAP action string
+ */
+ AXIS2_EXTERN axutil_string_t *AXIS2_CALL
+ axis2_msg_ctx_get_soap_action(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets SOAP action.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param soap_action SOAP action string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_soap_action(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axutil_string_t * soap_action);
+
+ /**
+ * Gets the boolean value indicating if MTOM is enabled or not.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if MTOM is enabled, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_ctx_get_doing_mtom(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the boolean value indicating if MTOM is enabled or not.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param doing_mtom AXIS2_TRUE if MTOM is enabled, else AXIS2_FALSE
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_doing_mtom(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_bool_t doing_mtom);
+
+ /**
+ * Gets the boolean value indicating if REST is enabled or not.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if REST is enabled, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_ctx_get_doing_rest(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the boolean value indicating if REST is enabled or not.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param doing_rest AXIS2_TRUE if REST is enabled, else AXIS2_FALSE
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_doing_rest(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_bool_t doing_rest);
+
+ /**
+ * Sets the boolean value indicating if REST should be done through
+ * HTTP POST or not.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param do_rest_through_post AXIS2_TRUE if REST is to be done with
+ * HTTP POST, else AXIS2_FALSE if REST is not to be done with HTTP POST
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_do_rest_through_post(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_bool_t do_rest_through_post);
+
+ /**
+ * Sets the boolean value indicating if REST should be done through
+ * HTTP POST or not.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if REST is to be done with HTTP POST, else
+ * AXIS2_FALSE if REST is not to be done with HTTP POST
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_ctx_get_do_rest_through_post(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets manage session bool value.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if session is managed, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_ctx_get_manage_session(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets manage session bool value.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param manage_session manage session bool value
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_manage_session(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_bool_t manage_session);
+
+ /**
+ * Gets the bool value indicating the SOAP version being used either
+ * SOAP 1.1 or SOAP 1.2
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if SOAP 1.1 is being used, else AXIS2_FALSE if
+ * SOAP 1.2 is being used
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_ctx_get_is_soap_11(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the bool value indicating the SOAP version being used either
+ * SOAP 1.1 or SOAP 1.2
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param is_soap11 AXIS2_TRUE if SOAP 1.1 is being used, else
+ * AXIS2_FALSE if SOAP 1.2 is being used
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_is_soap_11(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_bool_t is_soap11);
+
+ /**
+ * Gets service group context. The returned service group context
+ * relates to the service group to which the service, related to the
+ * message context, belongs.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to service group struct
+ */
+ AXIS2_EXTERN struct axis2_svc_grp_ctx *AXIS2_CALL
+ axis2_msg_ctx_get_svc_grp_ctx(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets service group context. The returned service group context
+ * relates to the service group to which the service, related to the
+ * message context, belongs.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param svc_grp_ctx pointer to service group context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_svc_grp_ctx(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ struct axis2_svc_grp_ctx *svc_grp_ctx);
+
+ /**
+ * Gets the operation that is to be invoked.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to operation, returns a reference not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_op *AXIS2_CALL
+ axis2_msg_ctx_get_op(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the operation that is to be invoked.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param op pointer to operation, message context does not assume the
+ * ownership of operation
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_op(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ struct axis2_op *op);
+
+ /**
+ * Gets the service to which the operation to be invoked belongs.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to service struct, returns a reference not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_svc *AXIS2_CALL
+ axis2_msg_ctx_get_svc(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the service to which the operation to be invoked belongs.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param svc pointer to service struct, message context does not assume
+ * the ownership of struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_svc(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ struct axis2_svc *svc);
+
+ /**
+ * Gets the service group to which the service to be invoked belongs.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to service group struct, returns a reference not
+ * a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_svc_grp *AXIS2_CALL
+ axis2_msg_ctx_get_svc_grp(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the service group to which the service to be invoked belongs.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param svc_grp pointer to service group struct, message context does
+ * not assume the ownership of the struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_svc_grp(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ struct axis2_svc_grp *svc_grp);
+
+ /**
+ * Gets the service group context ID.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return service group context ID string
+ */
+ AXIS2_EXTERN const axutil_string_t *AXIS2_CALL
+ axis2_msg_ctx_get_svc_grp_ctx_id(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the service group context ID.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param svc_grp_ctx_id service group context ID string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_svc_grp_ctx_id(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axutil_string_t * svc_grp_ctx_id);
+
+ /**
+ * Sets function to be used to find a service. This function is used by dispatchers
+ * to locate the service to be invoked.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param func function to be used to find an operation
+ * @return pointer to service to be invoked
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_find_svc(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ AXIS2_MSG_CTX_FIND_SVC func);
+
+ /**
+ * Sets function to be used to find an operation in the given service.
+ * This function is used by dispatchers to locate the operation to be invoked.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param func function to be used to find an operation
+ * @return pointer to the operation to be invoked
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_find_op(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ AXIS2_MSG_CTX_FIND_OP func);
+
+ /**
+ * Finds the service to be invoked. This function is used by dispatchers
+ * to locate the service to be invoked.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer to service to be invoked
+ */
+ AXIS2_EXTERN struct axis2_svc *AXIS2_CALL
+ axis2_msg_ctx_find_svc(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Finds the operation to be invoked in the given service. This function
+ * is used by dispatchers to locate the operation to be invoked.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param svc pointer to service to whom the operation belongs
+ * @return pointer to the operation to be invoked
+ */
+ AXIS2_EXTERN struct axis2_op *AXIS2_CALL
+ axis2_msg_ctx_find_op(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ struct axis2_svc *svc);
+
+ /**
+ * Gets the options to be used in invocation.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return options pointer to options struct, message context does not
+ * assume the ownership of the struct
+ */
+ AXIS2_EXTERN struct axis2_options *AXIS2_CALL
+ axis2_msg_ctx_get_options(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the bool value indicating the paused status.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if invocation is paused, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_ctx_is_paused(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the options to be used in invocation.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param options pointer to options struct, message context does not
+ * assume the ownership of the struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_options(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ struct axis2_options *options);
+
+ /**
+ * Sets the flow to be invoked.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param flow int value indicating the flow
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_flow(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ int flow);
+
+ /**
+ * Gets the flow to be invoked.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return int value indicating the flow
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_msg_ctx_get_flow(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the list of supported REST HTTP Methods
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param supported_rest_http_methods pointer array list containing
+ * the list of HTTP Methods supported. Message context does
+ * assumes the ownership of the array list. Anything added to this
+ * array list will be freed by the msg_ctx
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_supported_rest_http_methods(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axutil_array_list_t * supported_rest_http_methods);
+
+ /**
+ * Gets the list of supported REST HTTP Methods
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer array list containing
+ * the list of HTTP Methods supported. Message context does
+ * assumes the ownership of the array list
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_msg_ctx_get_supported_rest_http_methods(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the execution chain to be invoked. The execution chain is a
+ * list of phases containing the handlers to be invoked.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param execution_chain pointer array list containing the list of
+ * handlers that constitute the execution chain. Message context does
+ * not assume the ownership of the array list
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_execution_chain(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axutil_array_list_t * execution_chain);
+
+ /**
+ * Gets the execution chain to be invoked. The execution chain is a
+ * list of phases containing the handlers to be invoked.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return pointer array list containing the list of handlers that
+ * constitute the execution chain. Message context does not assume
+ * the ownership of the array list
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_msg_ctx_get_execution_chain(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets current handler index, indicating which handler is currently
+ * being invoked in the execution chain
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param index index of currently executed handler
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_current_handler_index(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const int index);
+
+ /**
+ * Gets current handler index, indicating which handler is currently
+ * being invoked in the execution chain
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return index of currently executed handler
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_msg_ctx_get_current_handler_index(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets paused handler index, indicating at which handler the execution
+ * chain was paused.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return index of handler at which invocation was paused
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_msg_ctx_get_paused_handler_index(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets index of the current phase being invoked.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param index index of current phase
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_current_phase_index(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const int index);
+
+ /**
+ * Gets index of the current phase being invoked.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return index of current phase
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_msg_ctx_get_current_phase_index(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the phase at which the invocation was paused.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return index of paused phase
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_msg_ctx_get_paused_phase_index(
+ const axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets character set encoding to be used.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axutil_string_t *AXIS2_CALL
+ axis2_msg_ctx_get_charset_encoding(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets character set encoding to be used.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param str pointer to string struct representing encoding
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_charset_encoding(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axutil_string_t * str);
+
+ /**
+ * Gets the integer value indicating http status_code.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return status value
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_msg_ctx_get_status_code(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the int value indicating http status code
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param status_code of the http response
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_status_code(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const int status_code);
+
+ /**
+ * Gets the Transport Out Stream
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return reference to Transport Out Stream
+ */
+ AXIS2_EXTERN axutil_stream_t *AXIS2_CALL
+ axis2_msg_ctx_get_transport_out_stream(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the Transport Out Stream
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param stream reference to Transport Out Stream
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_transport_out_stream(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axutil_stream_t * stream);
+
+ /**
+ * Resets Transport Out Stream
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_reset_transport_out_stream(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the HTTP Out Transport Info associated
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return reference to HTTP Out Transport Info associated
+ */
+ AXIS2_EXTERN struct axis2_out_transport_info *AXIS2_CALL
+ axis2_msg_ctx_get_out_transport_info(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the HTTP Out Transport Info associated
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param out_transport_info reference to HTTP Out
+ * Transport Info associated
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_out_transport_info(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ struct axis2_out_transport_info *out_transport_info);
+
+ /**
+ * Resets the HTTP Out Transport Info associated
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_reset_out_transport_info(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Retrieves Transport Headers.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return Transport Headers associated.
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_msg_ctx_get_transport_headers(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Retrieves Transport Headers, and removes them
+ * from the message context
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return Transport Headers associated.
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_msg_ctx_extract_transport_headers(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the Transport Headers
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param transport_headers a Hash containing the
+ * Transport Headers
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_transport_headers(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axutil_hash_t * transport_headers);
+
+ /**
+ * Retrieves HTTP Accept-Charset records.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return HTTP Accept-Charset records associated.
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_msg_ctx_get_http_accept_charset_record_list(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Retrieves HTTP Accept-Charset records, and removes them
+ * from the message context
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return HTTP Accept-Charset records associated.
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_msg_ctx_extract_http_accept_charset_record_list(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the HTTP Accept-Charset records
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param accept_charset_record_list an Array List containing the
+ * HTTP Accept-Charset records
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_http_accept_charset_record_list(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axutil_array_list_t * accept_charset_record_list);
+
+ /**
+ * Retrieves HTTP Accept-Language records.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return HTTP Accept-Language records associated.
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_msg_ctx_get_http_accept_language_record_list(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Retrieves HTTP Accept-Language records, and removes them
+ * from the message context
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return HTTP Accept-Language records associated.
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_msg_ctx_extract_http_accept_language_record_list(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the HTTP Accept-Language records
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param accept_language_record_list an Array List containing the
+ * HTTP Accept-Language records
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_http_accept_language_record_list(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axutil_array_list_t * accept_language_record_list);
+
+ /**
+ * Gets the Content Language used
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return Content Language string
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_msg_ctx_get_content_language(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the Content Language used
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param str Content Language string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_content_language(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axis2_char_t * str);
+
+ /**
+ * Retrieves HTTP Accept records.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return HTTP Accept records associated.
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_msg_ctx_get_http_accept_record_list(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Retrieves HTTP Accept records, and removes them
+ * from the message context
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return HTTP Accept records associated.
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_msg_ctx_extract_http_accept_record_list(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the HTTP Accept records
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param accept_record_list an Array List containing the
+ * HTTP Accept records
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_http_accept_record_list(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axutil_array_list_t * accept_record_list);
+
+ /**
+ * Gets the transfer encoding used
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return Transfer encoding string
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_msg_ctx_get_transfer_encoding(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the transfer encoding used
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param str Transfer encoding string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_transfer_encoding(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axis2_char_t * str);
+
+ /**
+ * Gets the Transport URL
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return Transport URL string
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_msg_ctx_get_transport_url(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the Transport URL
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param str Transport URL string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_transport_url(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axis2_char_t * str);
+
+ /**
+ * Gets whether there was no content in the response.
+ * This will cater for a situation where the invoke
+ * method in a service returns NULL when no fault has
+ * occured.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return returns AXIS2_TRUE if there was no content
+ * occured or AXIS2_FALSE otherwise
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_ctx_get_no_content(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets that there was no content in the response.
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param no_content expects AXIS2_TRUE if there was no
+ * content in the response or AXIS2_FALSE otherwise
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_no_content(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_bool_t no_content);
+
+ /**
+ * Gets whether an authentication failure occured
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return returns AXIS2_TRUE if an authentication failure
+ * occured or AXIS2_FALSE if not
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_ctx_get_auth_failed(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets whether an authentication failure occured
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param status expects AXIS2_TRUE if an authentication failure
+ * occured or AXIS2_FALSE if not
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_auth_failed(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_bool_t status);
+
+ /**
+ * Gets whether HTTP Authentication is required or
+ * whether Proxy Authentication is required
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return returns AXIS2_TRUE for HTTP Authentication
+ * and AXIS2_FALSE for Proxy Authentication
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_ctx_get_required_auth_is_http(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets whether HTTP Authentication is required or
+ * whether Proxy Authentication is required
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param is_http use AXIS2_TRUE for HTTP Authentication
+ * and AXIS2_FALSE for Proxy Authentication
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_required_auth_is_http(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_bool_t is_http);
+
+ /**
+ * Sets the authentication type
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param auth_type Authentication type string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_auth_type(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * auth_type);
+
+ /**
+ * Gets the authentication type
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return Authentication type string
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_msg_ctx_get_auth_type(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the Output Header list
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return Output Header list
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_msg_ctx_get_http_output_headers(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Retrieves the Output Headers, and removes them
+ * from the message context
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @return Output Header list
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_msg_ctx_extract_http_output_headers(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the Output Header list
+ * @param msg_ctx message context
+ * @param env pointer to environment struct
+ * @param output_headers Output Header list
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_http_output_headers(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axutil_array_list_t * output_headers);
+
+
+
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_msg_ctx_get_mime_parts(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_msg_ctx_set_mime_parts(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axutil_array_list_t *mime_parts);
+
+ /**
+ * Incrementing the msg_ctx ref count. This is necessary when
+ * prevent freeing msg_ctx through op_client when it is in use
+ * as in sandesha2.
+ * @param msg_ctx pointer to message context
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if still in use, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_increment_ref(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_MSG_CTX_H */
diff --git a/include/axis2_msg_info_headers.h b/include/axis2_msg_info_headers.h
new file mode 100644
index 0000000..bd70bbe
--- /dev/null
+++ b/include/axis2_msg_info_headers.h
@@ -0,0 +1,466 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_MSG_INFO_HEADERS_H
+#define AXIS2_MSG_INFO_HEADERS_H
+
+/**
+ * @defgroup axis2_msg_info_headers message information headers
+ * @ingroup axis2_addr
+ * message information headers encapsulates properties that enable the
+ * identification and location of the endpoints involved in an interaction.
+ * The basic interaction pattern from which all others are composed is
+ * "one way". In this pattern a source sends a message to a destination
+ * without any further definition of the interaction. "Request Reply" is a
+ * common interaction pattern that consists of an initial message sent by
+ * a source endpoint (the request) and a subsequent message sent from the
+ * destination of the request back to the source (the reply).
+ * A reply can be either an application message, a fault, or any other message.
+ * message information headers capture addressing information related to these
+ * interaction patterns such as from, to, reply to and fault to addresses.
+ * @{
+ */
+
+/**
+ * @file axis2_msg_info_headers.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_const.h>
+#include <axutil_array_list.h>
+#include <axis2_endpoint_ref.h>
+#include <axis2_any_content_type.h>
+#include <axis2_svc_name.h>
+#include <axis2_relates_to.h>
+#include <axiom_node.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_msg_info_headers */
+ typedef struct axis2_msg_info_headers axis2_msg_info_headers_t;
+
+ /**
+ * Creates message information headers struct.
+ * @param env pointer to environment struct
+ * @param to pointer to endpoint reference representing to endpoint
+ * @param action WS-Addressing action string
+ * @return pointer to newly created message information headers struct
+ */
+ AXIS2_EXTERN axis2_msg_info_headers_t *AXIS2_CALL
+ axis2_msg_info_headers_create(
+ const axutil_env_t * env,
+ axis2_endpoint_ref_t * to,
+ const axis2_char_t * action);
+
+ /**
+ * Gets to endpoint. to endpoint represents the address of the
+ * intended receiver of this message.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @return pointer to endpoint reference representing to address,
+ * returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
+ axis2_msg_info_headers_get_to(
+ const axis2_msg_info_headers_t * msg_info_headers,
+ const axutil_env_t * env);
+
+ /**
+ * Sets to endpoint. to endpoint represents the address of the
+ * intended receiver of this message.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @param to pointer to endpoint reference representing to address,
+ * message information headers assumes ownership of the endpoint
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_info_headers_set_to(
+ struct axis2_msg_info_headers *msg_info_headers,
+ const axutil_env_t * env,
+ axis2_endpoint_ref_t * to);
+
+ /**
+ * Gets from endpoint. from endpoint represents the address of the
+ * endpoint where the message originated from.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @return pointer to endpoint reference representing from address,
+ * returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
+ axis2_msg_info_headers_get_from(
+ const axis2_msg_info_headers_t * msg_info_headers,
+ const axutil_env_t * env);
+
+ /**
+ * Sets from endpoint. from endpoint represents the address of the
+ * endpoint where the message originated from.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @param from pointer to endpoint reference representing from address,
+ * message information headers assumes ownership of the endpoint
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_info_headers_set_from(
+ struct axis2_msg_info_headers *msg_info_headers,
+ const axutil_env_t * env,
+ axis2_endpoint_ref_t * from);
+
+ /**
+ * Gets reply to endpoint. reply to endpoint identifies the intended
+ * receiver to which a message is replied.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @return pointer to endpoint reference representing reply to address,
+ * returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
+ axis2_msg_info_headers_get_reply_to(
+ const axis2_msg_info_headers_t * msg_info_headers,
+ const axutil_env_t * env);
+
+ /**
+ * Sets reply to endpoint. reply to endpoint identifies the intended
+ * receiver to which a message is replied.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @param reply_to pointer to endpoint reference representing reply to
+ * address, message information headers assumes ownership of the endpoint
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_info_headers_set_reply_to(
+ struct axis2_msg_info_headers *msg_info_headers,
+ const axutil_env_t * env,
+ axis2_endpoint_ref_t * reply_to);
+
+ /**
+ * Sets the bool value indicating whether the reply to endpoint should
+ * be none. reply to endpoint identifies the intended receiver for
+ * replies to a message. The URI "http://www.w3.org/2005/08/addressing/none"
+ * in the reply to address indicates that no reply should be sent.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @param none AXIS2_TRUE if http://www.w3.org/2005/08/addressing/none
+ * is to be used as reply to URI, else AXIS2_FALSE
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_info_headers_set_reply_to_none(
+ struct axis2_msg_info_headers *msg_info_headers,
+ const axutil_env_t * env,
+ const axis2_bool_t none);
+
+ /**
+ * Gets the bool value indicating whether the reply to endpoint should
+ * be none. reply to endpoint identifies the intended receiver for
+ * replies related to a message. The URI
+ * "http://www.w3.org/2005/08/addressing/none"
+ * in the reply to address indicates that no reply should be sent.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if http://www.w3.org/2005/08/addressing/none
+ * is to be used as reply to URI, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_info_headers_get_reply_to_none(
+ const axis2_msg_info_headers_t * msg_info_headers,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the bool value indicating whether the reply to endpoint should
+ * be anonymous. reply to endpoint identifies the intended receiver for
+ * replies related to a message. The URI
+ * "http://www.w3.org/2005/08/addressing/anonymous"
+ * in the reply to address indicates that reply should be sent to
+ * from address.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @param anonymous AXIS2_TRUE if
+ * http://www.w3.org/2005/08/addressing/anonymous
+ * is to be used as reply to URI, else AXIS2_FALSE
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_info_headers_set_reply_to_anonymous(
+ struct axis2_msg_info_headers *msg_info_headers,
+ const axutil_env_t * env,
+ const axis2_bool_t anonymous);
+
+ /**
+ * Gets the bool value indicating whether the reply to endpoint should
+ * be anonymous. reply to endpoint identifies the intended receiver for
+ * replies related to a message. The URI
+ * "http://www.w3.org/2005/08/addressing/anonymous"
+ * in the reply to address indicates that reply should be sent to
+ * from address.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if http://www.w3.org/2005/08/addressing/anonymous
+ * is to be used as reply to URI, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_info_headers_get_reply_to_anonymous(
+ const axis2_msg_info_headers_t * msg_info_headers,
+ const axutil_env_t * env);
+
+ /**
+ * Gets fault to endpoint. fault to endpoint identifies the intended
+ * receiver for faults related to a message.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @return pointer to endpoint reference representing fault to address,
+ * returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
+ axis2_msg_info_headers_get_fault_to(
+ const axis2_msg_info_headers_t * msg_info_headers,
+ const axutil_env_t * env);
+
+ /**
+ * Sets fault to endpoint. fault to endpoint identifies the intended
+ * receiver for faults related to a message.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @param fault_to pointer to endpoint reference representing fault to
+ * address, message information headers assumes ownership of the endpoint
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_info_headers_set_fault_to(
+ struct axis2_msg_info_headers *msg_info_headers,
+ const axutil_env_t * env,
+ axis2_endpoint_ref_t * fault_to);
+
+ /**
+ * Sets the bool value indicating whether the fault to endpoint should
+ * be none. fault to endpoint identifies the intended receiver for
+ * faults related to a message. The URI
+ * "http://www.w3.org/2005/08/addressing/none"
+ * in the fault to address indicates that no fault should be sent back.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @param none AXIS2_TRUE if http://www.w3.org/2005/08/addressing/none
+ * is to be used as fault to URI, else AXIS2_FALSE
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_info_headers_set_fault_to_none(
+ struct axis2_msg_info_headers *msg_info_headers,
+ const axutil_env_t * env,
+ const axis2_bool_t none);
+
+ /**
+ * Gets the bool value indicating whether the fault to endpoint should
+ * be none. fault to endpoint identifies the intended receiver for
+ * faults related to a message. The URI
+ * "http://www.w3.org/2005/08/addressing/none"
+ * in the fault to address indicates that no fault should be sent back.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if http://www.w3.org/2005/08/addressing/none
+ * is to be used as fault to URI, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_info_headers_get_fault_to_none(
+ const axis2_msg_info_headers_t * msg_info_headers,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the bool value indicating whether the fault to endpoint should
+ * be anonymous. fault to endpoint identifies the intended receiver for
+ * faults related to a message. The URI
+ * "http://www.w3.org/2005/08/addressing/anonymous"
+ * in the fault to address indicates that fault should be sent to
+ * from address.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @param anonymous AXIS2_TRUE if
+ * http://www.w3.org/2005/08/addressing/anonymous
+ * is to be used as fault to URI, else AXIS2_FALSE
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_info_headers_set_fault_to_anonymous(
+ struct axis2_msg_info_headers *msg_info_headers,
+ const axutil_env_t * env,
+ const axis2_bool_t anonymous);
+
+ /**
+ * Gets the bool value indicating whether the fault to endpoint should
+ * be anonymous. fault to endpoint identifies the intended receiver for
+ * faults related to a message. The URI
+ * "http://www.w3.org/2005/08/addressing/anonymous"
+ * in the fault to address indicates that fault should be sent to
+ * from address.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if http://www.w3.org/2005/08/addressing/anonymous
+ * is to be used as fault to URI, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_msg_info_headers_get_fault_to_anonymous(
+ const axis2_msg_info_headers_t * msg_info_headers,
+ const axutil_env_t * env);
+
+ /**
+ * Gets WS-Addressing action. action is an absolute IRI
+ * (Internationalized Resource Identifier) that uniquely identifies
+ * the semantics implied by this message.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @return WS-Addressing action string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_msg_info_headers_get_action(
+ const axis2_msg_info_headers_t * msg_info_headers,
+ const axutil_env_t * env);
+
+ /**
+ * Sets WS-Addressing action. action is an absolute IRI
+ * (Internationalized Resource Identifier) that uniquely identifies
+ * the semantics implied by this message.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @param action WS-Addressing action string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_info_headers_set_action(
+ struct axis2_msg_info_headers *msg_info_headers,
+ const axutil_env_t * env,
+ const axis2_char_t * action);
+
+ /**
+ * Gets message ID. message ID is an absolute IRI that uniquely
+ * identifies the message.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @return message ID string.
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_msg_info_headers_get_message_id(
+ const axis2_msg_info_headers_t * msg_info_headers,
+ const axutil_env_t * env);
+
+ /**
+ * Sets message ID. message ID is an absolute URI that uniquely
+ * identifies the message. Message ID will be prefixed with "urn:uuid:"
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @param message_id message ID string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_info_headers_set_message_id(
+ struct axis2_msg_info_headers *msg_info_headers,
+ const axutil_env_t * env,
+ const axis2_char_t * message_id);
+
+ /**
+ * Sets message ID. message ID is an absolute URI that uniquely
+ * identifies the message. Message ID Given will be used.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @param message_id message ID string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_info_headers_set_in_message_id(
+ struct axis2_msg_info_headers *msg_info_headers,
+ const axutil_env_t * env,
+ const axis2_char_t * message_id);
+
+ /**
+ * Gets relates to information.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @return pointer to relates to struct, returns a reference, not a
+ * cloned copy
+ * @sa axis2_relates_to
+ */
+ AXIS2_EXTERN axis2_relates_to_t *AXIS2_CALL
+ axis2_msg_info_headers_get_relates_to(
+ const axis2_msg_info_headers_t * msg_info_headers,
+ const axutil_env_t * env);
+
+ /**
+ * Sets relates to information.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @param relates_to pointer to relates to struct, message information
+ * headers assumes ownership of struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_info_headers_set_relates_to(
+ struct axis2_msg_info_headers *msg_info_headers,
+ const axutil_env_t * env,
+ axis2_relates_to_t * relates_to);
+
+ /**
+ * Gets all reference parameters associated with message information
+ * headers.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @return pointer to array list containing all reference parameters
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_msg_info_headers_get_all_ref_params(
+ const axis2_msg_info_headers_t * msg_info_headers,
+ const axutil_env_t * env);
+
+ /**
+ * Adds a reference parameter in the form of an AXIOM node.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @param ref_param pointer to AXIOM node representing reference
+ * parameter, message information header does not assume ownership of
+ * node
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_info_headers_add_ref_param(
+ struct axis2_msg_info_headers *msg_info_headers,
+ const axutil_env_t * env,
+ axiom_node_t * ref_param);
+
+ /**
+ * Frees message information header struct.
+ * @param msg_info_headers pointer to message information headers struct
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_msg_info_headers_free(
+ struct axis2_msg_info_headers *msg_info_headers,
+ const axutil_env_t * env);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_MSG_INFO_HEADERS_H */
diff --git a/include/axis2_msg_recv.h b/include/axis2_msg_recv.h
new file mode 100644
index 0000000..ecd9bce
--- /dev/null
+++ b/include/axis2_msg_recv.h
@@ -0,0 +1,268 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_MSG_RECV_H
+#define AXIS2_MSG_RECV_H
+
+/**
+ * @defgroup axis2_receivers receivers
+ * @ingroup axis2
+ * @{
+ * @}
+ */
+
+/** @defgroup axis2_msg_recv message receiver
+ * @ingroup axis2_receivers
+ * Description.
+ * @{
+ */
+
+/**
+ * @file axis2_msg_recv.h
+ * @brief Axis Message Receiver interface. Message Receiver struct.
+ * This interface is extended by custom message receivers
+ */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <axis2_defines.h>
+#include <axis2_const.h>
+#include <axis2_svc_skeleton.h>
+#include <axis2_msg_ctx.h>
+#include <axis2_op_ctx.h>
+#include <axis2_svr_callback.h>
+#include <axis2_svc.h>
+
+ struct axis2_msg_ctx;
+
+ /** Type name for struct axis2_msg_recv*/
+ typedef struct axis2_msg_recv axis2_msg_recv_t;
+
+ typedef axis2_status_t(
+ AXIS2_CALL
+ * AXIS2_MSG_RECV_INVOKE_BUSINESS_LOGIC) (
+ axis2_msg_recv_t * msg_recv,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx * in_msg_ctx,
+ struct axis2_msg_ctx * out_msg_ctx);
+
+ typedef axis2_status_t(
+ AXIS2_CALL
+ * AXIS2_MSG_RECV_RECEIVE) (
+ axis2_msg_recv_t * msg_recv,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx * in_msg_ctx,
+ void *callback_recv_param);
+
+ typedef axis2_status_t(
+ AXIS2_CALL * AXIS2_MSG_RECV_LOAD_AND_INIT_SVC)(
+ axis2_msg_recv_t *msg_recv,
+ const axutil_env_t *env,
+ struct axis2_svc *svc);
+
+ /**
+ * Deallocate memory
+ * @param msg_recv pinter to message receiver
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_msg_recv_free(
+ axis2_msg_recv_t * msg_recv,
+ const axutil_env_t * env);
+
+ /**
+ * This method is called from axis2_engine_receive method. This method's
+ * actual implementation is decided from the create method of the
+ * extended message receiver object. There depending on the synchronous or
+ * asynchronous type, receive method is assigned with the synchronous or
+ * asynchronous implementation of receive.
+ * @see raw_xml_in_out_msg_recv_create method where receive is assigned
+ * to receive_sync
+ * @param msg_recv pointer to message receiver
+ * @param env pointer to environment struct
+ * @param in_msg_ctx pointer to in message context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_recv_receive(
+ axis2_msg_recv_t * msg_recv,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx *in_msg_ctx,
+ void *callback_recv_param);
+
+ /**
+ * This contain in out synchronous business invoke logic
+ * @param msg_recv pointer to message receiver
+ * @param env pointer to environment struct
+ * @param in_msg_ctx pointer to in message context
+ * @param out_msg_ctx pointer to out message context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_msg_recv_invoke_business_logic(
+ axis2_msg_recv_t * msg_recv,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx *in_msg_ctx,
+ struct axis2_msg_ctx *out_msg_ctx);
+
+ /**
+ * this will create a new service skeleton object
+ * @param msg_recv pointer to message receiver
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ * @return service skeleton object
+ */
+ AXIS2_EXTERN axis2_svc_skeleton_t *AXIS2_CALL
+
+ axis2_msg_recv_make_new_svc_obj(
+ axis2_msg_recv_t * msg_recv,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx *msg_ctx);
+
+ /**
+ * This will return the service skeleton object
+ * @param msg_recv pointer to message receiver
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ * @return service skeleton object
+ */
+ /*AXIS2_EXTERN axis2_svc_skeleton_t *AXIS2_CALL
+
+ axis2_msg_recv_get_impl_obj(
+ axis2_msg_recv_t * msg_recv,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx *msg_ctx);*/
+
+ /**
+ * Set the application scope
+ * @param msg_recv pointer to message receiver
+ * @param env pointer to environment struct
+ * @param scope pointer to scope
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_recv_set_scope(
+ axis2_msg_recv_t * msg_recv,
+ const axutil_env_t * env,
+ const axis2_char_t * scope);
+
+ /**
+ * Get the application scope
+ * @param msg_recv pointer to message receiver
+ * @env pointer to environment struct
+ * @return scope
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_msg_recv_get_scope(
+ axis2_msg_recv_t * msg_recv,
+ const axutil_env_t * env);
+
+ /**
+ * Delete the service skeleton object created by make_new_svc_obj
+ * @param msg_recv pointer to message receiver
+ * @env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_recv_delete_svc_obj(
+ axis2_msg_recv_t * msg_recv,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ AXIS2_EXPORT axis2_status_t AXIS2_CALL
+
+ axis2_msg_recv_set_invoke_business_logic(
+ axis2_msg_recv_t * msg_recv,
+ const axutil_env_t * env,
+ AXIS2_MSG_RECV_INVOKE_BUSINESS_LOGIC func);
+
+ AXIS2_EXPORT axis2_status_t AXIS2_CALL
+ axis2_msg_recv_set_derived(
+ axis2_msg_recv_t * msg_recv,
+ const axutil_env_t * env,
+ void *derived);
+
+ AXIS2_EXPORT void *AXIS2_CALL
+ axis2_msg_recv_get_derived(
+ const axis2_msg_recv_t * msg_recv,
+ const axutil_env_t * env);
+
+ AXIS2_EXPORT axis2_status_t AXIS2_CALL
+ axis2_msg_recv_set_receive(
+ axis2_msg_recv_t * msg_recv,
+ const axutil_env_t * env,
+ AXIS2_MSG_RECV_RECEIVE func);
+
+ AXIS2_EXPORT axis2_status_t AXIS2_CALL
+ axis2_msg_recv_set_load_and_init_svc(
+ axis2_msg_recv_t *msg_recv,
+ const axutil_env_t *env,
+ AXIS2_MSG_RECV_LOAD_AND_INIT_SVC func);
+
+ AXIS2_EXPORT axis2_status_t AXIS2_CALL
+ axis2_msg_recv_load_and_init_svc(
+ axis2_msg_recv_t *msg_recv,
+ const axutil_env_t *env,
+ struct axis2_svc *svc);
+
+ /**
+ * Create new message receiver object. usually this will be called from the
+ * extended message receiver object.
+ * @see create method of raw_xml_in_out_msg_recv
+ * @param env pointer to environment struct
+ * @return newly created message receiver object
+ **/
+ AXIS2_EXTERN axis2_msg_recv_t *AXIS2_CALL
+ axis2_msg_recv_create(
+ const axutil_env_t * env);
+
+ /**
+ * Configuration context is attached to the message receiver so that conf_ctx can be assccessed in load_and_init
+ * method at service load time.
+ * @param msg_recv axis2_msg_recv instance
+ * @param env axutil environment
+ * @param axis2_conf_ctx Configuration context instance
+ */
+ AXIS2_EXPORT void AXIS2_CALL
+ axis2_msg_recv_set_conf_ctx(
+ axis2_msg_recv_t *msg_recv,
+ const axutil_env_t *env,
+ struct axis2_conf_ctx *conf_ctx);
+
+ /**
+ * Returns the Configuration context which is attached to the message receiver
+ * @param msg_recv axis2_msg_recv instance
+ * @param env axutil environment
+ * @returns configuration context
+ */
+ AXIS2_EXPORT struct axis2_conf_ctx* AXIS2_CALL
+ axis2_msg_recv_get_conf_ctx(
+ axis2_msg_recv_t *msg_recv,
+ const axutil_env_t *env);
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_MSG_RECV_H */
diff --git a/include/axis2_op.h b/include/axis2_op.h
new file mode 100644
index 0000000..27d3520
--- /dev/null
+++ b/include/axis2_op.h
@@ -0,0 +1,724 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_OP_H
+#define AXIS2_OP_H
+
+/**
+ * @defgroup axis2_op operation
+ * @ingroup axis2_desc
+ * operation represents the static structure of an operation in a service.
+ * In Axis2 description hierarchy, an operation lives inside the service to
+ * which it belongs.
+ * operations are configured in services.xml files located in the respective
+ * service group folders of the services folder in the repository.
+ * In services.xml file, operations are declared in association with a given
+ * service. The deployment engine would create operation instances to represent
+ * those configured operations and would associate them with the respective
+ * service in the configuration.
+ * operation encapsulates data on message exchange pattern (MEP), the
+ * execution flows, engaged module information, and the message receiver
+ * associated with the operation.
+ * @{
+ */
+
+#include <axutil_param_container.h>
+#include <axis2_svc.h>
+#include <axis2_msg_recv.h>
+#include <axutil_array_list.h>
+#include <axis2_module_desc.h>
+#include <axis2_description.h>
+#include <axis2_phase_meta.h>
+#include <axis2_relates_to.h>
+#include <axis2_msg_ctx.h>
+#include <axis2_op_ctx.h>
+#include <axis2_svc_ctx.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_op */
+ typedef struct axis2_op axis2_op_t;
+
+ struct axis2_svc;
+ struct axis2_msg_recv;
+ struct axutil_param_container;
+ struct axis2_module_desc;
+ struct axis2_op;
+ struct axis2_relates_to;
+ struct axis2_op_ctx;
+ struct axis2_svc_ctx;
+ struct axis2_msg_ctx;
+ struct axis2_msg;
+ struct axis2_conf;
+
+ /** SOAP action string constant */
+#define AXIS2_SOAP_ACTION "soapAction"
+
+ /**
+ * Creates operation struct.
+ * @param env pointer to environment struct
+ * @return pointer to newly created operation
+ */
+ AXIS2_EXTERN axis2_op_t *AXIS2_CALL
+ axis2_op_create(
+ const axutil_env_t * env);
+
+ /**
+ * Frees operation.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_op_free(
+ axis2_op_t * op,
+ const axutil_env_t * env);
+
+ /**
+ * Frees operation given as a void pointer.
+ * @param op pointer to operation as a void pointer
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_op_free_void_arg(
+ void *op,
+ const axutil_env_t * env);
+
+ /**
+ * Adds a parameter to method.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param param pointer parameter to be added, operation assumes
+ * ownership of parameter
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_add_param(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axutil_param_t * param);
+
+ /**
+ * Gets named parameter.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param name name of parameter to be retrieved as a string
+ * @return pointer to named parameter if exists, else NULL. Returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_param_t *AXIS2_CALL
+ axis2_op_get_param(
+ const axis2_op_t * op,
+ const axutil_env_t * env,
+ const axis2_char_t * name);
+ /**
+ * Removes a parameter assiciated with the operation
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param param_name parameter name to be removed
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_remove_param
+ (axis2_op_t *op,
+ const axutil_env_t *env,
+ const axis2_char_t *param_name);
+
+ /**
+ * Gets all parameters.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @return pointer to array list containing all parameters, returns
+ * a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_op_get_all_params(
+ const axis2_op_t * op,
+ const axutil_env_t * env);
+
+ /**
+ * Checks if the named parameter is locked.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param param_name name of the parameter to be checked
+ * @return AXIS2_TRUE if named parameter is locked, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_op_is_param_locked(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ const axis2_char_t * param_name);
+
+ /**
+ * Sets parent. Parent of an operation is of type service.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param svc pointer to parent service, operation does not assume
+ * ownership of service
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_set_parent(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ struct axis2_svc *svc);
+
+ /**
+ * Gets parent. Parent of an operation is of type service.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @return pointer to parent service, returns a reference, not a cloned
+ * copy
+ */
+ AXIS2_EXTERN struct axis2_svc *AXIS2_CALL
+ axis2_op_get_parent(
+ const axis2_op_t * op,
+ const axutil_env_t * env);
+
+ /**
+ * Sets HTTP Method for RESTful Services.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param rest_http_method HTTP Method string, operation does not assume
+ * ownership of rest_http_method.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_set_rest_http_method(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ const axis2_char_t * rest_http_method);
+
+ /**
+ * Gets HTTP Method for RESTful Services.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @return HTTP Method string, returns a reference,
+ * not a cloned copy
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_op_get_rest_http_method(
+ const axis2_op_t * op,
+ const axutil_env_t * env);
+
+ /**
+ * Sets HTTP Location for RESTful Services.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param rest_http_location HTTP Location string, operation does not assume
+ * ownership of rest_http_location.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_set_rest_http_location(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ const axis2_char_t * rest_http_location);
+
+ /**
+ * Gets HTTP Location for RESTful Services.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @return HTTP Location string, returns a reference,
+ * not a cloned copy
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_op_get_rest_http_location(
+ const axis2_op_t * op,
+ const axutil_env_t * env);
+
+ /**
+ * Sets operation QName.
+ * @param op pointer to operation as a void pointer.
+ * @param env pointer to environment struct
+ * @param qname pointer to QName, this method creates a clone of the
+ * QName
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_set_qname(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ const axutil_qname_t * qname);
+
+ /**
+ * Gets operation QName.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @return pointer to QName, returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN const axutil_qname_t *AXIS2_CALL
+ axis2_op_get_qname(
+ void *op,
+ const axutil_env_t * env);
+
+ /**
+ * Sets operation message exchange pattern (MEP).
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param pattern message exchange pattern string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_set_msg_exchange_pattern(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ const axis2_char_t * pattern);
+
+ /**
+ * Gets operation message exchange pattern (MEP).
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @return MEP string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+
+ axis2_op_get_msg_exchange_pattern(
+ const axis2_op_t * op,
+ const axutil_env_t * env);
+
+ /**
+ * Sets message receiver. message receiver is responsible for invoking
+ * the business logic associated with the operation.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param msg_recv pointer to message receiver, operation assumes
+ * ownership of message receiver
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_set_msg_recv(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ struct axis2_msg_recv *msg_recv);
+
+ /**
+ * Gets message receiver. message receiver is responsible for invoking
+ * the business logic associated with the operation.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @return pointer to message receiver, returns a reference, not a
+ * cloned copy
+ */
+ AXIS2_EXTERN struct axis2_msg_recv *AXIS2_CALL
+ axis2_op_get_msg_recv(
+ const axis2_op_t * op,
+ const axutil_env_t * env);
+
+ /**
+ * Gets style of operation. Style is that mentioned in WSDL, either
+ * RPC or document literal.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @return string representing style
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_op_get_style(
+ const axis2_op_t * op,
+ const axutil_env_t * env);
+
+ /**
+ * Sets style of operation. Style is that mentioned in WSDL, either
+ * RPC or document literal.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param style string representing style
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_set_style(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ const axis2_char_t * style);
+
+ /**
+ * Engages given module to operation.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param module_desc pointer to module description, operation does not
+ * assume ownership of struct
+ * @param conf pointer to configuration, operation does not assume
+ * ownership of configuration
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_engage_module(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ struct axis2_module_desc *module_desc,
+ struct axis2_conf *conf);
+
+ /**
+ * Adds module description to engaged module list.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param module_dec pointer to module description, operation does not
+ * assume ownership of struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_op_add_to_engaged_module_list(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ struct axis2_module_desc *module_dec);
+
+ /**
+ * Gets all modules associated to operation.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @return pointer to array list containing module descriptions
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_op_get_all_modules(
+ const axis2_op_t * op,
+ const axutil_env_t * env);
+
+ /**
+ * Gets Axis specific MEP constant. This method simply maps the string
+ * URI of the MEP to an integer.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @return integer representing MEP
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_op_get_axis_specific_mep_const(
+ axis2_op_t * op,
+ const axutil_env_t * env);
+
+ /**
+ * Gets fault in flow. Fault in flow is the list of phases invoked
+ * when a fault happens along in path.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @return pointer to array list containing phases, returns a reference,
+ * not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_op_get_fault_in_flow(
+ const axis2_op_t * op,
+ const axutil_env_t * env);
+
+ /**
+ * Gets fault out flow. Fault out flow is the list of phases invoked
+ * when a fault happens along out path.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @return pointer to array list containing phases, returns a reference,
+ * not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_op_get_fault_out_flow(
+ const axis2_op_t * op,
+ const axutil_env_t * env);
+
+ /**
+ * Gets out flow. Out flow is the list of phases invoked
+ * along out path.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @return pointer to array list containing phases, returns a reference,
+ * not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_op_get_out_flow(
+ const axis2_op_t * op,
+ const axutil_env_t * env);
+
+ /**
+ * Gets in flow. In flow is the list of phases
+ * invoked along in path.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @return pointer to array list containing phases, returns a reference,
+ * not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_op_get_in_flow(
+ const axis2_op_t * op,
+ const axutil_env_t * env);
+
+ /**
+ * Sets fault in flow. Fault in flow is the list of phases invoked
+ * when a fault happens along in path.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param list pointer to array list containing phases, operation takes
+ * over the ownership of list
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_set_fault_in_flow(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axutil_array_list_t * list);
+
+ /**
+ * Sets fault out flow. Fault out flow is the list of phases invoked
+ * when a fault happens along out path.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param list pointer to array list containing phases, operation takes
+ * over the ownership of list
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_set_fault_out_flow(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axutil_array_list_t * list);
+
+ /**
+ * Sets out flow. Out flow is the list of phases invoked
+ * along out path.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param list pointer to array list containing phases, operation takes
+ * over the ownership of list
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_set_out_flow(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axutil_array_list_t * list);
+
+ /**
+ * Sets in flow. In flow is the list of phases
+ * invoked along in path.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param list pointer to array list containing phases, operation takes
+ * over the ownership of list
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_set_in_flow(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axutil_array_list_t * list);
+
+ /**
+ * Adds given QName to module QName list.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param module_name pointer to module QName, QName would be cloned by
+ * this method
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_add_module_qname(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ const axutil_qname_t * module_qname);
+
+ /**
+ * Gets all module QNames as a list.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @return pointer to array list containing module QNames,
+ * returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_op_get_all_module_qnames(
+ const axis2_op_t * op,
+ const axutil_env_t * env);
+
+ /**
+ * Finds operation context related to this operation using given message
+ * context and service context. This method would create a new operation
+ * context related to the operation, if one could not be found.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ * @param svc_ctx pointer to service context
+ * @return pointer to operation context, returns
+ * a reference, not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_op_ctx *AXIS2_CALL
+ axis2_op_find_op_ctx(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx *msg_ctx,
+ struct axis2_svc_ctx *svc_ctx);
+
+ /**
+ * Finds operation context related to this operation using given message
+ * context. This method will not create a new operation context if
+ * an associated operation context could not be found.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ * @return pointer to operation context if found, else NULL. Returns
+ * a reference, not a cloned copy
+
+ */
+ AXIS2_EXTERN struct axis2_op_ctx *AXIS2_CALL
+
+ axis2_op_find_existing_op_ctx(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ const struct axis2_msg_ctx *msg_ctx);
+
+ /**
+ * Registers given operation context against this operation. Registration
+ * happens within the given message context, as it is the message context
+ * that captures the state information of a given invocation.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ * @param op_ctx pointer to operation context, operation does not assume
+ * ownership of operation context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_register_op_ctx(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx *msg_ctx,
+ struct axis2_op_ctx *op_ctx);
+
+ /**
+ * Gets message with given label.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @return pointer to message corresponding to given label, returns
+ * a reference, not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_msg *AXIS2_CALL
+ axis2_op_get_msg(
+ const axis2_op_t * op,
+ const axutil_env_t * env,
+ const axis2_char_t * label);
+
+ /**
+ * Adds given message with the given label.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param label label string
+ * @param msg pointer to message
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_add_msg(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ const axis2_char_t * label,
+ const struct axis2_msg *msg);
+
+ /**
+ * Checks if the operation is from a module.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * AXIS2_TRUE if the operation is from a module, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_op_is_from_module(
+ const axis2_op_t * op,
+ const axutil_env_t * env);
+
+ /**
+ * Set the wsamapping list.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @param mapping_list list of action mappings
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_set_wsamapping_list(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axutil_array_list_t * mapping_list);
+
+ /**
+ * Get the wsamapping list.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_op_get_wsamapping_list(
+ axis2_op_t * op,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axutil_param_container_t *AXIS2_CALL
+
+ axis2_op_get_param_container(
+ const axis2_op_t * op,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_op_remove_from_engaged_module_list(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ struct axis2_module_desc *module_desc);
+
+ /**
+ * Creates operation struct for an operation defined in a module.
+ * @param env pointer to environment struct
+ * @return pointer to newly created operation
+ */
+ AXIS2_EXTERN axis2_op_t *AXIS2_CALL
+ axis2_op_create_from_module(
+ const axutil_env_t * env);
+
+ /**
+ * Creates operation struct with given QName.
+ * @param env pointer to environment struct
+ * @param name pointer to QName
+ * @return pointer to newly created operation
+ */
+ AXIS2_EXTERN axis2_op_t *AXIS2_CALL
+ axis2_op_create_with_qname(
+ const axutil_env_t * env,
+ const axutil_qname_t * name);
+
+ /**
+ * Frees the operation given as a void pointer. This method would cast the
+ * void parameter to an operation pointer and then call free method.
+ * @param pointer to operation as a void pointer
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_op_free_void_arg(
+ void *op,
+ const axutil_env_t * env);
+
+ /**
+ * Gets base description.
+ * @param op pointer to message
+ * @param env pointer to environment struct
+ * @return pointer to base description struct
+ */
+ AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+ axis2_op_get_base(
+ const axis2_op_t * op,
+ const axutil_env_t * env);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_OP_H */
diff --git a/include/axis2_op_client.h b/include/axis2_op_client.h
new file mode 100644
index 0000000..8ba764d
--- /dev/null
+++ b/include/axis2_op_client.h
@@ -0,0 +1,445 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_OP_CLIENT_H
+#define AXIS2_OP_CLIENT_H
+
+/**
+ * @defgroup axis2_client_api client API
+ * @ingroup axis2
+ * @{
+ * @}
+ */
+
+/**
+ * @defgroup axis2_op_client operation client
+ * @ingroup axis2_client_api
+ * The operation client is meant to be used by advanced users to consume services.
+ * Operation client understands a specific Message Exchange Pattern (op) and
+ * hence the behavior is defined by the op.
+ * To consume services with an operation client, an operation (of type axis2_op_t)
+ * and a service context (of type axis2_svc_ctx_t)
+ * has to be provided along with options to be used. The execute() function
+ * can be used to send the request and get the response.
+ * The service client implementation uses the operation client and provides an
+ * easy to use API for consuming services. Hence the service client
+ * implementation is a very good example of how to use the operation client API.
+ * @sa axis2_svc_client
+ * @{
+ */
+
+/**
+ * @file axis2_op_client.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_options.h>
+#include <axis2_msg_ctx.h>
+#include <axis2_callback.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_op_client */
+ typedef struct axis2_op_client axis2_op_client_t;
+
+ struct axis2_callback_recv;
+
+ /**
+ * Sets the options that is to be used by this operation client.
+ * @param op_client pointer to operation client struct
+ * @param env pointer to environment struct
+ * @param options pointer to options struct to be set
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_client_set_options(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env,
+ const axis2_options_t * options);
+
+ /**
+ * Gets options used by operation client.
+ * @param op_client pointer to operation client struct
+ * @param env pointer to environment struct
+ * @return a pointer to the options struct if options set, else NULL.
+ * Returns a reference, not a cloned copy.
+ */
+ AXIS2_EXTERN const axis2_options_t *AXIS2_CALL
+ axis2_op_client_get_options(
+ const axis2_op_client_t * op_client,
+ const axutil_env_t * env);
+
+ /**
+ * Adds a message context to the client for processing.
+ * @param op_client pointer to operation client struct
+ * @param env pointer to environment struct
+ * @param msg_ctx message context to be added. operation client takes
+ * over the ownership of the message context struct.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_client_add_msg_ctx(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * Adds out message context to the client for processing.
+ * @param op_client pointer to operation client struct
+ * @param env pointer to environment struct
+ * @param msg_ctx message context to be added. operation client takes
+ * over the ownership of the message context struct.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_client_add_out_msg_ctx(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_client_add_in_msg_ctx(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * Gets a message corresponding to the given label.
+ * @param op_client pointer to operation client struct
+ * @param env pointer to environment struct
+ * @param message_label the message label of the desired message context
+ * @return the desired message context or NULL if its not available.
+ * Returns a reference, not a cloned copy.
+ */
+ AXIS2_EXTERN const axis2_msg_ctx_t *AXIS2_CALL
+ axis2_op_client_get_msg_ctx(
+ const axis2_op_client_t * op_client,
+ const axutil_env_t * env,
+ const axis2_wsdl_msg_labels_t message_label);
+
+ /**
+ * Sets the callback to be executed when a response message is received.
+ * @param op_client pointer to operation client struct
+ * @param env pointer to environment struct
+ * @param callback the callback to be used. operation client takes
+ * over the ownership of the message context struct.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_client_set_callback(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env,
+ axis2_callback_t * callback);
+
+ /**
+ * Gets the callback.
+ * @param op_client pointer to operation client struct
+ * @param env pointer to environment struct
+ * @return callback
+ */
+ AXIS2_EXTERN axis2_callback_t *AXIS2_CALL
+ axis2_op_client_get_callback(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env);
+
+ /**
+ * Execute the op. What this does depends on the specific operation client.
+ * The basic idea is to have the operation client execute and do something
+ * with the messages that have been added to it so far. For example, if its
+ * an Out-In op, and if the Out message has been set, then executing the
+ * client asks it to send the out message and get the in message
+ * @param op_client pointer to operation client
+ * @param env pointer to environment struct
+ * @param block indicates whether execution should block or return ASAP
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_client_execute(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env,
+ const axis2_bool_t block);
+
+ /**
+ * Resets the operation client to a clean status after the op has completed.
+ * This is how you can reuse an operation client. Note that this does not reset
+ * the options; only the internal state so the client can be used again.
+ * @param op_client pointer to operation client
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_client_reset(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env);
+
+ /**
+ * Completes the execution by closing the transports if necessary.
+ * This method is useful when client uses two transports for sending and
+ * receiving.
+ * @param op_client pointer to operation client struct
+ * @param env pointer to environment struct
+ * @param msg_ctx message context which contains the transport information
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_client_complete(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * Gets the operation context of the operation client.
+ * @param op_client pointer to operation client struct
+ * @param env pointer to environment struct
+ * @return operation context related to operation client
+ */
+ AXIS2_EXTERN axis2_op_ctx_t *AXIS2_CALL
+ axis2_op_client_get_operation_context(
+ const axis2_op_client_t * op_client,
+ const axutil_env_t * env);
+
+ /**
+ * Sets callback receiver.
+ * @param op_client pointer to operation client struct
+ * @param env pointer to environment struct
+ * @param callback_recv pointer to callback receiver struct.
+ * operation client assumes ownership of the callback struct.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_client_set_callback_recv(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env,
+ struct axis2_callback_recv *callback_recv);
+
+ /**
+ * Frees the operation client
+ * @param op_client pointer to operation client struct
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_op_client_free(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env);
+
+ /**
+ * Creates an operation client struct for the specified operation, service
+ * context and given options.
+ * @param env pointer to environment struct
+ * @param op pointer to operation struct corresponding to the operation to
+ * to be executed. Newly created client assumes ownership of the operation.
+ * @param svc_ctx pointer to service context struct representing the service
+ * to be consumed. Newly created client assumes ownership of the service
+ * context.
+ * @param options options to be used by operation client. Newly created
+ * client assumes ownership of the options
+ * context.
+ * @return a pointer to newly created operation client struct,
+ * or NULL on error with error code set in environment's error
+ */
+ AXIS2_EXTERN axis2_op_client_t *AXIS2_CALL
+ axis2_op_client_create(
+ const axutil_env_t * env,
+ axis2_op_t * op,
+ axis2_svc_ctx_t * svc_ctx,
+ axis2_options_t * options);
+
+ /**
+ * Gets SOAP action.
+ * @param op_client pointer to op client struct
+ * @param env pointer to environment struct
+ * @return a pointer to SOAP action string
+ */
+ AXIS2_EXTERN axutil_string_t *AXIS2_CALL
+ axis2_op_client_get_soap_action(
+ const axis2_op_client_t * op_client,
+ const axutil_env_t * env);
+
+ /**
+ * Prepares the message context for invocation. Here the properties kept
+ * in the op_client are copied to the message context.
+ * @param op_client pointer to op client struct
+ * @param env pointer to environment struct
+ * @param op pointer operation to be invoked
+ * @param msg_ctx pointer to message context to be filled
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_client_prepare_invocation(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env,
+ axis2_op_t * op,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * Prepares the SOAP envelope using the payload.
+ * @param op_client pointer to op client struct
+ * @param env pointer to environment struct
+ * @param to_send payload to be sent in AXIOM node format
+ * @return a pointer to message context struct filled with the SOAP
+ * envelope to be sent
+ */
+ AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
+ axis2_op_client_prepare_soap_envelope(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env,
+ axiom_node_t * to_send);
+
+ /**
+ * Tries to infer the transport looking at the URL, the URL can be http://
+ * tcp:// mail:// local://. The method will look for the transport name as the
+ * protocol part of the transport.
+ * @param op_client pointer to op client struct
+ * @param env pointer to environment struct
+ * @param epr endpoint reference struct representing the endpoint URL
+ * @return pointer to the transport description with inferred information
+ */
+ AXIS2_EXTERN axis2_transport_out_desc_t *AXIS2_CALL
+ axis2_op_client_infer_transport(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env,
+ axis2_endpoint_ref_t * epr);
+
+ /**
+ * Creates default SOAP envelope.
+ * @param op_client pointer to op client struct
+ * @param env pointer to environment struct
+ * @return pointer to default SOAP envelope created
+ */
+ AXIS2_EXTERN axiom_soap_envelope_t *AXIS2_CALL
+ axis2_op_client_create_default_soap_envelope(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env);
+
+ /**
+ * Engage named module. The named module must have been configured in
+ * the Axis2 configuration. For a module to be detected by the
+ * deployment engine, the modules has to be placed in the
+ * AXIS2_REPOSITORY/modules directory.
+ * @param op_client pointer to op client struct
+ * @param env pointer to environment struct
+ * @param qname QName representing the module name
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_client_engage_module(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env,
+ const axutil_qname_t * qname);
+
+ /**
+ * Sets SOAP version URI.
+ * @param op_client pointer to op client struct
+ * @param env pointer to environment struct
+ * @param soap_version_uri SOAP version URI
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_client_set_soap_version_uri(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env,
+ const axis2_char_t * soap_version_uri);
+
+ /**
+ * Sets SOAP action.
+ * @param op_client pointer to op client struct
+ * @param env pointer to environment struct
+ * @param soap_action SOAP action
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_client_set_soap_action(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env,
+ axutil_string_t * soap_action);
+
+ /**
+ * Sets WSA action.
+ * @param op_client pointer to op client struct
+ * @param env pointer to environment struct
+ * @param wsa_action Web services Addressing action
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_client_set_wsa_action(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env,
+ const axis2_char_t * wsa_action);
+
+ /**
+ * Gets service context.
+ * @param op_client pointer to op client struct
+ * @param env pointer to environment struct
+ * @return pointer to service context struct if set, else NULL
+ */
+ AXIS2_EXTERN axis2_svc_ctx_t *AXIS2_CALL
+ axis2_op_client_get_svc_ctx(
+ const axis2_op_client_t * op_client,
+ const axutil_env_t * env);
+
+
+ /**
+ * Sets whether to reuse op client.
+ * @param op_client pointer to op client struct
+ * @param env pointer to environment struct
+ * @param reuse flag is a boolean value
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_op_client_set_reuse(
+ axis2_op_client_t * op_client,
+ const axutil_env_t * env,
+ axis2_bool_t reuse);
+
+ /**
+ * Sends a message represented by the given message context and captures
+ * the response in return message context.
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context representing the message to
+ * be sent
+ * @return message context representing the received response
+ */
+ AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
+ axis2_op_client_two_way_send(
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * Receives a message corresponding to a request depicted by given
+ * message context.
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context representing the response to
+ * be received
+ * @return message context representing the received response
+ */
+ AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
+ axis2_op_client_receive(
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_OP_CLIENT_H */
diff --git a/include/axis2_op_ctx.h b/include/axis2_op_ctx.h
new file mode 100644
index 0000000..f29ec60
--- /dev/null
+++ b/include/axis2_op_ctx.h
@@ -0,0 +1,307 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_OP_CTX_H
+#define AXIS2_OP_CTX_H
+
+/**
+ * @defgroup axis2_op_ctx operation context
+ * @ingroup axis2_context
+ * operation context represents a running "instance" of an operation.
+ * operation context allows messages to be grouped into operations as in
+ * WSDL 2.0 specification. operations are essentially arbitrary message exchange
+ * patterns (MEP). So as messages are being exchanged, operation context remembers
+ * the state of message exchange pattern specifics.
+ * The implementation of operation context supports MEPs which have one input
+ * message and/or one output message. In order to support other MEPs one must
+ * extend this struct.
+ * @{
+ */
+
+/**
+ * @file axis2_op_ctx.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_hash.h>
+#include <axutil_env.h>
+#include <axis2_msg_ctx.h>
+#include <axis2_op.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_op_ctx */
+ typedef struct axis2_op_ctx axis2_op_ctx_t;
+
+ struct axis2_svc_ctx;
+
+ /**
+ * Creates an operation context struct instance.
+ * @param env pointer to environment struct
+ * @param op pointer to operation that is related to operation context.
+ * operation context does not assume the ownership of the struct
+ * @param svc_ctx pointer to parent service context
+ * @return pointer to newly created operation context
+ */
+ AXIS2_EXTERN axis2_op_ctx_t *AXIS2_CALL
+ axis2_op_ctx_create(
+ const axutil_env_t * env,
+ struct axis2_op *op,
+ struct axis2_svc_ctx *svc_ctx);
+
+ /**
+ * Gets base which is of context type.
+ * @param op_ctx pointer to operation context
+ * @param env pointer to environment struct
+ * @return pointer to base context
+ */
+ AXIS2_EXTERN axis2_ctx_t *AXIS2_CALL
+ axis2_op_ctx_get_base(
+ const axis2_op_ctx_t * op_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Frees operation context.
+ * @param op_ctx pointer to operation context
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_op_ctx_free(
+ struct axis2_op_ctx *op_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Initializes operation context. This method traverses through all the
+ * message contexts stored within it and initialize them all.
+ * @param op_ctx pointer to operation context
+ * @param env pointer to environment struct
+ * @param conf pointer to conf configuration
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_ctx_init(
+ struct axis2_op_ctx *op_ctx,
+ const axutil_env_t * env,
+ struct axis2_conf *conf);
+
+ /**
+ * Gets operation the operation context is related to.
+ * @param op_ctx pointer to operation context
+ * @param env pointer to environment struct
+ * @return pointer to operation
+ */
+ AXIS2_EXTERN struct axis2_op *AXIS2_CALL
+ axis2_op_ctx_get_op(
+ const axis2_op_ctx_t * op_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets parent which is of service context type.
+ * @param op_ctx pointer to operation context
+ * @param env pointer to environment struct
+ * @return pointer to service context within which this operation
+ * context lives
+ */
+ AXIS2_EXTERN struct axis2_svc_ctx *AXIS2_CALL
+ axis2_op_ctx_get_parent(
+ const axis2_op_ctx_t * op_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Adds a message context.
+ * @param op_ctx pointer to operation context
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ * does not assume the ownership of the struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_ctx_add_msg_ctx(
+ struct axis2_op_ctx *op_ctx,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * Gets message context with the given message ID.
+ * @param op_ctx pointer to operation context
+ * @param env pointer to environment struct
+ * @param message_id message label of type axis2_wsdl_msg_labels_t.
+ * This can be one of AXIS2_WSDL_MESSAGE_LABEL_IN or AXIS2_WSDL_MESSAGE_LABEL_OUT
+ * from the axis2_wsdl_msg_labels enum.
+ * @return pointer to message context with given ID
+ */
+ AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
+ axis2_op_ctx_get_msg_ctx(
+ const axis2_op_ctx_t * op_ctx,
+ const axutil_env_t * env,
+ const axis2_wsdl_msg_labels_t message_id);
+
+ /**
+ * Gets the bool value indicating if the MEP is complete.
+ * MEP is considered complete when all the messages that
+ * are associated with the MEP has arrived.
+ * @param op_ctx pointer to operation context
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if MEP invocation is complete, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_op_ctx_get_is_complete(
+ const axis2_op_ctx_t * op_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the bool value indicating if the MEP is complete.
+ * MEP is considered complete when all the messages that
+ * are associated with the MEP has arrived.
+ * @param op_ctx pointer to operating context
+ * @param env pointer to environment struct
+ * @param is_complete AXIS2_TRUE if MEP invocation is complete, else
+ * AXIS2_FALSE
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_ctx_set_complete(
+ struct axis2_op_ctx *op_ctx,
+ const axutil_env_t * env,
+ axis2_bool_t is_complete);
+
+ /**
+ * Cleans up the operation context. Clean up includes removing all
+ * message context references recorded in operation context.
+ * @param op_ctx pointer to operation context
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_ctx_cleanup(
+ struct axis2_op_ctx *op_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets parent service context.
+ * @param op_ctx pointer to operation context
+ * @param env pointer to environment struct
+ * @param svc_ctx pointer to service context, message context does not
+ * assume the ownership of the struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_ctx_set_parent(
+ struct axis2_op_ctx *op_ctx,
+ const axutil_env_t * env,
+ struct axis2_svc_ctx *svc_ctx);
+
+ /**
+ * Gets the message context map.
+ * @param op_ctx pointer to operation context
+ * @param env pointer to environment struct
+ * @return pointer to hash table containing message contexts
+ */
+ AXIS2_EXTERN axis2_msg_ctx_t **AXIS2_CALL
+ axis2_op_ctx_get_msg_ctx_map(
+ const axis2_op_ctx_t * op_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the bool value indicating the status of response.
+ * @param op_ctx pointer to operation context
+ * @param env pointer to environment struct
+ * @param response_written AXIS2_TRUE if response is written, else
+ * AXIS2_FALSE
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_ctx_set_response_written(
+ axis2_op_ctx_t * op_ctx,
+ const axutil_env_t * env,
+ const axis2_bool_t response_written);
+
+ /**
+ * Checks the response status, whether it is written or not.
+ * @param op_ctx pointer to operation context
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if response is already written, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_op_ctx_get_response_written(
+ const axis2_op_ctx_t * op_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Destroys mutex used to synchronize the read/write operations
+ * @param op_ctx pointer to operation context
+ * @param env pointer to environment struct
+ * @return returns void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_op_ctx_destroy_mutex(
+ struct axis2_op_ctx *op_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Checks whether op_ctx is in use. This is necessary when destroying the
+ * thread mutex at the http_worker to check whether the operation context
+ * is still in use
+ * @param op_ctx pointer to operation context
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if still in use, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_op_ctx_is_in_use(
+ const axis2_op_ctx_t * op_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Set operation context's is_in_use attribute. This is necessary when
+ * destroying the thread mutex at the http_worker to check whether the
+ * operation context is still in use
+ * @param op_ctx pointer to operation context
+ * @param env pointer to environment struct
+ * @param is_in_use AXIS2_TRUE if still in use, else AXIS2_FALSE
+ * @return AXIS2_TRUE if still in use, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_ctx_set_in_use(
+ struct axis2_op_ctx *op_ctx,
+ const axutil_env_t * env,
+ axis2_bool_t is_in_use);
+
+ /**
+ * Incrementing the op_ctx ref count. This is necessary when
+ * prevent freeing op_ctx through op_client when it is in use
+ * as in sandesha where the msg_cts is stored.
+ * @param op_ctx pointer to operation context
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if still in use, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_op_ctx_increment_ref(
+ axis2_op_ctx_t * op_ctx,
+ const axutil_env_t * env);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_OP_CTX_H */
diff --git a/include/axis2_options.h b/include/axis2_options.h
new file mode 100644
index 0000000..4ed2185
--- /dev/null
+++ b/include/axis2_options.h
@@ -0,0 +1,848 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_OPTIONS_H
+#define AXIS2_OPTIONS_H
+
+/** @defgroup axis2_options options
+ * @ingroup axis2_client_api
+ * The options struct holds user options to be used by client when invocation
+ * services. In addition to the end point reference information, options
+ * struct also hold addressing, transport and timeout related information.
+ * User specific properties could also set on top of options.
+ * @{
+ */
+
+/**
+ * @file axis2_options.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_transport_in_desc.h>
+#include <axis2_endpoint_ref.h>
+#include <axutil_hash.h>
+#include <axis2_relates_to.h>
+#include <axis2_transport_out_desc.h>
+#include <axis2_transport_receiver.h>
+#include <axiom_element.h>
+#include <axis2_msg_info_headers.h>
+
+/** Default timeout */
+#define AXIS2_DEFAULT_TIMEOUT_MILLISECONDS 30000
+
+/** Timeout in seconds waiting for a response envelope */
+#define AXIS2_TIMEOUT_IN_SECONDS "time_out"
+
+/** Copy properties */
+#define AXIS2_COPY_PROPERTIES "copy_properties"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_options */
+ typedef struct axis2_options axis2_options_t;
+
+ /**
+ * Gets Web Services Addressing (WSA) action.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return WSA action string if set, else NULL
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_options_get_action(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Gets WSA fault to address.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return pointer to endpoint reference struct representing fault to
+ * address if set, else NULL
+ */
+ AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
+ axis2_options_get_fault_to(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Gets WSA from address.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return pointer to endpoint reference struct representing from
+ * address if set, else NULL
+ */
+ AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
+ axis2_options_get_from(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Gets transport receiver.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return pointer to transport receiver struct if set, else NULL
+ */
+ AXIS2_EXTERN axis2_transport_receiver_t *AXIS2_CALL
+ axis2_options_get_transport_receiver(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Gets transport in.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return pointer to transport in struct if set, else NULL
+ */
+ AXIS2_EXTERN axis2_transport_in_desc_t *AXIS2_CALL
+ axis2_options_get_transport_in(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Gets transport in protocol.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return pointer to transport in protocol string if set, else NULL
+ */
+ AXIS2_EXTERN AXIS2_TRANSPORT_ENUMS AXIS2_CALL
+ axis2_options_get_transport_in_protocol(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Gets message ID.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return pointer to message ID string if set, else NULL
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_options_get_message_id(
+ const axis2_options_t * options_t,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the properties hash map.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return pointer to properties hash map if set, else NULL
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_options_get_properties(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Gets a property corresponding to the given key.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param key key of the property to be returned
+ * @return value corresponding to the given key
+ */
+ AXIS2_EXTERN void *AXIS2_CALL
+ axis2_options_get_property(
+ const axis2_options_t * options,
+ const axutil_env_t * env,
+ const axis2_char_t * key);
+
+ /**
+ * Gets relates to information.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return pointer to relates to struct if set, else NULL
+ */
+ AXIS2_EXTERN axis2_relates_to_t *AXIS2_CALL
+ axis2_options_get_relates_to(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Gets WSA reply to address.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return pointer to endpoint reference struct representing reply to
+ * address if set, else NULL
+ */
+ AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
+ axis2_options_get_reply_to(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Gets transport out.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return pointer to transport out struct if set, else NULL
+ */
+ AXIS2_EXTERN axis2_transport_out_desc_t *AXIS2_CALL
+ axis2_options_get_transport_out(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Gets transport out protocol.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return pointer to transport out protocol string if set, else NULL
+ */
+ AXIS2_EXTERN AXIS2_TRANSPORT_ENUMS AXIS2_CALL
+ axis2_options_get_sender_transport_protocol(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Gets SOAP version URI.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return string representing SOAP version URI
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_options_get_soap_version_uri(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the wait time after which a client times out in a blocking scenario.
+ * The default is AXIS2_DEFAULT_TIMEOUT_MILLISECONDS.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return timeout in milliseconds
+ */
+ AXIS2_EXTERN long AXIS2_CALL
+ axis2_options_get_timeout_in_milli_seconds(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Gets WSA to address.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return pointer to endpoint reference struct representing to
+ * address if set, else NULL
+ */
+ AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
+ axis2_options_get_to(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Gets use separate listener status.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if using separate listener, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_options_get_use_separate_listener(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the parent options.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return pointer to the parent options struct if set, else NULL
+ */
+ AXIS2_EXTERN axis2_options_t *AXIS2_CALL
+ axis2_options_get_parent(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the parent options.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param parent pointer to parent options struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_parent(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const axis2_options_t * parent);
+
+ /**
+ * Sets WSA action
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param action pointer to action string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_action(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const axis2_char_t * action);
+
+ /**
+ * Sets fault to address.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param fault_to pointer to endpoint reference struct representing
+ * fault to address. options takes over the ownership of the struct.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_fault_to(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ axis2_endpoint_ref_t * fault_to);
+
+ /**
+ * Sets from address.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param from pointer to endpoint reference struct representing
+ * from to address. options takes over the ownership of the struct.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_from(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ axis2_endpoint_ref_t * from);
+
+ /**
+ * sets from address.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param to pointer to endpoint reference struct representing
+ * to address. Options takes over the ownership of the struct.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_to(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ axis2_endpoint_ref_t * to);
+
+ /**
+ * Sets transport receiver.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param receiver pointer to transport receiver struct. options takes
+ * over the ownership of the struct.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_transport_receiver(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ axis2_transport_receiver_t * receiver);
+
+ /**
+ * Sets transport in description.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param transport_in pointer to transport_in struct. options takes
+ * over the ownership of the struct.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_transport_in(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ axis2_transport_in_desc_t * transport_in);
+
+ /**
+ * Sets transport in protocol.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param in_protocol pointer to in_protocol struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_transport_in_protocol(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const AXIS2_TRANSPORT_ENUMS transport_in_protocol);
+
+ /**
+ * Sets message ID.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param message_id pointer to message_id struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_message_id(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const axis2_char_t * message_id);
+
+ /**
+ * Sets the properties hash map.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param properties pointer to properties hash map. options takes
+ * over the ownership of the hash struct.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_properties(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ axutil_hash_t * properties);
+
+ /**
+ * Sets a property with the given key value.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param property_key property key string
+ * @param property pointer to property to be set
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_property(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const axis2_char_t * property_key,
+ const void *property);
+
+ /**
+ * Sets relates to.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param relates_to pointer to relates_to struct. options takes
+ * over the ownership of the struct.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_relates_to(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ axis2_relates_to_t * relates_to);
+
+ /**
+ * Sets reply to address.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param reply_to pointer to endpoint reference struct representing
+ * reply to address. options takes over the ownership of the struct.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_reply_to(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ axis2_endpoint_ref_t * reply_to);
+
+ /**
+ * Sets the transport out description.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param transport_out pointer to transport out description struct.
+ * options takes over the ownership of the struct.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_transport_out(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ axis2_transport_out_desc_t * transport_out);
+
+ /**
+ * Sets the sender transport.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param sender_transport name of the sender transport to be set
+ * @param conf pointer to conf struct, it is from the conf that the
+ * transport is picked with the given name
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_sender_transport(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const AXIS2_TRANSPORT_ENUMS sender_transport,
+ axis2_conf_t * conf);
+
+ /**
+ * Sets the SOAP version URI.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param soap_version_uri URI of the SOAP version to be set, can be
+ * either AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI or
+ * AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_soap_version_uri(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const axis2_char_t * soap_version_uri);
+
+ /**
+ * Sets timeout in Milli seconds.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param timeout_in_milli_seconds timeout in milli seconds
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_timeout_in_milli_seconds(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const long timeout_in_milli_seconds);
+
+ /**
+ * Sets transport information. Transport information includes the name
+ * of the sender transport, name of the receiver transport and if a
+ * separate listener to be used to receive response.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param sender_transport name of sender transport to be used
+ * @param receiver_transport name of receiver transport to be used
+ * @param use_separate_listener bool value indicating whether to use
+ * a separate listener or not.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_transport_info(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const AXIS2_TRANSPORT_ENUMS sender_transport,
+ const AXIS2_TRANSPORT_ENUMS receiver_transport,
+ const axis2_bool_t use_separate_listener);
+
+ /**
+ * Sets the bool value indicating whether to use a separate listener or not.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param use_separate_listener bool value indicating whether to use
+ * a separate listener or not.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_use_separate_listener(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const axis2_bool_t use_separate_listener);
+
+ /**
+ * Adds a WSA reference parameter.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param reference_parameter pointer to reference parameter in the form
+ * of an AXIOM tree. options takes over the ownership of the struct.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_add_reference_parameter(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ axiom_node_t * reference_parameter);
+
+ /**
+ * Gets manage session bool value.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if session is managed, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_options_get_manage_session(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Sets manage session bool value.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param manage_session manage session bool value
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_manage_session(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const axis2_bool_t manage_session);
+
+ /**
+ * Sets WSA message information headers.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param pointer to message information headers struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_msg_info_headers(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ axis2_msg_info_headers_t * msg_info_headers);
+
+ /**
+ * Gets WSA message information headers.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return pointer to message information headers struct if set,
+ * else NULL
+ */
+ AXIS2_EXTERN axis2_msg_info_headers_t *AXIS2_CALL
+ axis2_options_get_msg_info_headers(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Gets SOAP version.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return AXIOM_SOAP11 if SOAP version 1.1 is in use, else AXIOM_SOAP12
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_options_get_soap_version(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Sets SOAP version.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param soap_version soap version, either AXIOM_SOAP11 or AXIOM_SOAP12
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_soap_version(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const int soap_version);
+
+ /**
+ * Enable/disable MTOM handling.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param enable_mtom AXIS2_TRUE if MTOM is to be enabled, AXIS2_FALSE
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_enable_mtom(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ axis2_bool_t enable_mtom);
+
+ /**
+ * Gets Enable/disable MTOM status.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if MTOM enabled, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_options_get_enable_mtom(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Gets SOAP action.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return SOAP Action string if set, else NULL
+ */
+ AXIS2_EXTERN axutil_string_t *AXIS2_CALL
+ axis2_options_get_soap_action(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Sets SOAP action
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param action pointer to SOAP action string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_soap_action(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ axutil_string_t * soap_action);
+
+ /**
+ * Sets xml parser reset
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param reset flag is a boolean value
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_xml_parser_reset(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const axis2_bool_t paser_reset_flag);
+
+ /**
+ * Gets xml parser reset value,
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return xml parser reset boolean value
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_options_get_xml_parser_reset(
+ const axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Frees options struct.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_options_free(
+ axis2_options_t * options,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the bool value indicating whether to enable REST or not.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param enable_rest bool value indicating whether to enable REST
+ * or not, AXIS2_TRUE to enable, AXIS2_FALSE to disable
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_enable_rest(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const axis2_bool_t enable_rest);
+
+ /**
+ * Sets the bool value indicating whether to test whether HTTP
+ * Authentication is required or not.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param test_http_auth bool value indicating whether to test
+ * or not, AXIS2_TRUE to enable, AXIS2_FALSE to disable
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_test_http_auth(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const axis2_bool_t test_http_auth);
+
+ /**
+ * Sets the bool value indicating whether to test whether Proxy
+ * Authentication is required or not.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param test_proxy_auth bool value indicating whether to test
+ * or not, AXIS2_TRUE to enable, AXIS2_FALSE to disable
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_test_proxy_auth(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const axis2_bool_t test_proxy_auth);
+
+ /**
+ * Sets the HTTP method to be used
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param http_method string representing HTTP method to use,
+ * can be either AXIS2_HTTP_GET or AXIS2_HTTP_POST
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_http_method(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const axis2_char_t * http_method);
+
+ /**
+ * Sets the Additional HTTP Headers to be sent.
+ * @param options pointer to options struct
+ * @param env pointer to environment struct
+ * @param http_header_list array list containing
+ * HTTP Headers.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_http_headers(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ axutil_array_list_t * http_header_list);
+
+ /**
+ * Creates the options struct.
+ * @param env pointer to environment struct
+ * @return a pointer to newly created options struct, or NULL on error
+ * with error code set in environment's error.
+ */
+ AXIS2_EXTERN axis2_options_t *AXIS2_CALL
+ axis2_options_create(
+ const axutil_env_t * env);
+
+ /**
+ * Creates the options struct with given parent.
+ * @param env pointer to environment struct
+ * @param parent pointer to parent struct
+ * @return a pointer to newly created options struct. Newly created options
+ * assumes ownership of the parent
+ * or NULL on error with error code set in environment's error.
+ */
+ AXIS2_EXTERN axis2_options_t *AXIS2_CALL
+ axis2_options_create_with_parent(
+ const axutil_env_t * env,
+ axis2_options_t * parent);
+
+ /**
+ * Sets HTTP authentication information.
+ * @param env pointer to environment struct
+ * @param parent pointer to parent struct
+ * @param username string representing username
+ * @param password string representing password
+ * @param auth_type use "Basic" to force basic authentication
+ * and "Digest" to force digest authentication or NULL for not
+ * forcing authentication
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_http_auth_info(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const axis2_char_t * username,
+ const axis2_char_t * password,
+ const axis2_char_t * auth_type);
+
+ /**
+ * Sets proxy authentication information.
+ * @param env pointer to environment struct
+ * @param parent pointer to parent struct
+ * @param username string representing username
+ * @param password string representing password
+ * @param auth_type use "Basic" to force basic authentication
+ * and "Digest" to force digest authentication or NULL for not
+ * forcing authentication
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_options_set_proxy_auth_info(
+ axis2_options_t * options,
+ const axutil_env_t * env,
+ const axis2_char_t * username,
+ const axis2_char_t * password,
+ const axis2_char_t * auth_type);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_OPTIONS_H */
diff --git a/include/axis2_out_transport_info.h b/include/axis2_out_transport_info.h
new file mode 100644
index 0000000..1161062
--- /dev/null
+++ b/include/axis2_out_transport_info.h
@@ -0,0 +1,115 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_OUT_TRANSPORT_INFO_H
+#define AXIS2_OUT_TRANSPORT_INFO_H
+
+/**
+ * @defgroup axis2_out_transport_info out transport info
+ * @ingroup axis2_core_trans
+ * Description
+ * @{
+ */
+
+/**
+ * @file axis2_out_transport_info.h
+ * @brief axis2 Out Transport Info
+ */
+
+#include <axis2_const.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_out_transport_info */
+ typedef struct axis2_out_transport_info axis2_out_transport_info_t;
+
+ typedef struct axis2_out_transport_info_ops axis2_out_transport_info_ops_t;
+
+ struct axis2_out_transport_info_ops
+ {
+ axis2_status_t(
+ AXIS2_CALL
+ * set_content_type)(
+ axis2_out_transport_info_t * info,
+ const axutil_env_t * env,
+ const axis2_char_t * content_type);
+
+ axis2_status_t(
+ AXIS2_CALL
+ * set_char_encoding)(
+ axis2_out_transport_info_t * info,
+ const axutil_env_t * env,
+ const axis2_char_t * encoding);
+
+ axis2_status_t(
+ AXIS2_CALL
+ * set_cookie_header)(
+ axis2_out_transport_info_t * info,
+ const axutil_env_t * env,
+ const axis2_char_t * cookie_header);
+
+ axis2_status_t(
+ AXIS2_CALL
+ * set_session)(
+ axis2_out_transport_info_t * info,
+ const axutil_env_t * env,
+ const axis2_char_t * session_id,
+ const axis2_char_t * session_value);
+
+ void(
+ AXIS2_CALL
+ * free)(
+ axis2_out_transport_info_t * info,
+ const axutil_env_t * env);
+ };
+
+ struct axis2_out_transport_info
+ {
+ const axis2_out_transport_info_ops_t *ops;
+ };
+
+ /** Set content type. */
+#define AXIS2_OUT_TRANSPORT_INFO_SET_CONTENT_TYPE(out_transport_info, \
+ env, content_type) ((out_transport_info->ops)->set_content_type(out_transport_info, env, content_type))
+
+ /** Set cahr encoding. */
+#define AXIS2_OUT_TRANSPORT_INFO_SET_CHAR_ENCODING(out_transport_info, \
+ env, encoding) ((out_transport_info->ops)->set_char_encoding(out_transport_info, env, encoding))
+
+ /** Set cookie header. */
+#define AXIS2_OUT_TRANSPORT_INFO_SET_COOKIE_HEADER(out_transport_info, \
+ env, cookie_header) ((out_transport_info->ops)->set_cookie_header(out_transport_info, env, cookie_header))
+
+ /** Set session. */
+#define AXIS2_OUT_TRANSPORT_INFO_SET_SESSION(out_transport_info, \
+ env, session_id, session_value) ((out_transport_info->ops)->set_session(out_transport_info, env, session_id, session_value))
+
+ /** Free. */
+#define AXIS2_OUT_TRANSPORT_INFO_FREE(out_transport_info, env)\
+ ((out_transport_info->ops)->free(out_transport_info, env))
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_OUT_TRANSPORT_INFO_H */
diff --git a/include/axis2_phase.h b/include/axis2_phase.h
new file mode 100644
index 0000000..e0231d8
--- /dev/null
+++ b/include/axis2_phase.h
@@ -0,0 +1,352 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_PHASE_H
+#define AXIS2_PHASE_H
+
+/**
+ * @defgroup axis2_phase phases
+ * @ingroup axis2_engine
+ * phase is a logical unit of execution in the Axis2 engine's execution flows.
+ * A phase encapsulates one or more handlers in a given sequence to be invoked.
+ * The sequencing of handlers within a phase are often defined by module
+ * configuration which specifies where in the phase's handler chain a given
+ * handler should be placed.
+ * Calling invoke on phase triggers invoke on the handlers stored within the
+ * phase in the sequence they are ordered.
+ * @{
+ */
+
+/**
+ * @file axis2_phase.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_handler.h>
+#include <axis2_handler_desc.h>
+#include <axutil_array_list.h>
+#include <axutil_qname.h>
+
+/**
+ * A given handler's location within the list of handlers is before a particular
+ * handler and after another particular handler.
+ */
+#define AXIS2_PHASE_BOTH_BEFORE_AFTER 0
+
+/**
+ * A given handler's location within the list of handlers is before another
+ * given handler.
+ */
+#define AXIS2_PHASE_BEFORE 1
+
+/**
+ * A given handler's location within the list of handlers is after another
+ * given handler.
+ */
+#define AXIS2_PHASE_AFTER 2
+
+/**
+ * A given handler's location within the list of handlers could be anywhere in
+ * the list.
+ */
+#define AXIS2_PHASE_ANYWHERE 3
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for axis2_phase */
+ typedef struct axis2_phase axis2_phase_t;
+
+ struct axis2_msg_ctx;
+
+ /**
+ * Adds given handler to the specified position in the handler array list.
+ * @param phase pointer to phase struct
+ * @param env pointer to environment struct
+ * @param index index
+ * @param handler pointer to handler, phase does not assume the
+ * ownership of the handler
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_add_handler_at(
+ axis2_phase_t * phase,
+ const axutil_env_t * env,
+ const int index,
+ axis2_handler_t * handler);
+
+ /**
+ * Adds the given handler to the end of the handler list.
+ * @param phase pointer to phase
+ * @param env pointer to environment struct
+ * @param handler pointer to handler, phase does not assume the
+ * ownership of the handler
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_add_handler(
+ axis2_phase_t * phase,
+ const axutil_env_t * env,
+ axis2_handler_t * handler);
+
+ /**
+ * Remove the given handler from the handler list.
+ * @param phase pointer to phase
+ * @param env pointer to environment struct
+ * @param handler pointer to handler, phase does not assume the
+ * ownership of the handler
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_remove_handler(
+ axis2_phase_t * phase,
+ const axutil_env_t * env,
+ axis2_handler_t * handler);
+
+ /**
+ * Invokes the phase. This function will in turn call invoke method of
+ * each handler in the handler list, in sequence, starting from the
+ * beginning of the list to the end of the list.
+ * @param phase pointer to phase
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_invoke(
+ axis2_phase_t * phase,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx *msg_ctx);
+
+ /**
+ * Gets phase name.
+ * @param phase pointer to phase
+ * @param env pointer to environment struct
+ * @return returns name of phase
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_phase_get_name(
+ const axis2_phase_t * phase,
+ const axutil_env_t * env);
+
+ /**
+ * Gets handler count in the handler list.
+ * @param phase pointer to phase
+ * @param env pointer to environment struct
+ * @return the number of handlers in the handler list
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_phase_get_handler_count(
+ const axis2_phase_t * phase,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the first handler in the handler list.
+ * @param phase pointer to phase
+ * @param env pointer to environment struct
+ * @param handler pointer to handler, phase does not assume the
+ * ownership of the handler
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_set_first_handler(
+ axis2_phase_t * phase,
+ const axutil_env_t * env,
+ axis2_handler_t * handler);
+
+ /**
+ * Sets the last handler in the handler list.
+ * @param phase pointer to phase
+ * @param env pointer to environment struct
+ * @param handler pointer to handler, phase does not assume the
+ * ownership of the handler
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_set_last_handler(
+ axis2_phase_t * phase,
+ const axutil_env_t * env,
+ axis2_handler_t * handler);
+
+ /**
+ * Adds handler within the handler description to the list of handlers
+ * in the phase.
+ * @param phase pointer to phase
+ * @param env pointer to environment struct
+ * @param handler_desc pointer to handler description, phase does not
+ * assume the ownership of neither the handler description not the handler
+ * within the handler description
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_add_handler_desc(
+ axis2_phase_t * phase,
+ const axutil_env_t * env,
+ axis2_handler_desc_t * handler_desc);
+
+ /**
+ * Remove handler within the handler description from the list of handlers
+ * in the phase.
+ * @param phase pointer to phase
+ * @param env pointer to environment struct
+ * @param handler_desc pointer to handler description, phase does not
+ * assume the ownership of neither the handler description not the handler
+ * within the handler description
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_remove_handler_desc(
+ axis2_phase_t * phase,
+ const axutil_env_t * env,
+ axis2_handler_desc_t * handler_desc);
+
+ /**
+ * Inserts the handler into handler list of the phase based on the phase
+ * rules associated with the handler. This function takes into account
+ * the before rules of the handler. Before rules specify the location
+ * of a current handler in the handler list, before which the given
+ * handler is to be placed.
+ * @param phase pointer to phase
+ * @param env pointer to environment struct
+ * @param handler pointer to handler, phase does not assume the
+ * ownership of the handler
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_insert_before(
+ axis2_phase_t * phase,
+ const axutil_env_t * env,
+ axis2_handler_t * handler);
+
+ /**
+ * Inserts the handler into handler list of the phase based on the phase
+ * rules associated with the handler. This function takes into account
+ * the after rules of the handler. After rules specify the location
+ * of a current handler in the handler list, after which the given
+ * handler is to be placed.
+ * @param phase pointer to phase
+ * @param env pointer to environment struct
+ * @param handler pointer to handler, phase does not assume the
+ * ownership of the handler
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_insert_after(
+ axis2_phase_t * phase,
+ const axutil_env_t * env,
+ axis2_handler_t * handler);
+
+ /**
+ * Inserts the handler into handler list of the phase based on both
+ * before and after phase rules associated with the handler.
+ * This method assume that both the before and after cannot be the same
+ * handler . That condition is not checked by this function.
+ * It should be checked before calling this function
+ * @param phase pointer to phase
+ * @param env pointer to environment struct
+ * @param handler pointer to handler, phase does not assume the
+ * ownership of the handler
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_phase_insert_before_and_after(
+ axis2_phase_t * phase,
+ const axutil_env_t * env,
+ axis2_handler_t * handler);
+
+ /**
+ * Inserts the handler to the correct location in the handler list of
+ * the phase. Location is evaluated based on the phase rules.
+ * @param phase pointer to phase
+ * @param env pointer to environment struct
+ * @param handler_desc pointer to handler description, phase does not
+ * assume the ownership of neither the handler description not the handler
+ * within the handler description
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_insert_handler_desc(
+ axis2_phase_t * phase,
+ const axutil_env_t * env,
+ axis2_handler_desc_t * handler_desc);
+
+ /**
+ * Gets all the handlers in the phase.
+ * @param phase pointer to phase
+ * @param env pointer to environment struct
+ * @return pointer to array list containing the list of handlers
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_phase_get_all_handlers(
+ const axis2_phase_t * phase,
+ const axutil_env_t * env);
+
+ /**
+ * Invokes handlers starting from the given handler index.
+ * @param phase pointer to phase
+ * @param env pointer to environment struct
+ * @param paused_handler_index index of the handler to start the
+ * invocation from
+ * @param msg_ctx pointer to message context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_phase_invoke_start_from_handler(
+ axis2_phase_t * phase,
+ const axutil_env_t * env,
+ const int paused_handler_index,
+ struct axis2_msg_ctx *msg_ctx);
+
+ /**
+ * Frees phase struct.
+ * @param phase pointer to phase
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_phase_free(
+ axis2_phase_t * phase,
+ const axutil_env_t * env);
+
+ /**
+ * creates phase struct instance.
+ * @param env pointer to environment struct
+ * @param phase_name name of the phase to be created
+ * @return pointer to newly created phase
+ */
+ AXIS2_EXTERN axis2_phase_t *AXIS2_CALL
+ axis2_phase_create(
+ const axutil_env_t * env,
+ const axis2_char_t * phase_name);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_increment_ref(
+ axis2_phase_t * phase,
+ const axutil_env_t * env);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_PHASE_H */
diff --git a/include/axis2_phase_holder.h b/include/axis2_phase_holder.h
new file mode 100644
index 0000000..d24efae
--- /dev/null
+++ b/include/axis2_phase_holder.h
@@ -0,0 +1,170 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_PHASE_HOLDER_H
+#define AXIS2_PHASE_HOLDER_H
+
+/**
+ * @defgroup axis2_phase_holder phase holder
+ * @ingroup axis2_phase_resolver
+ * phase holder is used by phase resolver to hold information related to
+ * phases and handlers within a phase. This struct hold the list of phases
+ * found in the services.xml and axis2.xml.
+ * @{
+ */
+
+/**
+ * @file axis2_phase_holder.h
+ */
+
+#include <axis2_const.h>
+#include <axutil_error.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axutil_allocator.h>
+#include <axutil_qname.h>
+#include <axutil_array_list.h>
+#include <axis2_handler_desc.h>
+#include <axis2_phase.h>
+#include <axis2_phase_rule.h>
+#include <axis2_handler.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_phase_holder */
+ typedef struct axis2_phase_holder axis2_phase_holder_t;
+
+ struct axis2_phase;
+ struct axis2_handler_desc;
+ struct axis2_handler;
+ struct axis2_phase_rule;
+
+ /**
+ * Frees phase holder.
+ * @param phase_holder pointer to phase holder
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_phase_holder_free(
+ axis2_phase_holder_t * phase_holder,
+ const axutil_env_t * env);
+
+ /**
+ * Checks if the named phase exist.
+ * @param phase_holder pointer to phase holder
+ * @param env pointer to environment struct
+ * @param phase_name phase name string
+ * @return AXIS2_TRUE if the named phase exist, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_phase_holder_is_phase_exist(
+ axis2_phase_holder_t * phase_holder,
+ const axutil_env_t * env,
+ const axis2_char_t * phase_name);
+
+ /**
+ * Adds given handler to phase holder.
+ * @param phase_holder pointer to phase holder
+ * @param env pointer to environment struct
+ * @para handler pointer to handler
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_holder_add_handler(
+ axis2_phase_holder_t * phase_holder,
+ const axutil_env_t * env,
+ struct axis2_handler_desc *handler);
+
+ /**
+ * Removes given handler from phase holder.
+ * @param phase_holder pointer to phase holder
+ * @param env pointer to environment struct
+ * @para handler pointer to handler
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_holder_remove_handler(
+ axis2_phase_holder_t * phase_holder,
+ const axutil_env_t * env,
+ struct axis2_handler_desc *handler);
+
+ /**
+ * Gets the named phase from phase array list.
+ * @param phase_holder pointer to phase holder
+ * @param env pointer to environment struct
+ * @param phase_name pointer to phase name
+ * @return pointer to named phase if it exists, else NULL. Returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_phase *AXIS2_CALL
+ axis2_phase_holder_get_phase(
+ const axis2_phase_holder_t * phase_holder,
+ const axutil_env_t * env,
+ const axis2_char_t * phase_name);
+
+ /**
+ * Builds the transport phase. This method loads the corresponding handlers and added them into
+ * correct phase. This function is no longer used in Axis2/C and
+ * marked as deprecated.
+ * @deprecated
+ * @param phase_holder pointer to phase holder
+ * @param env pointer to environment struct
+ * @param phase pointer to phase, phase holder does not assume the
+ * ownership the phase
+ * @param handlers pointer to array list of handlers, phase holder does
+ * not assume the ownership of the list
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_holder_build_transport_handler_chain(
+ axis2_phase_holder_t * phase_holder,
+ const axutil_env_t * env,
+ struct axis2_phase *phase,
+ axutil_array_list_t * handlers);
+
+ /**
+ * Creates phase holder struct.
+ * @param env pointer to environment struct
+ * @return pointer to newly created phase holder
+ */
+ AXIS2_EXTERN axis2_phase_holder_t *AXIS2_CALL
+ axis2_phase_holder_create(
+ const axutil_env_t * env);
+
+ /**
+ * Creates phase holder struct with given list of phases.
+ * @param env pointer to environment struct
+ * @param phases pointer to array list of phases
+ * @return pointer to newly created phase holder
+ */
+ AXIS2_EXTERN axis2_phase_holder_t *AXIS2_CALL
+
+ axis2_phase_holder_create_with_phases(
+ const axutil_env_t * env,
+ axutil_array_list_t * phases);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_PHASE_HOLDER_H */
diff --git a/include/axis2_phase_meta.h b/include/axis2_phase_meta.h
new file mode 100644
index 0000000..10e5555
--- /dev/null
+++ b/include/axis2_phase_meta.h
@@ -0,0 +1,89 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_PHASE_META_H
+#define AXIS2_PHASE_META_H
+
+/**
+ * @defgroup axis2_phase_meta phase meta data
+ * @ingroup axis2_engine
+ * @{
+ */
+
+/**
+ * @file axis2_conf.h
+ * @brief Axis2 configuration interface
+ */
+
+#include <axis2_defines.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Axis2 in flow */
+
+ /*#define AXIS2_IN_FLOW 1*/
+
+ /** Axis2 out flow */
+
+ /*#define AXIS2_OUT_FLOW 2*/
+
+ /** Axis2 fault in flow */
+
+ /*#define AXIS2_FAULT_IN_FLOW 3*/
+
+ /** Axis2 fault out flow */
+
+ /*#define AXIS2_FAULT_OUT_FLOW 4*/
+
+ /** phase transport in */
+#define AXIS2_PHASE_TRANSPORT_IN "Transport"
+
+ /** phase pre dispatch */
+#define AXIS2_PHASE_PRE_DISPATCH "PreDispatch"
+
+ /** phase dispatch */
+#define AXIS2_PHASE_DISPATCH "Dispatch"
+
+ /** phase post dispatch */
+#define AXIS2_PHASE_POST_DISPATCH "PostDispatch"
+
+ /** phase policy determination */
+#define AXIS2_PHASE_POLICY_DETERMINATION "PolicyDetermination"
+
+ /** phase message processing */
+#define AXIS2_PHASE_MESSAGE_PROCESSING "MessageProcessing"
+
+ /** phase message out */
+#define AXIS2_PHASE_MESSAGE_OUT "MessageOut"
+
+ /**
+ * All the handlers inside transport_sender and tranport_recievre in axis2.xml gose
+ * to this phase
+ */
+#define AXIS2_TRANSPORT_PHASE "TRANSPORT"
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_PHASE_META_H */
diff --git a/include/axis2_phase_resolver.h b/include/axis2_phase_resolver.h
new file mode 100644
index 0000000..e3b1af1
--- /dev/null
+++ b/include/axis2_phase_resolver.h
@@ -0,0 +1,275 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_PHASE_RESOLVER_H
+#define AXIS2_PHASE_RESOLVER_H
+
+/**
+ * @defgroup axis2_phase_resolver phase resolver
+ * @ingroup axis2_phase_resolver
+ *
+ * Engaging modules into axis2 configuration, services and operations are done here.
+ * This is accomplished mainly by following operations respectively.
+ * axis2_phase_resolver_engage_module_globally().
+ * axis2_phase_resolver_engage_module_to_svc().
+ * axis2_phase_resolver_engage_module_to_op().
+ * The user normally engage a module programmatically or using configuration files. When an
+ * application client engage a module programmatically he can use axis2_op_client_engage_module()
+ * function, or axis2_svc_client_engage_module() function. Engaging using configuration files means
+ * adding a module_ref parameter into services.xml or axis2.xml.
+ * In whatever way engaging a module finally sums upto addding module handlers into each operations flows
+ * in the order defined in module.xml. Here flows in operations are actually array lists of user defined
+ * phases (See op.c).
+ *
+ * Above functions in phase resolver add module handlers into operation flows as mentioned above as well
+ * as add module handlers into system defined phases. User defined phases are added into each operation
+ * at deployment time before handlers are added into them by phase resolver. System define phases
+ * are added into axis2_conf_t structure and predefined handlers are added to them before module handlers
+ * are added to them by phase resolver.
+ *
+ * Modules defined in axis2.xml are engaged by call to axis2_conf_engage_module() function. Modules defined in
+ * services xml are engaged by call to axis2_svc_enage_module() or axis2_svc_grp_engage_module(). Modules
+ * define in operation tag under services.xml are engaged by call to axis2_op_engage_module() function.
+ * These function in tern call one of axis2_phase_resolver_engage_module_globally() or
+ * axis2_phase_resolver_engage_module_to_svc() or axis2_phase_resolver_engage_module_to_op.
+ *
+ * Also when you add a service programmaticaly into axis2_conf_t you need to build execution chains for that
+ * services operations.
+ * axis2_phase_resolver_build_execution_chains_for_svc() is the function to be called for that purpose.
+ * This will extract the already engaged modules for the configuration and service and add handlers from
+ * them into operation phases.
+ *
+ * @{
+ */
+
+/**
+ * @file axis2_phase_resolver.h
+ */
+
+#include <axis2_const.h>
+#include <axutil_error.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axutil_allocator.h>
+#include <axutil_qname.h>
+#include <axutil_array_list.h>
+#include <axutil_hash.h>
+#include <axis2_handler_desc.h>
+#include <axis2_phase.h>
+#include <axis2_phase_rule.h>
+#include <axis2_handler.h>
+#include <axis2_handler_desc.h>
+#include <axis2_flow.h>
+#include <axis2_module_desc.h>
+#include <axis2_phase_holder.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for axis2_phase_resolver */
+ typedef struct axis2_phase_resolver axis2_phase_resolver_t;
+
+ struct axis2_phase;
+ struct axis2_handler_desc;
+ struct axis2_module_desc;
+ struct axis2_handler;
+ struct axis2_phase_rule;
+ struct axis2_svc;
+ struct axis2_conf;
+ struct axis2_op;
+ struct axis2_phase_holder;
+
+ /**
+ * Frees phase resolver.
+ * @param phase_resolver pointer to phase resolver
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_phase_resolver_free(
+ axis2_phase_resolver_t * phase_resolver,
+ const axutil_env_t * env);
+
+ /**
+ * Engages the given module globally. Engaging a module globally means
+ * that the given module would be engaged to all operations in all
+ * services.
+ * @param phase_resolver pointer to phase resolver
+ * @param env pointer to environment struct
+ * @param module pointer to module
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_phase_resolver_engage_module_globally(
+ axis2_phase_resolver_t * phase_resolver,
+ const axutil_env_t * env,
+ struct axis2_module_desc *module);
+
+ /**
+ * Engages the given module to the given service. This means
+ * the given module would be engaged to all operations of the given
+ * service.
+ * @param phase_resolver pointer to phase resolver
+ * @param env pointer to environment struct
+ * @param svc pointer to service
+ * @param module_desc pointer to module description
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_phase_resolver_engage_module_to_svc(
+ axis2_phase_resolver_t * phase_resolver,
+ const axutil_env_t * env,
+ struct axis2_svc *svc,
+ struct axis2_module_desc *module_desc);
+
+ /**
+ * Engages the given module to the given operation.
+ * @param phase_resolver pointer to phase resolver
+ * @param env pointer to environment struct
+ * @param axis_op pointer to axis operation
+ * @param pointer to module description
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_resolver_engage_module_to_op(
+ axis2_phase_resolver_t * phase_resolver,
+ const axutil_env_t * env,
+ struct axis2_op *axis_op,
+ struct axis2_module_desc *module_desc);
+
+ /**
+ * Builds the execution chains for service. Execution chains are collection of phases that are
+ * invoked in the execution path. Execution chains for system defined phases are created when
+ * call to engage_module_globally() function. Here it is created for service operations.
+ * @param phase_resolver pointer to phase resolver
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_resolver_build_execution_chains_for_svc(
+ axis2_phase_resolver_t * phase_resolver,
+ const axutil_env_t * env);
+
+ /**
+ * Builds execution chains for given module operation.
+ * @param phase_resolver pointer to phase resolver
+ * @param env pointer to environment struct
+ * @param op pointer to operation
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_phase_resolver_build_execution_chains_for_module_op(
+ axis2_phase_resolver_t * phase_resolver,
+ const axutil_env_t * env,
+ struct axis2_op *op);
+
+ /**
+ * Disengages the given module from the given service. This means
+ * the given module would be disengaged from all operations of the given
+ * service.
+ * @param phase_resolver pointer to phase resolver
+ * @param env pointer to environment struct
+ * @param svc pointer to service
+ * @param module_desc pointer to module description
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_resolver_disengage_module_from_svc(
+ axis2_phase_resolver_t * phase_resolver,
+ const axutil_env_t * env,
+ struct axis2_svc *svc,
+ struct axis2_module_desc *module_desc);
+
+ /**
+ * Disengages the given module from the given operation.
+ * @param phase_resolver pointer to phase resolver
+ * @param env pointer to environment struct
+ * @param axis_op pointer to axis operation
+ * @param pointer to module description
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_resolver_disengage_module_from_op(
+ axis2_phase_resolver_t * phase_resolver,
+ const axutil_env_t * env,
+ struct axis2_op *axis_op,
+ struct axis2_module_desc *module_desc);
+
+ /**
+ * Builds transport chains. This function is no longer used in Axis2/C and hence
+ * marked as deprecated.
+ * @deprecated
+ * @param phase_resolver pointer to phase resolver
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_resolver_build_transport_chains(
+ axis2_phase_resolver_t * phase_resolver,
+ const axutil_env_t * env);
+
+ /**
+ * Creates phase resolver struct.
+ * @param env pointer to environment struct
+ * @return pointer to newly created phase resolver
+ */
+ AXIS2_EXTERN axis2_phase_resolver_t *AXIS2_CALL
+
+ axis2_phase_resolver_create(
+ const axutil_env_t * env);
+
+ /**
+ * Creates phase resolver struct with given configuration.
+ * @param env pointer to environment struct
+ * @param axis2_config pointer to aixs2 configuration, phase resolver
+ * created would not assume ownership of configuration
+ * @return pointer to newly created phase resolver
+ */
+ AXIS2_EXTERN axis2_phase_resolver_t *AXIS2_CALL
+
+ axis2_phase_resolver_create_with_config(
+ const axutil_env_t * env,
+ struct axis2_conf *axis2_config);
+
+ /**
+ * Creates phase resolver struct with given configuration and service.
+ * @param env pointer to environment struct
+ * @param aixs2_config pointer to aixs2 configuration, phase resolver
+ * created would not assume ownership of configuration
+ * @param svc pointer to service, phase resolver
+ * created would not assume ownership of service
+ * @return pointer to newly created phase resolver
+ */
+ AXIS2_EXTERN axis2_phase_resolver_t *AXIS2_CALL
+
+ axis2_phase_resolver_create_with_config_and_svc(
+ const axutil_env_t * env,
+ struct axis2_conf *axis2_config,
+ struct axis2_svc *svc);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_PHASE_RESOLVER_H */
diff --git a/include/axis2_phase_rule.h b/include/axis2_phase_rule.h
new file mode 100644
index 0000000..de5b645
--- /dev/null
+++ b/include/axis2_phase_rule.h
@@ -0,0 +1,216 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_PHASE_RULE_H
+#define AXIS2_PHASE_RULE_H
+
+/**
+ * @defgroup axis2_phase_rule phase rule
+ * @ingroup axis2_desc
+ * phase rule encapsulates data and operations related to phase rules for a
+ * given handler. phase rule lives within a handler.
+ * phase rules of a handler specify the relative location of the
+ * handler within the phase to which it belongs, with respect to other handlers
+ * in the phase or first and last positions of the handler chain of the phase.
+ * @{
+ */
+
+/**
+ * @file axis2_phase_rule.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_qname.h>
+#include <axutil_param.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_phase_rule */
+ typedef struct axis2_phase_rule axis2_phase_rule_t;
+
+ /**
+ * Gets the name of the handler before which the handler associated with
+ * this rule should be placed.
+ * @param phase_rule pointer to phase rule
+ * @param env pointer to environment struct
+ * @return name of handler before which the handler should be placed
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_phase_rule_get_before(
+ const axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the name of the handler before which the handler associated with
+ * this rule should be placed.
+ * @param phase_rule pointer to phase rule
+ * @param env pointer to environment struct
+ * @param before name of handler before which the handler should be placed
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_rule_set_before(
+ axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env,
+ const axis2_char_t * before);
+
+ /**
+ * Gets the name of the handler after which the handler associated with
+ * this rule should be placed.
+ * @param phase_rule pointer to phase rule
+ * @param env pointer to environment struct
+ * @return name of handler after which the handler should be placed
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_phase_rule_get_after(
+ const axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the name of the handler after which the handler associated with
+ * this rule should be placed.
+ * @param phase_rule pointer to phase rule
+ * @param env pointer to environment struct
+ * @param after name of handler after which the handler should be placed
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_rule_set_after(
+ axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env,
+ const axis2_char_t * after);
+
+ /**
+ * Gets name.
+ * @param phase_rule pointer to phase rule
+ * @param env pointer to environment struct
+ * @return name string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_phase_rule_get_name(
+ const axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env);
+
+ /**
+ * Sets name.
+ * @param phase_rule pointer to phase rule
+ * @param env pointer to environment struct
+ * @param name name string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_rule_set_name(
+ axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env,
+ const axis2_char_t * name);
+
+ /**
+ * Checks if the handler is the first in phase.
+ * @param phase_rule pointer to phase rule
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if the handler associated with this rule is the
+ * first in phase, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_phase_rule_is_first(
+ const axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env);
+
+ /**
+ * Sets handler to be the first in phase.
+ * @param phase_rule pointer to phase rule
+ * @param env pointer to environment struct
+ * @param first AXIS2_TRUE if the handler associated with this rule is the
+ * first in phase, else AXIS2_FALSE
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_rule_set_first(
+ axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env,
+ axis2_bool_t first);
+
+ /**
+ * Checks if the handler is the last in phase.
+ * @param phase_rule pointer to phase rule
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if the handler associated with this rule is the
+ * last in phase, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_phase_rule_is_last(
+ const axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env);
+
+ /**
+ * Sets handler to be the last in phase.
+ * @param phase_rule pointer to phase rule
+ * @param env pointer to environment struct
+ * @param last AXIS2_TRUE if the handler associated with this rule is the
+ * last in phase, else AXIS2_FALSE
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_rule_set_last(
+ axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env,
+ axis2_bool_t last);
+
+ /**
+ * Frees phase rule.
+ * @param phase_rule pointer to phase rule
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_phase_rule_free(
+ axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env);
+
+ /**
+ * Clones phase rule.
+ * @param phase_rule pointer to phase rule
+ * @param env pointer to environment struct
+ * @return pointer to newly cloned phase rule
+ */
+ AXIS2_EXTERN axis2_phase_rule_t *AXIS2_CALL
+ axis2_phase_rule_clone(
+ axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env);
+
+ /**
+ * Creates a phase rule struct instance.
+ * @param env pointer to environment struct
+ * @param phase_name name of the phase rule
+ * @return pointer to newly created phase rule
+ */
+ AXIS2_EXTERN axis2_phase_rule_t *AXIS2_CALL
+ axis2_phase_rule_create(
+ const axutil_env_t * env,
+ const axis2_char_t * name);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_PHASE_RULE_H */
diff --git a/include/axis2_phases_info.h b/include/axis2_phases_info.h
new file mode 100644
index 0000000..9c1a1f7
--- /dev/null
+++ b/include/axis2_phases_info.h
@@ -0,0 +1,238 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_PHASES_INFO_H
+#define AXIS2_PHASES_INFO_H
+
+/** @defgroup axis2_phases_info phases information
+ * @ingroup axis2_deployment
+ *
+ * In deployment engine when configuration builder parse phase order elements in axis2.xml, for
+ * phases defined in a phase order it will create a phase name list and add it to the phases
+ * info. There are four phase orders. inflow, outflow, in faultflow and out faultflow.
+ * So configuration builder add array lists for each of this phase orders into the phases info.
+ *
+ * At the time of module engagement phase resolver call the functions here to retrieve phase
+ * lists for each flow for the purpose of adding handlers. When such a request come what each
+ * function do is, create phase instances list for corresponding phase names stored in the phase name
+ * list for that flow and return.
+ *
+ * @{
+ */
+
+#include <axis2_const.h>
+#include <axutil_error.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axutil_allocator.h>
+#include <axutil_string.h>
+#include <axutil_array_list.h>
+#include <axis2_op.h>
+#include <axis2_phase.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_phases_info */
+ typedef struct axis2_phases_info axis2_phases_info_t;
+
+ /** Deallocate memory
+ * @param pahses_info pointer to phases info
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_phases_info_free(
+ axis2_phases_info_t * phases_info,
+ const axutil_env_t * env);
+
+ /**
+ * Set the inflow phase names as an array list. These phases are defined in the inflow phase
+ * order element defined in axis2.xml.
+ *
+ * @param phases_info pointer to phases info
+ * @param env pointer to environment struct
+ * @param in_phases inter to in phases
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phases_info_set_in_phases(
+ axis2_phases_info_t * phases_info,
+ const axutil_env_t * env,
+ axutil_array_list_t * in_phases);
+
+ /**
+ * Set the outflow phase names as an array list. These phases are defined in the outflow phase
+ * order element defined in axis2.xml.
+ *
+ * @param phases_info pointer to phases info
+ * @param env pointer to environment struct
+ * @param out_phases pointer to out phases
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phases_info_set_out_phases(
+ axis2_phases_info_t * phases_info,
+ const axutil_env_t * env,
+ axutil_array_list_t * out_phases);
+
+ /**
+ * Set the INfaultflow phase names as an array list. These phases are defined in the INfaultflow
+ * phase order element defined in axis2.xml.
+ *
+ * @param phases_info pointer to phases info
+ * @param env pointer to environment struct
+ * @param in_faultphases pionter to in fault phases
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_phases_info_set_in_faultphases(
+ axis2_phases_info_t * phases_info,
+ const axutil_env_t * env,
+ axutil_array_list_t * in_faultphases);
+
+ /**
+ * Set the Outfaultflow phase names as an array list. These phases are defined in the
+ * Outfaultflow phase order element defined in axis2.xml.
+ *
+ * @param phases_info pointer to phases info
+ * @param env pointer to env
+ * @param out_faultphases pointer to out fault phases
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_phases_info_set_out_faultphases(
+ axis2_phases_info_t * phases_info,
+ const axutil_env_t * env,
+ axutil_array_list_t * out_faultphases);
+
+ /**
+ * @param phases_info pointer to phases info
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_phases_info_get_in_phases(
+ const axis2_phases_info_t * phases_info,
+ const axutil_env_t * env);
+
+ /**
+ * @param phases_info pointer to phases info
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_phases_info_get_out_phases(
+ const axis2_phases_info_t * phases_info,
+ const axutil_env_t * env);
+
+ /**
+ * @param phases_info pointer to phases info
+ * @parma env pointer to environment struct
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_phases_info_get_in_faultphases(
+ const axis2_phases_info_t * phases_info,
+ const axutil_env_t * env);
+
+ /**
+ * @param phases_info pointer to phases info
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_phases_info_get_out_faultphases(
+ const axis2_phases_info_t * phases_info,
+ const axutil_env_t * env);
+
+ /**
+ * @param phases_info pointer to phases info
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_phases_info_get_op_in_phases(
+ const axis2_phases_info_t * phases_info,
+ const axutil_env_t * env);
+
+ /**
+ * @param phases_info pointer to phases info
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_phases_info_get_op_out_phases(
+ const axis2_phases_info_t * phases_info,
+ const axutil_env_t * env);
+
+ /**
+ * @param phases_info pointer to phases info
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_phases_info_get_op_in_faultphases(
+ const axis2_phases_info_t * phases_info,
+ const axutil_env_t * env);
+
+ /**
+ * @param phases_info pointer to phases info
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_phases_info_get_op_out_faultphases(
+ const axis2_phases_info_t * phases_info,
+ const axutil_env_t * env);
+
+ /**
+ * @param phases_info pointer to phases info
+ * @param env pointer to environment struct
+ * @param axis2_opt pointer to axis2 opt
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phases_info_set_op_phases(
+ axis2_phases_info_t * phases_info,
+ const axutil_env_t * env,
+ struct axis2_op *axis2_opt);
+
+ /** create Phases Info struct
+ * @param env pointer to environment struct
+ * @return pointer to newly created phases info
+ */
+ AXIS2_EXTERN axis2_phases_info_t *AXIS2_CALL
+ axis2_phases_info_create(
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_phases_info_copy_flow(
+ const axutil_env_t * env,
+ const axutil_array_list_t * flow_to_copy);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*AXIS2_PHASES_INFO_H */
diff --git a/include/axis2_policy_include.h b/include/axis2_policy_include.h
new file mode 100644
index 0000000..c088aeb
--- /dev/null
+++ b/include/axis2_policy_include.h
@@ -0,0 +1,215 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_POLICY_INCLUDE_H
+#define AXIS2_POLICY_INCLUDE_H
+
+/**
+ * @defgroup axis2_policy_include policy include
+ * @ingroup axis2_desc
+ * @{
+ */
+
+#include <axutil_array_list.h>
+#include <axis2_desc.h>
+#include <neethi_policy.h>
+#include <neethi_registry.h>
+#include <neethi_reference.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_policy_include */
+ typedef struct axis2_policy_include axis2_policy_include_t;
+
+ typedef enum axis2_policy_types
+ {
+ AXIS2_POLICY = 0,
+ AXIS2_MODULE_POLICY,
+ AXIS2_SERVICE_POLICY,
+ AXIS2_OPERATION_POLICY,
+ AXIS2_MESSAGE_POLICY,
+ AXIS2_PORT_POLICY,
+ AXIS2_PORT_TYPE_POLICY,
+ AXIS2_BINDING_POLICY,
+ AXIS2_BINDING_OPERATION_POLICY,
+ AXIS2_INPUT_POLICY,
+ AXIS2_OUTPUT_POLICY,
+ AXIS2_BINDING_INPUT_POLICY,
+ AXIS2_BINDING_OUTPUT_POLICY,
+ AXIS2_MODULE_OPERATION_POLICY,
+ AXIS2_POLICY_REF,
+ AXIS2_ANON_POLICY
+ } axis2_policy_types;
+
+ /**
+ * Creates policy include struct.
+ * @param env pointer to environment struct
+ * @return pointer to newly created policy include
+ */
+ AXIS2_EXTERN axis2_policy_include_t *AXIS2_CALL
+
+ axis2_policy_include_create(
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_policy_include_t *AXIS2_CALL
+
+ axis2_policy_include_create_with_desc(
+ const axutil_env_t * env,
+ axis2_desc_t * desc);
+
+ /**
+ * Frees policy include.
+ * @param policy_include pointer to policy include
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_policy_include_free(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_policy_include_free(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_policy_include_set_registry(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ neethi_registry_t * registry);
+
+ AXIS2_EXTERN neethi_registry_t *AXIS2_CALL
+
+ axis2_policy_include_get_registry(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_policy_include_set_policy(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ neethi_policy_t * policy);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_policy_include_update_policy(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ neethi_policy_t * policy);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_policy_include_set_effective_policy(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ neethi_policy_t * effective_policy);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_policy_include_set_desc(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ axis2_desc_t * desc);
+
+ AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+ axis2_policy_include_get_desc(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_policy_include_t *AXIS2_CALL
+
+ axis2_policy_include_get_parent(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN neethi_policy_t *AXIS2_CALL
+ axis2_policy_include_get_policy(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN neethi_policy_t *AXIS2_CALL
+
+ axis2_policy_include_get_effective_policy(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_policy_include_get_policy_elements(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_policy_include_get_policy_elements_with_type(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ int type);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_policy_include_register_policy(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ axis2_char_t * key,
+ neethi_policy_t * effective_policy);
+
+ AXIS2_EXTERN neethi_policy_t *AXIS2_CALL
+
+ axis2_policy_include_get_policy_with_key(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ axis2_char_t * key);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_policy_include_add_policy_element(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ int type,
+ neethi_policy_t * policy);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_policy_include_add_policy_reference_element(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ int type,
+ neethi_reference_t * reference);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_policy_include_remove_policy_element(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ axis2_char_t * policy_uri);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_policy_include_remove_all_policy_element(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_POLICY_INCLUDE_H */
diff --git a/include/axis2_raw_xml_in_out_msg_recv.h b/include/axis2_raw_xml_in_out_msg_recv.h
new file mode 100644
index 0000000..8ffe9bb
--- /dev/null
+++ b/include/axis2_raw_xml_in_out_msg_recv.h
@@ -0,0 +1,59 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_RAW_XML_IN_OUT_MSG_RECV_H
+#define AXIS2_RAW_XML_IN_OUT_MSG_RECV_H
+
+/** @defgroup axis2_raw_xml_in_out_msg_recv raw XML in-out message receiver
+ * @ingroup axis2_receivers
+ * @{
+ */
+
+/**
+ * @file axis2_ws_info.h
+ * @brief Axis2 Raw Xml In Out Message Receiver interface
+ */
+
+#include <axis2_const.h>
+#include <axutil_error.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axutil_allocator.h>
+#include <axutil_qname.h>
+#include <axis2_msg_recv.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * Creates raw xml in out message receiver struct
+ * @return pointer to newly created raw xml in out message receiver
+ */
+ AXIS2_EXTERN axis2_msg_recv_t *AXIS2_CALL
+
+ axis2_raw_xml_in_out_msg_recv_create(
+ const axutil_env_t * env);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_RAW_XML_IN_OUT_MSG_RECV_H */
diff --git a/include/axis2_relates_to.h b/include/axis2_relates_to.h
new file mode 100644
index 0000000..5775545
--- /dev/null
+++ b/include/axis2_relates_to.h
@@ -0,0 +1,129 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_RELATES_TO_H
+#define AXIS2_RELATES_TO_H
+
+/**
+ * @defgroup axis2_relates_to relates to
+ * @ingroup axis2_addr
+ * relates to encapsulates data that indicate how a message relates to
+ * another message.
+ * The related message is identified by a URI that corresponds to the
+ * related message's message ID. The type of the relationship is also captured
+ * by relates to. Basically relates to handles the following WS-Addressing
+ * header <wsa:RelatesTo RelationshipType="..."?>xs:anyURI</wsa:RelatesTo>
+ * @{
+ */
+
+/**
+ * @file axis2_relates_to.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_const.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_relates_to */
+ typedef struct axis2_relates_to axis2_relates_to_t;
+
+ /**
+ * creates relates to struct.
+ * @param env pointer to environment struct
+ * @param value value string
+ * @param relationship_type relationship type string
+ */
+ AXIS2_EXTERN axis2_relates_to_t *AXIS2_CALL
+ axis2_relates_to_create(
+ const axutil_env_t * env,
+ const axis2_char_t * value,
+ const axis2_char_t * relationship_type);
+
+ /**
+ * Gets value. The value field represents the URI that corresponds to the
+ * related message's message ID
+ * @param relates_to pointer to relates to struct
+ * @param env pointer to environment struct
+ * @return value string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_relates_to_get_value(
+ const axis2_relates_to_t * relates_to,
+ const axutil_env_t * env);
+
+ /**
+ * Sets value. The value field represents the URI that corresponds to the
+ * related message's message ID
+ * @param relates_to pointer to relates to struct
+ * @param env pointer to environment struct
+ * @param value value string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_relates_to_set_value(
+ struct axis2_relates_to *relates_to,
+ const axutil_env_t * env,
+ const axis2_char_t * value);
+
+ /**
+ * Gets relationship type.
+ * @param relates_to pointer to relates to struct
+ * @param env pointer to environment struct
+ * @return relationship type string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_relates_to_get_relationship_type(
+ const axis2_relates_to_t * relates_to,
+ const axutil_env_t * env);
+
+ /**
+ * Sets relationship type.
+ * @param relates_to pointer to relates to struct
+ * @param env pointer to environment struct
+ * @param relationship_type relationship type string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_relates_to_set_relationship_type(
+ struct axis2_relates_to *relates_to,
+ const axutil_env_t * env,
+ const axis2_char_t * relationship_type);
+
+ /**
+ * Frees relates to struct.
+ * @param relates_to pointer to relates to struct
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_relates_to_free(
+ struct axis2_relates_to *relates_to,
+ const axutil_env_t * env);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_RELATES_TO_H */
diff --git a/include/axis2_simple_http_svr_conn.h b/include/axis2_simple_http_svr_conn.h
new file mode 100644
index 0000000..37b9979
--- /dev/null
+++ b/include/axis2_simple_http_svr_conn.h
@@ -0,0 +1,204 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_SIMPLE_HTTP_SVR_CONN_H
+#define AXIS2_SIMPLE_HTTP_SVR_CONN_H
+
+/**
+ * @ingroup axis2_core_transport_http
+ * @{
+ */
+
+/**
+ * @file axis2_simple_http_svr_conn.h
+ * @brief Axis2 simple http server connection
+ */
+
+#include <axis2_const.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_http_simple_request.h>
+#include <axis2_http_simple_response.h>
+#include <axis2_http_response_writer.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef struct axis2_simple_http_svr_conn axis2_simple_http_svr_conn_t;
+
+ /**
+ * @param svr_conn pointer to server connection struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_simple_http_svr_conn_close(
+ axis2_simple_http_svr_conn_t * svr_conn,
+ const axutil_env_t * env);
+
+ /**
+ * @param svr_conn pointer to server connection struct
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_simple_http_svr_conn_is_open(
+ axis2_simple_http_svr_conn_t * svr_conn,
+ const axutil_env_t * env);
+
+ /**
+ * @param svr_conn pointer to server connection struct
+ * @param env pointer to environment struct
+ * @param keep_alive
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_simple_http_svr_conn_set_keep_alive(
+ axis2_simple_http_svr_conn_t * svr_conn,
+ const axutil_env_t * env,
+ axis2_bool_t keep_alive);
+
+ /**
+ * @param svr_conn pointer to server connection struct
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+
+ axis2_simple_http_svr_conn_is_keep_alive(
+ axis2_simple_http_svr_conn_t * svr_conn,
+ const axutil_env_t * env);
+
+ /**
+ * @param svr_conn pointer to server connection struct
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axutil_stream_t *AXIS2_CALL
+
+ axis2_simple_http_svr_conn_get_stream(
+ const axis2_simple_http_svr_conn_t * svr_conn,
+ const axutil_env_t * env);
+
+ /**
+ * @param svr_conn pointer to server connection struct
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_http_response_writer_t *AXIS2_CALL
+
+ axis2_simple_http_svr_conn_get_writer(
+ const axis2_simple_http_svr_conn_t * svr_conn,
+ const axutil_env_t * env);
+
+ /**
+ * @param svr_conn pointer to server connection struct
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_http_simple_request_t *AXIS2_CALL
+ axis2_simple_http_svr_conn_read_request(
+ axis2_simple_http_svr_conn_t * svr_conn,
+ const axutil_env_t * env);
+
+ /**
+ * @param svr_conn pointer to server connection struct
+ * @param env pointer to environment struct
+ * @param response response
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_simple_http_svr_conn_write_response(
+ axis2_simple_http_svr_conn_t * svr_conn,
+ const axutil_env_t * env,
+ axis2_http_simple_response_t * response);
+
+ /**
+ * @param svr_conn pointer to server connection struct
+ * @param env pointer to environment struct
+ * @param timeout timeout
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_simple_http_svr_conn_set_rcv_timeout(
+ axis2_simple_http_svr_conn_t * svr_conn,
+ const axutil_env_t * env,
+ int timeout);
+
+ /**
+ * @param svr_conn pointer to server connection struct
+ * @param env pointer to environment struct
+ * @param timeout timeout
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_simple_http_svr_conn_set_snd_timeout(
+ axis2_simple_http_svr_conn_t * svr_conn,
+ const axutil_env_t * env,
+ int timeout);
+
+ /**
+ * @param svr_conn pointer to server connection struct
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+
+ axis2_simple_http_svr_conn_get_svr_ip(
+ const axis2_simple_http_svr_conn_t * svr_conn,
+ const axutil_env_t * env);
+
+ /**
+ * @param svr_conn pointer to server connection struct
+ * @param env pointer to environment struct
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+
+ axis2_simple_http_svr_conn_get_peer_ip(
+ const axis2_simple_http_svr_conn_t * svr_conn,
+ const axutil_env_t * env);
+
+
+ /**
+ * @param svr_conn pointer to server connection struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_simple_http_svr_conn_free(
+ axis2_simple_http_svr_conn_t * svr_conn,
+ const axutil_env_t * env);
+
+ /**
+ * creates axis2_simple_http_svr_conn struct
+ * @param env pointer to environment struct
+ * @param sockfd sockfd
+ */
+ AXIS2_EXTERN axis2_simple_http_svr_conn_t *AXIS2_CALL
+
+ axis2_simple_http_svr_conn_create(
+ const axutil_env_t * env,
+ int sockfd);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_SIMPLE_HTTP_SVR_CONN_H */
diff --git a/include/axis2_stub.h b/include/axis2_stub.h
new file mode 100644
index 0000000..0d502ca
--- /dev/null
+++ b/include/axis2_stub.h
@@ -0,0 +1,200 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_STUB_H
+#define AXIS2_STUB_H
+
+/** @defgroup axis2_stub stub
+ * @ingroup axis2_client_api
+ * stub is a wrapper API for service client that helps users to use client API
+ * easily.
+ * @sa axis2_svc_client
+ * @{
+ */
+
+/**
+ * @file axis2_stub.h
+ */
+
+#include <axis2_endpoint_ref.h>
+#include <axis2_svc_client.h>
+#include <axis2_options.h>
+#include <axiom_xml_reader.h>
+#include <axutil_property.h>
+
+/** DEPRECATED: Please use AXIOM_SOAP11 instead.
+ Constant value representing SOAP version 1.1 */
+#define AXIOM_SOAP_11 1
+
+/** DEPRECATED: Please use AXIOM_SOAP12 instead.
+ Constant value representing SOAP version 1.2 */
+#define AXIOM_SOAP_12 2
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_stub */
+ typedef struct axis2_stub axis2_stub_t;
+
+ /**
+ * Frees stub struct.
+ * @param stub pointer to stub struct
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_stub_free(
+ axis2_stub_t * stub,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the endpoint reference.
+ * @param stub pointer to stub struct
+ * @param env pointer to environment struct
+ * @param endpoint_ref pointer to endpoint reference. stub assumes the
+ * ownership of the endpoint reference struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_stub_set_endpoint_ref(
+ axis2_stub_t * stub,
+ const axutil_env_t * env,
+ axis2_endpoint_ref_t * endpoint_ref);
+
+ /**
+ * Sets the endpoint reference, represented by a string.
+ * @param stub pointer to stub struct
+ * @param env pointer to environment struct
+ * @param endpoint_uri pointer to endpoint uri string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_stub_set_endpoint_uri(
+ axis2_stub_t * stub,
+ const axutil_env_t * env,
+ const axis2_char_t * endpoint_uri);
+
+ /**
+ * Sets the bool value specifying whether to use a separate listener
+ * for receive channel.
+ * @param stub pointer to stub struct
+ * @param env pointer to environment struct
+ * @param use_separate whether to use a separate listener
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_stub_set_use_separate_listener(
+ axis2_stub_t * stub,
+ const axutil_env_t * env,
+ const axis2_bool_t use_separate_listener);
+
+ /**
+ * Sets the SOAP version.
+ * @param stub pointer to stub struct
+ * @param env pointer to environment struct
+ * @param soap_version int value representing the SOAP version
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_stub_set_soap_version(
+ axis2_stub_t * stub,
+ const axutil_env_t * env,
+ const int soap_version);
+
+ /**
+ * Gets the service context ID.
+ * @param stub pointer to stub struct
+ * @param env pointer to environment struct
+ * @return service context ID if set, else NULL
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_stub_get_svc_ctx_id(
+ const axis2_stub_t * stub,
+ const axutil_env_t * env);
+
+ /**
+ * Engages the named module.
+ * @param stub pointer to stub struct
+ * @param env pointer to environment struct
+ * @param module_name string representing the name of the module
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_stub_engage_module(
+ axis2_stub_t * stub,
+ const axutil_env_t * env,
+ const axis2_char_t * module_name);
+
+ /**
+ * Gets the service client instance used by this stub.
+ * @param stub pointer to stub struct
+ * @param env pointer to environment struct
+ * @return pointer to service client struct used by the stub
+ */
+ AXIS2_EXTERN axis2_svc_client_t *AXIS2_CALL
+ axis2_stub_get_svc_client(
+ const axis2_stub_t * stub,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the options used on top of the service client used by this stub.
+ * @param stub pointer to stub struct
+ * @param env pointer to environment struct
+ * @return pointer to options used by the service client of this stub
+ */
+ AXIS2_EXTERN axis2_options_t *AXIS2_CALL
+ axis2_stub_get_options(
+ const axis2_stub_t * stub,
+ const axutil_env_t * env);
+
+ /**
+ * Creates a stub instance.
+ * @param env pointer to environment struct
+ * @param endpoint_ref pointer to endpoint reference struct representing the
+ * stub endpoint. Newly created stub assumes ownership of the endpoint
+ * @param client_home name of the directory that contains the Axis2/C repository
+ * @return pointer to newly created axis2_stub struct
+ */
+ AXIS2_EXTERN axis2_stub_t *AXIS2_CALL
+ axis2_stub_create_with_endpoint_ref_and_client_home(
+ const axutil_env_t * env,
+ axis2_endpoint_ref_t * endpoint_ref,
+ const axis2_char_t * client_home);
+
+ /**
+ * Creates a stub instance.
+ * @param env pointer to environment struct
+ * @param endpoint_uri string representing the endpoint reference
+ * @param client_home name of the directory that contains the Axis2/C repository
+ * @return pointer to newly created axis2_stub struct
+ */
+ AXIS2_EXTERN axis2_stub_t *AXIS2_CALL
+ axis2_stub_create_with_endpoint_uri_and_client_home(
+ const axutil_env_t * env,
+ const axis2_char_t * endpoint_uri,
+ const axis2_char_t * client_home);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_STUB_H */
diff --git a/include/axis2_svc.h b/include/axis2_svc.h
new file mode 100644
index 0000000..c710587
--- /dev/null
+++ b/include/axis2_svc.h
@@ -0,0 +1,1236 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_SVC_H
+#define AXIS2_SVC_H
+
+/** @defgroup axis2_svc service
+ * @ingroup axis2_desc
+ * service represents the static structure of a service in a service group.
+ * In Axis2 description hierarchy, a service lives inside the service group to
+ * which it belongs.
+ * services are configured in services.xml files located in the respective
+ * service group folders of the services folder in the repository.
+ * In services.xml file, services are declared in association with a given
+ * service group or at top level as a stand alone service. In cases where a
+ * service is configured without an associated service group, a service group
+ * with the same name as that of the service would be created by the deployment
+ * engine and the service would be associated with that newly created service
+ * group. The deployment engine would create service instances to represent
+ * those configured services in services.xml files and would associate them with
+ * the respective service group in the configuration.
+ * service encapsulates data on engaged module information, the XML schema
+ * defined in WSDL that is associated with the service and the operations of
+ * the service.
+ * @{
+ */
+
+/**
+ * @file axis2_svc.h
+ */
+
+#include <axutil_param_container.h>
+#include <axis2_flow_container.h>
+#include <axis2_op.h>
+#include <axis2_svc_grp.h>
+#include <axutil_qname.h>
+#include <axutil_error.h>
+#include <axutil_array_list.h>
+#include <axis2_const.h>
+#include <axis2_phase_resolver.h>
+#include <axis2_module_desc.h>
+#include <axis2_conf.h>
+#include <axutil_string.h>
+#include <axutil_stream.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_svc */
+ typedef struct axis2_svc axis2_svc_t;
+
+ struct axis2_svc_grp;
+ struct axis2_flow_container;
+ struct axutil_param_container;
+ struct axis2_module_desc;
+ struct axis2_conf;
+
+ /**
+ * Frees service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_svc_free(
+ axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Adds operation.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param op pointer to operation struct, service assumes ownership of
+ * operation
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_add_op(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ struct axis2_op *op);
+
+ /**
+ * Gets operation corresponding to the given QName.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param op_qname pointer to QName representing operation QName
+ * @return pointer to operation corresponding to given QName
+ */
+ AXIS2_EXTERN struct axis2_op *AXIS2_CALL
+ axis2_svc_get_op_with_qname(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env,
+ const axutil_qname_t * op_qname);
+
+ /**
+ * Gets the RESTful operation list corresponding to the given method
+ * and first constant part of location.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param http_method HTTPMethod
+ * @param http_location HTTPLocation
+ * @return pointer to operation corresponding to given method and
+ * location
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_svc_get_rest_op_list_with_method_and_location(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env,
+ const axis2_char_t * http_method,
+ const axis2_char_t * http_location);
+
+
+ /**
+ * Gets the RESTful operation map for a given service
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return pointer to hash with the information
+ * (method, url)=> processing structure for each ops
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_svc_get_rest_map(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Gets operation corresponding to the name.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param op_name operation name string
+ * @return pointer to operation corresponding to given name
+ */
+ AXIS2_EXTERN struct axis2_op *AXIS2_CALL
+ axis2_svc_get_op_with_name(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env,
+ const axis2_char_t * op_name);
+
+ /**
+ * Gets all operations of service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return pointer to hash map containing all operations of the service
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_svc_get_all_ops(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Sets parent which is of type service group.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param svc_grp pointer to parent service group
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_set_parent(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ struct axis2_svc_grp *svc_grp);
+
+ /**
+ * Gets parent which is of type service group.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return pointer to parent service group
+ */
+ AXIS2_EXTERN struct axis2_svc_grp *AXIS2_CALL
+ axis2_svc_get_parent(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Sets QName.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param qname pointer to QName
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_set_qname(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ const axutil_qname_t * qname);
+
+ /**
+ * Gets QName.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return pointer to QName
+ */
+ AXIS2_EXTERN const axutil_qname_t *AXIS2_CALL
+ axis2_svc_get_qname(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Adds given parameter to operation.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param param pointer to parameter, service assumes ownership of
+ * parameter
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_add_param(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ axutil_param_t * param);
+
+ /**
+ * Gets named parameter.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param name name string
+ * @return pointer to named parameter if exists, else NULL. Returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_param_t *AXIS2_CALL
+ axis2_svc_get_param(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env,
+ const axis2_char_t * name);
+
+ /**
+ * Remove a parameter.
+ * @param svc pointer to service struct
+ * @param env pointer to the environment
+ * @Param param_name parameter name to be removed
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_remove_param(
+ const axis2_svc_t *svc,
+ const axutil_env_t *env,
+ const axis2_char_t *param_name);
+
+ /**
+ * Gets all parameters stored within service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return pointer to array list of parameters, returns a reference,
+ * not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_svc_get_all_params(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Checks if the named parameter is locked.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param param_name parameter name
+ * @return AXIS2_TRUE if the named parameter is locked, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_svc_is_param_locked(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ const axis2_char_t * param_name);
+
+ /**
+ * Engages given module to service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param module_desc pointer to module description to be engaged,
+ * service does not assume the ownership of module
+ * @param conf pointer to configuration, it is configuration that holds
+ * module information
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_engage_module(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ struct axis2_module_desc *module_desc,
+ struct axis2_conf *conf);
+
+ /**
+ * Disengages given module from service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param module_desc pointer to module description to be engaged,
+ * service does not assume the ownership of module
+ * @param conf pointer to configuration, it is configuration that holds
+ * module information
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_disengage_module(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ struct axis2_module_desc *module_desc,
+ struct axis2_conf *conf);
+
+ /**
+ * Check whether a given module is engaged to the service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param module_qname pointer to module qname to be engaged,
+ * @return AXIS2_TRUE if module is engaged, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_svc_is_module_engaged(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ axutil_qname_t * module_qname);
+
+ /**
+ * Return the engaged module list.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return engaged module list
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_svc_get_engaged_module_list(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Adds operations defined in a module to this service. It is possible
+ * to define operations that are associated to a module in a module.xml
+ * file. These operations in turn could be invoked in relation to a
+ * service. This method allows those module related operation to be
+ * added to a service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param module_desc pointer to module description containing module
+ * related operation information. service does not assume the ownership
+ * of module description
+ * @param conf pointer to configuration, it is configuration that stores
+ * the modules
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_add_module_ops(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ struct axis2_module_desc *module_desc,
+ struct axis2_conf *axis2_config);
+
+ /**
+ * Adds given module description to engaged module list.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param module_desc pointer to module description, service does not
+ * assume the ownership of module description
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ /*AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_svc_add_to_engaged_module_list(axis2_svc_t *svc,
+ const axutil_env_t *env,
+ struct axis2_module_desc *module_desc); */
+
+ /**
+ * Gets all engaged modules.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return pointer to array list containing all engaged modules
+ */
+ /*AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_svc_get_all_engaged_modules(const axis2_svc_t *svc,
+ const axutil_env_t *env); */
+
+ /**
+ * Sets style. Style can be either RPC or document literal.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param style style of service as defined in WSDL
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_set_style(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ const axis2_char_t * style);
+
+ /**
+ * Gets style. Style can be either RPC or document literal.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return string representing the style of service
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_svc_get_style(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Gets in flow. In flow is the list of phases invoked
+ * along in path.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return pointer to flow representing in flow
+ */
+ /*AXIS2_EXTERN struct axis2_flow *AXIS2_CALL
+
+ axis2_svc_get_in_flow(const axis2_svc_t *svc,
+ const axutil_env_t *env); */
+
+ /**
+ * Sets in flow. In flow is the list of phases invoked
+ * along in path.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param in_flow pointer to flow representing in flow
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ /*AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_svc_set_in_flow(axis2_svc_t *svc,
+ const axutil_env_t *env,
+ struct axis2_flow *in_flow); */
+
+ /**
+ * Gets out flow. Out flow is the list of phases invoked
+ * along out path.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return pointer to flow representing out flow
+ */
+ /*AXIS2_EXTERN struct axis2_flow *AXIS2_CALL
+
+ axis2_svc_get_out_flow(
+ const axis2_svc_t *svc,
+ const axutil_env_t *env); */
+
+ /**
+ * Sets out flow. Out flow is the list of phases invoked
+ * along out path.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return out_flow pointer to flow representing out flow
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ /*AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_svc_set_out_flow(
+ axis2_svc_t *svc,
+ const axutil_env_t *env,
+ struct axis2_flow *out_flow); */
+
+ /**
+ * Gets fault in flow. Fault in flow is the list of phases invoked
+ * along in path if a fault happens.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return pointer to flow representing fault in flow
+ */
+ /*AXIS2_EXTERN struct axis2_flow *AXIS2_CALL
+
+ axis2_svc_get_fault_in_flow(
+ const axis2_svc_t *svc,
+ const axutil_env_t *env); */
+
+ /**
+ * Sets fault in flow. Fault in flow is the list of phases invoked
+ * along in path if a fault happens.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param fault_flow pointer to flow representing fault in flow
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ /*AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_svc_set_fault_in_flow(
+ axis2_svc_t *svc,
+ const axutil_env_t *env,
+ struct axis2_flow *fault_flow); */
+
+ /**
+ * Gets fault out flow. Fault out flow is the list of phases invoked
+ * along out path if a fault happens.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return pointer to flow representing fault out flow
+ */
+ /*AXIS2_EXTERN struct axis2_flow *AXIS2_CALL
+
+ axis2_svc_get_fault_out_flow(
+ const axis2_svc_t *svc,
+ const axutil_env_t *env); */
+
+ /**
+ * Sets fault out flow. Fault out flow is the list of phases invoked
+ * along out path if a fault happens.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param fault_flow pointer to flow representing fault out flow
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ /*AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_svc_set_fault_out_flow(
+ axis2_svc_t *svc,
+ const axutil_env_t *env,
+ struct axis2_flow *fault_flow); */
+
+ /**
+ * Gets operation corresponding to given SOAP Action.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param soap_action SOAP action string
+ * @return pointer to operation corresponding to given SOAP action if
+ * one exists, else NULL. Returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_op *AXIS2_CALL
+ axis2_svc_get_op_by_soap_action(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env,
+ const axis2_char_t * soap_action);
+
+ /**
+ * Gets operation corresponding to given SOAP Action and endpoint QName.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param soap_action SOAP action string
+ * @param endpoint pointer QName representing endpoint URI
+ * @return pointer operation corresponding to given SOAP Action and
+ * endpoint QName.
+ */
+ /*AXIS2_EXTERN struct axis2_op *AXIS2_CALL
+
+ axis2_svc_get_op_by_soap_action_and_endpoint(
+ const axis2_svc_t *svc,
+ const axutil_env_t *env,
+ const axis2_char_t *soap_action,
+ const axutil_qname_t *endpoint); */
+
+ /**
+ * Gets service name.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return service name string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_svc_get_name(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Sets service name.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param svc_name service name string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_set_name(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ const axis2_char_t * svc_name);
+
+ /**
+ * Sets current time as last update time of the service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_set_last_update(
+ axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Gets last update time of the service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return last updated time in seconds
+ */
+ AXIS2_EXTERN long AXIS2_CALL
+ axis2_svc_get_last_update(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Get the description of the services, which is in the
+ * service.xml, <description> tag
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return services description string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_svc_get_svc_desc(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Set the description of the service which is in service.xml
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_set_svc_desc(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ const axis2_char_t * svc_desc);
+
+ /**
+ * Get the static wsdl file of the services, which is in the
+ * service.xml, wsdl_path parameter
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return static wsdl file location
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_svc_get_svc_wsdl_path(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Set the wsdl path of the service which is in service.xml
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_set_svc_wsdl_path(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ const axis2_char_t * wsdl_path);
+
+ /**
+ * Get the folder path on disk of the services, which is in the
+ * service.xml
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return folder path on disk
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_svc_get_svc_folder_path(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Set the folder path of the service which is in service.xml
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_set_svc_folder_path(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ const axis2_char_t * folder_path);
+
+ /**
+ * Gets the name of the file that holds the implementation of the
+ * service. service implementation is compiled into shared libraries
+ * and is placed in the respective sub folder in the services folder
+ * of Axis2 repository.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return file name string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_svc_get_file_name(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the name of the file that holds the implementation of the
+ * service. service implementation is compiled into shared libraries
+ * and is placed in the respective sub folder in the services folder
+ * of Axis2 repository.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param file_name file name string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_set_file_name(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ const axis2_char_t * file_name);
+
+ /**
+ * Gets all endpoints associated with the service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return pointer to hash map containing all endpoints
+ */
+ /*AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+
+ axis2_svc_get_all_endpoints(
+ const axis2_svc_t *svc,
+ const axutil_env_t *env); */
+
+ /**
+ * Sets the list of endpoints associated with the service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param endpoints pointer to hash map containing all endpoints
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ /*AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_svc_set_all_endpoints(
+ axis2_svc_t *svc,
+ const axutil_env_t *env,
+ axutil_hash_t *endpoints); */
+
+ /**
+ * Gets namespace.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return namespace URI string
+ */
+ /*AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+
+ axis2_svc_get_namespace(
+ const axis2_svc_t *svc,
+ const axutil_env_t *env);
+ */
+
+ /**
+ * Adds WS-Addressing mapping for a given operation. The services.xml
+ * configuration file could specify a SOAP action that would map to
+ * one of the service operations. This method could be used to register
+ * that mapping against operations. WS-Addressing based dispatcher
+ * makes use of this mapping to identify the operation to be invoked,
+ * given WSA action.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param wsa_action WSA action string
+ * @param op pointer to operation that maps to the given WSA action
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_add_mapping(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ const axis2_char_t * wsa_action,
+ struct axis2_op *axis2_op);
+
+ /**
+ * Adds a REST mapping for a given RESTful operation. The services.xml
+ * configuration file could specify a HTTP Method and Location that would
+ * map to one of the service operations. This method could be used to register
+ * that mapping against operations. The REST based dispatcher makes use
+ * of this mapping to identify the operation to be invoked, given the URL.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param method REST HTTP Method
+ * @param location REST HTTP Location
+ * @param op pointer to operation that maps to the given WSA action
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_add_rest_mapping(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ const axis2_char_t * method,
+ const axis2_char_t * location,
+ struct axis2_op *axis2_op);
+
+ /**
+ * Adds a module qname to list of module QNames associated with service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param module_qname pointer to QName to be added, this method clones
+ * the QName
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_add_module_qname(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ const axutil_qname_t * module_qname);
+
+ /**
+ * Gets all module QNames associated with the service as a list.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return pointer to array list containing QNames
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_svc_get_all_module_qnames(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Checks if the XML schema location is adjusted.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return AXIS2_TRUE if XML schema is adjusted, else AXIS2_FALSE
+ */
+ /*AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+
+ axis2_svc_is_schema_location_adjusted(
+ axis2_svc_t *svc,
+ const axutil_env_t *env);
+ */
+
+ /**
+ * Sets the bool value indicating if the XML schema location is adjusted.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param adjusted AXIS2_TRUE if XML schema is adjusted, else AXIS2_FALSE
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ /*
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_svc_set_schema_location_adjusted(
+ axis2_svc_t *svc,
+ const axutil_env_t *env,
+ const axis2_bool_t adjusted); */
+
+ /**
+ * Gets XML schema mapping table for service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return pointer to hash map with XML schema mappings, returns a
+ * reference, not a cloned copy
+ */
+ /*
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+
+ axis2_svc_axis2_svc_get_schema_mapping_table(
+ const axis2_svc_t *svc,
+ const axutil_env_t *env); */
+
+ /**
+ * Sets XML schema mapping table for service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param table pointer to hash map with XML schema mappings, service
+ * assumes ownership of the map
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ /*
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_svc_set_schema_mapping_table(
+ axis2_svc_t *svc,
+ const axutil_env_t *env,
+ axutil_hash_t *table); */
+
+ /**
+ * Gets custom schema prefix.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return custom schema prefix string
+ */
+ /*
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+
+ axis2_svc_get_custom_schema_prefix(
+ const axis2_svc_t *svc,
+ const axutil_env_t *env); */
+
+ /**
+ * Sets custom schema prefix.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param prefix custom schema prefix string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ /*
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_svc_set_custom_schema_prefix(
+ axis2_svc_t *svc,
+ const axutil_env_t *env,
+ const axis2_char_t *prefix); */
+
+ /**
+ * Gets custom schema suffix.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return custom schema suffix string
+ */
+ /*
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+
+ axis2_svc_get_custom_schema_suffix(
+ const axis2_svc_t *svc,
+ const axutil_env_t *env); */
+
+ /**
+ * Sets custom schema suffix.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param suffix custom schema suffix string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ /*
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_svc_set_custom_schema_suffix(
+ axis2_svc_t *svc,
+ const axutil_env_t *env,
+ const axis2_char_t *suffix); */
+
+ /**
+ * Prints the schema to given stream.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param out_stream stream to print to
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ /*
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_svc_print_schema(
+ axis2_svc_t *svc,
+ const axutil_env_t *env,
+ axutil_stream_t *out_stream); */
+
+ /**
+ * Gets the XML schema at the given index of XML schema array list.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param index index of the XML schema to be retrieved
+ * @return pointer to XML schema, returns a reference, not a cloned copy
+ */
+ /*AXIS2_EXTERN xml_schema_t *AXIS2_CALL
+
+ axis2_svc_get_schema(
+ const axis2_svc_t *svc,
+ const axutil_env_t *env,
+ const int index); */
+
+ /**
+ * Adds all namespaces in the namespace map to the XML schema at
+ * the given index of the XML schema array list.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param index index of the XML schema to be processed
+ * @return pointer to XML schema with namespaces added,
+ * returns a reference, not a cloned copy
+ */
+
+ /* AXIS2_EXTERN xml_schema_t *AXIS2_CALL
+
+ axis2_svc_add_all_namespaces(
+ axis2_svc_t *svc,
+ const axutil_env_t *env,
+ int index);*/
+
+ /**
+ * Gets the list of XML schemas associated with service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return pointer to array list of XML schemas, returns a reference,
+ * not a cloned copy
+ */
+ /*
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_svc_get_all_schemas(
+ const axis2_svc_t *svc,
+ const axutil_env_t *env); */
+
+ /**
+ * Adds the given XML schema to the list of XML schemas associated
+ * with the service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param schema pointer to XML schema struct, service assumes the
+ * ownership of struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ /*
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_svc_add_schema(
+ axis2_svc_t *svc,
+ const axutil_env_t *env,
+ xml_schema_t *schema); */
+
+ /**
+ * Adds the list of all XML schemas to service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param schemas pointer to array list containing XML schemas
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ /*
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_svc_add_all_schemas(
+ axis2_svc_t *svc,
+ const axutil_env_t *env,
+ axutil_array_list_t *schemas); */
+
+ /**
+ * Gets XML schema's target namespace.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return XML schema target namespace string
+ */
+ /*
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+
+ axis2_svc_get_schema_target_ns(
+ const axis2_svc_t *svc,
+ const axutil_env_t *env); */
+
+ /**
+ * Sets XML schema's target namespace.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param ns namespace string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ /*
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_svc_set_schema_target_ns(
+ axis2_svc_t *svc,
+ const axutil_env_t *env,
+ const axis2_char_t *ns); */
+
+ /**
+ * Gets XML schema's target namespace prefix.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return XML schema target namespace prefix string
+ */
+ /*
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+
+ axis2_svc_get_schema_target_ns_prefix(
+ const axis2_svc_t *svc,
+ const axutil_env_t *env); */
+
+ /**
+ * Sets XML schema's target namespace prefix.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param prefix namespace prefix string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ /*
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_svc_set_schema_target_ns_prefix(
+ axis2_svc_t *svc,
+ const axutil_env_t *env,
+ const axis2_char_t *prefix); */
+
+ /**
+ * Gets target namespace.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return target namespace as a string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_svc_get_target_ns(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Sets target namespace.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param ns target namespace as a string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ saxis2_svc_et_target_ns(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ const axis2_char_t * ns);
+
+ /**
+ * Gets target namespace prefix.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return target namespace prefix string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+
+ axis2_svc_get_target_ns_prefix(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Sets target namespace prefix.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param prefix target namespace prefix string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_set_target_ns_prefix(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ const axis2_char_t * prefix);
+
+ /**
+ * Gets XML schemas element corresponding to the given QName.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param qname QName of the XML schema element to be retrieved
+ * @return pointer to XML schema element, returns a reference, not a
+ * cloned copy
+ */
+ /*AXIS2_EXTERN xml_schema_element_t *AXIS2_CALL
+
+ axis2_svc_get_schema_element(
+ const axis2_svc_t *svc,
+ const axutil_env_t *env,
+ const axutil_qname_t *qname); */
+
+ /**
+ * Gets the namespace map with all namespaces related to service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return pointer to hash map containing all namespaces, returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ gaxis2_svc_et_ns_map(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the namespace map with all namespaces related to service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param ns_map pointer to hash map containing all namespaces
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_set_ns_map(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ axutil_hash_t * ns_map);
+
+ /**
+ * Populates the schema mappings. This method is used in code generation
+ * and WSDL generation (WSDL2C and C2WSDL). This method deals with the
+ * imported schemas that would be there in the WSDL.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ /*AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_svc_populate_schema_mappings(
+ axis2_svc_t *svc,
+ const axutil_env_t *env); */
+
+ AXIS2_EXTERN axutil_param_container_t *AXIS2_CALL
+
+ axis2_svc_get_param_container(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_flow_container_t *AXIS2_CALL
+
+ axis2_svc_get_flow_container(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /**
+ * Creates a service struct instance.
+ * @param env pointer to environment struct
+ * @return pointer to newly created service
+ */
+ AXIS2_EXTERN axis2_svc_t *AXIS2_CALL
+ axis2_svc_create(
+ const axutil_env_t * env);
+
+ /**
+ * Creates a service struct with given QName.
+ * @param env pointer to environment struct
+ * @param qname service QName
+ * @return pointer to newly created service
+ */
+ AXIS2_EXTERN axis2_svc_t *AXIS2_CALL
+ axis2_svc_create_with_qname(
+ const axutil_env_t * env,
+ const axutil_qname_t * qname);
+
+ AXIS2_EXTERN void *AXIS2_CALL
+ axis2_svc_get_impl_class(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_set_impl_class(
+ axis2_svc_t * svc,
+ const axutil_env_t * env,
+ void *impl_class);
+
+ /**
+ * Gets base description.
+ * @param svc pointer to message
+ * @param env pointer to environment struct
+ * @return pointer to base description struct
+ */
+ AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+ axis2_svc_get_base(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+
+ /* Get the mutex associated with this service
+ * @param svc pointer to message
+ * @param env pointer to environment struct
+ * @return pointer to a axutil_thread_mutext_t
+ */
+ AXIS2_EXTERN axutil_thread_mutex_t * AXIS2_CALL
+ axis2_svc_get_mutex(
+ const axis2_svc_t * svc,
+ const axutil_env_t * env);
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_SVC_H */
diff --git a/include/axis2_svc_client.h b/include/axis2_svc_client.h
new file mode 100644
index 0000000..eb13c66
--- /dev/null
+++ b/include/axis2_svc_client.h
@@ -0,0 +1,642 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_SVC_CLIENT_H
+#define AXIS2_SVC_CLIENT_H
+
+/**
+ * @defgroup axis2_svc_client service client
+ * @ingroup axis2_client_api
+ * The service client interface serves as the primary client
+ * interface for consuming services. You can set the options to be
+ * used by the service client and then invoke an operation on a given
+ * service. There are several ways of invoking a service operation,
+ * which are based on the concept of a message exchange pattern
+ * (MEP). The two basic MEPs supported by service client are out-only
+ * and out-in. Each MEP can be used in either blocking or
+ * non-blocking mode. The operation invocations using the service
+ * client API are based on the XML-in/XML-out principle: both the
+ * payload to be sent to the service and the result from the service
+ * are in XML, represented in AXIOM.
+ * @{
+ */
+
+/**
+ * @file axis2_svc_client.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axutil_uri.h>
+#include <axis2_svc.h>
+#include <axis2_options.h>
+#include <axutil_qname.h>
+#include <axiom_element.h>
+#include <axis2_callback.h>
+#include <axis2_endpoint_ref.h>
+#include <axis2_svc_ctx.h>
+#include <axis2_conf_ctx.h>
+#include <axis2_op_client.h>
+#include <axutil_string.h>
+#include <neethi_policy.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_svc_client */
+ typedef struct axis2_svc_client axis2_svc_client_t;
+
+ /**
+ * Returns the axis2_svc_t this is a client for. This is primarily
+ * useful when the service is created anonymously or from WSDL.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @return a pointer to axis service struct, or NULL if no service
+ * is associated. Returns a reference, not a cloned copy.
+ */
+ AXIS2_EXTERN axis2_svc_t *AXIS2_CALL
+ axis2_svc_client_get_svc(
+ const axis2_svc_client_t * svc_client,
+ const axutil_env_t * env);
+
+ /**
+ * Returns the axis2_conf_ctx_t. This is useful when creating service clients using
+ * the same configuration context as the original service client.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @return a pointer to axis configuration context struct, or NULL.
+ * Returns a reference, not a cloned copy.
+ */
+ AXIS2_EXTERN axis2_conf_ctx_t *AXIS2_CALL
+ axis2_svc_client_get_conf_ctx(
+ const axis2_svc_client_t * svc_client,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the options to be used by service client.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @param options pointer to options struct to be set
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_client_set_options(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ const axis2_options_t * options);
+
+ /**
+ * Gets options used by service client.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @return a pointer to the options struct if options set, else NULL.
+ * Returns a reference, not a cloned copy.
+ */
+ AXIS2_EXTERN const axis2_options_t *AXIS2_CALL
+ axis2_svc_client_get_options(
+ const axis2_svc_client_t * svc_client,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the overriding options. The overriding client options related
+ * to this service interaction override any options that the
+ * underlying operation client may have.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @param options pointer to options struct to be set
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_client_set_override_options(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ const axis2_options_t * override_options);
+
+ /**
+ * Gets the overriding options.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @return pointer to overriding options struct if options set, else NULL.
+ * Returns a reference, not a cloned copy.
+ */
+ AXIS2_EXTERN const axis2_options_t *AXIS2_CALL
+ axis2_svc_client_get_override_options(
+ const axis2_svc_client_t * svc_client,
+ const axutil_env_t * env);
+
+ /**
+ * Engages the named module. The engaged modules extend the message
+ * processing when consuming services. Modules help to apply QoS
+ * norms in messaging. Once a module is engaged to a service client,
+ * the axis2_engine makes sure to invoke the module for all the
+ * interactions between the client and the service.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @param module_name name of the module to be engaged
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_client_engage_module(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ const axis2_char_t * module_name);
+
+ /**
+ * Dis-engages the named module. Dis-engaging a module on a service
+ * client ensures that the axis2_engine would not invoke the named
+ * module when sending and receiving messages.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @param module_name name of the module to be dis-engaged
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_client_disengage_module(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ const axis2_char_t * module_name);
+
+ /**
+ * Adds an XML element as a header to be sent to the server side.
+ * This allows users to go beyond the usual XML-in/XML-out pattern,
+ * and send custom SOAP headers. Once added, service client owns
+ * the header and will clean up when the service client is freed.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @param header om node representing the SOAP header in XML
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_client_add_header(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ axiom_node_t * header);
+
+ /**
+ * Removes all the headers added to service client.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_client_remove_all_headers(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env);
+
+ /**
+ * This method can be used to send an XML message.
+ * This is a simple method to invoke a service operation whose MEP is
+ * Robust Out-Only. If a fault triggers on server side, this method
+ * would report an error back to the caller.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @param op_qname operation qname. NULL is equivalent to an
+ * operation name of "__OPERATION_ROBUST_OUT_ONLY__"
+ * @param payload pointer to OM node representing the XML payload to be sent.
+ * The caller has control over the payload until the service client frees it.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_client_send_robust_with_op_qname(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ const axutil_qname_t * op_qname,
+ const axiom_node_t * payload);
+
+ /**
+ * This method can be used to send an XML message.
+ * This is a simple method to invoke a service operation whose MEP is
+ * Robust Out-Only. If a fault triggers on server side, this method
+ * would report an error back to the caller.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * operation name of "__OPERATION_ROBUST_OUT_ONLY__"
+ * @param payload pointer to OM node representing the XML payload to be sent.
+ * The caller has control over the payload until the service client frees it.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_client_send_robust(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ const axiom_node_t * payload);
+
+ /**
+ * Sends a message and forget about it. This method is used to interact with
+ * a service operation whose MEP is In-Only. That is, there is no
+ * opportunity to get an error from the service via this method; one may still
+ * get client-side errors, such as host unknown etc.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @param op_qname operation qname. NULL is equivalent to an
+ * operation name of "__OPERATION_OUT_ONLY__"
+ * @param payload pointer to OM node representing the XML payload to be sent.
+ * The caller has control over the payload until the service client frees it.
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_svc_client_fire_and_forget_with_op_qname(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ const axutil_qname_t * op_qname,
+ const axiom_node_t * payload);
+
+ /**
+ * Sends a message and forget about it. This method is used to interact with
+ * a service operation whose MEP is In-Only. That is, there is no
+ * opportunity to get an error from the service via this method; one may still
+ * get client-side errors, such as host unknown etc.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @param payload pointer to OM node representing the XML payload to be sent.
+ * The caller has control over the payload until the service client frees it.
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_svc_client_fire_and_forget(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ const axiom_node_t * payload);
+
+ /**
+ * Sends XML request and receives XML response.
+ * This method is used to interact with a service operation whose MEP is In-Out.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @param op_qname operation qname. NULL is equivalent to an
+ * operation name of "__OPERATION_OUT_IN__"
+ * @param payload pointer to OM node representing the XML payload to be sent.
+ * The caller has control over the payload until the service client frees it.
+ * @return pointer to OM node representing the XML response. The
+ * caller owns the returned node.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ axis2_svc_client_send_receive_with_op_qname(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ const axutil_qname_t * op_qname,
+ const axiom_node_t * payload);
+
+ /**
+ * Sends XML request and receives XML response.
+ * This method is used to interact with a service operation whose MEP is In-Out.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @param payload pointer to OM node representing the XML payload to be sent.
+ * The caller has control over the payload until the service client frees it.
+ * @return pointer to OM node representing the XML response. The
+ * caller owns the returned node.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ axis2_svc_client_send_receive(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ const axiom_node_t * payload);
+
+ /**
+ * Sends XML request and receives XML response, but does not block for response.
+ * This method is used to interact in non-blocking mode with a service
+ * operation whose MEP is In-Out.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @param op_qname operation qname. NULL is equivalent to an
+ * operation name of "__OPERATION_OUT_IN__"
+ * @param payload pointer to OM node representing the XML payload to be sent.
+ * The caller has control over the payload until the service client frees it.
+ * @callback pointer to callback struct used to capture response
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_svc_client_send_receive_non_blocking_with_op_qname(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ const axutil_qname_t * op_qname,
+ const axiom_node_t * payload,
+ axis2_callback_t * callback);
+
+ /**
+ * Sends XML request and receives XML response, but does not block for response.
+ * This method is used to interact in non-blocking mode with a service
+ * operation whose MEP is In-Out.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @param payload pointer to OM node representing the XML payload to be sent.
+ * The caller has control over the payload until the service client frees it.
+ * @callback pointer to callback struct used to capture response
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_svc_client_send_receive_non_blocking(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ const axiom_node_t * payload,
+ axis2_callback_t * callback);
+
+ /**
+ * Creates an op_client for a specific operation. This is the way to
+ * create a full functional MEP client which can be used to exchange
+ * messages for this specific operation.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @param op_qname axutil_qname_t of the operation
+ * @return pointer to newly created op_client configured for the given operation
+ */
+ AXIS2_EXTERN axis2_op_client_t *AXIS2_CALL
+ axis2_svc_client_create_op_client(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ const axutil_qname_t * op_qname);
+
+ /**
+ * Cleans up service client invocation. This will close the output
+ * stream and/or remove entry from waiting queue of the transport
+ * listener queue.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_client_finalize_invoke(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the service client's own endpoint_ref, that is the
+ * endpoint the client will be sending from.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @param transport name of the transport, e.g "http"
+ * @return pointer to the endpoint_ref struct. Returns a reference,
+ * not a cloned copy.
+ */
+ AXIS2_EXTERN const axis2_endpoint_ref_t *AXIS2_CALL
+ axis2_svc_client_get_own_endpoint_ref(
+ const axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ const axis2_char_t * transport);
+
+ /**
+ * Gets the target endpoint ref.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @return pointer to the endpoint_ref struct. Returns a reference,
+ * not a cloned copy.
+ */
+ AXIS2_EXTERN const axis2_endpoint_ref_t *AXIS2_CALL
+ axis2_svc_client_get_target_endpoint_ref(
+ const axis2_svc_client_t * svc_client,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the target endpoint ref.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @param target_epr pointer to the endpoint_ref struct to be set as
+ * target. service client takes over the ownership of the struct.
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_client_set_target_endpoint_ref(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ axis2_endpoint_ref_t * target_epr);
+
+ /**
+ * Sets the proxy with authentication support.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @param proxy_host pointer to the proxy_host settings to be set
+ * @param proxy_port pointer to the proxy_port settings to be set
+ * @param username pointer to the username associated with proxy
+ * which is required for authentication
+ * @param password pointer to the password associated with proxy
+ * which is required for authentication
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_client_set_proxy_with_auth(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ axis2_char_t * proxy_host,
+ axis2_char_t * proxy_port,
+ axis2_char_t * username,
+ axis2_char_t * password);
+
+ /**
+ * Sets the proxy.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @param proxy_host pointer to the proxy_host settings to be set
+ * @param proxy_port pointer to the proxy_port settings to be set
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_client_set_proxy(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ axis2_char_t * proxy_host,
+ axis2_char_t * proxy_port);
+
+ /**
+ * Gets the service context.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @return pointer to service context struct. service client owns
+ * the returned pointer.
+ */
+ AXIS2_EXTERN axis2_svc_ctx_t *AXIS2_CALL
+ axis2_svc_client_get_svc_ctx(
+ const axis2_svc_client_t * svc_client,
+ const axutil_env_t * env);
+
+ /**
+ * Frees the service client.
+ * @param svc_client pointer to service client struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_svc_client_free(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the operation client
+ * @param svc_client pointer to service_client struct
+ * @param env env pointer to environment struct
+ * @return pointer to service context struct. service client owns
+ * the returned pointer
+ */
+ AXIS2_EXTERN axis2_op_client_t *AXIS2_CALL
+ axis2_svc_client_get_op_client(
+ const axis2_svc_client_t * svc_client,
+ const axutil_env_t * env);
+
+ /**
+ * Creates a service client struct.
+ * @param env pointer to environment struct
+ * @param client_home name of the directory that contains the Axis2/C repository
+ * @return a pointer to newly created service client struct,
+ * or NULL on error with error code set in environment's error
+ */
+ AXIS2_EXTERN axis2_svc_client_t *AXIS2_CALL
+ axis2_svc_client_create(
+ const axutil_env_t * env,
+ const axis2_char_t * client_home);
+
+ /**
+ * Creates a service client struct for a specified service and configuration
+ * context.
+ * @param env pointer to environment struct
+ * @param conf_ctx pointer to configuration context. Newly created client
+ * assumes ownership of the conf_ctx
+ * @param svc pointer to service struct representing the service to be consumed.
+ * Newly created client assumes ownership of the service
+ * @param client_home name of the directory that contains the Axis2/C repository
+ * @return a pointer to newly created service client struct,
+ * or NULL on error with error code set in environment's error
+ */
+ AXIS2_EXTERN axis2_svc_client_t *AXIS2_CALL
+ axis2_svc_client_create_with_conf_ctx_and_svc(
+ const axutil_env_t * env,
+ const axis2_char_t * client_home,
+ axis2_conf_ctx_t * conf_ctx,
+ axis2_svc_t * svc);
+
+ /**
+ * Gets the last response SOAP envelope.
+ * @param svc_client pointer to service_client struct
+ * @param env env pointer to environment struct
+ * @return pointer to SOAP envelope that was returned as a result
+ * when send_receieve was called last time
+ */
+ AXIS2_EXTERN axiom_soap_envelope_t *AXIS2_CALL
+ axis2_svc_client_get_last_response_soap_envelope(
+ const axis2_svc_client_t * svc_client,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the boolean value indicating if the last response had a SOAP fault.
+ * @param svc_client pointer to service_client struct
+ * @param env env pointer to environment struct
+ * @return AXIS2_TRUE if there was a fault, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_svc_client_get_last_response_has_fault(
+ const axis2_svc_client_t * svc_client,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the authentication type required.
+ * @param svc_client pointer to service_client struct
+ * @param env env pointer to environment struct
+ * @return AXIS2_TRUE if the operation succeeded, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axis2_svc_client_get_auth_type(
+ const axis2_svc_client_t * svc_client,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the boolean value indicating whether HTTP Authentication
+ * is required.
+ * @param svc_client pointer to service_client struct
+ * @param env env pointer to environment struct
+ * @return AXIS2_TRUE if Authentication is required, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_svc_client_get_http_auth_required(
+ const axis2_svc_client_t * svc_client,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the boolean value indicating whether Proxy Authentication
+ * is required.
+ * @param svc_client pointer to service_client struct
+ * @param env env pointer to environment struct
+ * @return AXIS2_TRUE if Authentication is required, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_svc_client_get_proxy_auth_required(
+ const axis2_svc_client_t * svc_client,
+ const axutil_env_t * env);
+
+ /**
+ * Create a policy object and set it to the description hierarchy
+ * @param svc_client pointer to service_client struct
+ * @param env pointer to environment struct
+ * @param root_node pointer to a policy node
+ * @return AXIS2_FAILURE if there was a fault, else AXIS2_SUCCESS
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_client_set_policy_from_om(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ axiom_node_t * root_node);
+
+ /**
+ * Set the given policy object to the description hierarchy
+ * @param svc_client pointer to service_client struct
+ * @param env pointer to environment struct
+ * @param policy neethi_policy_t to a policy struct
+ * @return AXIS2_FAILURE if there was a fault, else AXIS2_SUCCESS
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_client_set_policy(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env,
+ neethi_policy_t * policy);
+
+ /**
+ * Gets the HTTP Headers of the last response.
+ * @param svc_client pointer to service_client struct
+ * @param env pointer to environment struct
+ * @return list of HTTP Response Headers
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axis2_svc_client_get_http_headers(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the HTTP Status Code of the last response.
+ * @param svc_client pointer to service_client struct
+ * @param env pointer to environment struct
+ * @return HTTP Status Code
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_svc_client_get_http_status_code(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env);
+
+ /**
+ * Close the service client.
+ * @param svc_client pointer to service_client struct
+ * @param env pointer to environment struct
+ * @return AXIS2_FAILURE if there was a fault, else AXIS2_SUCCESS
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_client_close(
+ axis2_svc_client_t * svc_client,
+ const axutil_env_t * env);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_SVC_CLIENT_H */
diff --git a/include/axis2_svc_ctx.h b/include/axis2_svc_ctx.h
new file mode 100644
index 0000000..c88d2f4
--- /dev/null
+++ b/include/axis2_svc_ctx.h
@@ -0,0 +1,196 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_SVC_CTX_H
+#define AXIS2_SVC_CTX_H
+
+/**
+ * @defgroup axis2_svc_ctx service context
+ * @ingroup axis2_context
+ * service context represents a running "instance" of a service.
+ * service context allows instance of operations belonging to a service to be
+ * grouped.
+ * @{
+ */
+
+/**
+ * @file axis2_svc_ctx.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_op_ctx.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_svc_ctx */
+ typedef struct axis2_svc_ctx axis2_svc_ctx_t;
+
+ /**
+ * Creates a service context struct that corresponds to the given service
+ * and with the given parent service group context.
+ * @param env pointer to environment struct
+ * @param svc pointer to service that this service context represents,
+ * service context does not assume the ownership of service
+ * @param svc_grp_ctx pointer to service group context, the parent of the
+ * newly created service context. service context does not assume the
+ * ownership of parent
+ * @return pointer to newly created service context
+ */
+ AXIS2_EXTERN axis2_svc_ctx_t *AXIS2_CALL
+ axis2_svc_ctx_create(
+ const axutil_env_t * env,
+ struct axis2_svc *svc,
+ struct axis2_svc_grp_ctx *svc_grp_ctx);
+
+ /**
+ * Gets base which is of type context.
+ * @param svc_ctx pointer to service context
+ * @param env pointer to environment struct
+ * @return pointer to context, returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axis2_ctx_t *AXIS2_CALL
+ axis2_svc_ctx_get_base(
+ const axis2_svc_ctx_t * svc_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets parent which is of type service group context.
+ * @param svc_ctx pointer to service context
+ * @param env pointer to environment struct
+ * @return pointer to parent service group context
+ */
+ AXIS2_EXTERN struct axis2_svc_grp_ctx *AXIS2_CALL
+ axis2_svc_ctx_get_parent(
+ const axis2_svc_ctx_t * svc_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets parent which is of type service group context.
+ * @param svc_ctx pointer to service context
+ * @param env pointer to environment struct
+ * @param parent parent of service context which is of type
+ * service group context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_ctx_set_parent(
+ axis2_svc_ctx_t * svc_ctx,
+ const axutil_env_t * env,
+ struct axis2_svc_grp_ctx *parent);
+
+ /**
+ * Frees service context instance.
+ * @param svc_ctx pointer to service context
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_svc_ctx_free(
+ struct axis2_svc_ctx *svc_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Initializes service context. This method locates the corresponding
+ * service that is related to the service context from configuration
+ * using service qname and keeps a reference to it for future use.
+ * @param svc_ctx pointer to service context
+ * @param env pointer to environment struct
+ * @param conf pointer to configuration
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_ctx_init(
+ struct axis2_svc_ctx *svc_ctx,
+ const axutil_env_t * env,
+ struct axis2_conf *conf);
+
+ /**
+ * Gets the ID of the service that this service context is an instance
+ * of.
+ * @param svc_ctx pointer to service context
+ * @param env pointer to environment struct
+ * @return service ID string.
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_svc_ctx_get_svc_id(
+ const axis2_svc_ctx_t * svc_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets the service that this service context represents.
+ * @param svc_ctx pointer to service context
+ * @param env pointer to environment struct
+ * @return pointer to service, returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_svc *AXIS2_CALL
+ axis2_svc_ctx_get_svc(
+ const axis2_svc_ctx_t * svc_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the service that this service context represents.
+ * @param svc_ctx pointer to service context
+ * @param env pointer to environment struct
+ * @param svc pointer to service struct, service context does not assume
+ * the ownership of the struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_ctx_set_svc(
+ axis2_svc_ctx_t * svc_ctx,
+ const axutil_env_t * env,
+ struct axis2_svc *svc);
+
+ /**
+ * Gets configuration context which is the super root (super most parent)
+ * of the context hierarchy to which this service context belongs.
+ * @param svc_ctx pointer to service context
+ * @param env pointer to environment struct
+ * @return pointer to configuration context
+ */
+ AXIS2_EXTERN struct axis2_conf_ctx *AXIS2_CALL
+ axis2_svc_ctx_get_conf_ctx(
+ const axis2_svc_ctx_t * svc_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Creates an operation context for the named operation. The named
+ * operation should be one of the operations in the service related
+ * to this service context.
+ * @param svc_ctx pointer to service context
+ * @param env pointer to environment struct
+ * @param qname pointer to qname that represents the operation name.
+ * @return pointer to operation context
+ */
+ AXIS2_EXTERN struct axis2_op_ctx *AXIS2_CALL
+ axis2_svc_ctx_create_op_ctx(
+ struct axis2_svc_ctx *svc_ctx,
+ const axutil_env_t * env,
+ const axutil_qname_t * qname);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_SVC_CTX_H */
diff --git a/include/axis2_svc_grp.h b/include/axis2_svc_grp.h
new file mode 100644
index 0000000..4f05296
--- /dev/null
+++ b/include/axis2_svc_grp.h
@@ -0,0 +1,368 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_SVC_GRP_H
+#define AXIS2_SVC_GRP_H
+
+/**
+ * @defgroup axis2_svc_grp service group
+ * @ingroup axis2_desc
+ * service group represents the static structure of a service group in
+ * the Axis2 configuration.
+ * In Axis2 description hierarchy, a service group lives inside the
+ * configuration. service groups are configured in services.xml files located
+ * in the respective service group folders of the services folder in the repository.
+ * In services.xml file, services groups are declared at top level.
+ * A service group can have one or more services associated with it.
+ * Sometimes services.xml would not have a service group defined, but only a
+ * service. In such cases a service group with the same name as that of the
+ * service mentioned in services.xml would be created by the deployment
+ * engine and the service would be associated with that newly created service
+ * group. The deployment engine would create service group instances to represent
+ * those configured service groups in services.xml files and would store
+ * them in the configuration.
+ * service group encapsulates data on engaged module information and the
+ * service associated with service group.
+ * @{
+ */
+
+/**
+ * @file axis2_svc_grp.h
+ */
+
+#include <axutil_param_container.h>
+#include <axis2_desc.h>
+#include <axis2_svc.h>
+#include <axis2_svc_grp_ctx.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_svc_grp */
+ typedef struct axis2_svc_grp axis2_svc_grp_t;
+
+ struct axis2_svc;
+ struct axis2_svc_grp_ctx;
+
+ /**
+ * Frees service group.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_svc_grp_free(
+ axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env);
+
+ /**
+ * Sets service group name.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @param svc_grp_name service group name string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_grp_set_name(
+ axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env,
+ const axis2_char_t * svc_grp_name);
+
+ /**
+ * Gets service group name.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @return service group name string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_svc_grp_get_name(
+ const axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env);
+
+ /**
+ * Adds given service to service group.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @param service service to be added, service group assumes ownership
+ * of service
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_grp_add_svc(
+ axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env,
+ struct axis2_svc *svc);
+
+ /**
+ * Gets named service from service group.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @param svc_qname pointer to QName of the service
+ * @return pointer to service corresponding to given QName, returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_svc *AXIS2_CALL
+ axis2_svc_grp_get_svc(
+ const axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env,
+ const axutil_qname_t * svc_qname);
+
+ /**
+ * Gets all services associated with service group.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @return pointer to hash table containing all services, returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_svc_grp_get_all_svcs(
+ const axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env);
+
+ /**
+ * Removes named service from service group.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @param svc_name pointer to service QName
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_grp_remove_svc(
+ axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env,
+ const axutil_qname_t * svc_qname);
+
+ /**
+ * Adds parameter.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @param param pointer to parameter, service group assumes ownership
+ * of parameter
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_grp_add_param(
+ axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env,
+ axutil_param_t * param);
+
+ /**
+ * Gets named parameter.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @param name parameter name
+ * @return pointer to named parameter if exists, else NULL. Returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_param_t *AXIS2_CALL
+ axis2_svc_grp_get_param(
+ const axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env,
+ const axis2_char_t * name);
+
+ /**
+ * Remove a parameter.
+ * @param svc_grp pointer to service grp struct
+ * @param env pointer to the environment
+ * @Param param_name parameter name to be removed
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_grp_remove_param(
+ const axis2_svc_grp_t *svc_grp,
+ const axutil_env_t *env,
+ const axis2_char_t *param_name);
+
+ /**
+ * Gets all parameters set on service group.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @return pointer to array list containing parameter, returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_svc_grp_get_all_params(
+ const axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env);
+
+ /**
+ * Checks if the named parameter is locked.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @param param_name pointer to param name
+ * @return AXIS2_TRUE if the named parameter is locked, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_svc_grp_is_param_locked(
+ axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env,
+ const axis2_char_t * param_name);
+
+ /**
+ * Adds given module QName to list of module QNames.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @param module_name pointer to module QName
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_grp_add_module_qname(
+ axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env,
+ const axutil_qname_t * module_qname);
+
+ /**
+ * Gets parent which is of type configuration.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @return pointer to parent configuration, returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_conf *AXIS2_CALL
+ axis2_svc_grp_get_parent(
+ const axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env);
+
+ /**
+ * Sets parent which is of type configuration.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @param parent parent configuration, service group does not assume
+ * the ownership of configuration
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_grp_set_parent(
+ axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env,
+ struct axis2_conf *parent);
+
+ /**
+ * Engages named module to service group. Engaging a module to service
+ * group would ensure that the same module would be engaged to all
+ * services within the group.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @param module_name pointer to module QName
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_grp_engage_module(
+ axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env,
+ const axutil_qname_t * module_qname);
+
+ /**
+ * Gets all module QNames associated with service group.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @return pointer to array list containing all QNames, returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_svc_grp_get_all_module_qnames(
+ const axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env);
+
+ /**
+ * Adds module reference.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @param moduleref pointer to module QName
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_grp_add_module_ref(
+ axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env,
+ const axutil_qname_t * moduleref);
+
+ /**
+ * Gets all module references.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @return pointer to array list containing module reference, returns
+ * a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+
+ axis2_svc_grp_get_all_module_refs(
+ const axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env);
+
+ /**
+ * Gets service group context related to this service group.
+ * @param svc_grp pointer to service group struct
+ * @param env pointer to environment struct
+ * @param parent pointer to configuration context which is the parent of
+ * the context hierarchy
+ * @return pointer to service group context related to this service
+ * group, returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_svc_grp_ctx *AXIS2_CALL
+
+ axis2_svc_grp_get_svc_grp_ctx(
+ const axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env,
+ struct axis2_conf_ctx *parent);
+
+ AXIS2_EXTERN axutil_param_container_t *AXIS2_CALL
+
+ axis2_svc_grp_get_param_container(
+ const axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env);
+
+ /**
+ * Creates a service group struct instance.
+ * @param env pointer to environment struct
+ * @return pointer to newly created service group
+ */
+ AXIS2_EXTERN axis2_svc_grp_t *AXIS2_CALL
+ axis2_svc_grp_create(
+ const axutil_env_t * env);
+
+ /**
+ * Creates service group with given configuration as the parent.
+ * @param env pointer to environment struct
+ * @param conf pointer to configuration, service group created does not
+ * assume ownership of configuration
+ * @return pointer to newly created service group
+ */
+ AXIS2_EXTERN axis2_svc_grp_t *AXIS2_CALL
+ axis2_svc_grp_create_with_conf(
+ const axutil_env_t * env,
+ struct axis2_conf *conf);
+
+ /**
+ * Gets base description.
+ * @param svc_grp pointer to message
+ * @param env pointer to environment struct
+ * @return pointer to base description struct
+ */
+ AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+ axis2_svc_grp_get_base(
+ const axis2_svc_grp_t * svc_grp,
+ const axutil_env_t * env);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_SVC_GRP_H */
diff --git a/include/axis2_svc_grp_ctx.h b/include/axis2_svc_grp_ctx.h
new file mode 100644
index 0000000..0ae9c96
--- /dev/null
+++ b/include/axis2_svc_grp_ctx.h
@@ -0,0 +1,194 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_SVC_GRP_CTX_H
+#define AXIS2_SVC_GRP_CTX_H
+
+/**
+ * @defgroup axis2_svc_grp_ctx service group context
+ * @ingroup axis2_context
+ * service group context represents a running "instance" of a service group.
+ * service group context allows instance of services belonging to a service
+ * group to be grouped.
+ * @{
+ */
+
+/**
+ * @file axis2_svc_grp_ctx.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_svc_ctx.h>
+#include <axis2_svc_grp.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ struct axis2_svc_grp;
+
+ /** Type name for struct svc_grp_ctx */
+ typedef struct axis2_svc_grp_ctx axis2_svc_grp_ctx_t;
+
+ /**
+ * Creates a service group context struct.
+ * @param env pointer to environment struct
+ * @param svc_grp pointer to service group that this service context
+ * represents, service group context does not assume the ownership of the struct
+ * @param conf_ctx pointer to configuration context, the parent context
+ * of the newly created service group context, service group context does not
+ * assume the ownership of the struct
+ * @return pointer to newly created service group context
+ */
+ AXIS2_EXTERN axis2_svc_grp_ctx_t *AXIS2_CALL
+ axis2_svc_grp_ctx_create(
+ const axutil_env_t * env,
+ struct axis2_svc_grp *svc_grp,
+ struct axis2_conf_ctx *conf_ctx);
+
+ /**
+ * Gets base which is of type context.
+ * @param svc_grp_ctx pointer to service group context
+ * @param env pointer to environment
+ * @return pointer to base context struct, returns a reference not a
+ * cloned copy
+ */
+ AXIS2_EXTERN axis2_ctx_t *AXIS2_CALL
+ axis2_svc_grp_ctx_get_base(
+ const axis2_svc_grp_ctx_t * svc_grp_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets parent. configuration context is the parent of any service group
+ * context instance.
+ * @param svc_grp_ctx pointer to service group context
+ * @param env pointer to environment struct
+ * @return pointer to configuration context, parent of service group
+ */
+ AXIS2_EXTERN struct axis2_conf_ctx *AXIS2_CALL
+ axis2_svc_grp_ctx_get_parent(
+ const axis2_svc_grp_ctx_t * svc_grp_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Frees service group context.
+ * @param svc_grp_ctx pointer to service group context
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_svc_grp_ctx_free(
+ struct axis2_svc_grp_ctx *svc_grp_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Initializes service group context. In this method, it pics the
+ * related service group from configuration and keeps a reference
+ * for future use.
+ * @param svc_grp_ctx pointer to service group context
+ * @param env pointer to environment struct
+ * @param conf pointer to configuration
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_grp_ctx_init(
+ struct axis2_svc_grp_ctx *svc_grp_ctx,
+ const axutil_env_t * env,
+ struct axis2_conf *conf);
+
+ /**
+ * Gets service group context ID.
+ * @param svc_grp_ctx pointer to service group context
+ * @param env pointer to environment struct
+ * @return service group context ID string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_svc_grp_ctx_get_id(
+ const axis2_svc_grp_ctx_t * svc_grp_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Sets service group context ID.
+ * @param svc_grp_ctx pointer to service group context
+ * @param env pointer to environment struct
+ * @param id service group context ID
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_grp_ctx_set_id(
+ struct axis2_svc_grp_ctx *svc_grp_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * id);
+
+ /**
+ * Gets named service context.
+ * @param svc_grp_ctx pointer to service group context
+ * @param env pointer to environment struct
+ * @param svc_name name of service context to be retrieved
+ * @return pointer to named service context
+ */
+ AXIS2_EXTERN struct axis2_svc_ctx *AXIS2_CALL
+ axis2_svc_grp_ctx_get_svc_ctx(
+ const axis2_svc_grp_ctx_t * svc_grp_ctx,
+ const axutil_env_t * env,
+ const axis2_char_t * svc_name);
+
+ /**
+ * Fills service context map. This will create one service context per
+ * each service in the service group related to this service context.
+ * @param svc_grp_ctx pointer to service group context
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_grp_ctx_fill_svc_ctx_map(
+ struct axis2_svc_grp_ctx *svc_grp_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets service group related to this service context.
+ * @param svc_grp_ctx pointer to service group context
+ * @param env pointer to environment struct
+ * @return pointer to service group that this service group context
+ * represents
+ */
+ AXIS2_EXTERN struct axis2_svc_grp *AXIS2_CALL
+ axis2_svc_grp_ctx_get_svc_grp(
+ const axis2_svc_grp_ctx_t * svc_grp_ctx,
+ const axutil_env_t * env);
+
+ /**
+ * Gets service context map containing all service contexts.
+ * @param svc_grp_ctx pointer to service group context
+ * @param env pointer to environment struct
+ * @return pointer to hash table containing the service context map
+ */
+ AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+ axis2_svc_grp_ctx_get_svc_ctx_map(
+ const axis2_svc_grp_ctx_t * svc_grp_ctx,
+ const axutil_env_t * env);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_SVC_GRP_CTX_H */
diff --git a/include/axis2_svc_name.h b/include/axis2_svc_name.h
new file mode 100644
index 0000000..72422bb
--- /dev/null
+++ b/include/axis2_svc_name.h
@@ -0,0 +1,135 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_SVC_NAME_H
+#define AXIS2_SVC_NAME_H
+
+/**
+ * @defgroup axis2_svc_name service name
+ * @ingroup axis2_addr
+ * service name provides a full description of the service endpoint. service
+ * name contains a QName identifying the WSDL service element that contains
+ * the definition of the endpoint being conveyed. It also contains an optional
+ * non-qualified name that identifies the specific port in the service that
+ * corresponds to the endpoint.
+ * @{
+ */
+
+/**
+ * @file axis2_svc_name.h
+ */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_const.h>
+#include <axutil_qname.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_svc_name */
+ typedef struct axis2_svc_name axis2_svc_name_t;
+
+ /**
+ * Creates a service name struct with given QName and endpoint name.
+ * @param env pointer to environment struct
+ * @param qname pointer to QName, this method creates a clone of QName
+ * @param endpoint_name endpoint name string
+ * @return pointer to newly create service name struct
+ */
+ AXIS2_EXTERN axis2_svc_name_t *AXIS2_CALL
+ axis2_svc_name_create(
+ const axutil_env_t * env,
+ const axutil_qname_t * qname,
+ const axis2_char_t * endpoint_name);
+
+ /**
+ * Gets QName. QName identifies the WSDL service element that contains
+ * the definition of the endpoint being conveyed.
+ * @param svc_name pointer to service name struct
+ * @param env pointer to environment struct
+ * @return pointer to QName struct, returns a reference, not a cloned
+ * copy
+ */
+ AXIS2_EXTERN const axutil_qname_t *AXIS2_CALL
+ axis2_svc_name_get_qname(
+ const axis2_svc_name_t * svc_name,
+ const axutil_env_t * env);
+
+ /**
+ * Sets QName. QName identifies the WSDL service element that contains
+ * the definition of the endpoint being conveyed.
+ * @param svc_name pointer to service name struct
+ * @param env pointer to environment struct
+ * @param qname pointer to QName, service name creates a clone of QName
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_name_set_qname(
+ struct axis2_svc_name *svc_name,
+ const axutil_env_t * env,
+ const axutil_qname_t * qname);
+
+ /**
+ * Gets endpoint name. Endpoint name is a non-qualified name that
+ * identifies the specific port in the service that corresponds to
+ * the endpoint.
+ * @param svc_name pointer to service name struct
+ * @param env pointer to environment struct
+ * @return endpoint name string
+ */
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axis2_svc_name_get_endpoint_name(
+ const axis2_svc_name_t * svc_name,
+ const axutil_env_t * env);
+
+ /**
+ * Sets endpoint name. Endpoint name is a non-qualified name that
+ * identifies the specific port in the service that corresponds to
+ * the endpoint.
+ * @param svc_name pointer to service name struct
+ * @param env pointer to environment struct
+ * @param endpoint_name endpoint name string
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_name_set_endpoint_name(
+ struct axis2_svc_name *svc_name,
+ const axutil_env_t * env,
+ const axis2_char_t * endpoint_name);
+
+ /**
+ * Frees service name struct.
+ * @param svc_name pointer to service name struct
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_svc_name_free(
+ struct axis2_svc_name *svc_name,
+ const axutil_env_t * env);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_SVC_NAME_H */
diff --git a/include/axis2_svc_skeleton.h b/include/axis2_svc_skeleton.h
new file mode 100644
index 0000000..27d08a9
--- /dev/null
+++ b/include/axis2_svc_skeleton.h
@@ -0,0 +1,182 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_SVC_SKELETON_H
+#define AXIS2_SVC_SKELETON_H
+
+/**
+ * @defgroup axis2_soc_api service API
+ * @ingroup axis2
+ * @{
+ * @}
+ */
+
+/**
+ * @defgroup axis2_svc_skeleton service skeleton
+ * @ingroup axis2_svc_api
+ * service skeleton API should be implemented by all services
+ * that are to be deployed with Axis2/C engine.
+ * @{
+ */
+
+/**
+ * @file axis2_svc_skeleton.h
+ */
+
+#include <axiom_node.h>
+#include <axutil_array_list.h>
+#include <axis2_msg_ctx.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_svc_skeleton_ops */
+ typedef struct axis2_svc_skeleton_ops axis2_svc_skeleton_ops_t;
+
+ /** Type name for struct axis2_svc_skeleton */
+ typedef struct axis2_svc_skeleton axis2_svc_skeleton_t;
+
+ /**
+ * service skeleton ops struct.
+ * Encapsulator struct for operations of axis2_svc_skeleton.
+ */
+ struct axis2_svc_skeleton_ops
+ {
+
+ /**
+ * Initializes the service implementation.
+ * @param svc_skeleton pointer to svc_skeleton struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ int(
+ AXIS2_CALL
+ * init)(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env);
+
+ /**
+ * Invokes the service. This function should be used to call up the
+ * functions implementing service operations.
+ * @param svc_skeli pointer to svc_skeli struct
+ * @param env pointer to environment struct
+ * @param node pointer to node struct
+ * @param msg_ctx pointer to message context struct
+ * @return pointer to AXIOM node resulting from the invocation.
+ * In case of one way operations, NULL would be returned with
+ * status in environment error set to AXIS2_SUCCESS. On error
+ * NULL would be returned with error status set to AXIS2_FAILURE
+ */
+ axiom_node_t *(
+ AXIS2_CALL
+ * invoke)(
+ axis2_svc_skeleton_t * svc_skeli,
+ const axutil_env_t * env,
+ axiom_node_t * node,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * This method would be called if a fault is detected.
+ * @param svc_skeli pointer to svc_skeli struct
+ * @param env pointer to environment struct
+ * @param node pointer to node struct
+ * @return pointer to AXIOM node reflecting the fault, NULL on error
+ */
+ axiom_node_t *(
+ AXIS2_CALL
+ * on_fault)(
+ axis2_svc_skeleton_t * svc_skeli,
+ const axutil_env_t * env,
+ axiom_node_t * node);
+
+ /**
+ * Frees service implementation.
+ * @param svc_skeli pointer to svc_skeli struct
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ int(
+ AXIS2_CALL
+ * free)(
+ axis2_svc_skeleton_t * svc_skeli,
+ const axutil_env_t * env);
+
+ /**
+ * Initializes the service implementation.
+ * @param svc_skeleton pointer to svc_skeleton struct
+ * @param env pointer to environment struct
+ * @param conf pointer to axis2c configuration struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ int(
+ AXIS2_CALL
+ * init_with_conf)(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env,
+ struct axis2_conf * conf);
+ };
+
+ /**
+ * service skeleton struct.
+ */
+ struct axis2_svc_skeleton
+ {
+
+ /** operations of service skeleton */
+ const axis2_svc_skeleton_ops_t *ops;
+
+ /** Array list of functions, implementing the service operations */
+ axutil_array_list_t *func_array;
+ };
+
+ /*************************** Function macros **********************************/
+
+ /** Initialize the svc skeleton.
+ @sa axis2_svc_skeleton_ops#init */
+#define AXIS2_SVC_SKELETON_INIT(svc_skeleton, env) \
+ ((svc_skeleton)->ops->init (svc_skeleton, env))
+
+ /** Initialize the svc skeleton with axis2c configuration struct.
+ @sa axis2_svc_skeleton_ops#init_with_conf */
+#define AXIS2_SVC_SKELETON_INIT_WITH_CONF(svc_skeleton, env, conf) \
+ ((svc_skeleton)->ops->init_with_conf (svc_skeleton, env, conf))
+
+ /** Frees the svc skeleton.
+ @sa axis2_svc_skeleton_ops#free */
+#define AXIS2_SVC_SKELETON_FREE(svc_skeleton, env) \
+ ((svc_skeleton)->ops->free (svc_skeleton, env))
+
+ /** Invokes axis2 service skeleton.
+ @sa axis2_svc_skeleton_ops#invoke */
+#define AXIS2_SVC_SKELETON_INVOKE(svc_skeleton, env, node, msg_ctx) \
+ ((svc_skeleton)->ops->invoke (svc_skeleton, env, node, msg_ctx))
+
+ /** Called on fault.
+ @sa axis2_svc_skeleton_ops#on_fault */
+#define AXIS2_SVC_SKELETON_ON_FAULT(svc_skeleton, env, node) \
+ ((svc_skeleton)->ops->on_fault (svc_skeleton, env, node))
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_SVC_SKELETON_H */
diff --git a/include/axis2_svr_callback.h b/include/axis2_svr_callback.h
new file mode 100644
index 0000000..47ba646
--- /dev/null
+++ b/include/axis2_svr_callback.h
@@ -0,0 +1,95 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_SVR_CALLBACK_H
+#define AXIS2_SVR_CALLBACK_H
+
+/** @defgroup axis2_svr_callback server callback
+ * @ingroup axis2_svc_api
+ * @{
+ */
+
+/**
+ * @file axis2_svr_callback.h
+ * @brief axis Server Callback interface
+ */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <axis2_defines.h>
+#include <axis2_const.h>
+#include <axis2_msg_ctx.h>
+
+ /** Type name for struct axis2_svr_callback */
+ typedef struct axis2_svr_callback axis2_svr_callback_t;
+
+ /**
+ * Deallocate memory
+ * @param svr_callback pointer to server callback struct
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_svr_callback_free(
+ axis2_svr_callback_t * svr_callback,
+ const axutil_env_t * env);
+
+ /**
+ * Handle result
+ * @param svr_callback pointer to server callback struct
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svr_callback_handle_result(
+ axis2_svr_callback_t * svr_callback,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * Handle fault
+ * @param svr_callback pointer to server callback struct
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svr_callback_handle_fault(
+ axis2_svr_callback_t * svr_callback,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx);
+
+ /**
+ * Create Server Callback struct
+ * @param env pointer to environment struct
+ * @return newly created server callback object
+ */
+ AXIS2_EXTERN axis2_svr_callback_t *AXIS2_CALL
+ axis2_svr_callback_create(
+ const axutil_env_t * env);
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_SVR_CALLBACK_H */
diff --git a/include/axis2_thread_mutex.h b/include/axis2_thread_mutex.h
new file mode 100644
index 0000000..6512812
--- /dev/null
+++ b/include/axis2_thread_mutex.h
@@ -0,0 +1,112 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_THREAD_MUTEX_H
+#define AXIS2_THREAD_MUTEX_H
+
+/**
+ * @file axutil_thread_mutex.h
+ * @brief AXIS2 Thread Mutex Routines
+ */
+
+#include <axis2_const.h>
+#include <axutil_allocator.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+ /**
+ * @defgroup axis2_mutex thread mutex routines
+ * @ingroup axis2_util
+ * @{
+ */
+
+ /** Opaque thread-local mutex structure */
+ typedef struct axutil_thread_mutex_t axutil_thread_mutex_t;
+
+#define AXIS2_THREAD_MUTEX_DEFAULT 0x0 /**< platform-optimal lock behavior */
+
+#define AXIS2_THREAD_MUTEX_NESTED 0x1 /**< enable nested (recursive) locks */
+
+#define AXIS2_THREAD_MUTEX_UNNESTED 0x2 /**< disable nested locks */
+
+ /**
+ * Create and initialize a mutex that can be used to synchronize threads.
+ *
+ * @param flags Or'ed value of:
+ * <PRE>
+ * AXIS2_THREAD_MUTEX_DEFAULT platform-optimal lock behavior.
+ * AXIS2_THREAD_MUTEX_NESTED enable nested (recursive) locks.
+ * AXIS2_THREAD_MUTEX_UNNESTED disable nested locks (non-recursive).
+ * </PRE>
+ * @param allocator the allocator from which to allocate the mutex.
+ * @return mutex the memory address where the newly created mutex will be
+ * stored.
+ * @warning Be cautious in using AXIS2_THREAD_MUTEX_DEFAULT. While this is the
+ * most optimial mutex based on a given platform's performance charateristics,
+ * it will behave as either a nested or an unnested lock.
+ */
+ AXIS2_EXTERN axutil_thread_mutex_t *AXIS2_CALL
+
+ axutil_thread_mutex_create(
+ axutil_allocator_t * allocator,
+ unsigned int flags);
+
+ /**
+ * Acquire the lock for the given mutex. If the mutex is already locked,
+ * the current thread will be put to sleep until the lock becomes available.
+ * @param mutex the mutex on which to acquire the lock.
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axutil_thread_mutex_lock(
+ axutil_thread_mutex_t * mutex);
+
+ /**
+ * Attempt to acquire the lock for the given mutex. If the mutex has already
+ * been acquired, the call returns immediately
+ * @param mutex the mutex on which to attempt the lock acquiring.
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axutil_thread_mutex_trylock(
+ axutil_thread_mutex_t * mutex);
+
+ /**
+ * Release the lock for the given mutex.
+ * @param mutex the mutex from which to release the lock.
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axutil_thread_mutex_unlock(
+ axutil_thread_mutex_t * mutex);
+
+ /**
+ * Destroy the mutex and free the memory associated with the lock.
+ * @param mutex the mutex to destroy.
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axutil_thread_mutex_destroy(
+ axutil_thread_mutex_t * mutex);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_THREAD_MUTEX_H */
diff --git a/include/axis2_transport_in_desc.h b/include/axis2_transport_in_desc.h
new file mode 100644
index 0000000..bd96331
--- /dev/null
+++ b/include/axis2_transport_in_desc.h
@@ -0,0 +1,329 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_TRANSPORT_IN_DESC_H
+#define AXIS2_TRANSPORT_IN_DESC_H
+
+/**
+ * @defgroup axis2_transport_in_desc transport in description
+ * @ingroup axis2_desc
+ * transport in description represents a transport receiver configured in
+ * Axis2 configuration. There can be multiple transport receivers configured
+ * in axis2.xml file and each of them will be represented with a transport
+ * in description instance. deployment engine takes care of creating and
+ * instantiating transport in descriptions.
+ * transport in description encapsulates flows related to the transport in
+ * and also holds a reference to related transport receiver.
+ * @{
+ */
+
+/**
+ * @file axis2_transport_in_desc.h
+ * @brief Axis2 description transport in interface
+ */
+
+#include <axis2_const.h>
+#include <axutil_error.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axutil_allocator.h>
+#include <axutil_array_list.h>
+
+/*#include <axis2_transport_receiver.h>*/
+#include <axis2_phase_meta.h>
+#include <axis2_phase.h>
+#include <axis2_flow.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_transport_in_desc */
+ typedef struct axis2_transport_in_desc axis2_transport_in_desc_t;
+
+ struct axis2_phase;
+ struct axis2_transport_receiver;
+
+ /**
+ * Frees transport in description.
+ * @param transport_in_desc pointer to transport in description struct
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_transport_in_desc_free(
+ axis2_transport_in_desc_t * transport_in_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Frees transport in description given as a void parameter.
+ * @param transport_in pointer to transport in description as a void
+ * pointer
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_transport_in_desc_free_void_arg(
+ void *transport_in,
+ const axutil_env_t * env);
+
+ /**
+ * Gets transport enum.
+ * @param transport_in pointer to transport in description struct
+ * @param env pointer to environment struct
+ * @return transport enum
+ */
+ AXIS2_EXTERN AXIS2_TRANSPORT_ENUMS AXIS2_CALL
+
+ axis2_transport_in_desc_get_enum(
+ const axis2_transport_in_desc_t * transport_in,
+ const axutil_env_t * env);
+
+ /**
+ * Sets transport enum.
+ * @param transport_in pointer to transport in description struct
+ * @param env pointer to environment struct
+ * @param trans_enum transport enum
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_transport_in_desc_set_enum(
+ struct axis2_transport_in_desc *transport_in,
+ const axutil_env_t * env,
+ const AXIS2_TRANSPORT_ENUMS trans_enum);
+
+ /**
+ * Gets in flow. In flow represents the list of phases invoked
+ * along the receive path.
+ * @param transport_in pointer to transport in description struct
+ * @param env pointer to environment struct
+ * @return pointer to flow representing in flow, returns a reference,
+ * not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_flow *AXIS2_CALL
+
+ axis2_transport_in_desc_get_in_flow(
+ const axis2_transport_in_desc_t * transport_in,
+ const axutil_env_t * env);
+
+ /**
+ * Sets in flow. In flow represents the list of phases invoked
+ * along the receive path.
+ * @param transport_in pointer to transport in description struct
+ * @param env pointer to environment struct
+ * @param in_flow pointer to in flow representing in flow, transport in
+ * description assumes ownership of the flow
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_transport_in_desc_set_in_flow(
+ struct axis2_transport_in_desc *transport_in,
+ const axutil_env_t * env,
+ struct axis2_flow *in_flow);
+
+ /**
+ * Gets fault in flow. Fault in flow represents the list of phases
+ * invoked along the receive path if a fault happens.
+ * @param transport_in pointer to transport in description struct
+ * @param env pointer to environment struct
+ * @return pointer to flow representing fault in flow, returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_flow *AXIS2_CALL
+
+ axis2_transport_in_desc_get_fault_in_flow(
+ const axis2_transport_in_desc_t * transport_in,
+ const axutil_env_t * env);
+
+ /**
+ * Sets fault in flow. Fault in flow represents the list of phases
+ * invoked along the receive path if a fault happens.
+ * @param transport_in pointer to transport in description struct
+ * @param env pointer to environment struct
+ * @param fault_in_flow pointer to flow representing fault in flow,
+ * transport in description assumes the ownership of the flow
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_transport_in_desc_set_fault_in_flow(
+ struct axis2_transport_in_desc *transport_in,
+ const axutil_env_t * env,
+ struct axis2_flow *fault_in_flow);
+
+ /**
+ * Gets transport receiver associated with the transport in description.
+ * @param transport_in pointer to transport in description struct
+ * @param env pointer to environment struct
+ * @return pointer to transport receiver, returns a reference, not
+ * a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_transport_receiver *AXIS2_CALL
+
+ axis2_transport_in_desc_get_recv(
+ const axis2_transport_in_desc_t * transport_in,
+ const axutil_env_t * env);
+
+ /**
+ * Sets transport receiver associated with the transport in description.
+ * @param transport_in pointer to transport in description struct
+ * @param env pointer to environment struct
+ * @param recv pointer to transport receiver, transport in
+ * description assumes ownership of the receiver
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_transport_in_desc_set_recv(
+ struct axis2_transport_in_desc *transport_in,
+ const axutil_env_t * env,
+ struct axis2_transport_receiver *recv);
+
+ /**
+ * Gets the transport in phase associated with transport in description.
+ * @param transport_in pointer to transport in description struct
+ * @param env pointer to environment struct
+ * @return transport in phase, returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_phase *AXIS2_CALL
+
+ axis2_transport_in_desc_get_in_phase(
+ const axis2_transport_in_desc_t * transport_in,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the transport in phase associated with transport in description.
+ * @param transport_in pointer to transport in description struct
+ * @param env pointer to environment struct
+ * @param in_phase pointer to phase representing transport in phase,
+ * transport in description assumes ownership of phase
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_transport_in_desc_set_in_phase(
+ struct axis2_transport_in_desc *transport_in,
+ const axutil_env_t * env,
+ struct axis2_phase *in_phase);
+
+ /**
+ * Gets the transport fault phase associated with transport in description.
+ * @param transport_in pointer to transport in description struct
+ * @param env pointer to environment struct
+ * @return pointer to phase representing fault phase
+ */
+ AXIS2_EXTERN struct axis2_phase *AXIS2_CALL
+
+ axis2_transport_in_desc_get_fault_phase(
+ const axis2_transport_in_desc_t * transport_in,
+ const axutil_env_t * env);
+
+ /**
+ * Sets the transport fault phase associated with transport in description.
+ * @param transport_in pointer to transport in description struct
+ * @param env pointer to environment struct
+ * @param fault_phase pointer to fault phase
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_transport_in_desc_set_fault_phase(
+ struct axis2_transport_in_desc *transport_in,
+ const axutil_env_t * env,
+ struct axis2_phase *fault_phase);
+
+ /**
+ * Adds given parameter.
+ * @param transport_in_desc pointer to transport in description struct
+ * @param env pointer to environment struct
+ * @param param pointer to parameter, transport in description assumes
+ * ownership of parameter
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_transport_in_desc_add_param(
+ axis2_transport_in_desc_t * transport_in_desc,
+ const axutil_env_t * env,
+ axutil_param_t * param);
+
+ /**
+ * Gets named parameter.
+ * @param transport_in_desc pointer to transport in description struct
+ * @param env pointer to environment struct
+ * @param param_name parameter name string
+ * @return pointer to named parameter if it exists, else NULL. Returns
+ * a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axutil_param_t *AXIS2_CALL
+
+ axis2_transport_in_desc_get_param(
+ const axis2_transport_in_desc_t * transport_in_desc,
+ const axutil_env_t * env,
+ const axis2_char_t * param_name);
+
+ /**
+ * Checks if the named parameter is locked.
+ * @param transport_in_desc pointer to transport in description struct
+ * @param env pointer to environment struct
+ * @param param_name parameter name string
+ * @return AXIS2_TRUE if named parameter is locked, else AXIS2_FALSE
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+
+ axis2_transport_in_desc_is_param_locked(
+ axis2_transport_in_desc_t * transport_in_desc,
+ const axutil_env_t * env,
+ const axis2_char_t * param_name);
+
+ AXIS2_EXTERN axutil_param_container_t *AXIS2_CALL
+
+ axis2_transport_in_desc_param_container(
+ const axis2_transport_in_desc_t * transport_in_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Creates transport in description with given transport enum.
+ * @param env pointer to environment struct
+ * @param trans_enum transport enum
+ * @return pointer to newly created phase holder
+ */
+ AXIS2_EXTERN axis2_transport_in_desc_t *AXIS2_CALL
+
+ axis2_transport_in_desc_create(
+ const axutil_env_t * env,
+ const AXIS2_TRANSPORT_ENUMS trans_enum);
+
+ /**
+ * Frees transport in description given as a void parameter.
+ * @param transport_in pointer to transport in description as a void
+ * pointer
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_transport_in_desc_free_void_arg(
+ void *transport_in,
+ const axutil_env_t * env);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_TRANSPORT_IN_DESC_H */
diff --git a/include/axis2_transport_out_desc.h b/include/axis2_transport_out_desc.h
new file mode 100644
index 0000000..4dcc629
--- /dev/null
+++ b/include/axis2_transport_out_desc.h
@@ -0,0 +1,327 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_TRANSPORT_OUT_DESC_H
+#define AXIS2_TRANSPORT_OUT_DESC_H
+
+/**
+ * @defgroup axis2_transport_out_desc transport out description
+ * @ingroup axis2_desc
+ * transport out description represents a transport sender configured in
+ * Axis2 configuration. There can be multiple transport senders configured
+ * in axis2.xml file and each of them will be represented with a transport
+ * out description instance. deployment engine takes care of creating and
+ * instantiating transport out descriptions.
+ * transport out description encapsulates flows related to the transport out
+ * and also holds a reference to related transport sender.
+ * @{
+ */
+
+/**
+ * @file axis2_transport_out_desc.h
+ */
+
+#include <axis2_const.h>
+#include <axutil_error.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axutil_allocator.h>
+#include <axutil_array_list.h>
+#include <axis2_phase_meta.h>
+#include <axis2_phase.h>
+#include <axis2_flow.h>
+#include <axis2_transport_sender.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** Type name for struct axis2_transport_out_desc */
+ typedef struct axis2_transport_out_desc axis2_transport_out_desc_t;
+
+ struct axis2_phase;
+ struct axis2_transport_sender;
+
+ /**
+ * Frees transport out description.
+ * @param transport_out_dec pointer to transport out description
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_transport_out_desc_free(
+ axis2_transport_out_desc_t * transport_out_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Frees transport out description given as a void pointer.
+ * @param transport_out_dec pointer to transport out description as a
+ * void pointer
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_transport_out_desc_free_void_arg(
+ void *transport_out,
+ const axutil_env_t * env);
+
+ /**
+ * Gets transport enum.
+ * @param transport_out pointer to transport_out
+ * @param env pointer to environment struct
+ * @return transport enum
+ */
+ AXIS2_EXTERN AXIS2_TRANSPORT_ENUMS AXIS2_CALL
+
+ axis2_transport_out_desc_get_enum(
+ const axis2_transport_out_desc_t * transport_out,
+ const axutil_env_t * env);
+
+ /**
+ * Sets transport enum.
+ * @param transport_out pointer to transport_out
+ * @param env pointer to environment struct
+ * @param trans_enum transport enum
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_transport_out_desc_set_enum(
+ struct axis2_transport_out_desc *transport_out,
+ const axutil_env_t * env,
+ const AXIS2_TRANSPORT_ENUMS trans_enum);
+
+ /**
+ * Gets out flow. Out flow represents the list of phases invoked
+ * along the sender path.
+ * @param transport_out pointer to transport_out
+ * @param env pointer to environment struct
+ * @return pointer to flow representing out flow, returns a reference,
+ * not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_flow *AXIS2_CALL
+
+ axis2_transport_out_desc_get_out_flow(
+ const axis2_transport_out_desc_t * transport_out,
+ const axutil_env_t * env);
+
+ /**
+ * Sets out flow. Out flow represents the list of phases invoked
+ * along the sender path.
+ * @param transport_out pointer to transport_out
+ * @param env pointer to environment struct
+ * @param out_flow pointer to out flow, transport out description
+ * assumes ownership of flow
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_transport_out_desc_set_out_flow(
+ struct axis2_transport_out_desc *transport_out,
+ const axutil_env_t * env,
+ struct axis2_flow *out_flow);
+
+ /**
+ * Gets fault out flow. Fault out flow represents the list of phases
+ * invoked along the sender path if a fault happens.
+ * @param transport_out pointer to transport_out
+ * @param env pointer to environment struct
+ * @return pointer to flow representing fault out flow
+ */
+ AXIS2_EXTERN struct axis2_flow *AXIS2_CALL
+
+ axis2_transport_out_desc_get_fault_out_flow(
+ const axis2_transport_out_desc_t * transport_out,
+ const axutil_env_t * env);
+
+ /**
+ * Sets fault out flow. Fault out flow represents the list of phases
+ * invoked along the sender path if a fault happens.
+ * @param transport_out pointer to transport_out
+ * @param env pointer to environment struct
+ * @param fault_out_flow pointer to fault_out_flow
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_transport_out_desc_set_fault_out_flow(
+ struct axis2_transport_out_desc *transport_out,
+ const axutil_env_t * env,
+ struct axis2_flow *fault_out_flow);
+
+ /**
+ * Gets transport sender.
+ * @param transport_out pointer to transport_out
+ * @param env pointer to environment struct
+ * @return pointer to transport sender associated wit the transport out
+ * description, returns a reference, not a cloned copy
+ */
+ AXIS2_EXTERN axis2_transport_sender_t *AXIS2_CALL
+
+ axis2_transport_out_desc_get_sender(
+ const axis2_transport_out_desc_t * transport_out,
+ const axutil_env_t * env);
+
+ /**
+ * Sets transport sender.
+ * @param transport_out pointer to transport_out
+ * @param env pointer to environment struct
+ * @param sender pointer to transport sender, transport description
+ * assumes ownership of sender
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_transport_out_desc_set_sender(
+ struct axis2_transport_out_desc *transport_out,
+ const axutil_env_t * env,
+ axis2_transport_sender_t * sender);
+
+ /**
+ * Gets transport out phase.
+ * @param transport_out pointer to transport_out
+ * @param env pointer to environment struct
+ * @return pointer to phase representing transport out phase, returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_phase *AXIS2_CALL
+
+ axis2_transport_out_desc_get_out_phase(
+ const axis2_transport_out_desc_t * transport_out,
+ const axutil_env_t * env);
+
+ /**
+ * Sets transport out phase.
+ * @param transport_out pointer to transport_out
+ * @param env pointer to environment struct
+ * @param out_phase pointer to phase representing transport out phase,
+ * transport out description assumes ownership of phase
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_transport_out_desc_set_out_phase(
+ struct axis2_transport_out_desc *transport_out,
+ const axutil_env_t * env,
+ struct axis2_phase *out_phase);
+
+ /**
+ * Gets fault phase.
+ * @param transport_out pointer to transport_out
+ * @param env pointer to environment struct
+ * @return pointer to phase representing fault phase, returns a
+ * reference, not a cloned copy
+ */
+ AXIS2_EXTERN struct axis2_phase *AXIS2_CALL
+
+ axis2_transport_out_desc_get_fault_phase(
+ const axis2_transport_out_desc_t * transport_out,
+ const axutil_env_t * env);
+
+ /**
+ * Sets fault phase.
+ * @param transport_out pointer to transport_out
+ * @param env pointer to environment struct
+ * @param fault_phase pointer to phase representing fault phase,
+ * transport description assumes ownership of phase
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_transport_out_desc_set_fault_phase(
+ struct axis2_transport_out_desc *transport_out,
+ const axutil_env_t * env,
+ struct axis2_phase *fault_phase);
+
+ /**
+ * Adds parameter.
+ * @param transport_out_desc pointer to tarn sport out description
+ * @param env pointer to environment struct
+ * @param param pointer to parameter, transport out description assumes
+ * ownership of parameter
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ axis2_transport_out_desc_add_param(
+ axis2_transport_out_desc_t * transport_out_desc,
+ const axutil_env_t * env,
+ axutil_param_t * param);
+
+ /**
+ * Gets named parameter.
+ * @param transport_out_desc pointer to transport out description
+ * @param env pointer to environment struct
+ * @param param_name parameter name string
+ */
+ AXIS2_EXTERN axutil_param_t *AXIS2_CALL
+
+ axis2_transport_out_desc_get_param(
+ const axis2_transport_out_desc_t * transport_out_desc,
+ const axutil_env_t * env,
+ const axis2_char_t * param_name);
+
+ /**
+ * Checks if the named parameter is locked.
+ * @param transport_out_desc pointer to transport out description
+ * @param env pointer to environment struct
+ * @param param_name pointer to parameter name
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+
+ axis2_transport_out_desc_is_param_locked(
+ axis2_transport_out_desc_t * transport_out_desc,
+ const axutil_env_t * env,
+ const axis2_char_t * param_name);
+
+ AXIS2_EXTERN axutil_param_container_t *AXIS2_CALL
+
+ axis2_transport_out_desc_param_container(
+ const axis2_transport_out_desc_t * transport_out_desc,
+ const axutil_env_t * env);
+
+ /**
+ * Creates transport out description with given transport enum.
+ * @param env pointer to environment struct
+ * @param trans_enum pointer to transport enum
+ * @return pointer to newly created transport out
+ */
+ AXIS2_EXTERN axis2_transport_out_desc_t *AXIS2_CALL
+
+ axis2_transport_out_desc_create(
+ const axutil_env_t * env,
+ const AXIS2_TRANSPORT_ENUMS trans_enum);
+
+ /**
+ * Frees transport out description given as a void pointer.
+ * @param transport_out_dec pointer to transport out description as a
+ * void pointer
+ * @param env pointer to environment struct
+ * @return void
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_transport_out_desc_free_void_arg(
+ void *transport_out,
+ const axutil_env_t * env);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_TRANSPORT_OUT_DESC_H */
diff --git a/include/axis2_transport_receiver.h b/include/axis2_transport_receiver.h
new file mode 100644
index 0000000..7af1973
--- /dev/null
+++ b/include/axis2_transport_receiver.h
@@ -0,0 +1,256 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_TRANSPORT_RECEIVER_H
+#define AXIS2_TRANSPORT_RECEIVER_H
+
+/**
+ * @defgroup axis2_transport transport
+ * @ingroup axis2
+ * @{
+ * @}
+ */
+
+/** @defgroup axis2_transport_receiver transport receiver
+ * @ingroup axis2_transport
+ * Description.
+ * @{
+ */
+
+/**
+ * @file axis2_transport_receiver.h
+ * @brief Axis2 description transport receiver interface
+ */
+
+ #include <axis2_const.h>
+ #include <axutil_error.h>
+ #include <axis2_defines.h>
+ #include <axutil_env.h>
+ #include <axutil_allocator.h>
+ #include <axis2_endpoint_ref.h>
+ #include <axis2_ctx.h>
+ #include <axis2_conf_ctx.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ struct axis2_conf_ctx;
+ struct axis2_transport_in_desc;
+
+ /** Type name for axis2_transport_receiver */
+ typedef struct axis2_transport_receiver axis2_transport_receiver_t;
+
+ /** Type name for axis2_transport_receiver_ops */
+ typedef struct axis2_transport_receiver_ops axis2_transport_receiver_ops_t;
+
+ /**
+ * @brief Description Transport Receiver ops struct
+ * Encapsulator struct for ops of axis2_transport_receiver
+ */
+ struct axis2_transport_receiver_ops
+ {
+
+ /**
+ * @param transport_receiver pointer to transport receiver
+ * @param env pointer to environment struct
+ * @param conf_ctx pointer to configuration context
+ * @param intrasport_in pointer to transport_in
+ */
+ axis2_status_t(AXIS2_CALL * init)(
+ axis2_transport_receiver_t * transport_receiver,
+ const axutil_env_t * env,
+ struct axis2_conf_ctx * conf_ctx,
+ struct axis2_transport_in_desc * transport_in);
+
+ /**
+ * @param transport_receiver
+ * @param env pointer to environment struct
+ */
+ axis2_status_t(AXIS2_CALL * start)(
+ axis2_transport_receiver_t * transport_receiver,
+ const axutil_env_t * env);
+
+ /**
+ * @param tranport_receiver pointer to transport receiver
+ * @param env pointer to environment struct
+ * @param svc_name pointer to service name
+ */
+ axis2_endpoint_ref_t *(AXIS2_CALL * get_reply_to_epr)(
+ axis2_transport_receiver_t * transport_receiver,
+ const axutil_env_t * env,
+ const axis2_char_t * svc_name);
+
+ /**
+ * @param tranport_receiver pointer to transport receiver
+ * @param env pointer to environment struct
+ * @param svc_name pointer to service name
+ */
+ axis2_endpoint_ref_t *(AXIS2_CALL * get_epr_for_service)(
+ axis2_transport_receiver_t * transport_receiver,
+ const axutil_env_t * env,
+ const axis2_char_t * svc_name);
+
+ /**
+ * @param tranport_receiver pointer to transport receiver
+ * @param env pointer to environment struct
+ * @param svc_name pointer to service name
+ */
+ axis2_char_t *(AXIS2_CALL * get_server_ip)(
+ axis2_transport_receiver_t * transport_receiver,
+ const axutil_env_t * env);
+
+ /**
+ * @param tranport_receiver pointer to transport receiver
+ * @param env pointer to environment struct
+ * @param svc_name pointer to service name
+ */
+ void (AXIS2_CALL * set_server_ip)(
+ axis2_transport_receiver_t * transport_receiver,
+ const axutil_env_t * env,
+ axis2_char_t * ip);
+
+ /**
+ * @param server pointer to server
+ * @param env pointer to environment struct
+ */
+ struct axis2_conf_ctx *(AXIS2_CALL * get_conf_ctx)(
+ axis2_transport_receiver_t * server,
+ const axutil_env_t * env);
+
+ /**
+ * @param server pointer to server
+ * @param env pointer to environment struct
+ */
+ axis2_bool_t(AXIS2_CALL * is_running)(
+ axis2_transport_receiver_t * server,
+ const axutil_env_t * env);
+
+ void(AXIS2_CALL * set_is_application_client_side)(
+ axis2_transport_receiver_t * server,
+ const axutil_env_t * env,
+ axis2_bool_t is_application_client_side);
+
+ /**
+ * @param transport_receiver pointer to transport receiver
+ * @param env pointer to environment struct
+ */
+ axis2_status_t(AXIS2_CALL * stop)(
+ axis2_transport_receiver_t * transport_receiver,
+ const axutil_env_t * env);
+
+ /**
+ * De-allocate memory
+ * @param transport_receiver pointer to transport receiver
+ * @param env pointer to environment struct
+ */
+ void(AXIS2_CALL * free)(
+ axis2_transport_receiver_t * transport_receiver,
+ const axutil_env_t * env);
+
+ };
+
+ /**
+ * @brief Transport Receiver struct
+ */
+ struct axis2_transport_receiver
+ {
+ const axis2_transport_receiver_ops_t *ops;
+ };
+
+ /** Frees the transport receiver.
+ @sa axis2_transport_receiver#free */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_transport_receiver_free(
+ axis2_transport_receiver_t * transport_receiver,
+ const axutil_env_t * env);
+
+ /** Initialize the transport receiver.
+ @sa axis2_transport_receiver#init */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_transport_receiver_init(
+ axis2_transport_receiver_t * transport_receiver,
+ const axutil_env_t * env,
+ struct axis2_conf_ctx *conf_ctx,
+ struct axis2_transport_in_desc *transport_in);
+
+ /** Start
+ @sa axis2_transport_receiver#start */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_transport_receiver_start(
+ axis2_transport_receiver_t * transport_receiver,
+ const axutil_env_t * env);
+
+ /** Stop.
+ @sa axis2_transport_receiver#stop */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_transport_receiver_stop(
+ axis2_transport_receiver_t * transport_receiver,
+ const axutil_env_t * env);
+
+ /** Get reply to epr.
+ @sa axis2_transport_receiver#get_reply_to_epr */
+ AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
+ axis2_transport_receiver_get_reply_to_epr(
+ axis2_transport_receiver_t * transport_receiver,
+ const axutil_env_t * env,
+ const axis2_char_t * svc_name);
+
+ /** Get conf ctx.
+ @sa axis2_transport_receiver#get_conf_ctx */
+ AXIS2_EXTERN struct axis2_conf_ctx *AXIS2_CALL
+ axis2_transport_receiver_get_conf_ctx(
+ axis2_transport_receiver_t * transport_receiver,
+ const axutil_env_t * env);
+
+ /** Is running.
+ @sa axis2_transport_receiver#is_running */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_transport_receiver_is_running(
+ axis2_transport_receiver_t * transport_receiver,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_transport_receiver_set_is_application_client_side(
+ axis2_transport_receiver_t * transport_receiver,
+ const axutil_env_t * env,
+ axis2_bool_t is_application_client_side);
+
+ AXIS2_EXTERN axis2_endpoint_ref_t* AXIS2_CALL
+ axis2_transport_receiver_get_epr_for_service(axis2_transport_receiver_t *transport_receiver,
+ const axutil_env_t *env,
+ const axis2_char_t *svc_name);
+
+ AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+ axis2_transport_receiver_get_server_ip(
+ axis2_transport_receiver_t *transport_receiver,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_transport_receiver_set_server_ip(
+ axis2_transport_receiver_t *transport_receiver,
+ const axutil_env_t *env,
+ axis2_char_t *serverip);
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_TRANSPORT_RECEIVER_H */
diff --git a/include/axis2_transport_sender.h b/include/axis2_transport_sender.h
new file mode 100644
index 0000000..70a8586
--- /dev/null
+++ b/include/axis2_transport_sender.h
@@ -0,0 +1,173 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIS2_TRANSPORT_SENDER_H
+#define AXIS2_TRANSPORT_SENDER_H
+
+/** @defgroup axis2_transport_sender transport sender
+ * @ingroup axis2_transport
+ * Description
+ * @{
+ */
+
+/**
+ * @file axis2_transport_sender.h
+ * @brief Axis2 description transport sender interface
+ */
+
+#include <axis2_const.h>
+#include <axutil_error.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axutil_allocator.h>
+#include <axis2_transport_out_desc.h>
+#include <axis2_ctx.h>
+#include <axis2_msg_ctx.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ struct axis2_transport_out_desc;
+ struct axis2_ctx;
+ struct axis2_msg_ctx;
+ struct axis2_handler;
+
+ /** Type name for struct axis2_transport_sender */
+ typedef struct axis2_transport_sender axis2_transport_sender_t;
+
+ /** Type name for struct axis2_transport_sender_ops */
+ typedef struct axis2_transport_sender_ops axis2_transport_sender_ops_t;
+
+ /**
+ * @brief Description Transport Sender ops struct
+ * Encapsulator struct for ops of axis2_transport_sender
+ */
+ struct axis2_transport_sender_ops
+ {
+
+ /**
+ * Initialize
+ * @param transport_sender pointer to transport sender
+ * @param env pointer to environment
+ * @param conf_ctx pointer to configuration context
+ * @param transport_out pointer to transport_out
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ axis2_status_t(
+ AXIS2_CALL
+ * init)(
+ axis2_transport_sender_t * transport_sender,
+ const axutil_env_t * env,
+ struct axis2_conf_ctx * conf_ctx,
+ struct axis2_transport_out_desc * transport_out);
+
+ /**
+ * Invoke
+ * @param transport_sender pointer to transport sender
+ * @param env pointer to environment struct
+ * @param msg_ctx pointer to message context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ axis2_status_t(
+ AXIS2_CALL
+ * invoke)(
+ axis2_transport_sender_t * transport_sender,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx * msg_ctx);
+
+ /**
+ * Clean up
+ * @param transport_sender pointer to transport sender
+ * @param env pointer to environmnet struct
+ * @param msg_ctx pointer to message context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ axis2_status_t(
+ AXIS2_CALL
+ * cleanup)(
+ axis2_transport_sender_t * transport_sender,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx * msg_ctx);
+
+ /** De-allocate memory
+ * @param transport_sender pointer to transport sender
+ * @param env pointer to environment struct
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ void(
+ AXIS2_CALL
+ * free)(
+ axis2_transport_sender_t * transport_sender,
+ const axutil_env_t * env);
+
+ };
+
+ /**
+ * Transport Sender struct
+ * This send the SOAP Message to other SOAP nodes and this alone write the SOAP
+ * Message to the wire. Out flow must be end with one of this kind
+ */
+ struct axis2_transport_sender
+ {
+
+ /** operations of axis transport sender */
+ const axis2_transport_sender_ops_t *ops;
+ };
+
+ /**
+ * Creates phase holder struct
+ * @param env pointer to environment struct
+ * @return pointer to newly created transport sender
+ */
+ AXIS2_EXTERN axis2_transport_sender_t *AXIS2_CALL
+
+ axis2_transport_sender_create(
+ const axutil_env_t * env);
+
+ /*************************** Function macros **********************************/
+
+ /** Frees the axis2 transport sender.
+ @sa axis2_transport_sender_ops#free */
+#define AXIS2_TRANSPORT_SENDER_FREE(transport_sender, env) \
+ ((transport_sender->ops)->free (transport_sender, env))
+
+ /** Initialize the axis2 transport sender.
+ @sa axis2_transport_sender_ops#init */
+#define AXIS2_TRANSPORT_SENDER_INIT(transport_sender, env, conf_context, transport_out) \
+ ((transport_sender->ops)->init (transport_sender, env, conf_context, transport_out))
+
+ /** Invoke.
+ @sa axis2_transport_sender_ops#invoke */
+#define AXIS2_TRANSPORT_SENDER_INVOKE(transport_sender, env, msg_ctx) \
+ ((transport_sender->ops)->invoke (transport_sender, env, msg_ctx))
+
+ /** Cleanup.
+ @sa axis2_transport_sender_ops#cleanup */
+#define AXIS2_TRANSPORT_SENDER_CLEANUP(transport_sender, env, msg_ctx) \
+ ((transport_sender->ops)->cleanup (transport_sender, env, msg_ctx))
+
+ /*************************** End of function macros ***************************/
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_TRANSPORT_SENDER_H */
diff --git a/include/axis2_util.h b/include/axis2_util.h
new file mode 100644
index 0000000..b600efd
--- /dev/null
+++ b/include/axis2_util.h
@@ -0,0 +1,61 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_UTIL_H
+#define AXIS2_UTIL_H
+
+#include <axutil_allocator.h>
+#include <axutil_array_list.h>
+#include <axutil_class_loader.h>
+#include <axutil_dir_handler.h>
+#include <axutil_dll_desc.h>
+#include <axutil_env.h>
+#include <axutil_error.h>
+#include <axutil_file.h>
+#include <axutil_file_handler.h>
+#include <axutil_hash.h>
+#include <axutil_linked_list.h>
+#include <axutil_log.h>
+#include <axutil_network_handler.h>
+#include <axutil_param.h>
+#include <axutil_param_container.h>
+#include <axutil_property.h>
+#include <axutil_qname.h>
+#include <axutil_stack.h>
+#include <axutil_stream.h>
+#include <axutil_string.h>
+#include <axutil_string_util.h>
+#include <axutil_thread_pool.h>
+#include <axutil_types.h>
+#include <axutil_url.h>
+#include <axutil_utils.h>
+#include <axutil_uuid_gen.h>
+#include <platforms/axutil_platform_auto_sense.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_UTIL_H */