You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by na...@apache.org on 2006/09/01 14:46:04 UTC

svn commit: r439295 [13/15] - in /webservices/axis2/trunk/c: tools/ tools/codegen/ tools/codegen/include/ tools/codegen/samples/ tools/codegen/samples/client/ tools/codegen/samples/client/calculator/ tools/codegen/samples/client/interop_test_svc/ tools...

Added: webservices/axis2/trunk/c/tools/codegen/src/wsdl/engine_configuration.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/engine_configuration.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/engine_configuration.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/engine_configuration.c Fri Sep  1 05:45:57 2006
@@ -0,0 +1,1714 @@
+/*
+ * 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 <w2c_engine_configuration.h>
+#include <axis2_array_list.h>
+#include <axis2_hash.h>
+#include <axis2_string.h>
+#include <w2c_string.h>
+#include <w2c_qname2name_maker.h>
+
+/** 
+ * @brief
+ */
+typedef struct w2c_engine_configuration_impl
+{
+    w2c_engine_configuration_t engine_configuration;
+
+    /** Base URI */
+    axis2_char_t *base_uri;
+    axis2_char_t *wsdl_uri;
+    /** path to the repository - used for evaluating policy */
+    axis2_char_t *repository_path;
+    /** Mapping file including the qname to type map */
+    axis2_char_t *type_mapping_file;
+    axis2_hash_t *uri2packagemap;
+    axis2_bool_t params_wrapped;
+
+    axis2_char_t *output_location;
+
+    /* get the defaults for these from the property file */
+    axis2_char_t *output_language;
+    axis2_char_t *databinding_type;
+    axis2_bool_t advanced_codegen_enabled;
+
+    axis2_bool_t async_on;
+    axis2_bool_t sync_on;
+    axis2_bool_t server_side;
+    axis2_bool_t generate_deployement_descriptor; 
+    axis2_bool_t write_testcase;
+    axis2_bool_t write_message_receiver;
+    axis2_char_t *package_name;
+
+    /**
+     * Default packClasses is true, which means the classes generated
+     * by default are wrapped. The effect of this setting will be controlled
+     * to some extent, by the other settings as well.
+     */
+    axis2_bool_t pack_classes;
+    axis2_bool_t generate_all;
+
+    /* user selected portname */
+    axis2_char_t *port_name;
+    /* user selected servicename */
+    axis2_char_t *service_name;
+
+    /*option to generate server side interface or not*/
+    axis2_bool_t serverside_interface;
+
+    /**
+     * A hashmap to hang the property objects
+     */
+    axis2_hash_t *policy_map;
+
+    /*
+    * A hashmap of properties that may be populated on the way. extensions can populate it
+    * This can be used to keep non specific information
+    */
+    axis2_hash_t *configuration_properties;
+   
+    axis2_char_t *wsdl_version;
+    axis2_bool_t flatten_files;
+
+    w2c_typemapper_t *typemapper;
+
+    /** c specific names */
+    axis2_bool_t convert_names;
+    axis2_bool_t indent_code;
+    axis2_array_list_t *filenames;
+
+    w2c_qname2name_maker_t *qname2name;
+    W2C_ENGINE_CONFIGURATION_NAMEMAKER namemaker_func; 
+       
+} w2c_engine_configuration_impl_t;
+
+#define W2C_INTF_TO_IMPL(engine_configuration) \
+    ((w2c_engine_configuration_impl_t *) engine_configuration)
+
+/************************* Function prototypes ********************************/
+
+axis2_status_t AXIS2_CALL 
+w2c_engine_configuration_free (w2c_engine_configuration_t *engine_configuration, 
+           const axis2_env_t *env);
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_base_uri (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_wsdl_uri (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_repository_path (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_type_mapping_file (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_hash_t* AXIS2_CALL
+w2c_engine_configuration_get_uri2packagemap (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_params_wrapped (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_output_location (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_output_language (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_databinding_type (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_advanced_codegen_enabled (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_async_on (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_sync_on (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_server_side (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_generate_deployement_descriptor (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_write_testcase (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_write_message_receiver (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_package_name (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_pack_classes (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_generate_all (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_port_name (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_service_name (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_serverside_interface (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_hash_t* AXIS2_CALL
+w2c_engine_configuration_get_policy_map (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_hash_t* AXIS2_CALL
+w2c_engine_configuration_get_configuration_properties (
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_wsdl_version(
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_flatten_files(
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+w2c_typemapper_t* AXIS2_CALL
+w2c_engine_configuration_get_typemapper(
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_convert_names(
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+W2C_ENGINE_CONFIGURATION_NAMEMAKER AXIS2_CALL
+w2c_engine_configuration_get_namemaker_func(
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+w2c_qname2name_maker_t* AXIS2_CALL
+w2c_engine_configuration_get_qname2name(
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_indent_code(
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env );
+
+
+
+/** setter methods */
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_base_uri (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_char_t* base_uri );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_wsdl_uri (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_char_t* wsdl_uri );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_repository_path (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_char_t* repository_path );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_type_mapping_file (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_char_t* type_mapping_file );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_uri2packagemap (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_hash_t* uri2packagemap );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_params_wrapped (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_bool_t params_wrapped );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_output_location (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_char_t* output_location );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_output_language (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_char_t* output_language );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_databinding_type (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_char_t* databinding_type );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_advanced_codegen_enabled (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_bool_t advanced_codegen_enabled );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_async_on (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_bool_t async_on );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_sync_on (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_bool_t sync_on );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_server_side (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_bool_t server_side );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_generate_deployement_descriptor (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_bool_t generate_deployement_descriptor );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_write_testcase (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_bool_t write_testcase );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_write_message_receiver (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_bool_t write_message_receiver );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_package_name (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_char_t* package_name );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_pack_classes (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_bool_t pack_classes );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_generate_all (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_bool_t generate_all );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_port_name (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_char_t* port_name );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_service_name (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_char_t* service_name );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_serverside_interface (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_bool_t serverside_interface );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_policy_map (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_hash_t* policy_map );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_configuration_properties (
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_hash_t* configuration_properties );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_wsdl_version(
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_char_t* wsdl_version );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_flatten_files(
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_bool_t flatten_files );
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_typemapper(
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           w2c_typemapper_t *typemapper);
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_convert_names(
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_bool_t convert_names);
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_namemaker_func(
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           W2C_ENGINE_CONFIGURATION_NAMEMAKER namemaker_func);
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_qname2name(
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           w2c_qname2name_maker_t *qname2name);
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_indent_code(
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_bool_t indent_code);
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_add_filename(
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_char_t *filename);
+
+axis2_array_list_t *AXIS2_CALL
+w2c_engine_configuration_get_filenames(
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env);
+
+
+
+/************************** End of function prototypes ************************/
+
+AXIS2_EXTERN w2c_engine_configuration_t * AXIS2_CALL 
+w2c_engine_configuration_create (const axis2_env_t *env)
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+
+    engine_configuration_impl = (w2c_engine_configuration_impl_t *) AXIS2_MALLOC(env->
+               allocator, sizeof(w2c_engine_configuration_impl_t));
+
+    if(NULL == engine_configuration_impl)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); 
+        return NULL;
+    }
+ 
+    engine_configuration_impl->base_uri = NULL;
+    engine_configuration_impl->wsdl_uri = NULL;
+    engine_configuration_impl->repository_path = NULL;
+    engine_configuration_impl->type_mapping_file = NULL;
+    engine_configuration_impl->output_location = NULL;
+    engine_configuration_impl->output_language = NULL;
+    engine_configuration_impl->databinding_type = NULL;
+    engine_configuration_impl->package_name = NULL;
+    engine_configuration_impl->port_name = NULL;
+    engine_configuration_impl->service_name = NULL;
+    engine_configuration_impl->policy_map = NULL;
+    engine_configuration_impl->configuration_properties = NULL;
+    engine_configuration_impl->uri2packagemap = NULL;
+    engine_configuration_impl->wsdl_version = NULL;
+    engine_configuration_impl->typemapper = NULL;
+    engine_configuration_impl->qname2name = NULL;
+    engine_configuration_impl->namemaker_func = NULL; 
+   
+    engine_configuration_impl->serverside_interface = AXIS2_FALSE;
+    engine_configuration_impl->pack_classes = AXIS2_FALSE;
+    engine_configuration_impl->generate_all = AXIS2_FALSE;
+    engine_configuration_impl->advanced_codegen_enabled = AXIS2_FALSE;
+    engine_configuration_impl->async_on = AXIS2_FALSE;
+    engine_configuration_impl->sync_on = AXIS2_FALSE;
+    engine_configuration_impl->server_side = AXIS2_FALSE;
+    engine_configuration_impl->generate_deployement_descriptor = AXIS2_FALSE;
+    engine_configuration_impl->write_testcase = AXIS2_FALSE;
+    engine_configuration_impl->write_message_receiver = AXIS2_FALSE;
+    engine_configuration_impl->params_wrapped = AXIS2_FALSE;
+    engine_configuration_impl->flatten_files = AXIS2_FALSE;
+    engine_configuration_impl->convert_names = AXIS2_FALSE;
+    engine_configuration_impl->indent_code = AXIS2_FALSE;
+
+    engine_configuration_impl->filenames = axis2_array_list_create(env, 10);
+
+    engine_configuration_impl->engine_configuration.ops = 
+    AXIS2_MALLOC (env->allocator, sizeof(w2c_engine_configuration_ops_t));
+    if(NULL == engine_configuration_impl->engine_configuration.ops)
+    {
+        w2c_engine_configuration_free(&(engine_configuration_impl->engine_configuration), env);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    
+    engine_configuration_impl->engine_configuration.ops->free = w2c_engine_configuration_free;
+    engine_configuration_impl->engine_configuration.ops->get_base_uri =
+                                                w2c_engine_configuration_get_base_uri;
+    engine_configuration_impl->engine_configuration.ops->set_base_uri =
+                                                w2c_engine_configuration_set_base_uri;
+    engine_configuration_impl->engine_configuration.ops->get_wsdl_uri =
+                                                w2c_engine_configuration_get_wsdl_uri;
+    engine_configuration_impl->engine_configuration.ops->set_wsdl_uri =
+                                                w2c_engine_configuration_set_wsdl_uri;
+    engine_configuration_impl->engine_configuration.ops->get_repository_path =
+                                                w2c_engine_configuration_get_repository_path;
+    engine_configuration_impl->engine_configuration.ops->set_repository_path =
+                                                w2c_engine_configuration_set_repository_path;
+    engine_configuration_impl->engine_configuration.ops->get_type_mapping_file =
+                                                w2c_engine_configuration_get_type_mapping_file;
+    engine_configuration_impl->engine_configuration.ops->set_type_mapping_file =
+                                                w2c_engine_configuration_set_type_mapping_file;
+    engine_configuration_impl->engine_configuration.ops->get_uri2packagemap =
+                                                w2c_engine_configuration_get_uri2packagemap;
+    engine_configuration_impl->engine_configuration.ops->set_uri2packagemap =
+                                                w2c_engine_configuration_set_uri2packagemap;
+    engine_configuration_impl->engine_configuration.ops->get_params_wrapped =
+                                                w2c_engine_configuration_get_params_wrapped;
+    engine_configuration_impl->engine_configuration.ops->set_params_wrapped =
+                                                w2c_engine_configuration_set_params_wrapped;
+    engine_configuration_impl->engine_configuration.ops->get_output_location =
+                                                w2c_engine_configuration_get_output_location;
+    engine_configuration_impl->engine_configuration.ops->set_output_location =
+                                                w2c_engine_configuration_set_output_location;
+    engine_configuration_impl->engine_configuration.ops->get_output_language =
+                                                w2c_engine_configuration_get_output_language;
+    engine_configuration_impl->engine_configuration.ops->set_output_language =
+                                                w2c_engine_configuration_set_output_language;
+    engine_configuration_impl->engine_configuration.ops->get_databinding_type =
+                                                w2c_engine_configuration_get_databinding_type;
+    engine_configuration_impl->engine_configuration.ops->set_databinding_type =
+                                                w2c_engine_configuration_set_databinding_type;
+    engine_configuration_impl->engine_configuration.ops->get_advanced_codegen_enabled =
+                                                w2c_engine_configuration_get_advanced_codegen_enabled;
+    engine_configuration_impl->engine_configuration.ops->set_advanced_codegen_enabled =
+                                                w2c_engine_configuration_set_advanced_codegen_enabled;
+    engine_configuration_impl->engine_configuration.ops->get_async_on =
+                                                w2c_engine_configuration_get_async_on;
+    engine_configuration_impl->engine_configuration.ops->set_async_on =
+                                                w2c_engine_configuration_set_async_on;
+    engine_configuration_impl->engine_configuration.ops->get_sync_on =
+                                                w2c_engine_configuration_get_sync_on;
+    engine_configuration_impl->engine_configuration.ops->set_sync_on =
+                                                w2c_engine_configuration_set_sync_on;
+    engine_configuration_impl->engine_configuration.ops->get_server_side =
+                                                w2c_engine_configuration_get_server_side;
+    engine_configuration_impl->engine_configuration.ops->set_server_side =
+                                                w2c_engine_configuration_set_server_side;
+    engine_configuration_impl->engine_configuration.ops->get_generate_deployement_descriptor =
+                                                w2c_engine_configuration_get_generate_deployement_descriptor; 
+    engine_configuration_impl->engine_configuration.ops->set_generate_deployement_descriptor =
+                                                w2c_engine_configuration_set_generate_deployement_descriptor; 
+    engine_configuration_impl->engine_configuration.ops->get_write_testcase =
+                                                w2c_engine_configuration_get_write_testcase;
+    engine_configuration_impl->engine_configuration.ops->set_write_testcase =
+                                                w2c_engine_configuration_set_write_testcase;
+    engine_configuration_impl->engine_configuration.ops->get_write_message_receiver =
+                                                w2c_engine_configuration_get_write_message_receiver;
+    engine_configuration_impl->engine_configuration.ops->set_write_message_receiver =
+                                                w2c_engine_configuration_set_write_message_receiver;
+    engine_configuration_impl->engine_configuration.ops->get_package_name =
+                                                w2c_engine_configuration_get_package_name;
+    engine_configuration_impl->engine_configuration.ops->set_package_name =
+                                                w2c_engine_configuration_set_package_name;
+    engine_configuration_impl->engine_configuration.ops->get_pack_classes =
+                                                w2c_engine_configuration_get_pack_classes;
+    engine_configuration_impl->engine_configuration.ops->set_pack_classes =
+                                                w2c_engine_configuration_set_pack_classes;
+    engine_configuration_impl->engine_configuration.ops->get_generate_all =
+                                                w2c_engine_configuration_get_generate_all;
+    engine_configuration_impl->engine_configuration.ops->set_generate_all =
+                                                w2c_engine_configuration_set_generate_all;
+    engine_configuration_impl->engine_configuration.ops->get_port_name =
+                                                w2c_engine_configuration_get_port_name;
+    engine_configuration_impl->engine_configuration.ops->set_port_name =
+                                                w2c_engine_configuration_set_port_name;
+    engine_configuration_impl->engine_configuration.ops->get_service_name =
+                                                w2c_engine_configuration_get_service_name;
+    engine_configuration_impl->engine_configuration.ops->set_service_name =
+                                                w2c_engine_configuration_set_service_name;
+    engine_configuration_impl->engine_configuration.ops->get_serverside_interface =
+                                                w2c_engine_configuration_get_serverside_interface;
+    engine_configuration_impl->engine_configuration.ops->set_serverside_interface =
+                                                w2c_engine_configuration_set_serverside_interface;
+    engine_configuration_impl->engine_configuration.ops->get_policy_map =
+                                                w2c_engine_configuration_get_policy_map;
+    engine_configuration_impl->engine_configuration.ops->set_policy_map =
+                                                w2c_engine_configuration_set_policy_map;
+    engine_configuration_impl->engine_configuration.ops->get_configuration_properties =
+                                                w2c_engine_configuration_get_configuration_properties;
+    engine_configuration_impl->engine_configuration.ops->set_configuration_properties =
+                                                w2c_engine_configuration_set_configuration_properties;
+    engine_configuration_impl->engine_configuration.ops->get_wsdl_version=
+                                                w2c_engine_configuration_get_wsdl_version;
+    engine_configuration_impl->engine_configuration.ops->set_wsdl_version=
+                                                w2c_engine_configuration_set_wsdl_version;
+    engine_configuration_impl->engine_configuration.ops->get_flatten_files=
+                                                w2c_engine_configuration_get_flatten_files;
+    engine_configuration_impl->engine_configuration.ops->set_flatten_files=
+                                                w2c_engine_configuration_set_flatten_files;
+    engine_configuration_impl->engine_configuration.ops->get_typemapper=
+                                                w2c_engine_configuration_get_typemapper;
+    engine_configuration_impl->engine_configuration.ops->set_typemapper=
+                                                w2c_engine_configuration_set_typemapper;
+    engine_configuration_impl->engine_configuration.ops->get_convert_names=
+                                                w2c_engine_configuration_get_convert_names;
+    engine_configuration_impl->engine_configuration.ops->set_convert_names=
+                                                w2c_engine_configuration_set_convert_names;
+    engine_configuration_impl->engine_configuration.ops->get_namemaker_func=
+                                                w2c_engine_configuration_get_namemaker_func;
+    engine_configuration_impl->engine_configuration.ops->set_namemaker_func=
+                                                w2c_engine_configuration_set_namemaker_func;
+    engine_configuration_impl->engine_configuration.ops->get_qname2name =
+                                                w2c_engine_configuration_get_qname2name;
+    engine_configuration_impl->engine_configuration.ops->set_qname2name =
+                                                w2c_engine_configuration_set_qname2name;
+    engine_configuration_impl->engine_configuration.ops->get_indent_code =
+                                                w2c_engine_configuration_get_indent_code;
+    engine_configuration_impl->engine_configuration.ops->set_indent_code =
+                                                w2c_engine_configuration_set_indent_code;
+    engine_configuration_impl->engine_configuration.ops->add_filename =
+                                                w2c_engine_configuration_add_filename;
+    engine_configuration_impl->engine_configuration.ops->get_filenames=
+                                                w2c_engine_configuration_get_filenames;
+
+    return &(engine_configuration_impl->engine_configuration);
+}
+
+AXIS2_EXTERN w2c_engine_configuration_t * AXIS2_CALL 
+w2c_engine_configuration_create_with_options (const axis2_env_t *env,
+                     axis2_hash_t* options)
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+
+    engine_configuration_impl = (w2c_engine_configuration_impl_t *) 
+                     w2c_engine_configuration_create ( env);
+
+    if(NULL == engine_configuration_impl)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); 
+        return NULL;
+    }
+    w2c_engine_config_loader_load_config (env, 
+            &(engine_configuration_impl-> engine_configuration),
+            options );
+
+    return &(engine_configuration_impl->engine_configuration);
+}
+/***************************Function implementation****************************/
+
+axis2_status_t AXIS2_CALL 
+w2c_engine_configuration_free (w2c_engine_configuration_t *engine_configuration, 
+                            const axis2_env_t *env)
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration);
+    
+    if ( engine_configuration_impl->filenames)
+    {
+        AXIS2_ARRAY_LIST_FREE( engine_configuration_impl->filenames, env);
+    }
+    if ( engine_configuration_impl->base_uri )
+    {
+        AXIS2_FREE ( env-> allocator, engine_configuration_impl->base_uri );
+    }
+    if ( engine_configuration_impl->wsdl_uri )
+    {
+        AXIS2_FREE ( env-> allocator, engine_configuration_impl->wsdl_uri );
+    }
+    if ( engine_configuration_impl->repository_path )
+    {
+        AXIS2_FREE ( env-> allocator, engine_configuration_impl->repository_path );
+    }
+    if ( engine_configuration_impl->output_language )
+    {
+        AXIS2_FREE ( env-> allocator, engine_configuration_impl->output_language );
+    }
+    if ( engine_configuration_impl->databinding_type )
+    {
+        AXIS2_FREE ( env-> allocator, engine_configuration_impl->databinding_type );
+    }
+    if ( engine_configuration_impl->package_name )
+    {
+        AXIS2_FREE ( env-> allocator, engine_configuration_impl->package_name );
+    }
+    if ( engine_configuration_impl->port_name )
+    {
+        AXIS2_FREE ( env-> allocator, engine_configuration_impl->port_name );
+    }
+    if ( engine_configuration_impl->service_name )
+    {
+        AXIS2_FREE ( env-> allocator, engine_configuration_impl->service_name );
+    }
+    if ( engine_configuration_impl->typemapper)
+    {
+        W2C_TYPEMAPPER_FREE ( engine_configuration_impl->typemapper, env );
+    }
+    
+    axis2_hash_free (engine_configuration_impl->uri2packagemap, env );
+    axis2_hash_free (engine_configuration_impl->policy_map, env );
+
+
+    if(engine_configuration->ops)
+    {
+        AXIS2_FREE(env->allocator, engine_configuration->ops);
+        engine_configuration->ops = NULL;
+    }
+    if(engine_configuration_impl)
+    {
+        AXIS2_FREE(env->allocator, engine_configuration_impl);
+        engine_configuration_impl = NULL;
+    }
+    
+    return AXIS2_SUCCESS;
+}
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_base_uri (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, NULL );
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> base_uri;
+}
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_wsdl_uri (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, NULL );
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> wsdl_uri;
+}
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_repository_path (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, NULL );
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> repository_path;
+}
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_type_mapping_file (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, NULL );
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> type_mapping_file;
+}
+
+axis2_hash_t* AXIS2_CALL
+w2c_engine_configuration_get_uri2packagemap (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, NULL );
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> uri2packagemap;
+}
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_params_wrapped (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FALSE);
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> params_wrapped;
+}
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_output_location (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FALSE);
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> output_location;
+}
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_output_language (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, NULL );
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> output_language;
+}
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_databinding_type (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, NULL );
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> databinding_type;
+}
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_advanced_codegen_enabled (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FALSE);
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> advanced_codegen_enabled;
+}
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_async_on (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FALSE);
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> async_on;
+}
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_sync_on (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FALSE);
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> sync_on;
+}
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_server_side (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FALSE);
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> server_side;
+}
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_generate_deployement_descriptor (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FALSE);
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> generate_deployement_descriptor;
+}
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_write_testcase (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FALSE);
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> write_testcase;
+}
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_write_message_receiver (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FALSE);
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> write_message_receiver;
+}
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_package_name (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, NULL );
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> package_name;
+}
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_pack_classes (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FALSE);
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> pack_classes;
+}
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_generate_all (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FALSE);
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> generate_all;
+}
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_port_name (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, NULL );
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> port_name;
+}
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_service_name (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, NULL );
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> service_name;
+}
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_serverside_interface (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FALSE);
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> serverside_interface;
+}
+
+axis2_hash_t* AXIS2_CALL
+w2c_engine_configuration_get_policy_map (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, NULL );
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> policy_map;
+}
+
+axis2_hash_t* AXIS2_CALL
+w2c_engine_configuration_get_configuration_properties (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, NULL );
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> configuration_properties;
+}
+
+axis2_char_t* AXIS2_CALL
+w2c_engine_configuration_get_wsdl_version (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, NULL );
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> wsdl_version;
+}
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_flatten_files (
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FALSE );
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> flatten_files;
+}
+
+w2c_typemapper_t* AXIS2_CALL
+w2c_engine_configuration_get_typemapper(
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, NULL);
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> typemapper;
+}
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_convert_names(
+          w2c_engine_configuration_t  *engine_configuration,
+          const axis2_env_t *env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FALSE );
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> convert_names;
+}
+
+W2C_ENGINE_CONFIGURATION_NAMEMAKER AXIS2_CALL
+w2c_engine_configuration_get_namemaker_func(
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, NULL);
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> namemaker_func;
+}
+
+w2c_qname2name_maker_t *AXIS2_CALL
+w2c_engine_configuration_get_qname2name(
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, NULL);
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> qname2name;
+}
+
+axis2_bool_t AXIS2_CALL
+w2c_engine_configuration_get_indent_code(
+          w2c_engine_configuration_t * engine_configuration,
+          const axis2_env_t* env )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FALSE);
+    
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+   
+    return engine_configuration_impl-> indent_code;
+}
+
+/** setter methods */
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_base_uri (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_char_t *base_uri )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->base_uri = AXIS2_STRDUP( base_uri, env);
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_wsdl_uri (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_char_t *wsdl_uri )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->wsdl_uri = AXIS2_STRDUP( wsdl_uri, env);
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_repository_path (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_char_t *repository_path )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->repository_path = AXIS2_STRDUP( repository_path, env);
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_type_mapping_file (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_char_t *type_mapping_file )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->type_mapping_file = AXIS2_STRDUP( type_mapping_file, env);
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_uri2packagemap (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_hash_t *uri2packagemap )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->uri2packagemap = uri2packagemap;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_params_wrapped (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_bool_t params_wrapped )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->params_wrapped = params_wrapped;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_output_location (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_char_t *output_location )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->output_location = output_location;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_output_language (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_char_t *output_language )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->output_language = AXIS2_STRDUP( output_language, env);
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_databinding_type (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_char_t *databinding_type )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->databinding_type = AXIS2_STRDUP( databinding_type, env);
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_advanced_codegen_enabled (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_bool_t advanced_codegen_enabled )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->advanced_codegen_enabled = advanced_codegen_enabled;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_async_on (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_bool_t async_on )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->async_on = async_on;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_sync_on (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_bool_t sync_on )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->sync_on = sync_on;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_server_side (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_bool_t server_side )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->server_side = server_side;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_generate_deployement_descriptor (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_bool_t generate_deployement_descriptor )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->generate_deployement_descriptor = generate_deployement_descriptor;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_write_testcase (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_bool_t write_testcase )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->write_testcase = write_testcase;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_write_message_receiver (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_bool_t write_message_receiver )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->write_message_receiver = write_message_receiver;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_package_name (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_char_t *package_name )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->package_name = AXIS2_STRDUP( package_name, env);
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_pack_classes (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_bool_t pack_classes )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->pack_classes = pack_classes;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_generate_all (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_bool_t generate_all )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->generate_all = generate_all;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_port_name (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_char_t *port_name )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->port_name = AXIS2_STRDUP( port_name, env);
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_service_name (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_char_t *service_name )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->service_name = AXIS2_STRDUP( service_name, env);
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_serverside_interface (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_bool_t serverside_interface )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->serverside_interface = serverside_interface;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_policy_map (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_hash_t *policy_map )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->policy_map = policy_map;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_configuration_properties (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_hash_t *configuration_properties )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->configuration_properties = configuration_properties;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_wsdl_version (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_char_t *wsdl_version )
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->wsdl_version = AXIS2_STRDUP( wsdl_version, env);
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_flatten_files (
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_bool_t flatten_files)
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->flatten_files = flatten_files;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_typemapper(
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           w2c_typemapper_t *typemapper)
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->typemapper = typemapper;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_convert_names(
+           w2c_engine_configuration_t *engine_configuration,
+           const axis2_env_t *env,
+           axis2_bool_t convert_names)
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->convert_names = convert_names;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_namemaker_func(
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           W2C_ENGINE_CONFIGURATION_NAMEMAKER namemaker_func)
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->namemaker_func = namemaker_func;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_qname2name(
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           w2c_qname2name_maker_t *qname2name)
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->qname2name = qname2name;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_set_indent_code(
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_bool_t indent_code)
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    engine_configuration_impl->indent_code = indent_code;
+    return AXIS2_SUCCESS;
+}
+
+/** methods other than getters and setters */
+axis2_status_t AXIS2_CALL
+w2c_engine_configuration_add_filename(
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env,
+           axis2_char_t *filename)
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    AXIS2_ARRAY_LIST_ADD( engine_configuration_impl->filenames, env, filename);
+    return AXIS2_SUCCESS;
+}
+
+axis2_array_list_t* AXIS2_CALL
+w2c_engine_configuration_get_filenames(
+           w2c_engine_configuration_t* engine_configuration,
+           const axis2_env_t* env)
+{
+    w2c_engine_configuration_impl_t *engine_configuration_impl = NULL;
+    
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   
+    engine_configuration_impl = W2C_INTF_TO_IMPL(engine_configuration );
+
+    return engine_configuration_impl->filenames;
+}

