Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 28156 invoked from network); 2 Dec 2005 09:44:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Dec 2005 09:44:33 -0000 Received: (qmail 89235 invoked by uid 500); 2 Dec 2005 09:44:31 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 89175 invoked by uid 500); 2 Dec 2005 09:44:31 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 89163 invoked by uid 500); 2 Dec 2005 09:44:31 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 89160 invoked by uid 99); 2 Dec 2005 09:44:31 -0000 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 02 Dec 2005 01:44:30 -0800 Received: (qmail 27944 invoked by uid 65534); 2 Dec 2005 09:44:10 -0000 Message-ID: <20051202094410.27943.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r351652 - in /webservices/axis2/trunk/c: include/ modules/core/transport/ modules/wsdl/src/ Date: Fri, 02 Dec 2005 09:44:08 -0000 To: axis2-cvs@ws.apache.org From: damitha@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: damitha Date: Fri Dec 2 01:43:55 2005 New Revision: 351652 URL: http://svn.apache.org/viewcvs?rev=351652&view=rev Log: Added new files Added: webservices/axis2/trunk/c/include/axis2_wsdl_extensible_element.h webservices/axis2/trunk/c/include/axis2_wsdl_soap_operation.h webservices/axis2/trunk/c/modules/core/transport/axis2_transport_sender.h webservices/axis2/trunk/c/modules/wsdl/src/wsdl_extensible_element.c webservices/axis2/trunk/c/modules/wsdl/src/wsdl_soap_operation.c Added: webservices/axis2/trunk/c/include/axis2_wsdl_extensible_element.h URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_wsdl_extensible_element.h?rev=351652&view=auto ============================================================================== --- webservices/axis2/trunk/c/include/axis2_wsdl_extensible_element.h (added) +++ webservices/axis2/trunk/c/include/axis2_wsdl_extensible_element.h Fri Dec 2 01:43:55 2005 @@ -0,0 +1,117 @@ +/* + * 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 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_WSDL_EXTENSIBLE_ELEMENT_H +#define AXIS2_WSDL_EXTENSIBLE_ELEMENT_H + +/** + * @file axis2_wsdl_extensible_element.h + * @brief Axis2 Wsdl extensible component interface + */ + +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef struct axis2_wsdl_extensible_element axis2_wsdl_extensible_element_t; +typedef struct axis2_wsdl_extensible_element_ops axis2_wsdl_extensible_element_ops_t; + +/** @defgroup axis2_wsdl_extensible_element Wsdl Extensible Element + * @ingroup axis2_wsdl + * @{ + */ + +/** + * @brief Wsdl Extensible Element operations struct + * Encapsulator struct for operations of axis2_wsdl_extensible_element + */ +AXIS2_DECLARE_DATA struct axis2_wsdl_extensible_element_ops +{ + /** De-allocate memory + * @return status code + */ + axis2_status_t (AXIS2_CALL *free)( + axis2_wsdl_extensible_element_t *wsdl_extensible_element, + axis2_env_t **env); + + axis2_bool_t (AXIS2_CALL * + is_required) (axis2_wsdl_extensible_element_t *extensible_element, + axis2_env_t **env); + + axis2_status_t (AXIS2_CALL * + set_required) (axis2_wsdl_extensible_element_t *extensible_element, + axis2_env_t **env, + axis2_bool_t required); + + axis2_qname_t *(AXIS2_CALL * + get_type) (axis2_wsdl_extensible_element_t *extensible_element, + axis2_env_t **env); + + axis2_status_t (AXIS2_CALL * + set_type) (axis2_wsdl_extensible_element_t *extensible_element, + axis2_env_t **env, + axis2_qname_t *type); +}; + +/** + * @brief Wsdl container struct + * Property for params + */ +AXIS2_DECLARE_DATA struct axis2_wsdl_extensible_element +{ + axis2_wsdl_extensible_element_ops_t *ops; +}; + +/** + * Creates wsdl property struct + * @return pointer to newly created wsdl property + */ +AXIS2_DECLARE(axis2_wsdl_extensible_element_t *) +axis2_wsdl_extensible_element_create (axis2_env_t **env); + +/*************************** Function macros **********************************/ + +#define AXIS2_WSDL_EXTENSIBLE_ELEMENT_FREE(extensible_element, env) \ + ((extensible_element->ops)->free (extensible_element, env)) + +#define AXIS2_WSDL_EXTENSIBLE_ELEMENT_IS_REQUIRED(extensible_element, env) \ + ((extensible_element->ops)->is_required (extensible_element, env)) + +#define AXIS2_WSDL_EXTENSIBLE_ELEMENT_SET_REQUIRED(extensible_element, env, required) \ + ((extensible_element->ops)->set_required (extensible_element, env, required)) + +#define AXIS2_WSDL_EXTENSIBLE_ELEMENT_GET_TYPE(extensible_element, env) \ + (extensible_element->ops->get_type (extensible_element, env)) + +#define AXIS2_WSDL_EXTENSIBLE_ELEMENT_SET_TYPE(extensible_element, env, type) \ + ((extensible_element->ops)->set_type (extensible_element, env, type)) + +/*************************** End of function macros ***************************/ + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif /* AXIS2_WSDL_EXTENSIBLE_ELEMENT_H */ Added: webservices/axis2/trunk/c/include/axis2_wsdl_soap_operation.h URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_wsdl_soap_operation.h?rev=351652&view=auto ============================================================================== --- webservices/axis2/trunk/c/include/axis2_wsdl_soap_operation.h (added) +++ webservices/axis2/trunk/c/include/axis2_wsdl_soap_operation.h Fri Dec 2 01:43:55 2005 @@ -0,0 +1,128 @@ +/* + * 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 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_WSDL_SOAP_OPERATION_H +#define AXIS2_WSDL_SOAP_OPERATION_H + +/** + * @file axis2_wsdl_soap_operation.h + * @brief Axis2 Wsdl soap operation interface + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef struct axis2_wsdl_soap_operation axis2_wsdl_soap_operation_t; +typedef struct axis2_wsdl_soap_operation_ops axis2_wsdl_soap_operation_ops_t; + +/** @defgroup axis2_wsdl_soap_operation Wsdl Extensible Element + * @ingroup axis2_wsdl + * @{ + */ + +/** + * @brief Wsdl Extensible Element operations struct + * Encapsulator struct for operations of axis2_wsdl_soap_operation + */ +AXIS2_DECLARE_DATA struct axis2_wsdl_soap_operation_ops +{ + /** De-allocate memory + * @return status code + */ + axis2_status_t (AXIS2_CALL *free)( + axis2_wsdl_soap_operation_t *wsdl_soap_operation, + axis2_env_t **env); + + axis2_char_t *(AXIS2_CALL * + get_style) (axis2_wsdl_soap_operation_t *soap_operation, + axis2_env_t **env); + + axis2_status_t (AXIS2_CALL * + set_style) (axis2_wsdl_soap_operation_t *soap_operation, + axis2_env_t **env, + axis2_char_t *style); + + axis2_char_t * (AXIS2_CALL * + get_soap_action) (axis2_wsdl_soap_operation_t *soap_operation, + axis2_env_t **env); + + axis2_status_t (AXIS2_CALL * + set_soap_action) (axis2_wsdl_soap_operation_t *soap_operation, + axis2_env_t **env, + axis2_char_t *soap_action); +}; + +/** + * @brief Wsdl container struct + * Property for params + */ +AXIS2_DECLARE_DATA struct axis2_wsdl_soap_operation +{ + axis2_wsdl_soap_operation_ops_t *ops; + axis2_wsdl_extensible_element_t *extensible_element; +}; + +/** + * Creates wsdl property struct + * @return pointer to newly created wsdl property + */ +AXIS2_DECLARE(axis2_wsdl_soap_operation_t *) +axis2_wsdl_soap_operation_create (axis2_env_t **env); + +/** + * Creates wsdl property struct + * @param type + * @return pointer to newly created wsdl property + */ +AXIS2_DECLARE(axis2_wsdl_soap_operation_t *) +axis2_wsdl_soap_operation_create_with_type (axis2_env_t **env, axis2_qname_t *type); + +/*************************** Function macros **********************************/ + +#define AXIS2_WSDL_SOAP_OPERATION_FREE(extensible_element, env) \ + ((extensible_element->ops)->free (extensible_element, env)) + +#define AXIS2_WSDL_SOAP_OPERATION_GET_STYLE(extensible_element, env) \ + ((extensible_element->ops)->get_style (extensible_element, env)) + +#define AXIS2_WSDL_SOAP_OPERATION_SET_STYLE(extensible_element, env, style) \ + ((extensible_element->ops)->set_style (extensible_element, env, style)) + +#define AXIS2_WSDL_SOAP_OPERATION_GET_SOAP_ACTION(extensible_element, env) \ + ((extensible_element->ops)->get_soap_action (extensible_element, env)) + +#define AXIS2_WSDL_SOAP_OPERATION_SET_SOAP_ACTION(extensible_element, env, soap_action) \ + ((extensible_element->ops)->set_soap_action (extensible_element, env, soap_action)) + +/*************************** End of function macros ***************************/ + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif /* AXIS2_WSDL_SOAP_OPERATION_H */ Added: webservices/axis2/trunk/c/modules/core/transport/axis2_transport_sender.h URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/axis2_transport_sender.h?rev=351652&view=auto ============================================================================== --- webservices/axis2/trunk/c/modules/core/transport/axis2_transport_sender.h (added) +++ webservices/axis2/trunk/c/modules/core/transport/axis2_transport_sender.h Fri Dec 2 01:43:55 2005 @@ -0,0 +1,125 @@ +/* + * 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 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 + +/** + * @file axis2_transport_sender.h + * @brief Axis2 description transport sender interface + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +struct axis2_transport_sender; +struct axis2_transport_out_desc; +struct axis2_ctx; +struct axis2_msg_ctx; +struct axis2_handler; +typedef struct axis2_transport_sender axis2_transport_sender_t; +typedef struct axis2_transport_sender_ops axis2_transport_sender_ops_t; + +/** @defgroup axis2_transport_sender Transport Sender + * @ingroup axis2_description + * @{ + */ + +/** + * @brief Description Transport Sender operations struct + * Encapsulator struct for operations of axis2_transport_sender + */ +AXIS2_DECLARE_DATA struct axis2_transport_sender_ops +{ + /** De-allocate memory + * @return status code + */ + axis2_status_t (AXIS2_CALL *free)( + axis2_transport_sender_t *transport_sender, + axis2_env_t **env); + /** + * Initialize + * @param confContext + * @param transportOut + * @throws org.apache.axis2.AxisFault + */ + axis2_status_t (AXIS2_CALL * + init) (axis2_transport_sender_t *transport_sender, + axis2_env_t **env, + struct axis2_ctx *conf_ctx, + struct axis2_transport_out_desc *transport_out); + /** + * Clean up + * @param msgContext + * @throws org.apache.axis2.AxisFault + */ + axis2_status_t (AXIS2_CALL * + cleanup) (axis2_transport_sender_t *transport_sender, + axis2_env_t **env, + struct axis2_msg_ctx *msg_ctx); + +}; + +/** + * @brief 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 + */ +AXIS2_DECLARE_DATA struct axis2_transport_sender +{ + axis2_transport_sender_ops_t *ops; + struct axis2_handler *handler; +}; + +/** + * Creates phase holder struct + * @return pointer to newly created transport sender + */ +AXIS2_DECLARE(axis2_transport_sender_t *) +axis2_transport_sender_create (axis2_env_t **env); + +/*************************** Function macros **********************************/ + +#define AXIS2_TRANSPORT_SENDER_FREE(transport_sender, env) \ + ((transport_sender->ops)->free (transport_sender, env)) + +#define AXIS2_TRANSPORT_SENDER_INIT(transport_sender, env, conf_context, transport_out) \ + ((transport_sender->ops)->init (transport_sender, env, conf_context, transport_out)) + +#define AXIS2_TRANSPORT_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 */ Added: webservices/axis2/trunk/c/modules/wsdl/src/wsdl_extensible_element.c URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/src/wsdl_extensible_element.c?rev=351652&view=auto ============================================================================== --- webservices/axis2/trunk/c/modules/wsdl/src/wsdl_extensible_element.c (added) +++ webservices/axis2/trunk/c/modules/wsdl/src/wsdl_extensible_element.c Fri Dec 2 01:43:55 2005 @@ -0,0 +1,175 @@ +/* + * 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 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. + */ + +#include + +/** + * @brief Wsdl extensible element struct impl + * Wsdl extensible element + */ +typedef struct axis2_wsdl_extensible_element_impl +{ + axis2_wsdl_extensible_element_t extensible_element; + + axis2_qname_t *type; + + axis2_bool_t required; + +} axis2_wsdl_extensible_element_impl_t; + +#define AXIS2_INTF_TO_IMPL(extensible_element) \ + ((axis2_wsdl_extensible_element_impl_t *)extensible_element) + +/************************* Function prototypes ********************************/ + +axis2_status_t AXIS2_CALL + axis2_wsdl_extensible_element_free ( + axis2_wsdl_extensible_element_t *extensible_element, + axis2_env_t **env); + +axis2_bool_t AXIS2_CALL +axis2_wsdl_extensible_element_is_required( + axis2_wsdl_extensible_element_t *extensible_element, + axis2_env_t **env); + +axis2_status_t AXIS2_CALL +axis2_wsdl_extensible_element_set_required( + axis2_wsdl_extensible_element_t *extensible_element, + axis2_env_t **env, + axis2_bool_t required); + +axis2_qname_t *AXIS2_CALL +axis2_wsdl_extensible_element_get_type( + axis2_wsdl_extensible_element_t *extensible_element, + axis2_env_t **env); + +axis2_status_t AXIS2_CALL +axis2_wsdl_extensible_element_set_type( + axis2_wsdl_extensible_element_t *extensible_element, + axis2_env_t **env, + axis2_qname_t *type); + +/************************** End of function prototypes ************************/ + +axis2_wsdl_extensible_element_t * AXIS2_CALL +axis2_wsdl_extensible_element_create (axis2_env_t **env) +{ + AXIS2_ENV_CHECK(env, NULL); + + axis2_wsdl_extensible_element_impl_t *extensible_element_impl = + (axis2_wsdl_extensible_element_impl_t *) AXIS2_MALLOC((*env)->allocator, + sizeof(axis2_wsdl_extensible_element_impl_t)); + + + if(NULL == extensible_element_impl) + AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL); + + extensible_element_impl->extensible_element.ops = + AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_wsdl_extensible_element_ops_t)); + if(NULL == extensible_element_impl->extensible_element.ops) + { + axis2_wsdl_extensible_element_free(&(extensible_element_impl-> + extensible_element), env); + AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL); + } + + extensible_element_impl->extensible_element.ops->free = + axis2_wsdl_extensible_element_free; + + extensible_element_impl->extensible_element.ops->is_required = + axis2_wsdl_extensible_element_is_required; + extensible_element_impl->extensible_element.ops->set_required = + axis2_wsdl_extensible_element_set_required; + extensible_element_impl->extensible_element.ops->get_type = + axis2_wsdl_extensible_element_get_type; + extensible_element_impl->extensible_element.ops->set_type = + axis2_wsdl_extensible_element_set_type; + + extensible_element_impl->type = NULL; + + return &(extensible_element_impl->extensible_element); +} + +/***************************Function implementation****************************/ + +axis2_status_t AXIS2_CALL +axis2_wsdl_extensible_element_free ( + axis2_wsdl_extensible_element_t *extensible_element, + axis2_env_t **env) +{ + AXIS2_FUNC_PARAM_CHECK(extensible_element, env, AXIS2_FAILURE); + if(NULL != extensible_element->ops) + AXIS2_FREE((*env)->allocator, extensible_element->ops); + + if(NULL != AXIS2_INTF_TO_IMPL(extensible_element)->type) + { + AXIS2_QNAME_FREE(AXIS2_INTF_TO_IMPL(extensible_element)-> + type, env); + } + + AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(extensible_element)); + + return AXIS2_SUCCESS; +} + +axis2_bool_t AXIS2_CALL +axis2_wsdl_extensible_element_is_required( + axis2_wsdl_extensible_element_t *extensible_element, + axis2_env_t **env) +{ + AXIS2_FUNC_PARAM_CHECK(extensible_element, env, AXIS2_FALSE); + return AXIS2_INTF_TO_IMPL(extensible_element)->required; +} + +axis2_status_t AXIS2_CALL +axis2_wsdl_extensible_element_set_required( + axis2_wsdl_extensible_element_t *extensible_element, + axis2_env_t **env, + axis2_bool_t required) +{ + AXIS2_FUNC_PARAM_CHECK(extensible_element, env, AXIS2_FALSE); + + AXIS2_INTF_TO_IMPL(extensible_element)->required = required; + return AXIS2_SUCCESS; +} + +axis2_qname_t *AXIS2_CALL +axis2_wsdl_extensible_element_get_type( + axis2_wsdl_extensible_element_t *extensible_element, + axis2_env_t **env) +{ + AXIS2_FUNC_PARAM_CHECK(extensible_element, env, NULL); + return AXIS2_INTF_TO_IMPL(extensible_element)->type; +} + +axis2_status_t AXIS2_CALL +axis2_wsdl_extensible_element_set_type( + axis2_wsdl_extensible_element_t *extensible_element, + axis2_env_t **env, + axis2_qname_t *type) +{ + axis2_wsdl_extensible_element_impl_t *extensible_element_impl = + AXIS2_INTF_TO_IMPL(extensible_element); + + AXIS2_FUNC_PARAM_CHECK(extensible_element, env, AXIS2_FAILURE); + AXIS2_PARAM_CHECK((*env)->error, type, AXIS2_FAILURE); + + if(extensible_element_impl->type) + AXIS2_QNAME_FREE(extensible_element_impl->type, env); + + extensible_element_impl->type = type; + return AXIS2_SUCCESS; +} Added: webservices/axis2/trunk/c/modules/wsdl/src/wsdl_soap_operation.c URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/src/wsdl_soap_operation.c?rev=351652&view=auto ============================================================================== --- webservices/axis2/trunk/c/modules/wsdl/src/wsdl_soap_operation.c (added) +++ webservices/axis2/trunk/c/modules/wsdl/src/wsdl_soap_operation.c Fri Dec 2 01:43:55 2005 @@ -0,0 +1,203 @@ +/* + * 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 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. + */ + +#include + +/** + * @brief Wsdl soap operation struct impl + * Wsdl soap element + */ +typedef struct axis2_wsdl_soap_operation_impl +{ + axis2_wsdl_soap_operation_t soap_operation; + + axis2_char_t *soap_action; + + axis2_char_t *style; + +} axis2_wsdl_soap_operation_impl_t; + +#define AXIS2_INTF_TO_IMPL(soap_operation) \ + ((axis2_wsdl_soap_operation_impl_t *)soap_operation) + +/************************* Function prototypes ********************************/ + +axis2_status_t AXIS2_CALL + axis2_wsdl_soap_operation_free ( + axis2_wsdl_soap_operation_t *soap_operation, + axis2_env_t **env); + +axis2_char_t *AXIS2_CALL +axis2_wsdl_soap_operation_get_style(axis2_wsdl_soap_operation_t *soap_operation, + axis2_env_t **env); + +axis2_status_t AXIS2_CALL +axis2_wsdl_soap_operation_set_style(axis2_wsdl_soap_operation_t *soap_operation, + axis2_env_t **env, + axis2_char_t *style); + +axis2_char_t * AXIS2_CALL +axis2_wsdl_soap_operation_get_soap_action(axis2_wsdl_soap_operation_t *soap_operation, + axis2_env_t **env); + +axis2_status_t AXIS2_CALL +axis2_wsdl_soap_operation_set_soap_action(axis2_wsdl_soap_operation_t *soap_operation, + axis2_env_t **env, + axis2_char_t *soap_action); + + +/************************** End of function prototypes ************************/ + +axis2_wsdl_soap_operation_t * AXIS2_CALL +axis2_wsdl_soap_operation_create (axis2_env_t **env) +{ + AXIS2_ENV_CHECK(env, NULL); + + axis2_wsdl_soap_operation_impl_t *soap_operation_impl = + (axis2_wsdl_soap_operation_impl_t *) AXIS2_MALLOC((*env)->allocator, + sizeof(axis2_wsdl_soap_operation_impl_t)); + + + if(NULL == soap_operation_impl) + AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL); + + soap_operation_impl->soap_operation.ops = + AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_wsdl_soap_operation_ops_t)); + if(NULL == soap_operation_impl->soap_operation.ops) + { + axis2_wsdl_soap_operation_free(&(soap_operation_impl-> + soap_operation), env); + AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL); + } + + soap_operation_impl->soap_operation.ops->free = + axis2_wsdl_soap_operation_free; + + soap_operation_impl->soap_operation.ops->get_style = + axis2_wsdl_soap_operation_get_style; + soap_operation_impl->soap_operation.ops->set_style = + axis2_wsdl_soap_operation_set_style; + soap_operation_impl->soap_operation.ops->get_soap_action = + axis2_wsdl_soap_operation_get_soap_action; + soap_operation_impl->soap_operation.ops->set_soap_action = + axis2_wsdl_soap_operation_set_soap_action; + + soap_operation_impl->style = NULL; + soap_operation_impl->soap_action = NULL; + + axis2_qname_t *type_l = axis2_qname_create(env, "operation", + SOAP_11_OPERATION, NULL); + + AXIS2_WSDL_EXTENSIBLE_ELEMENT_SET_TYPE(soap_operation_impl->soap_operation. + extensible_element, env, type_l); + + return &(soap_operation_impl->soap_operation); +} + +axis2_wsdl_soap_operation_t * AXIS2_CALL +axis2_wsdl_soap_operation_create_with_type (axis2_env_t **env, axis2_qname_t *type) +{ + AXIS2_ENV_CHECK(env, NULL); + AXIS2_PARAM_CHECK((*env)->error, type, NULL); + axis2_wsdl_soap_operation_t *soap_operation = + axis2_wsdl_soap_operation_create(env); + + AXIS2_WSDL_EXTENSIBLE_ELEMENT_SET_TYPE(soap_operation->extensible_element, env, type); + + return soap_operation; +} + +/***************************Function implementation****************************/ + +axis2_status_t AXIS2_CALL +axis2_wsdl_soap_operation_free ( + axis2_wsdl_soap_operation_t *soap_operation, + axis2_env_t **env) +{ + axis2_wsdl_soap_operation_impl_t *soap_operation_impl = + AXIS2_INTF_TO_IMPL(soap_operation); + AXIS2_FUNC_PARAM_CHECK(soap_operation, env, AXIS2_FAILURE); + if(NULL != soap_operation->ops) + AXIS2_FREE((*env)->allocator, soap_operation->ops); + + if(NULL != soap_operation_impl->style) + { + AXIS2_FREE((*env)->allocator, soap_operation_impl->style); + } + + if(NULL != soap_operation_impl->soap_action) + { + AXIS2_FREE((*env)->allocator, soap_operation_impl->soap_action); + } + + AXIS2_FREE((*env)->allocator, soap_operation_impl); + + return AXIS2_SUCCESS; +} + +axis2_char_t *AXIS2_CALL +axis2_wsdl_soap_operation_get_style(axis2_wsdl_soap_operation_t *soap_operation, + axis2_env_t **env) +{ + AXIS2_FUNC_PARAM_CHECK(soap_operation, env, NULL); + + return AXIS2_INTF_TO_IMPL(soap_operation)->style; +} + +axis2_status_t AXIS2_CALL +axis2_wsdl_soap_operation_set_style(axis2_wsdl_soap_operation_t *soap_operation, + axis2_env_t **env, + axis2_char_t *style) +{ + axis2_wsdl_soap_operation_impl_t *soap_operation_impl = AXIS2_INTF_TO_IMPL( + soap_operation); + + AXIS2_FUNC_PARAM_CHECK(soap_operation, env, AXIS2_FAILURE); + AXIS2_PARAM_CHECK((*env)->error, style, AXIS2_FAILURE); + + if(soap_operation_impl->style) + AXIS2_FREE((*env)->allocator, style); + + soap_operation_impl->style = style; + return AXIS2_SUCCESS; +} + +axis2_char_t * AXIS2_CALL +axis2_wsdl_soap_operation_get_soap_action(axis2_wsdl_soap_operation_t *soap_operation, + axis2_env_t **env) +{ + AXIS2_FUNC_PARAM_CHECK(soap_operation, env, NULL); + + return AXIS2_INTF_TO_IMPL(soap_operation)->soap_action; +} + +axis2_status_t AXIS2_CALL +axis2_wsdl_soap_operation_set_soap_action(axis2_wsdl_soap_operation_t *soap_operation, + axis2_env_t **env, + axis2_char_t *soap_action) +{ + axis2_wsdl_soap_operation_impl_t *soap_operation_impl = AXIS2_INTF_TO_IMPL( + soap_operation); + + AXIS2_FUNC_PARAM_CHECK(soap_operation, env, AXIS2_FAILURE); + AXIS2_PARAM_CHECK((*env)->error, soap_action, AXIS2_FAILURE); + + if(soap_operation_impl->soap_action) + AXIS2_FREE((*env)->allocator, soap_action); + + soap_operation_impl->soap_action = soap_action; + return AXIS2_SUCCESS; +}