Added: webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/Makefile.am?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/Makefile.am (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/Makefile.am Fri Sep  1 05:45:57 2006
@@ -0,0 +1,49 @@
+prglibdir=$(prefix)/lib/codegen
+
+prglib_LTLIBRARIES = \
+             libw2c_databinding_default_ext.la \
+             libw2c_c_namemaker_ext.la \
+             libw2c_c_qname2name_ext.la \
+             libw2c_default_qname2name_ext.la \
+             libw2c_c_code_indenter_ext.la \
+             $(NULL)
+
+libw2c_databinding_default_ext_la_SOURCES = databinding_default_ext.c
+libw2c_c_namemaker_ext_la_SOURCES = c_namemaker_ext.c
+libw2c_c_qname2name_ext_la_SOURCES = c_qname2name_ext.c
+libw2c_default_qname2name_ext_la_SOURCES = default_qname2name_ext.c
+libw2c_c_code_indenter_ext_la_SOURCES = c_code_indenter_ext.c
+
+libw2c_databinding_default_ext_la_LIBADD = \
+                 $(top_builddir)/src/util/libw2c_util.la \
+                 -L$(AXIS2C_HOME)/lib \
+                 -laxis2_util \
+                 -laxis2_axiom
+
+libw2c_c_namemaker_ext_la_LIBADD = \
+                 $(top_builddir)/src/util/libw2c_util.la \
+                 -L$(AXIS2C_HOME)/lib \
+                 -laxis2_util \
+                 -laxis2_axiom
+
+libw2c_c_qname2name_ext_la_LIBADD = \
+                 $(top_builddir)/src/util/libw2c_util.la \
+                 -L$(AXIS2C_HOME)/lib \
+                 -laxis2_util \
+                 -laxis2_axiom
+
+libw2c_default_qname2name_ext_la_LIBADD = \
+                 $(top_builddir)/src/util/libw2c_util.la \
+                 -L$(AXIS2C_HOME)/lib \
+                 -laxis2_util \
+                 -laxis2_axiom
+
+libw2c_c_code_indenter_ext_la_LIBADD = \
+                 $(top_builddir)/src/util/libw2c_util.la \
+                 -L$(AXIS2C_HOME)/lib \
+                 -laxis2_util \
+                 -laxis2_axiom
+
+INCLUDES = -I$(top_builddir)/include \
+                        @UTILINC@ \
+                        @AXIOMINC@

Added: webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_code_indenter_ext.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_code_indenter_ext.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_code_indenter_ext.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_code_indenter_ext.c Fri Sep  1 05:45:57 2006
@@ -0,0 +1,464 @@
+/*
+ * 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 <w2c_extension.h>
+#include <w2c_string.h>
+#include <axis2_string.h>
+
+
+typedef struct w2c_c_code_indenter_ext_impl
+{
+    w2c_extension_t extension;
+
+} w2c_c_code_indenter_ext_impl_t;
+
+#define W2C_INTF_TO_IMPL(extension) \
+        ((w2c_c_code_indenter_ext_impl_t*) extension)
+
+void format_file( axis2_char_t *filename,
+                  const axis2_env_t *env);
+
+/************************* implmentations ********************************/
+axis2_status_t AXIS2_CALL
+w2c_c_code_indenter_ext_free(w2c_extension_t *extension,
+       const axis2_env_t *env)
+{
+    w2c_c_code_indenter_ext_impl_t *extension_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    extension_impl = W2C_INTF_TO_IMPL(extension);
+
+    if(extension->ops)
+    {
+        AXIS2_FREE(env->allocator, extension->ops);
+    }
+    if(extension_impl)
+    {
+        AXIS2_FREE(env->allocator, extension_impl);
+    }
+
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_c_code_indenter_ext_engage(w2c_extension_t *extension,
+       const axis2_env_t *env,
+       w2c_engine_configuration_t *conf)
+{
+    w2c_c_code_indenter_ext_impl_t *extension_impl = NULL;
+    axis2_bool_t indent_code = AXIS2_FALSE;
+    axis2_char_t *lang = NULL;
+    axis2_array_list_t *filenames = NULL;
+    int i = 0, size = 0;
+    axis2_char_t *filename = NULL;
+    int length = 0;
+ 
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+    extension_impl = W2C_INTF_TO_IMPL(extension);
+
+    indent_code = W2C_ENGINE_CONFIGURATION_GET_INDENT_CODE( conf, env);
+    lang = W2C_ENGINE_CONFIGURATION_GET_OUTPUT_LANGUAGE( conf, env);
+    filenames = W2C_ENGINE_CONFIGURATION_GET_FILENAMES( conf, env);
+
+    /* this executes only with following configuration */
+    if ( indent_code && AXIS2_STRCMP( lang, "c") == 0)
+    {
+        size = AXIS2_ARRAY_LIST_SIZE( filenames, env);
+        for ( i = 0; i < size; i ++ )
+        {
+            filename = AXIS2_ARRAY_LIST_GET( filenames, env, i);
+            length = AXIS2_STRLEN( filename);
+            /* take only .c or .h files */
+            if( filename[length-1] == 'c' || filename[length-1] == 'h' ||
+                    filename[length-2] == '.' )
+            {
+                format_file( filename, env);
+            }
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+
+/****************** standard create and delete for DLL ************************/
+AXIS2_EXPORT int
+axis2_get_instance(w2c_extension_t **inst,
+                   const axis2_env_t *env)
+{
+    w2c_c_code_indenter_ext_impl_t *extension_impl = NULL;
+ 
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+    extension_impl = (w2c_c_code_indenter_ext_impl_t*)AXIS2_MALLOC( env-> allocator, 
+                                          sizeof(w2c_c_code_indenter_ext_impl_t) );
+ 
+    if(NULL == extension_impl)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); 
+        return AXIS2_FAILURE;
+    }
+    
+    extension_impl->extension.ops = 
+                AXIS2_MALLOC (env->allocator, sizeof(w2c_extension_ops_t));
+    if(NULL == extension_impl->extension.ops)
+    {
+        w2c_c_code_indenter_ext_free(&(extension_impl->extension), env);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }   
+    extension_impl->extension.ops->free = 
+                      w2c_c_code_indenter_ext_free;
+    extension_impl->extension.ops->engage = 
+                      w2c_c_code_indenter_ext_engage;
+
+    *inst = &(extension_impl->extension);
+
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXPORT int
+axis2_remove_instance(w2c_extension_t *inst,
+                      const axis2_env_t *env)
+{
+    axis2_status_t status = AXIS2_FAILURE;
+
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+    if (inst)
+    {
+        status = W2C_EXTENSION_FREE(inst, env);
+    }
+    return status;
+}
+
+/** the following part seperated to handle code indenting algorithm */
+
+/* function declarations */
+void format_file( axis2_char_t *filename,
+                  const axis2_env_t *env);
+axis2_char_t* read_file ( axis2_char_t *filename,
+                  const axis2_env_t *env);
+void write_file ( axis2_char_t *filename,
+                  axis2_char_t *buffer,
+                  const axis2_env_t *env);
+
+typedef struct custom_allocator
+{
+     int allocated;
+     int index;
+     char* buffer;
+} custom_allocator_t;
+
+void add_string( const axis2_env_t* env,
+                      custom_allocator_t* allocator,
+                      char* string);
+
+void add_char( const axis2_env_t* env,
+                      custom_allocator_t* allocator,
+                      char c,
+                      int turns);
+
+#define SPACES_FOR_TAB 4
+
+/* implementations */
+void format_file( axis2_char_t *filename,
+                  const axis2_env_t *env)
+{
+    custom_allocator_t * allocator  = NULL;
+    axis2_char_t* in_buffer = NULL;
+    axis2_char_t* out_buffer = NULL;
+    char* p = NULL;
+    int tabs = 0;
+
+    /** formatting parameters */
+    char *line_start = NULL;
+    char *line_end = NULL;
+    int start_blanks = 0;
+    int early_line_start_blanks = 0;
+    int continue_from_early_line = 0;
+    int line_ended_with_semicolon = 1;
+    int line_ended_with_bracket = 0;
+    int line_ended_with_backslash = 0;
+    int tabs_off = 0;
+    int is_comment = 0;
+    int multi_line_comment = 0;
+    int shift = 0;
+    int early_line_blank = 0;
+    int comment_just_finished = 0;
+    int early_line_macro = 0;
+   
+    allocator = (custom_allocator_t*) AXIS2_MALLOC(env->
+        allocator, sizeof(custom_allocator_t));
+    allocator-> buffer = NULL;
+    allocator-> allocated = 0;
+    allocator-> index = 0;
+    
+    in_buffer = read_file( filename, env);
+
+    p = in_buffer;
+    for ( p = in_buffer, tabs = 0 ; *p ; p ++)
+    {
+        /** identify new_line */
+        if ( p == in_buffer || *(p-1) == '\n')
+        {
+            /* assign new tabs off value from previous lines */
+            tabs += tabs_off;
+            if (tabs < 0 ) tabs = 0;
+            tabs_off = 0;
+
+            /** some decision making) */
+            if ( !early_line_blank)
+            {
+                if ( line_ended_with_semicolon )
+                {
+                    continue_from_early_line = 0;
+                }
+                else if ( line_ended_with_bracket)
+                {
+                    continue_from_early_line = 0;
+                }
+                else if ( line_ended_with_backslash)
+                {
+                    continue_from_early_line = 1;
+                }
+                else
+                {
+                    /** some decision 
+                     * if it is not a semicolon or bracket it continues*/
+                    continue_from_early_line = 1;
+                }
+   
+                /* more adjusment */
+                if ( comment_just_finished)
+                {
+                    continue_from_early_line = 0;
+                }
+                if ( multi_line_comment)
+                {
+                    continue_from_early_line = 1;
+                }
+                if ( early_line_macro && !line_ended_with_backslash )
+                {
+                    continue_from_early_line = 0;
+                }
+            }
+            start_blanks = 0;
+            /* count starter blanks */
+            for( ; *p && (*p == ' ' || *p == '\t'); p ++)
+            {
+                start_blanks ++;
+            }
+
+            line_start = p;
+            line_end = line_start;
+            /** ommit things until the end */
+            for( ; *p && *p !='\n'; p ++)
+            {
+                /** following set handle comments */
+                if ( !is_comment && *p == '/' &&
+                        *(p+1) == '*')
+                {
+                    is_comment = 1;
+                    multi_line_comment = 1;
+                }
+                else if ( is_comment && *p == '*' && *(p+1) == '/' )
+                {
+                    is_comment = 0;
+                    multi_line_comment = 0;
+                }
+                else if ( !is_comment && *p == '/' && *(p+1) == '/' )
+                {
+                    is_comment = 1;
+                }
+
+                else if ( !is_comment && *p == '{' )
+                {
+                    tabs_off ++;
+                }
+                else if ( !is_comment && *p == '}')
+                {
+                    tabs --;
+                    if (tabs < 0 ) tabs = 0;
+                }
+
+                /** check for the valid end */
+                if ( !is_comment && *p != ' ')
+                {
+                    line_end = p;
+                }
+            }
+            *p = '\0';
+            if ( line_end != line_start )
+            {
+                line_ended_with_semicolon = ( ';' == *line_end );
+                line_ended_with_bracket = (')' == *line_end);
+                line_ended_with_backslash= ( '\\' == *line_end);
+                comment_just_finished = ( '/' == *line_end &&
+                                    line_end -1 != line_start &&
+                                    '*' == *(line_end-1) );
+            }
+            early_line_blank = ('\0' == *line_start);
+
+            early_line_macro = ('#' == *line_start);
+            
+            if( !multi_line_comment)
+            {
+                is_comment = 0;
+            }
+            /* the following works only for generated code 
+             * given that code is relatively well formatted
+             */
+            if ( continue_from_early_line)
+            {
+                shift = start_blanks - early_line_start_blanks;
+                if (shift > 0)
+                { 
+                    add_char ( env, allocator, ' ', shift);
+                }
+            }
+            else
+            {
+                early_line_start_blanks = start_blanks;
+            }
+            if ( tabs > 0 )
+            {
+                add_char ( env, allocator, ' ', tabs * SPACES_FOR_TAB );
+            }
+            add_string ( env, allocator, line_start);
+            add_char (env, allocator, '\n', 1);
+            *p = '\n';
+        }
+    }
+
+    *(allocator-> buffer + allocator-> index) = '\0'; 
+    out_buffer = allocator-> buffer; 
+    write_file( filename, out_buffer, env); 
+}
+
+axis2_char_t* read_file ( axis2_char_t *filename,
+                  const axis2_env_t *env)
+{
+    const int MAX_SIZE=100;
+    int nread = 0;
+    FILE *f = NULL;
+    axis2_char_t *out_stream = NULL;
+    int ncount = 0;
+
+    out_stream = (axis2_char_t*) AXIS2_MALLOC( env-> allocator,
+                                    sizeof(axis2_char_t)* MAX_SIZE );
+    if (out_stream == NULL )
+    {
+        return NULL;
+    }
+
+    f = fopen ( filename, "r+");
+    if ( f == NULL )
+    {
+        free (out_stream );
+        return NULL;
+    }
+    do{
+        nread = fread ( out_stream + ncount, sizeof(axis2_char_t), MAX_SIZE, f);
+        ncount += nread;
+        out_stream = (axis2_char_t*) AXIS2_REALLOC( env-> allocator,
+                    out_stream,
+                    sizeof(axis2_char_t)* (MAX_SIZE + ncount ) );
+        if ( out_stream == NULL )
+        {
+            return NULL;
+        }
+    }while ( nread == MAX_SIZE );
+
+    out_stream[ncount] = '\0';
+    fclose(f);
+
+    return out_stream;
+}
+
+void write_file ( axis2_char_t *filename,
+                  axis2_char_t *buffer,
+                  const axis2_env_t *env)
+{
+    FILE *f = NULL;
+    f = fopen( filename, "w+");
+    fprintf( f, "%s",buffer);
+}
+
+void add_string( const axis2_env_t* env,
+                      custom_allocator_t* allocator,
+                      char* string)
+{
+    int additional_len = 0;
+    void* dest = NULL;
+    void* src = NULL;
+    int count = 0;
+
+    additional_len = AXIS2_STRLEN ( string ) +1;
+    if ( allocator-> index + additional_len  >= allocator-> allocated )
+    {
+        if ( allocator-> allocated == 0 )
+        {
+            allocator-> buffer =
+                    AXIS2_MALLOC ( env-> allocator, additional_len );
+        }
+        else
+        {
+            allocator-> buffer =
+                    AXIS2_REALLOC ( env-> allocator, allocator-> buffer,
+                                allocator-> allocated + additional_len);
+        }
+        allocator-> allocated += additional_len;
+    }
+
+    /* copy memory */
+    dest = allocator-> buffer + allocator-> index;
+    src = string;
+    count = additional_len; /* this is with the terminating zero */
+    memcpy ( dest, src, count );
+
+    allocator-> index += count -1;
+}
+
+
+void add_char( const axis2_env_t* env,
+                      custom_allocator_t* allocator,
+                      char c,
+                      int turns)
+{
+    int additional_len = 0;
+
+    additional_len = turns + 1;
+    if ( allocator-> index + additional_len  >= allocator-> allocated )
+    {
+        if ( allocator-> allocated == 0 )
+        {
+            allocator-> buffer =
+                    AXIS2_MALLOC ( env-> allocator, additional_len );
+        }
+        else
+        {
+            allocator-> buffer =
+                    AXIS2_REALLOC ( env-> allocator, allocator-> buffer,
+                                allocator-> allocated + additional_len);
+        }
+        allocator-> allocated += additional_len;
+    }
+
+    /* copy memory */
+    memset ( allocator-> buffer + allocator-> index, c, turns );
+
+    allocator-> index += turns;
+
+}
+

Added: webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_namemaker_ext.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_namemaker_ext.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_namemaker_ext.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_namemaker_ext.c Fri Sep  1 05:45:57 2006
@@ -0,0 +1,127 @@
+/*
+ * 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 <w2c_extension.h>
+#include <w2c_string.h>
+#include <axis2_string.h>
+
+
+typedef struct w2c_c_namemaker_ext_impl
+{
+    w2c_extension_t extension;
+
+} w2c_c_namemaker_ext_impl_t;
+
+#define W2C_INTF_TO_IMPL(extension) \
+        ((w2c_c_namemaker_ext_impl_t*) extension)
+
+/************************* implmentations ********************************/
+axis2_status_t AXIS2_CALL
+w2c_c_namemaker_ext_free(w2c_extension_t *extension,
+       const axis2_env_t *env)
+{
+    w2c_c_namemaker_ext_impl_t *extension_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    extension_impl = W2C_INTF_TO_IMPL(extension);
+
+    if(extension->ops)
+    {
+        AXIS2_FREE(env->allocator, extension->ops);
+    }
+    if(extension_impl)
+    {
+        AXIS2_FREE(env->allocator, extension_impl);
+    }
+
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_c_namemaker_ext_engage(w2c_extension_t *extension,
+       const axis2_env_t *env,
+       w2c_engine_configuration_t *conf)
+{
+    w2c_c_namemaker_ext_impl_t *extension_impl = NULL;
+    axis2_bool_t convert_names = AXIS2_FALSE;
+    axis2_char_t *lang = NULL;
+ 
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+    extension_impl = W2C_INTF_TO_IMPL(extension);
+
+    convert_names = W2C_ENGINE_CONFIGURATION_GET_CONVERT_NAMES( conf, env);
+    lang = W2C_ENGINE_CONFIGURATION_GET_OUTPUT_LANGUAGE( conf, env);
+
+    /* this executes only with following configuration */
+    if ( convert_names && AXIS2_STRCMP( lang, "c") == 0)
+    {
+        W2C_ENGINE_CONFIGURATION_SET_NAMEMAKER_FUNC( conf, env, 
+               (W2C_ENGINE_CONFIGURATION_NAMEMAKER) w2c_string_make_c_simple_name);
+    }
+        
+    return AXIS2_SUCCESS;
+}
+
+/****************** standard create and delete for DLL ************************/
+AXIS2_EXPORT int
+axis2_get_instance(w2c_extension_t **inst,
+                   const axis2_env_t *env)
+{
+    w2c_c_namemaker_ext_impl_t *extension_impl = NULL;
+ 
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+    extension_impl = (w2c_c_namemaker_ext_impl_t*)AXIS2_MALLOC( env-> allocator, 
+                                          sizeof(w2c_c_namemaker_ext_impl_t) );
+ 
+    if(NULL == extension_impl)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); 
+        return AXIS2_FAILURE;
+    }
+    
+    extension_impl->extension.ops = 
+                AXIS2_MALLOC (env->allocator, sizeof(w2c_extension_ops_t));
+    if(NULL == extension_impl->extension.ops)
+    {
+        w2c_c_namemaker_ext_free(&(extension_impl->extension), env);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }   
+    extension_impl->extension.ops->free = 
+                      w2c_c_namemaker_ext_free;
+    extension_impl->extension.ops->engage = 
+                      w2c_c_namemaker_ext_engage;
+
+    *inst = &(extension_impl->extension);
+
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXPORT int
+axis2_remove_instance(w2c_extension_t *inst,
+                      const axis2_env_t *env)
+{
+    axis2_status_t status = AXIS2_FAILURE;
+
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+    if (inst)
+    {
+        status = W2C_EXTENSION_FREE(inst, env);
+    }
+    return status;
+}
+



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org