axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r450427 [1/4] - in /webservices/axis2/trunk/c/tools/codegen/src: ./ schema/ templates/ typemappers/ wsdl/ wsdl/emitter/ wsdl/extensions/ wsdl/writer/
Date Wed, 27 Sep 2006 13:07:29 GMT
Author: nandika
Date: Wed Sep 27 06:07:26 2006
New Revision: 450427

URL: http://svn.apache.org/viewvc?view=rev&rev=450427
Log:
removing deprecated directories

Removed:
    webservices/axis2/trunk/c/tools/codegen/src/schema/
    webservices/axis2/trunk/c/tools/codegen/src/schema2code.c
    webservices/axis2/trunk/c/tools/codegen/src/templates/
    webservices/axis2/trunk/c/tools/codegen/src/typemappers/
Modified:
    webservices/axis2/trunk/c/tools/codegen/src/Makefile.am
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/emitter/c_emitter.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/emitter/emitter.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/emitter/w2c_emitter_protected.h
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/engine.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/engine_config_loader.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/engine_configuration.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_code_indenter_ext.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_namemaker_ext.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_qname2name_ext.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/databinding_default_ext.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/default_qname2name_ext.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cservice_xml_writer.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cskel_header_writer.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cskel_source_writer.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cstub_header_writer.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cstub_source_writer.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/csvc_skeleton_writer.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/writer.c

Modified: webservices/axis2/trunk/c/tools/codegen/src/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/Makefile.am?view=diff&rev=450427&r1=450426&r2=450427
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/Makefile.am (original)
+++ webservices/axis2/trunk/c/tools/codegen/src/Makefile.am Wed Sep 27 06:07:26 2006
@@ -1,4 +1,4 @@
-SUBDIRS = util wsdl
+SUBDIRS = util wsdl templates typemappers schema
 
 templatesdir=$(prefix)/conf
 typemappersdir=$(prefix)/conf
@@ -22,6 +22,6 @@
                         @UTILINC@ \
                         @AXIOMINC@
 
-install:install-recursive
-	cp templates $(templatesdir) -rf
-	cp typemappers $(typemappersdir) -rf
+#install:install-recursive
+#	cp templates $(templatesdir) -rf
+#	cp typemappers $(typemappersdir) -rf

Modified: webservices/axis2/trunk/c/tools/codegen/src/wsdl/emitter/c_emitter.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/emitter/c_emitter.c?view=diff&rev=450427&r1=450426&r2=450427
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/emitter/c_emitter.c (original)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/emitter/c_emitter.c Wed Sep 27 06:07:26 2006
@@ -1,22 +1,24 @@
 /*
  * 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_emitter_protected.h>
 #include <w2c_writer.h>
 #include <w2c_xslt_utils.h>
+#include <w2c_typemapper.h>
+#include <w2c_file_writer.h>
 
 #define W2C_C_EMITTER_STUB_PREFIX "axis2_stub_"
 #define W2C_C_EMITTER_STUB_SUFFIX ""
@@ -24,67 +26,75 @@
 #define W2C_C_EMITTER_SKEL_SUFFIX ""
 #define W2C_C_EMITTER_SVC_SKEL_PREFIX "axis2_svc_skel_"
 #define W2C_C_EMITTER_SVC_SKEL_SUFFIX ""
-
+#define W2C_C_EMITTER_TYPE_PREFIX "axis2_"
+#define W2C_C_EMITTER_TYPE_SUFFIX "_t*"
 
 /**********************fucntion prototypes ***********************************/
 
 axis2_status_t AXIS2_CALL
-w2c_c_emitter_emit_stub(w2c_emitter_t *emitter,
-        const axis2_env_t *env);
+w2c_c_emitter_set_config(w2c_emitter_t *emitter,
+       const axis2_env_t *env,
+       w2c_engine_configuration_t *config,
+       w2c_config_property_loader_t *loader);
 
 axis2_status_t AXIS2_CALL
-w2c_c_emitter_emit_skel(w2c_emitter_t *emitter,
-        const axis2_env_t *env);
+w2c_c_emitter_emit_stub( w2c_emitter_t *emitter,
+                         const axis2_env_t *env);
+
+axis2_status_t AXIS2_CALL
+w2c_c_emitter_emit_skel( w2c_emitter_t *emitter,
+                         const axis2_env_t *env);
 axis2_status_t
-w2c_c_emitter_write_stub_source(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env);
+w2c_c_emitter_write_stub_source( w2c_emitter_impl_t *emitter_impl,
+                                        const axis2_env_t *env);
 axis2_status_t
-w2c_c_emitter_write_stub_source(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env);
+w2c_c_emitter_write_stub_source( w2c_emitter_impl_t *emitter_impl,
+                                        const axis2_env_t *env);
 axis2_status_t
-w2c_c_emitter_write_skel_source(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env);
+w2c_c_emitter_write_skel_source( w2c_emitter_impl_t *emitter_impl,
+                                        const axis2_env_t *env);
 axis2_status_t
-w2c_c_emitter_write_skel_source(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env);
+w2c_c_emitter_write_skel_source( w2c_emitter_impl_t *emitter_impl,
+                                        const axis2_env_t *env);
 axis2_status_t
-w2c_c_emitter_write_svc_skel(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env);
+w2c_c_emitter_write_svc_skel( w2c_emitter_impl_t *emitter_impl,
+                                        const axis2_env_t *env);
 axis2_status_t
-w2c_c_emitter_write_svc_xml(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env);
+w2c_c_emitter_write_svc_xml( w2c_emitter_impl_t *emitter_impl,
+                                        const axis2_env_t *env);
 
 axiom_node_t*
-w2c_c_emitter_create_for_stub(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env);
+w2c_c_emitter_create_for_stub (w2c_emitter_impl_t *emitter_impl,
+                                   const axis2_env_t *env );
 axiom_node_t*
 w2c_c_emitter_create_for_skel(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env);
+                                   const axis2_env_t *env );
 axiom_node_t*
 w2c_c_emitter_create_for_svc_skel(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env);
+                                   const axis2_env_t *env );
 axiom_node_t*
 w2c_c_emitter_create_for_svc_xml(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env);
+                                   const axis2_env_t *env );
 
 /******************standard create and delete for DLL ************************/
 AXIS2_EXPORT int
 axis2_get_instance(w2c_emitter_t **inst,
-        const axis2_env_t *env)
+                   const axis2_env_t *env)
 {
     w2c_emitter_impl_t *emitter_impl = NULL;
-
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    emitter_impl = w2c_emitter_create_impl(env);
+ 
+    AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+    emitter_impl = w2c_emitter_create_impl (env);
     /* this is done through an extension */
     /*emitter_impl-> name_maker_func = w2c_string_make_c_simple_name;*/
-    if (!emitter_impl)
+    if(!emitter_impl)
     {
         return AXIS2_FAILURE;
     }
 
     emitter_impl->emitter.ops->emit_stub = w2c_c_emitter_emit_stub;
     emitter_impl->emitter.ops->emit_skel = w2c_c_emitter_emit_skel;
+    emitter_impl->emitter.ops->set_config = w2c_c_emitter_set_config;
 
     *inst = &(emitter_impl->emitter);
 
@@ -93,13 +103,13 @@
 
 AXIS2_EXPORT int
 axis2_remove_instance(w2c_emitter_t *inst,
-        const axis2_env_t *env)
+                      const axis2_env_t *env)
 {
-    axis2_status_t status = AXIS2_FAILURE;
+   axis2_status_t status = AXIS2_FAILURE;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    if (inst)
-    {
+   AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+   if (inst)
+   {
         status = W2C_EMITTER_FREE(inst, env);
     }
     return status;
@@ -107,30 +117,83 @@
 
 /*************************overriden functions ********************************/
 
+
+axis2_status_t AXIS2_CALL
+w2c_c_emitter_set_config(w2c_emitter_t *emitter,
+       const axis2_env_t *env,
+       w2c_engine_configuration_t *config,
+       w2c_config_property_loader_t *loader)
+{
+    w2c_typemapper_t *typemapper = NULL;
+    axis2_hash_t *types = NULL;
+    axis2_char_t *key = NULL;
+    axis2_qname_t *qname = NULL;
+    axis2_char_t *filename = NULL;
+    axis2_char_t *classname = NULL;
+    axis2_hash_index_t *hi = NULL;
+    axis2_char_t *source = NULL;
+    axis2_char_t *header = NULL;
+    axis2_char_t *root = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+   
+    typemapper = W2C_ENGINE_CONFIGURATION_GET_TYPEMAPPER( config, env);
+    types = W2C_TYPEMAPPER_GET_ALL( typemapper, env);
+
+    for (hi = axis2_hash_first( types, env);
+                         hi; hi = axis2_hash_next(env, hi))
+    {
+        axis2_hash_this(hi, (void*)&key, NULL, (void*)&classname);
+        qname = axis2_qname_create_from_string( env, key);
+        if ( !W2C_TYPEMAPPER_IS_PRIMITIVE( typemapper, env, qname) )
+        {
+            filename = axis2_stracat( W2C_C_EMITTER_TYPE_PREFIX, classname, env);
+            root = W2C_ENGINE_CONFIGURATION_GET_OUTPUT_LOCATION( config, env);
+            source = w2c_file_writer_create_classfile_name( env,
+                                root, 
+                                "",
+                                filename,
+                                ".c");
+
+            W2C_ENGINE_CONFIGURATION_ADD_FILENAME( config, env, source);
+            header = w2c_file_writer_create_classfile_name( env,
+                                root, 
+                                "",
+                                filename,
+                                ".h");
+
+            W2C_ENGINE_CONFIGURATION_ADD_FILENAME( config, env, header);
+            AXIS2_FREE( env-> allocator, filename);
+        }
+    }
+
+    return w2c_emitter_set_config( emitter, env, config, loader);
+}
+    
 axis2_status_t AXIS2_CALL
-w2c_c_emitter_emit_stub(w2c_emitter_t *emitter,
-        const axis2_env_t *env)
+w2c_c_emitter_emit_stub( w2c_emitter_t *emitter,
+                         const axis2_env_t *env)
 {
     w2c_emitter_impl_t *emitter_impl = NULL;
     axis2_status_t status;
     axis2_status_t overall_status = AXIS2_SUCCESS;
-
+    
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
+    
     emitter_impl = W2C_INTF_TO_IMPL(emitter);
-
-    status = w2c_c_emitter_write_stub_source(emitter_impl, env);
-    if (AXIS2_FAILURE == status)
+     
+    status = w2c_c_emitter_write_stub_source( emitter_impl, env);
+    if ( AXIS2_FAILURE == status )
     {
-        w2c_messages_print_n_log_error(env,
-                "writer.stubSourceFailed");
+        w2c_messages_print_n_log_error( env,
+                       "writer.stubSourceFailed");
         overall_status = AXIS2_FAILURE;
     }
-    status = w2c_c_emitter_write_stub_header(emitter_impl, env);
-    if (AXIS2_FAILURE == status)
+    status = w2c_c_emitter_write_stub_header( emitter_impl, env);
+    if ( AXIS2_FAILURE == status )
     {
-        w2c_messages_print_n_log_error(env,
-                "writer.stubHeaderFailed");
+        w2c_messages_print_n_log_error( env,
+                       "writer.stubHeaderFailed");
         overall_status = AXIS2_FAILURE;
     }
 
@@ -138,48 +201,48 @@
 }
 
 axis2_status_t AXIS2_CALL
-w2c_c_emitter_emit_skel(w2c_emitter_t *emitter,
-        const axis2_env_t *env)
+w2c_c_emitter_emit_skel( w2c_emitter_t *emitter,
+                         const axis2_env_t *env)
 {
     w2c_emitter_impl_t *emitter_impl = NULL;
     axis2_status_t status;
     axis2_status_t overall_status = AXIS2_SUCCESS;
     axis2_bool_t svc_desc = AXIS2_FALSE;
-
+    
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
+    
     emitter_impl = W2C_INTF_TO_IMPL(emitter);
-
-    status = w2c_c_emitter_write_skel_source(emitter_impl, env);
-    if (AXIS2_FAILURE == status)
+   
+    status = w2c_c_emitter_write_skel_source( emitter_impl, env);
+    if ( AXIS2_FAILURE == status )
     {
-        w2c_messages_print_n_log_error(env,
-                "writer.skelSourceFailed");
+        w2c_messages_print_n_log_error( env,
+                       "writer.skelSourceFailed");
         overall_status = AXIS2_FAILURE;
     }
-    status = w2c_c_emitter_write_skel_header(emitter_impl, env);
-    if (AXIS2_FAILURE == status)
+    status = w2c_c_emitter_write_skel_header( emitter_impl, env);
+    if ( AXIS2_FAILURE == status )
     {
-        w2c_messages_print_n_log_error(env,
-                "writer.skelHeaderFailed");
+        w2c_messages_print_n_log_error( env,
+                       "writer.skelHeaderFailed");
         overall_status = AXIS2_FAILURE;
     }
-    status = w2c_c_emitter_write_svc_skel(emitter_impl, env);
-    if (AXIS2_FAILURE == status)
+    status = w2c_c_emitter_write_svc_skel( emitter_impl, env);
+    if ( AXIS2_FAILURE == status )
     {
-        w2c_messages_print_n_log_error(env,
-                "writer.svcSkelFailed");
+        w2c_messages_print_n_log_error( env,
+                       "writer.svcSkelFailed");
         overall_status = AXIS2_FAILURE;
     }
     svc_desc = W2C_ENGINE_CONFIGURATION_GET_GENERATE_DEPLOYEMENT_DESCRIPTOR
-            (emitter_impl-> config, env);
-    if (svc_desc)
+                               ( emitter_impl-> config, env);
+    if (svc_desc )
     {
-        status = w2c_c_emitter_write_svc_xml(emitter_impl, env);
-        if (AXIS2_FAILURE == status)
+        status = w2c_c_emitter_write_svc_xml( emitter_impl, env);
+        if ( AXIS2_FAILURE == status )
         {
-            w2c_messages_print_n_log_error(env,
-                    "writer.svcXmlFailed");
+            w2c_messages_print_n_log_error( env,
+                           "writer.svcXmlFailed");
             overall_status = AXIS2_FAILURE;
         }
     }
@@ -187,8 +250,8 @@
 }
 
 axis2_status_t
-w2c_c_emitter_write_stub_source(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env)
+w2c_c_emitter_write_stub_source( w2c_emitter_impl_t *emitter_impl,
+                                        const axis2_env_t *env)
 {
     axiom_node_t *root = NULL;
     w2c_writer_t *writer = NULL;
@@ -196,22 +259,22 @@
     axis2_status_t status;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    root = w2c_c_emitter_create_for_stub(emitter_impl, env);
-    if (NULL == root)
+    root = w2c_c_emitter_create_for_stub (emitter_impl, env );
+    if (NULL == root )
     {
         return AXIS2_FAILURE;
     }
     writer = (w2c_writer_t*)w2c_class_loader_get_object_from_class_name
-            (env, "w2c_cstub_source_writer", W2C_EMITTER_WRITER_DIR, &dll_desc);
-    status = w2c_emitter_write_class(emitter_impl, env, root, writer);
+           ( env, "w2c_cstub_source_writer", W2C_EMITTER_WRITER_DIR, &dll_desc);
+    status = w2c_emitter_write_class ( emitter_impl, env, root, writer );
     w2c_class_loader_free_loaded_class(env, dll_desc);
     AXIOM_NODE_FREE_TREE(root, env);
     return status;
 }
 
 axis2_status_t
-w2c_c_emitter_write_stub_header(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env)
+w2c_c_emitter_write_stub_header( w2c_emitter_impl_t *emitter_impl,
+                                        const axis2_env_t *env)
 {
     axiom_node_t *root = NULL;
     w2c_writer_t *writer = NULL;
@@ -219,22 +282,22 @@
     axis2_status_t status;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    root = w2c_c_emitter_create_for_stub(emitter_impl, env);
-    if (NULL == root)
+    root = w2c_c_emitter_create_for_stub ( emitter_impl, env );
+    if (NULL == root )
     {
         return AXIS2_FAILURE;
     }
     writer = (w2c_writer_t*)w2c_class_loader_get_object_from_class_name
-            (env, "w2c_cstub_header_writer", W2C_EMITTER_WRITER_DIR, &dll_desc);
-    status = w2c_emitter_write_class(emitter_impl, env, root, writer);
+         ( env, "w2c_cstub_header_writer", W2C_EMITTER_WRITER_DIR, &dll_desc);
+    status = w2c_emitter_write_class ( emitter_impl, env, root, writer );
     w2c_class_loader_free_loaded_class(env, dll_desc);
     AXIOM_NODE_FREE_TREE(root, env);
     return status;
 }
 
 axis2_status_t
-w2c_c_emitter_write_skel_source(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env)
+w2c_c_emitter_write_skel_source( w2c_emitter_impl_t *emitter_impl,
+                                        const axis2_env_t *env)
 {
     axiom_node_t *root = NULL;
     w2c_writer_t *writer = NULL;
@@ -242,22 +305,22 @@
     axis2_status_t status;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    root = w2c_c_emitter_create_for_skel(emitter_impl, env);
-    if (NULL == root)
+    root = w2c_c_emitter_create_for_skel( emitter_impl, env );
+    if (NULL == root )
     {
         return AXIS2_FAILURE;
     }
     writer = (w2c_writer_t*)w2c_class_loader_get_object_from_class_name
-            (env, "w2c_cskel_source_writer", W2C_EMITTER_WRITER_DIR, &dll_desc);
-    status = w2c_emitter_write_class(emitter_impl, env, root, writer);
+           ( env, "w2c_cskel_source_writer", W2C_EMITTER_WRITER_DIR, &dll_desc);
+    status = w2c_emitter_write_class ( emitter_impl, env, root, writer );
     w2c_class_loader_free_loaded_class(env, dll_desc);
     AXIOM_NODE_FREE_TREE(root, env);
     return status;
 }
 
 axis2_status_t
-w2c_c_emitter_write_skel_header(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env)
+w2c_c_emitter_write_skel_header( w2c_emitter_impl_t *emitter_impl,
+                                        const axis2_env_t *env)
 {
     axiom_node_t *root = NULL;
     w2c_writer_t *writer = NULL;
@@ -265,22 +328,22 @@
     axis2_status_t status;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    root = w2c_c_emitter_create_for_skel(emitter_impl, env);
-    if (NULL == root)
+    root = w2c_c_emitter_create_for_skel( emitter_impl, env );
+    if (NULL == root )
     {
         return AXIS2_FAILURE;
     }
     writer = (w2c_writer_t*)w2c_class_loader_get_object_from_class_name
-            (env, "w2c_cskel_header_writer", W2C_EMITTER_WRITER_DIR, &dll_desc);
-    status = w2c_emitter_write_class(emitter_impl, env, root, writer);
+           ( env, "w2c_cskel_header_writer", W2C_EMITTER_WRITER_DIR, &dll_desc);
+    status = w2c_emitter_write_class ( emitter_impl, env, root, writer );
     w2c_class_loader_free_loaded_class(env, dll_desc);
     AXIOM_NODE_FREE_TREE(root, env);
     return status;
-}
+} 
 
 axis2_status_t
-w2c_c_emitter_write_svc_skel(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env)
+w2c_c_emitter_write_svc_skel( w2c_emitter_impl_t *emitter_impl,
+                                        const axis2_env_t *env)
 {
     axiom_node_t *root = NULL;
     w2c_writer_t *writer = NULL;
@@ -288,22 +351,22 @@
     axis2_status_t status;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    root = w2c_c_emitter_create_for_svc_skel(emitter_impl, env);
-    if (NULL == root)
+    root = w2c_c_emitter_create_for_svc_skel( emitter_impl, env );
+    if (NULL == root )
     {
         return AXIS2_FAILURE;
     }
     writer = (w2c_writer_t*)w2c_class_loader_get_object_from_class_name
-            (env, "w2c_csvc_skeleton_writer", W2C_EMITTER_WRITER_DIR, &dll_desc);
-    status = w2c_emitter_write_class(emitter_impl, env, root, writer);
+           ( env, "w2c_csvc_skeleton_writer", W2C_EMITTER_WRITER_DIR, &dll_desc);
+    status = w2c_emitter_write_class ( emitter_impl, env, root, writer );
     w2c_class_loader_free_loaded_class(env, dll_desc);
     AXIOM_NODE_FREE_TREE(root, env);
     return status;
-}
+} 
 
 axis2_status_t
-w2c_c_emitter_write_svc_xml(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env)
+w2c_c_emitter_write_svc_xml( w2c_emitter_impl_t *emitter_impl,
+                                        const axis2_env_t *env)
 {
     axiom_node_t *root = NULL;
     w2c_writer_t *writer = NULL;
@@ -311,22 +374,22 @@
     axis2_status_t status;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    root = w2c_c_emitter_create_for_svc_xml(emitter_impl, env);
-    if (NULL == root)
+    root = w2c_c_emitter_create_for_svc_xml( emitter_impl, env );
+    if (NULL == root )
     {
         return AXIS2_FAILURE;
     }
     writer = (w2c_writer_t*)w2c_class_loader_get_object_from_class_name
-            (env, "w2c_cservice_xml_writer", W2C_EMITTER_WRITER_DIR, &dll_desc);
-    status = w2c_emitter_write_class(emitter_impl, env, root, writer);
+           ( env, "w2c_cservice_xml_writer", W2C_EMITTER_WRITER_DIR, &dll_desc);
+    status = w2c_emitter_write_class ( emitter_impl, env, root, writer );
     w2c_class_loader_free_loaded_class(env, dll_desc);
     AXIOM_NODE_FREE_TREE(root, env);
     return status;
 }
 
 axiom_node_t*
-w2c_c_emitter_create_for_stub(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env)
+w2c_c_emitter_create_for_stub (w2c_emitter_impl_t *emitter_impl,
+                                   const axis2_env_t *env )
 {
     axiom_node_t *root = NULL;
     axis2_bool_t flag = AXIS2_FALSE;
@@ -335,58 +398,58 @@
     axis2_char_t *given_name = NULL;
     axis2_qname_t *qname = NULL;
     axis2_char_t *qname_str = NULL;
-
-    qname = w2c_emitter_pick_service_name(emitter_impl, env);
-    given_name = W2C_QNAME2NAME_MAKER_SUGGEST_NAME(
-                emitter_impl-> qname2name_maker, env, qname);
+    
+    qname = w2c_emitter_pick_service_name( emitter_impl, env );
+    given_name = W2C_QNAME2NAME_MAKER_SUGGEST_NAME( 
+            emitter_impl-> qname2name_maker, env, qname);
     qname_str = AXIS2_QNAME_TO_STRING(qname, env);
-
+    
     root = w2c_xslt_utils_add_child_node(env, "class", NULL);
-    full_name = AXIS2_STRDUP(W2C_C_EMITTER_STUB_PREFIX, env);
-    full_name = w2c_string_add_string(full_name, given_name, env);
-    full_name = w2c_string_add_string
-            (full_name, W2C_C_EMITTER_STUB_SUFFIX, env);
-    full_name_c = emitter_impl-> name_maker_func(full_name, env);
-
-    w2c_xslt_utils_add_attribute(env, root, "name", full_name_c);
-    w2c_xslt_utils_add_attribute(env, root, "prefix", full_name_c);
-    w2c_xslt_utils_add_attribute(env, root, "servicename", given_name);
-    w2c_xslt_utils_add_attribute(env, root, "package", "");
-    w2c_xslt_utils_add_attribute(env, root, "interfaceName", given_name);
-    w2c_xslt_utils_add_attribute(env, root, "qname" , qname_str);
+    full_name = AXIS2_STRDUP ( W2C_C_EMITTER_STUB_PREFIX, env );
+    full_name = w2c_string_add_string ( full_name, given_name, env );
+    full_name = w2c_string_add_string 
+                            ( full_name, W2C_C_EMITTER_STUB_SUFFIX, env);
+    full_name_c = emitter_impl-> name_maker_func( full_name, env);
 
+    w2c_xslt_utils_add_attribute (env, root, "name", full_name_c);
+    w2c_xslt_utils_add_attribute (env, root, "prefix", full_name_c);
+    w2c_xslt_utils_add_attribute (env, root, "servicename", given_name);
+    w2c_xslt_utils_add_attribute (env, root, "package", "");
+    w2c_xslt_utils_add_attribute (env, root, "interfaceName", given_name);
+    w2c_xslt_utils_add_attribute (env, root, "qname" , qname_str);
+    
 
-    flag =
-        W2C_ENGINE_CONFIGURATION_GET_PACK_CLASSES(emitter_impl-> config, env);
-    if (flag)
+    flag = 
+      W2C_ENGINE_CONFIGURATION_GET_PACK_CLASSES( emitter_impl-> config, env);
+    if ( flag )
     {
-        w2c_xslt_utils_add_attribute(env, root, "wrapped", "yes");
+       w2c_xslt_utils_add_attribute (env, root, "wrapped", "yes");
     }
-    flag =
-        W2C_ENGINE_CONFIGURATION_GET_ASYNC_ON(emitter_impl-> config, env);
-    if (flag)
+    flag = 
+        W2C_ENGINE_CONFIGURATION_GET_ASYNC_ON( emitter_impl-> config, env);
+    if ( flag)
     {
-        w2c_xslt_utils_add_attribute(env, root, "isAsync", "1");
+        w2c_xslt_utils_add_attribute (env, root, "isAsync", "1");
     }
-    flag =
-        W2C_ENGINE_CONFIGURATION_GET_SYNC_ON(emitter_impl-> config, env);
-    if (flag)
+    flag = 
+        W2C_ENGINE_CONFIGURATION_GET_SYNC_ON( emitter_impl-> config, env);
+    if ( flag)
     {
-        w2c_xslt_utils_add_attribute(env, root, "isSync", "1");
+        w2c_xslt_utils_add_attribute (env, root, "isSync", "1");
     }
+    
 
+    w2c_xslt_utils_copy_node_tree( env, root, emitter_impl-> common_node);
 
-    w2c_xslt_utils_copy_node_tree(env, root, emitter_impl-> common_node);
-
-    AXIS2_FREE(env->allocator, full_name);
-    AXIS2_FREE(env->allocator, full_name_c);
-
+    AXIS2_FREE (env->allocator, full_name );
+    AXIS2_FREE (env->allocator, full_name_c );
+      
     return root;
 }
 
 axiom_node_t*
 w2c_c_emitter_create_for_skel(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env)
+                                   const axis2_env_t *env )
 {
     axiom_node_t *root = NULL;
     axis2_char_t *full_name = NULL;
@@ -394,35 +457,35 @@
     axis2_char_t *given_name = NULL;
     axis2_qname_t *qname = NULL;
     axis2_char_t *qname_str = NULL;
-
-    qname = w2c_emitter_pick_service_name(emitter_impl, env);
-    given_name = W2C_QNAME2NAME_MAKER_SUGGEST_NAME(
-                emitter_impl-> qname2name_maker, env, qname);
+    
+    qname = w2c_emitter_pick_service_name( emitter_impl, env );
+    given_name = W2C_QNAME2NAME_MAKER_SUGGEST_NAME( 
+            emitter_impl-> qname2name_maker, env, qname);
     qname_str = AXIS2_QNAME_TO_STRING(qname, env);
-
+    
     root = w2c_xslt_utils_add_child_node(env, "interface", NULL);
-    full_name = AXIS2_STRDUP(W2C_C_EMITTER_SKEL_PREFIX, env);
-    full_name = w2c_string_add_string(full_name, given_name, env);
-    full_name = w2c_string_add_string
-            (full_name, W2C_C_EMITTER_SKEL_SUFFIX, env);
-    full_name_c = emitter_impl-> name_maker_func(full_name, env);
-
-    w2c_xslt_utils_add_attribute(env, root, "name", full_name_c);
-    w2c_xslt_utils_add_attribute(env, root, "prefix", full_name_c);
-    w2c_xslt_utils_add_attribute(env, root, "package", "");
-    w2c_xslt_utils_add_attribute(env, root, "qname", qname_str);
+    full_name = AXIS2_STRDUP ( W2C_C_EMITTER_SKEL_PREFIX, env );
+    full_name = w2c_string_add_string ( full_name, given_name, env );
+    full_name = w2c_string_add_string 
+                            ( full_name, W2C_C_EMITTER_SKEL_SUFFIX, env);
+    full_name_c = emitter_impl-> name_maker_func( full_name, env);
+
+    w2c_xslt_utils_add_attribute (env, root, "name", full_name_c);
+    w2c_xslt_utils_add_attribute (env, root, "prefix", full_name_c);
+    w2c_xslt_utils_add_attribute (env, root, "package", "");
+    w2c_xslt_utils_add_attribute (env, root, "qname", qname_str); 
 
-    w2c_xslt_utils_copy_node_tree(env, root, emitter_impl-> common_node);
+    w2c_xslt_utils_copy_node_tree( env, root, emitter_impl-> common_node);
 
-    AXIS2_FREE(env->allocator, full_name);
-    AXIS2_FREE(env->allocator, full_name_c);
+    AXIS2_FREE (env->allocator, full_name );
+    AXIS2_FREE (env->allocator, full_name_c );
 
     return root;
 }
 
 axiom_node_t*
 w2c_c_emitter_create_for_svc_skel(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env)
+                                   const axis2_env_t *env )
 {
     axiom_node_t *root = NULL;
     axis2_char_t *skel_name = NULL;
@@ -432,65 +495,65 @@
     axis2_char_t *given_name = NULL;
     axis2_qname_t *qname = NULL;
     axis2_char_t *qname_str = NULL;
-
-    qname = w2c_emitter_pick_service_name(emitter_impl, env);
-    given_name = W2C_QNAME2NAME_MAKER_SUGGEST_NAME(
-                emitter_impl-> qname2name_maker, env, qname);
+    
+    qname = w2c_emitter_pick_service_name( emitter_impl, env );
+    given_name = W2C_QNAME2NAME_MAKER_SUGGEST_NAME( 
+            emitter_impl-> qname2name_maker, env, qname);
     qname_str = AXIS2_QNAME_TO_STRING(qname, env);
-
+    
     root = w2c_xslt_utils_add_child_node(env, "interface", NULL);
-    svc_skel_name = AXIS2_STRDUP(W2C_C_EMITTER_SVC_SKEL_PREFIX, env);
-    svc_skel_name = w2c_string_add_string(svc_skel_name, given_name, env);
-    svc_skel_name = w2c_string_add_string
-            (svc_skel_name, W2C_C_EMITTER_SVC_SKEL_SUFFIX, env);
-    svc_skel_name_c = emitter_impl-> name_maker_func(svc_skel_name, env);
-
-    w2c_xslt_utils_add_attribute(env, root, "name", svc_skel_name_c);
-    w2c_xslt_utils_add_attribute(env, root, "prefix", svc_skel_name_c);
-    w2c_xslt_utils_add_attribute(env, root, "qname", qname_str);
-
-    skel_name = AXIS2_STRDUP(W2C_C_EMITTER_SKEL_PREFIX, env);
-    skel_name = w2c_string_add_string(skel_name, given_name, env);
-    skel_name = w2c_string_add_string
-            (skel_name, W2C_C_EMITTER_SKEL_SUFFIX, env);
-    skel_name_c = emitter_impl-> name_maker_func(skel_name, env);
-
-    w2c_xslt_utils_add_attribute(env, root, "svcname", skel_name_c);
-    w2c_xslt_utils_add_attribute(env, root, "svcop_prefix", skel_name_c);
-    w2c_xslt_utils_add_attribute(env, root, "package", "");
-
-    w2c_xslt_utils_copy_node_tree(env, root, emitter_impl-> common_node);
-
-    AXIS2_FREE(env->allocator, skel_name);
-    AXIS2_FREE(env->allocator, skel_name_c);
-    AXIS2_FREE(env->allocator, svc_skel_name);
-    AXIS2_FREE(env->allocator, svc_skel_name_c);
+    svc_skel_name = AXIS2_STRDUP ( W2C_C_EMITTER_SVC_SKEL_PREFIX, env );
+    svc_skel_name = w2c_string_add_string ( svc_skel_name, given_name, env );
+    svc_skel_name = w2c_string_add_string 
+                            ( svc_skel_name, W2C_C_EMITTER_SVC_SKEL_SUFFIX, env);
+    svc_skel_name_c = emitter_impl-> name_maker_func( svc_skel_name, env);
+
+    w2c_xslt_utils_add_attribute (env, root, "name", svc_skel_name_c);
+    w2c_xslt_utils_add_attribute (env, root, "prefix", svc_skel_name_c);
+    w2c_xslt_utils_add_attribute (env, root, "qname", qname_str);
+
+    skel_name = AXIS2_STRDUP ( W2C_C_EMITTER_SKEL_PREFIX, env );
+    skel_name = w2c_string_add_string ( skel_name, given_name, env );
+    skel_name = w2c_string_add_string 
+                            ( skel_name, W2C_C_EMITTER_SKEL_SUFFIX, env);
+    skel_name_c = emitter_impl-> name_maker_func( skel_name, env);
+
+    w2c_xslt_utils_add_attribute (env, root, "svcname", skel_name_c);
+    w2c_xslt_utils_add_attribute (env, root, "svcop_prefix", skel_name_c);
+    w2c_xslt_utils_add_attribute (env, root, "package", "");
+    
+    w2c_xslt_utils_copy_node_tree( env, root, emitter_impl-> common_node);
+
+    AXIS2_FREE (env->allocator, skel_name );
+    AXIS2_FREE (env->allocator, skel_name_c );
+    AXIS2_FREE (env->allocator, svc_skel_name );
+    AXIS2_FREE (env->allocator, svc_skel_name_c );
 
     return root;
 }
 
 axiom_node_t*
 w2c_c_emitter_create_for_svc_xml(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env)
+                                   const axis2_env_t *env )
 {
     axiom_node_t *root = NULL;
     axis2_char_t *svc_name = NULL;
     axis2_char_t *c_svc_name = NULL;
     axis2_qname_t *qname = NULL;
     axis2_char_t *qname_str = NULL;
-
-    qname = w2c_emitter_pick_service_name(emitter_impl, env);
-    svc_name = W2C_QNAME2NAME_MAKER_SUGGEST_NAME(
-                emitter_impl-> qname2name_maker, env, qname);
+    
+    qname = w2c_emitter_pick_service_name( emitter_impl, env );
+    svc_name = W2C_QNAME2NAME_MAKER_SUGGEST_NAME( 
+            emitter_impl-> qname2name_maker, env, qname);
     qname_str = AXIS2_QNAME_TO_STRING(qname, env);
-    c_svc_name = emitter_impl-> name_maker_func(svc_name, env);
-
+    c_svc_name = emitter_impl-> name_maker_func( svc_name, env);
+    
     root = w2c_xslt_utils_add_child_node(env, "interface", NULL);
-    w2c_xslt_utils_add_attribute(env, root, "servicename", svc_name);
-    w2c_xslt_utils_add_attribute(env, root, "c_servicename", c_svc_name);
-    w2c_xslt_utils_add_attribute(env, root, "qname", qname_str);
-
-    w2c_xslt_utils_copy_node_tree(env, root, emitter_impl-> common_node);
+    w2c_xslt_utils_add_attribute (env, root, "servicename", svc_name);
+    w2c_xslt_utils_add_attribute (env, root, "c_servicename", c_svc_name);
+    w2c_xslt_utils_add_attribute (env, root, "qname", qname_str);
+    
+    w2c_xslt_utils_copy_node_tree( env, root, emitter_impl-> common_node);
 
     return root;
 }

Modified: webservices/axis2/trunk/c/tools/codegen/src/wsdl/emitter/emitter.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/emitter/emitter.c?view=diff&rev=450427&r1=450426&r2=450427
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/emitter/emitter.c (original)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/emitter/emitter.c Wed Sep 27 06:07:26 2006
@@ -48,6 +48,12 @@
 #include <woden_wsdl10_soap_binding_exts.h>
 #include <woden_soap_binding_op_exts.h>
 #include <woden_wsdl10_soap_binding_op_exts.h>
+#include <woden_wsdl10_interface_msg_ref_element.h>
+#include <woden_wsdl10_interface_msg_ref.h>
+#include <woden_wsdl10_msg_ref.h>
+#include <woden_wsdl10_msg_ref_element.h>
+#include <woden_wsdl10_part.h>
+#include <woden_element_decl.h>
 
 #include <w2c_typemapper.h>
 #include <w2c_cmdline_option_consts.h>
@@ -56,33 +62,33 @@
 /***************************Function implementation****************************/
 
 w2c_emitter_impl_t*
-w2c_emitter_create_impl(const axis2_env_t *env)
+w2c_emitter_create_impl( const axis2_env_t *env)
 {
     w2c_emitter_impl_t *emitter_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
+    
+    emitter_impl = 
+         AXIS2_MALLOC (env->allocator, sizeof(w2c_emitter_impl_t));
 
-    emitter_impl =
-        AXIS2_MALLOC(env->allocator, sizeof(w2c_emitter_impl_t));
-
-    if (NULL == emitter_impl)
+    if(NULL == emitter_impl)
     {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); 
         return NULL;
     }
-    w2c_emitter_init(emitter_impl, env);
-
+    w2c_emitter_init(emitter_impl, env );
+    
     return emitter_impl;
 }
 
 axis2_status_t
-w2c_emitter_init(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env)
+w2c_emitter_init( w2c_emitter_impl_t *emitter_impl,
+                  const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    if (NULL == emitter_impl)
+    if(NULL == emitter_impl)
     {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_NULL_PARAM, AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_NULL_PARAM, AXIS2_FAILURE); 
         return AXIS2_FAILURE;
     }
     emitter_impl-> config = NULL;
@@ -93,15 +99,15 @@
     emitter_impl-> resolver = woden_resolver_create(env);
     axiom_element_create(env, NULL, "class", NULL, &(emitter_impl->common_node));
 
-    emitter_impl->emitter.ops =
-        AXIS2_MALLOC(env->allocator, sizeof(w2c_emitter_ops_t));
-    if (NULL == emitter_impl->emitter.ops)
+    emitter_impl->emitter.ops = 
+           AXIS2_MALLOC (env->allocator, sizeof(w2c_emitter_ops_t));
+    if(NULL == emitter_impl->emitter.ops)
     {
         w2c_emitter_free(&(emitter_impl->emitter), env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
-
+  
     emitter_impl->emitter.ops->free = w2c_emitter_free;
     emitter_impl->emitter.ops->set_config = w2c_emitter_set_config;
     emitter_impl->emitter.ops->emit_stub = w2c_emitter_emit_stub;
@@ -112,70 +118,70 @@
 
 axis2_status_t AXIS2_CALL
 w2c_emitter_free(w2c_emitter_t *emitter,
-        const axis2_env_t *env)
+       const axis2_env_t *env)
 {
     w2c_emitter_impl_t *emitter_impl = NULL;
-
+    
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
+    
     emitter_impl = W2C_INTF_TO_IMPL(emitter);
 
-    if (emitter_impl-> desc)
+    if ( emitter_impl-> desc)
     {
-        if (WODEN_RESOLVER_GET_SPEC(emitter_impl-> resolver, env)
-                == WODEN_WSDL10)
+        if (WODEN_RESOLVER_GET_SPEC( emitter_impl-> resolver, env ) 
+                                                          == WODEN_WSDL10 )
         {
-            WODEN_WSDL10_DESC_FREE(emitter_impl-> desc, env);
+            WODEN_WSDL10_DESC_FREE ( emitter_impl-> desc, env);
         }
-        else if (WODEN_RESOLVER_GET_SPEC(emitter_impl-> resolver, env)
-                == WODEN_WSDL20)
+        else if (WODEN_RESOLVER_GET_SPEC( emitter_impl-> resolver, env)
+                                                          == WODEN_WSDL20 )
         {
-            WODEN_DESC_FREE(emitter_impl-> desc, env);
+            WODEN_DESC_FREE ( emitter_impl-> desc, env);
         }
     }
-    if (emitter_impl-> resolver)
+    if ( emitter_impl-> resolver )
     {
-        WODEN_RESOLVER_FREE(emitter_impl-> resolver, env);
+        WODEN_RESOLVER_FREE( emitter_impl-> resolver, env);
     }
-    if (emitter_impl-> common_node)
+    if ( emitter_impl-> common_node )
     {
-        AXIOM_NODE_FREE_TREE_TREE(emitter_impl-> common_node, env);
+        AXIOM_NODE_FREE_TREE_TREE ( emitter_impl-> common_node, env );
     }
-    if (emitter->ops)
+    if(emitter->ops)
     {
         AXIS2_FREE(env->allocator, emitter->ops);
         emitter->ops = NULL;
     }
-    if (emitter_impl)
+    if(emitter_impl)
     {
         AXIS2_FREE(env->allocator, emitter_impl);
         emitter_impl = NULL;
     }
-
+    
     return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL
 w2c_emitter_set_config(w2c_emitter_t *emitter,
-        const axis2_env_t *env,
-        w2c_engine_configuration_t *config,
-        w2c_config_property_loader_t *loader)
+       const axis2_env_t *env,
+       w2c_engine_configuration_t *config,
+       w2c_config_property_loader_t *loader)
 {
     w2c_emitter_impl_t *emitter_impl = NULL;
     axis2_status_t status = AXIS2_SUCCESS;
     W2C_EMITTER_NAME_MAKER name_maker_func = NULL;
-
+    
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
+    
     emitter_impl = W2C_INTF_TO_IMPL(emitter);
     emitter_impl-> config = config;
     emitter_impl-> loader = loader;
 
-    name_maker_func = (W2C_EMITTER_NAME_MAKER)
-            W2C_ENGINE_CONFIGURATION_GET_NAMEMAKER_FUNC(config, env);
-    emitter_impl-> qname2name_maker = W2C_ENGINE_CONFIGURATION_GET_QNAME2NAME(config, env);
-
-    if (NULL == name_maker_func)
+    name_maker_func =(W2C_EMITTER_NAME_MAKER)
+         W2C_ENGINE_CONFIGURATION_GET_NAMEMAKER_FUNC( config, env);
+    emitter_impl-> qname2name_maker = W2C_ENGINE_CONFIGURATION_GET_QNAME2NAME( config, env);
+    
+    if ( NULL == name_maker_func )
     {
         emitter_impl-> name_maker_func = w2c_emitter_default_namemaker;
     }
@@ -183,22 +189,22 @@
     {
         emitter_impl-> name_maker_func = name_maker_func;
     }
-
-
-    status = w2c_emitter_parse_wsdl(emitter_impl, env);
-    if (AXIS2_FAILURE == status)
+    
+    
+    status = w2c_emitter_parse_wsdl( emitter_impl, env); 
+    if ( AXIS2_FAILURE == status )
+    {
+        w2c_messages_print_n_log_error( env,
+                       "emitter.errorParsingWSDL");
+        return AXIS2_FAILURE;
+    }
+ 
+    status =  w2c_emitter_load_services ( emitter_impl, env,
+                                     emitter_impl-> common_node );
+    if ( AXIS2_FAILURE == status )
     {
-        w2c_messages_print_n_log_error(env,
-                "emitter.errorParsingWSDL");
-        return AXIS2_FAILURE;
-    }
-
-    status =  w2c_emitter_load_services(emitter_impl, env,
-            emitter_impl-> common_node);
-    if (AXIS2_FAILURE == status)
-    {
-        w2c_messages_print_n_log_error(env,
-                "emitter.errorLoadingServices");
+        w2c_messages_print_n_log_error( env,
+                       "emitter.errorLoadingServices");
         return AXIS2_FAILURE;
     }
     return AXIS2_SUCCESS;
@@ -208,14 +214,14 @@
 
 axis2_status_t AXIS2_CALL
 w2c_emitter_emit_stub(w2c_emitter_t *emitter,
-        const axis2_env_t *env)
+       const axis2_env_t *env)
 {
     return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL
 w2c_emitter_emit_skel(w2c_emitter_t *emitter,
-        const axis2_env_t *env)
+       const axis2_env_t *env)
 {
     return AXIS2_SUCCESS;
 }
@@ -224,9 +230,9 @@
 
 axis2_status_t
 w2c_emitter_write_class(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env,
-        axiom_node_t *root,
-        w2c_writer_t *writer)
+                      const axis2_env_t *env,
+                      axiom_node_t *root,
+                      w2c_writer_t *writer)
 {
     axis2_char_t *package_name = NULL;
     axis2_char_t *file_name = NULL;
@@ -234,94 +240,95 @@
     axis2_status_t status = AXIS2_SUCCESS;
     axis2_char_t *full_path = NULL;
 
-    if (NULL == writer)
+    if ( NULL == writer )
     {
-        return AXIS2_FAILURE;
+       return AXIS2_FAILURE;
     }
-
-    status = W2C_WRITER_INITIALIZE(writer, env, emitter_impl->loader,
-            emitter_impl->config);
-    if (AXIS2_FAILURE == status)
+    
+    status = W2C_WRITER_INITIALIZE( writer, env, emitter_impl->loader, 
+                                       emitter_impl->config );
+    if ( AXIS2_FAILURE == status)
     {
-        w2c_messages_print_n_log_error(env,
-                "writer.templateLoadFailed");
+        w2c_messages_print_n_log_error( env, 
+                       "writer.templateLoadFailed");
         return AXIS2_FAILURE;
     }
-    root_ele = AXIOM_NODE_GET_DATA_ELEMENT(root, env);
-
-    package_name = AXIOM_ELEMENT_GET_ATTRIBUTE_VALUE_BY_NAME
-            (root_ele, env, "package");
-    file_name = AXIOM_ELEMENT_GET_ATTRIBUTE_VALUE_BY_NAME
-            (root_ele, env, "name");
-    full_path = W2C_WRITER_CREATE_OUT_FILE(writer, env, package_name, file_name);
-    if (NULL == full_path)
+    root_ele = AXIOM_NODE_GET_DATA_ELEMENT( root, env);
+    
+    package_name = AXIOM_ELEMENT_GET_ATTRIBUTE_VALUE_BY_NAME 
+                            ( root_ele, env, "package");
+    file_name = AXIOM_ELEMENT_GET_ATTRIBUTE_VALUE_BY_NAME 
+                            ( root_ele, env, "name");
+    full_path = W2C_WRITER_CREATE_OUT_FILE ( writer, env, package_name, file_name);
+    if ( NULL == full_path )
     {
         return AXIS2_FAILURE;
     }
-    W2C_ENGINE_CONFIGURATION_ADD_FILENAME(emitter_impl-> config, env,
-            full_path);
-    W2C_WRITER_PARSE(writer, env, root);
+    W2C_ENGINE_CONFIGURATION_ADD_FILENAME( emitter_impl-> config, env,
+                                       full_path);
+    W2C_WRITER_PARSE ( writer, env, root );
 
     return AXIS2_SUCCESS;
 }
 
 axis2_status_t
-w2c_emitter_parse_wsdl(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env)
+w2c_emitter_parse_wsdl( w2c_emitter_impl_t *emitter_impl,
+                        const axis2_env_t *env)
 {
     axiom_document_t *om_doc = NULL;
     axis2_char_t *doc_base_uri = NULL;
-    axis2_char_t *axis2c_home = NULL;
+    /*axis2_char_t *axis2c_home = NULL;*/
     void *desc = NULL;
     axis2_char_t *filename = NULL;
 
-
+  
     filename =
-        W2C_ENGINE_CONFIGURATION_GET_WSDL_URI(emitter_impl-> config, env);
+       W2C_ENGINE_CONFIGURATION_GET_WSDL_URI ( emitter_impl-> config, env);
 
     om_doc = get_root_element_from_filename(env, filename);
-    if (NULL == om_doc)
+    if ( NULL == om_doc )
     {
         return AXIS2_FAILURE;
     }
-    axis2c_home = AXIS2_GETENV("AXIS2C_HOME");
-    doc_base_uri = AXIS2_STRACAT(axis2c_home, "/woden/", env);
-
+    /*axis2c_home = AXIS2_GETENV("AXIS2C_HOME");
+    doc_base_uri = AXIS2_STRACAT (axis2c_home, "/woden/", env);*/
+    doc_base_uri = W2C_ENGINE_CONFIGURATION_GET_BASE_URI ( emitter_impl-> config, env);
+    
     desc = (void *)WODEN_RESOLVER_READ(emitter_impl-> resolver , env, om_doc,
-            doc_base_uri);
+                                                                 doc_base_uri);
     /* freee existing desc ) */
-    if (emitter_impl-> desc)
+    if ( emitter_impl-> desc )
     {
-        if (WODEN_RESOLVER_GET_SPEC(emitter_impl-> resolver, env)
-                == WODEN_WSDL10)
+        if (WODEN_RESOLVER_GET_SPEC( emitter_impl-> resolver, env )
+                                                            == WODEN_WSDL10 )
         {
-            WODEN_WSDL10_DESC_FREE(emitter_impl-> desc, env);
+            WODEN_WSDL10_DESC_FREE ( emitter_impl-> desc, env);
         }
-        else if (WODEN_RESOLVER_GET_SPEC(emitter_impl-> resolver, env)
-                == WODEN_WSDL20)
+        else if (WODEN_RESOLVER_GET_SPEC( emitter_impl-> resolver, env)
+                                                            == WODEN_WSDL20 )
         {
-            WODEN_DESC_FREE(emitter_impl-> desc, env);
+            WODEN_DESC_FREE ( emitter_impl-> desc, env);
         }
     }
     emitter_impl-> desc = desc ;
 
-    AXIS2_FREE(env-> allocator, doc_base_uri);
+    AXIS2_FREE ( env-> allocator, doc_base_uri);
     return AXIS2_SUCCESS;
 }
 
 axiom_document_t*
 get_root_element_from_filename(
-    const axis2_env_t *env,
-    axis2_char_t *filename)
+        const axis2_env_t *env,
+        axis2_char_t *filename)
 {
     axiom_xml_reader_t *reader = NULL;
     axiom_stax_builder_t *om_builder = NULL;
     axiom_document_t *doc   = NULL;
 
     reader = axiom_xml_reader_create_for_file(env, filename, NULL);
-    if (NULL == reader)
+    if ( NULL == reader )
     {
-        return NULL;
+       return NULL;
     }
     om_builder = axiom_stax_builder_create(env, reader);
     doc = axiom_document_create(env, NULL, om_builder);
@@ -331,17 +338,17 @@
 }
 
 axis2_qname_t*
-w2c_emitter_pick_service_name(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env)
+w2c_emitter_pick_service_name ( w2c_emitter_impl_t *emitter_impl,
+                               const axis2_env_t *env)
 {
     axis2_array_list_t *svc_list = NULL;
     void  *svc = NULL;
     axis2_qname_t *svc_qname = NULL;
 
-    if (WODEN_RESOLVER_GET_SPEC(emitter_impl-> resolver, env)
-            == WODEN_WSDL10)
+    if (WODEN_RESOLVER_GET_SPEC( emitter_impl-> resolver,env ) 
+                                                            == WODEN_WSDL10 )
     {
-        svc_list =
+        svc_list = 
             WODEN_WSDL10_DESC_ELEMENT_GET_SVC_ELEMENTS(emitter_impl->desc, env);
         if (svc_list)
         {
@@ -352,10 +359,10 @@
             }
         }
     }
-    if (WODEN_RESOLVER_GET_SPEC(emitter_impl-> resolver, env)
-            == WODEN_WSDL20)
+    if (WODEN_RESOLVER_GET_SPEC( emitter_impl-> resolver, env ) 
+                                                            == WODEN_WSDL20 )
     {
-        svc_list =
+        svc_list = 
             WODEN_DESC_ELEMENT_GET_SVC_ELEMENTS(emitter_impl->desc, env);
         if (svc_list)
         {
@@ -369,35 +376,35 @@
     return svc_qname;
 }
 
-
+                   
 axis2_status_t
-w2c_emitter_load_services(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env,
-        axiom_node_t *root)
+w2c_emitter_load_services( w2c_emitter_impl_t *emitter_impl,
+                            const axis2_env_t *env,
+                            axiom_node_t *root)
 {
     axis2_status_t status = AXIS2_FAILURE;
 
-    if (WODEN_RESOLVER_GET_SPEC(emitter_impl-> resolver, env)
-            == WODEN_WSDL10)
+    if (WODEN_RESOLVER_GET_SPEC( emitter_impl-> resolver,env )
+                                                            == WODEN_WSDL10 )
     {
-        status = w2c_emitter_load_services_wsdl1(emitter_impl, env, root);
+        status = w2c_emitter_load_services_wsdl1( emitter_impl, env, root);
     }
-    else if (WODEN_RESOLVER_GET_SPEC(emitter_impl-> resolver, env)
-            == WODEN_WSDL20)
+    else if (WODEN_RESOLVER_GET_SPEC( emitter_impl-> resolver, env )
+                                                            == WODEN_WSDL20 )
     {
-        status = w2c_emitter_load_services_wsdl2(emitter_impl, env, root);
+        status = w2c_emitter_load_services_wsdl2( emitter_impl, env, root);
     }
-
+    
     return status;
 }
-
+                   
 axis2_status_t
-w2c_emitter_load_services_wsdl1(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env,
-        axiom_node_t *root)
+w2c_emitter_load_services_wsdl1( w2c_emitter_impl_t *emitter_impl,
+                            const axis2_env_t *env,
+                            axiom_node_t *root)
 {
     axis2_array_list_t *svc_list = NULL;
-    woden_wsdl10_svc_t *svc = NULL;
+    woden_wsdl10_svc_t *svc = NULL; 
     axis2_qname_t* svc_qname = NULL;
 
     axis2_array_list_t *endpoint_list = NULL;
@@ -411,26 +418,26 @@
     axis2_uri_t *soap_address_uri = NULL;
     axiom_node_t *endpoint_node = NULL;
     void *ext_element = NULL;
-
+    
     woden_binding_t *binding = NULL;
     axis2_char_t *binding_style = NULL;
-
+    
     int j = 0;
     axis2_array_list_t *binding_ops_list = NULL;
     int binding_ops_count = 0;
     void *binding_op = NULL;
-
+   
     int i = 0;
     void* interface_op = NULL;
     axis2_qname_t *op_qname = NULL;
     axis2_char_t *local_part = NULL;
     axis2_char_t *ns = NULL;
     axiom_node_t *method = NULL;
-
+    
     void *soap_binding_op = NULL;
     axis2_uri_t *soap_action_uri = NULL;
     axis2_char_t *soap_action_str = NULL;
-
+   
     axis2_char_t *given_name = NULL;
     axis2_char_t *qname_str = NULL;
 
@@ -438,117 +445,117 @@
      * extract service(s)
      **********************************************************************/
     svc_list = WODEN_WSDL10_DESC_GET_SVCS(emitter_impl-> desc, env);
-
+    
     /** currently work only for one service */
-    if (AXIS2_ARRAY_LIST_SIZE(svc_list, env) < 1)
+    if (AXIS2_ARRAY_LIST_SIZE ( svc_list, env ) < 1 )
     {
-        /** no need to continue more */
-        return AXIS2_FAILURE;
+       /** no need to continue more */
+       return AXIS2_FAILURE; 
     }
-    svc = AXIS2_ARRAY_LIST_GET(svc_list, env, 0);
-    svc_qname = WODEN_WSDL10_SVC_GET_QNAME(svc, env);
-    ns = AXIS2_QNAME_GET_URI(svc_qname, env);
-    w2c_xslt_utils_add_attribute(env, root, "namespace", ns);
+    svc = AXIS2_ARRAY_LIST_GET( svc_list, env, 0 );
+    svc_qname = WODEN_WSDL10_SVC_GET_QNAME( svc, env);
+    ns = AXIS2_QNAME_GET_URI( svc_qname, env);
+    w2c_xslt_utils_add_attribute (env, root, "namespace", ns);
 
     /**********************************************************************
      * extract endpoint(s)
      **********************************************************************/
-    endpoint_list = WODEN_WSDL10_SVC_GET_ENDPOINTS(svc, env);
-
+    endpoint_list = WODEN_WSDL10_SVC_GET_ENDPOINTS (svc, env);
+    
     /** currently work only for one endpoint*/
-    if (AXIS2_ARRAY_LIST_SIZE(endpoint_list, env) < 1)
+    if (AXIS2_ARRAY_LIST_SIZE ( endpoint_list, env ) < 1 )
     {
-        return AXIS2_FAILURE; /* no need to continue more */
+       return AXIS2_FAILURE; /* no need to continue more */
     }
 
-    endpoint = AXIS2_ARRAY_LIST_GET(endpoint_list, env, 0);
+    endpoint = AXIS2_ARRAY_LIST_GET( endpoint_list, env, 0 );
     endpoint = woden_wsdl10_endpoint_to_element_extensible(
-                endpoint, env);
+                            endpoint, env);
 
     ext_type_l = axis2_qname_create(env, "address",
             "http://schemas.xmlsoap.org/wsdl/soap/", NULL);
     ext_elements = WODEN_ELEMENT_EXTENSIBLE_GET_EXT_ELEMENTS(endpoint,
             env);
-    if (ext_elements)
+    if(ext_elements)
         size = AXIS2_ARRAY_LIST_SIZE(ext_elements, env);
     else
         return AXIS2_FAILURE;
-    for (j = 0; j < size; j++)
+    for(j = 0; j < size; j++)
     {
         ext_element = AXIS2_ARRAY_LIST_GET(ext_elements, env, j);
         ext_type = (axis2_qname_t*)WODEN_EXT_ELEMENT_GET_EXT_TYPE(ext_element, env);
-        if (AXIS2_TRUE == AXIS2_QNAME_EQUALS(ext_type, env, ext_type_l))
+        if(AXIS2_TRUE == AXIS2_QNAME_EQUALS(ext_type, env, ext_type_l))
         {
             ext_element =
-                woden_wsdl10_soap_module_to_soap_module_element(
-                    ext_element, env);
+               woden_wsdl10_soap_module_to_soap_module_element (
+                        ext_element, env);
             soap_address =
                 WODEN_WSDL10_SOAP_MODULE_ELEMENT_GET_SOAP_ADDRESS_EXTS(
-                    ext_element, env);
+                        ext_element, env);
 
             soap_address_uri = WODEN_WSDL10_SOAP_ADDRESS_EXTS_GET_SOAP_ADDRESS(
-                        soap_address, env);
+                soap_address, env);
             break;
         }
     }
 
-    if (soap_address_uri)
+    if(soap_address_uri)
     {
         address = AXIS2_URI_TO_STRING(soap_address_uri, env,
                 AXIS2_URI_UNP_OMITUSERINFO);
         endpoint_node = w2c_xslt_utils_add_child_node(env, "endpoint",
-                root);
+                                                        root);
         /** here the endpoint adding */
-        w2c_xslt_utils_add_text(env, endpoint_node, address);
+        w2c_xslt_utils_add_text ( env, endpoint_node, address);
     }
 
     /**********************************************************************
      * extract bindings(s)
      **********************************************************************/
-    binding =
-        WODEN_WSDL10_ENDPOINT_GET_BINDING(endpoint, env);
+    binding = 
+          WODEN_WSDL10_ENDPOINT_GET_BINDING( endpoint, env);
     binding_style = ""; /* currently hard coded */
 
     /**********************************************************************
      * extract binding ops
      **********************************************************************/
-    binding_ops_list =
-        WODEN_BINDING_GET_BINDING_OPS(binding, env);
-    binding_ops_count =
-        AXIS2_ARRAY_LIST_SIZE(binding_ops_list, env);
+    binding_ops_list = 
+         WODEN_BINDING_GET_BINDING_OPS( binding, env);
+    binding_ops_count = 
+         AXIS2_ARRAY_LIST_SIZE( binding_ops_list, env );
 
-    for (i = 0; i < binding_ops_count; i ++)
+    for ( i = 0; i < binding_ops_count; i ++ )
     {
-        binding_op = AXIS2_ARRAY_LIST_GET(binding_ops_list, env, i);
+        binding_op = AXIS2_ARRAY_LIST_GET ( binding_ops_list, env, i );
         /**********************************************************************
          * extract interface ops
          **********************************************************************/
         interface_op = WODEN_WSDL10_BINDING_OP_GET_INTERFACE_OP
-                (binding_op, env);
-
-        op_qname = WODEN_INTERFACE_OP_GET_QNAME(interface_op, env);
-        if (op_qname)
+                                                          (binding_op, env);
+        
+        op_qname = WODEN_INTERFACE_OP_GET_QNAME( interface_op, env);
+        if ( op_qname )
         {
             method = w2c_xslt_utils_add_child_node(env, "method",
-                    root);
-            local_part = AXIS2_QNAME_GET_LOCALPART(op_qname, env);
-            given_name = W2C_QNAME2NAME_MAKER_SUGGEST_NAME(
-                        emitter_impl-> qname2name_maker, env, op_qname);
+                                               root);
+            local_part= AXIS2_QNAME_GET_LOCALPART(op_qname, env);
+            given_name = W2C_QNAME2NAME_MAKER_SUGGEST_NAME( 
+                    emitter_impl-> qname2name_maker, env, op_qname);
             qname_str = AXIS2_QNAME_TO_STRING(op_qname, env);
-            w2c_xslt_utils_add_attribute(env, method, "localpart",
-                    local_part);
+            w2c_xslt_utils_add_attribute (env, method, "localpart",
+                                                local_part);
             given_name = emitter_impl-> name_maker_func(given_name, env);
             w2c_xslt_utils_add_attribute(env, method, "name",
-                    given_name);
+                                                given_name);
             w2c_xslt_utils_add_attribute(env, method, "qname",
-                    qname_str);
-            AXIS2_FREE(env-> allocator, local_part);
+                                                qname_str); 
+            AXIS2_FREE( env-> allocator, local_part);
             ns = AXIS2_QNAME_GET_URI(op_qname, env);
-            w2c_xslt_utils_add_attribute(env, method, "namespace",
-                    ns);
+            w2c_xslt_utils_add_attribute (env, method, "namespace",
+                                                ns);
             /** todos */
-            w2c_xslt_utils_add_attribute(env, method, "style",
-                    binding_style);
+            w2c_xslt_utils_add_attribute (env, method, "style",
+                                                             binding_style);
         }
         else
         {
@@ -557,44 +564,44 @@
         /**********************************************************************
          * extract interface message refs
          **********************************************************************/
-        w2c_emitter_load_operations(emitter_impl, env, method, interface_op, 1);
+        w2c_emitter_load_operations( emitter_impl, env, method, interface_op, 1);
 
         /** get soap action */
         ext_type_l = axis2_qname_create(env, "operation",
-                "http://schemas.xmlsoap.org/wsdl/soap/", NULL);
+                                "http://schemas.xmlsoap.org/wsdl/soap/", NULL);
         binding_op = woden_wsdl10_binding_op_to_element_extensible(binding_op, env);
         ext_elements = WODEN_ELEMENT_EXTENSIBLE_GET_EXT_ELEMENTS(binding_op, env);
-        size = AXIS2_ARRAY_LIST_SIZE(ext_elements, env);
-        for (j = 0; j < size; j++)
+        size = AXIS2_ARRAY_LIST_SIZE( ext_elements, env);
+        for(j=0; j < size; j++)
         {
             ext_element = AXIS2_ARRAY_LIST_GET(ext_elements, env, j);
             ext_type = WODEN_EXT_ELEMENT_GET_EXT_TYPE(ext_element, env);
-            if (AXIS2_TRUE == AXIS2_QNAME_EQUALS(ext_type, env, ext_type_l))
+            if(AXIS2_TRUE == AXIS2_QNAME_EQUALS(ext_type, env, ext_type_l))
             {
-                ext_element = woden_wsdl10_soap_module_to_soap_module_element(
-                            ext_element, env);
+                ext_element = woden_wsdl10_soap_module_to_soap_module_element (
+                                                               ext_element, env);
                 soap_binding_op =
-                    WODEN_WSDL10_SOAP_MODULE_ELEMENT_GET_SOAP_BINDING_OP_EXTS(
-                        ext_element, env);
-                soap_action_uri =
-                    WODEN_WSDL10_SOAP_BINDING_OP_EXTS_GET_SOAP_ACTION
-                    (soap_binding_op, env);
-                soap_action_str = AXIS2_URI_TO_STRING
-                        (soap_action_uri, env, AXIS2_URI_UNP_OMITUSERINFO);
-                w2c_xslt_utils_add_attribute(env, method, "soapaction", soap_action_str);
+                      WODEN_WSDL10_SOAP_MODULE_ELEMENT_GET_SOAP_BINDING_OP_EXTS(
+                                                                 ext_element, env);
+                soap_action_uri = 
+                        WODEN_WSDL10_SOAP_BINDING_OP_EXTS_GET_SOAP_ACTION
+                                                           (soap_binding_op, env);
+                soap_action_str = AXIS2_URI_TO_STRING 
+                                  ( soap_action_uri, env, AXIS2_URI_UNP_OMITUSERINFO);
+                w2c_xslt_utils_add_attribute (env, method, "soapaction", soap_action_str);
             }
         }
     }
-
+    
     return AXIS2_SUCCESS;
-
+        
 }
 
 axis2_status_t
-w2c_emitter_load_operations(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env,
-        axiom_node_t *method,
-        void *interface_op, int wsdl_version)
+w2c_emitter_load_operations( w2c_emitter_impl_t *emitter_impl,
+                                    const axis2_env_t *env,
+                                    axiom_node_t *method, 
+                                    void *interface_op, int wsdl_version)
 {
     axis2_array_list_t *interface_msg_refs = NULL;
     int msg_refs_size = 0;
@@ -606,106 +613,121 @@
     axis2_bool_t in = AXIS2_FALSE;
     axis2_bool_t out = AXIS2_FALSE;
 
-    void *msg_ref_ele = NULL;
     axis2_qname_t *msg_qname = NULL;
-
+    void* if_msg_ref_ele = NULL;
+    void* msg_ref = NULL;
+    woden_wsdl10_part_t *part = NULL;
+    void *msg_ref_ele = NULL;
+    /*void *decl = NULL;*/
+    void *part_ele = NULL;
+  
     axiom_node_t* input_param = NULL;
     axiom_node_t* output_param = NULL;
 
     output_param = w2c_xslt_utils_add_child_node(env, "param",
-            output_param);
+                                          output_param);
     /*w2c_xslt_utils_add_attribute (env, output_param, "type",
                                                         "axiom_node_t*");
     w2c_xslt_utils_add_attribute (env, output_param, "name",
                                                         "param1"); */
-
+  
     interface_msg_refs = WODEN_INTERFACE_OP_GET_INTERFACE_MSG_REFS(
-                interface_op, env);
-    if (interface_msg_refs)
+            interface_op, env);
+    if(interface_msg_refs)
         msg_refs_size = AXIS2_ARRAY_LIST_SIZE(interface_msg_refs, env);
-    for (j = 0; j < msg_refs_size; j++)
+    for(j = 0; j < msg_refs_size; j++)
     {
         interface_msg_ref = AXIS2_ARRAY_LIST_GET(interface_msg_refs, env, j);
-        if (wsdl_version == 1)
+        if( wsdl_version == 1)
         {
             direction =  WODEN_WSDL10_INTERFACE_MSG_REF_GET_DIRECTION
-                    (interface_msg_ref, env);
-            msg_ref_ele = (woden_wsdl10_interface_msg_ref_element_t*)
-                    woden_wsdl10_interface_msg_ref_to_interface_msg_ref_element(interface_msg_ref, env);
-            msg_qname = WODEN_WSDL10_INTERFACE_MSG_REF_ELEMENT_GET_MSG_QNAME(msg_ref_ele, env);
+                                    (interface_msg_ref, env);
+            if_msg_ref_ele= (woden_wsdl10_interface_msg_ref_element_t*)
+                woden_wsdl10_interface_msg_ref_to_interface_msg_ref_element( interface_msg_ref, env);
+            
+            msg_ref = WODEN_WSDL10_INTERFACE_MSG_REF_ELEMENT_GET_MSG( if_msg_ref_ele, env);
+            msg_ref_ele = woden_wsdl10_msg_ref_to_msg_ref_element( msg_ref, env);
+            part = WODEN_WSDL10_MSG_REF_ELEMENT_GET_PART( msg_ref_ele, env);
+            part_ele = woden_wsdl10_part_to_part_element( part, env);
+            msg_qname = WODEN_WSDL10_PART_ELEMENT_GET_ELEMENT_QNAME( part_ele, env);
+            /*decl = WODEN_WSDL10_PART_GET_ELEMENT_DECLARATION( part, env);
+            msg_qname = WODEN_ELEMENT_DECL_GET_QNAME( decl, env);*/
+            /*msg_qname = WODEN_WSDL10_PART_GET_QNAME( part, env);*/
+           /* msg_qname = WODEN_WSDL10_INTERFACE_MSG_REF_ELEMENT_GET_MSG_QNAME( if_msg_ref_ele, env);*/
         }
-        else if (wsdl_version == 2)
+        else if ( wsdl_version == 2 )
         {
             direction =  WODEN_INTERFACE_MSG_REF_GET_DIRECTION
-                    (interface_msg_ref, env);
-            msg_ref_ele = (woden_interface_msg_ref_element_t*)
-                    woden_interface_msg_ref_to_interface_msg_ref_element(interface_msg_ref, env);
+                                    (interface_msg_ref, env);
+            if_msg_ref_ele= (woden_interface_msg_ref_element_t*)
+                woden_interface_msg_ref_to_interface_msg_ref_element( interface_msg_ref, env);
             /*msg_qname = WODEN_INTERFACE_MSG_REF_ELEMENT_GET_MSG_LABEL( msg_ref_ele, env);*/
-            msg_qname = WODEN_INTERFACE_MSG_REF_ELEMENT_GET_ELEMENT_QNAME(msg_ref_ele, env);
+            msg_qname = WODEN_INTERFACE_MSG_REF_ELEMENT_GET_ELEMENT_QNAME( if_msg_ref_ele, env);
         }
         str_direction = WODEN_DIRECTION_TO_STRING(direction, env);
-        if (0 == AXIS2_STRCMP(str_direction, "in"))
+        if(0 == AXIS2_STRCMP(str_direction, "in"))
         {
             if (!in) /* for the first in iteration */
             {
                 input_param = w2c_xslt_utils_add_child_node(env, "input", method);
                 in = AXIS2_TRUE;
             }
-            w2c_emitter_add_param(emitter_impl, env, input_param, msg_qname);
+            w2c_emitter_add_param( emitter_impl, env, input_param, msg_qname);
         }
-        if (0 == AXIS2_STRCMP(str_direction, "out"))
+        if(0 == AXIS2_STRCMP(str_direction, "out"))
         {
             if (!out)
             {
                 output_param = w2c_xslt_utils_add_child_node(env, "output",
-                        method);
+                                                                  method);
                 out = AXIS2_TRUE;
             }
-            w2c_emitter_add_param(emitter_impl, env, output_param, msg_qname);
+            w2c_emitter_add_param( emitter_impl, env, output_param, msg_qname);
         }
     }
-    if (in && out)
+    /** mep should be direcly called from woden */
+    if ( in && out )
     {
-        in_out = "12";
+         in_out = "12";
     }
-    if (in && !out)
+    if ( in && !out)
     {
-        in_out = "11";
+         in_out = "11";
     }
 
-    w2c_xslt_utils_add_attribute(env, method, "mep", in_out);
-
+    w2c_xslt_utils_add_attribute (env, method, "mep", in_out);
+ 
     return AXIS2_SUCCESS;
 }
 
 axis2_status_t
-w2c_emitter_load_services_wsdl2(w2c_emitter_impl_t* emitter_impl,
-        const axis2_env_t* env,
-        axiom_node_t* root)
+w2c_emitter_load_services_wsdl2( w2c_emitter_impl_t* emitter_impl,
+                            const axis2_env_t* env,
+                            axiom_node_t* root)
 {
     axis2_array_list_t* svc_list = NULL;
-    woden_svc_t* svc = NULL;
+    woden_svc_t* svc = NULL; 
 
     axis2_array_list_t* endpoint_list = NULL;
     woden_endpoint_t * endpoint = NULL;
     axis2_uri_t* endpoint_uri = NULL;
     axis2_char_t* endpoint_uri_str = NULL;
     axiom_node_t* endpoint_node = NULL;
-
+    
     woden_binding_t* binding = NULL;
     axis2_char_t* binding_style = NULL;
-
+    
     axis2_array_list_t* binding_ops_list = NULL;
     int binding_ops_count = 0;
     void* binding_op = NULL;
-
+   
     void* interface_op = NULL;
     int i = 0;
     axis2_qname_t* op_qname = NULL;
     axis2_char_t* local_part = NULL;
     axis2_char_t* ns = NULL;
     axiom_node_t* method = NULL;
-
+  
     /*void *soap_binding_op = NULL;*/
     axis2_uri_t *soap_action_uri = NULL;
     axis2_char_t *soap_action_str = NULL;
@@ -724,77 +746,77 @@
     svc_list = WODEN_DESC_GET_SVCS(emitter_impl->desc, env);
 
     /** currently work only for one service */
-    if (AXIS2_ARRAY_LIST_SIZE(svc_list, env) < 1)
+    if (AXIS2_ARRAY_LIST_SIZE ( svc_list, env ) < 1 )
     {
-        /** no need to continue more */
-        return AXIS2_FAILURE;
+       /** no need to continue more */
+       return AXIS2_FAILURE; 
     }
-    svc = AXIS2_ARRAY_LIST_GET(svc_list, env, 0);
+    svc = AXIS2_ARRAY_LIST_GET( svc_list, env, 0 );
 
     /**********************************************************************
      * extract endpoint(s)
      **********************************************************************/
-    endpoint_list = WODEN_SVC_GET_ENDPOINTS(svc, env);
-
+    endpoint_list = WODEN_SVC_GET_ENDPOINTS (svc, env);
+    
     /** currently work only for one endpoint*/
-    if (AXIS2_ARRAY_LIST_SIZE(endpoint_list, env) < 1)
+    if (AXIS2_ARRAY_LIST_SIZE ( endpoint_list, env ) < 1 )
     {
-        return AXIS2_FAILURE; /* no need to continue more */
+       return AXIS2_FAILURE; /* no need to continue more */
     }
-    endpoint = AXIS2_ARRAY_LIST_GET(endpoint_list, env, 0);
-    endpoint_uri = WODEN_ENDPOINT_GET_ADDRESS(endpoint, env);
-    endpoint_uri_str = AXIS2_URI_TO_STRING(endpoint_uri, env, AXIS2_URI_UNP_OMITUSERINFO);
+    endpoint = AXIS2_ARRAY_LIST_GET( endpoint_list, env, 0 );
+    endpoint_uri = WODEN_ENDPOINT_GET_ADDRESS( endpoint, env);
+    endpoint_uri_str = AXIS2_URI_TO_STRING ( endpoint_uri, env, AXIS2_URI_UNP_OMITUSERINFO);
     endpoint_node = w2c_xslt_utils_add_child_node(env, "endpoint",
-            root);
+                                                    root);
     /** here the endpoint adding */
-    w2c_xslt_utils_add_text(env, endpoint_node, endpoint_uri_str);
+    w2c_xslt_utils_add_text ( env, endpoint_node, endpoint_uri_str );
 
     /**********************************************************************
      * extract bindings(s)
      **********************************************************************/
-    binding =
-        WODEN_ENDPOINT_GET_BINDING(endpoint, env);
+    binding = 
+          WODEN_ENDPOINT_GET_BINDING( endpoint, env);
     binding_style = ""; /* currently hard coded */
 
     /**********************************************************************
      * extract binding ops
      **********************************************************************/
-    binding_ops_list =
-        WODEN_BINDING_GET_BINDING_OPS(binding, env);
-    binding_ops_count =
-        AXIS2_ARRAY_LIST_SIZE(binding_ops_list, env);
+    binding_ops_list = 
+         WODEN_BINDING_GET_BINDING_OPS( binding, env);
+    binding_ops_count = 
+         AXIS2_ARRAY_LIST_SIZE( binding_ops_list, env );
 
-    for (i = 0; i < binding_ops_count; i ++)
+    for ( i = 0; i < binding_ops_count; i ++ )
     {
-        binding_op = AXIS2_ARRAY_LIST_GET(binding_ops_list, env, i);
+        binding_op = AXIS2_ARRAY_LIST_GET ( binding_ops_list, env, i );
         /**********************************************************************
          * extract interface ops
          **********************************************************************/
 
         interface_op = WODEN_BINDING_OP_GET_INTERFACE_OP
-                (binding_op, env);
-        op_qname = WODEN_INTERFACE_OP_GET_QNAME(interface_op, env);
-        if (op_qname)
+                                               (binding_op, env);
+        op_qname = WODEN_INTERFACE_OP_GET_QNAME( interface_op, env);
+        if ( op_qname )
         {
             method = w2c_xslt_utils_add_child_node(env, "method",
-                    root);
-            local_part = AXIS2_QNAME_GET_LOCALPART(op_qname, env);
-            given_name = W2C_QNAME2NAME_MAKER_SUGGEST_NAME(
-                        emitter_impl-> qname2name_maker, env, op_qname);
+                                               root);
+            local_part= AXIS2_QNAME_GET_LOCALPART(op_qname, env);
+            given_name = W2C_QNAME2NAME_MAKER_SUGGEST_NAME( 
+                    emitter_impl-> qname2name_maker, env, op_qname);
             qname_str = AXIS2_QNAME_TO_STRING(op_qname, env);
-            w2c_xslt_utils_add_attribute(env, method, "localpart",
-                    local_part);
+            w2c_xslt_utils_add_attribute (env, method, "localpart",
+                                                local_part);
             given_name = emitter_impl-> name_maker_func(given_name, env);
-            w2c_xslt_utils_add_attribute(env, method, "name",
-                    given_name);
-            w2c_xslt_utils_add_attribute(env, method, "qname",
-                    qname_str);
+            w2c_xslt_utils_add_attribute (env, method, "name",
+                                                given_name);
+            w2c_xslt_utils_add_attribute (env, method, "qname",
+                                                qname_str);
             ns = AXIS2_QNAME_GET_URI(op_qname, env);
-            w2c_xslt_utils_add_attribute(env, method, "namespace",
-                    ns);
+            w2c_xslt_utils_add_attribute (env, method, "namespace",
+                                                ns);
             /** todos */
-            w2c_xslt_utils_add_attribute(env, method, "style",
-                    binding_style);
+            w2c_xslt_utils_add_attribute (env, method, "style",
+                                                             binding_style);
         }
         else
         {
@@ -803,20 +825,20 @@
         /**********************************************************************
          * extract interface message refs
          **********************************************************************/
-        w2c_emitter_load_operations(emitter_impl, env, method, interface_op, 2);
+        w2c_emitter_load_operations( emitter_impl, env, method, interface_op, 2);
 
 
         /** get soap action */
         ext_type_l = axis2_qname_create(env, "operation",
-                "http://schemas.xmlsoap.org/wsdl/soap/", NULL);
+                                "http://schemas.xmlsoap.org/wsdl/soap/", NULL);
         binding_op = woden_binding_op_to_element_extensible(binding_op, env);
         ext_elements = WODEN_ELEMENT_EXTENSIBLE_GET_EXT_ELEMENTS(binding_op, env);
-        size = AXIS2_ARRAY_LIST_SIZE(ext_elements, env);
-        for (j = 0; j < size; j++)
+        size = AXIS2_ARRAY_LIST_SIZE( ext_elements, env);
+        for(j=0; j < size; j++)
         {
             ext_element = AXIS2_ARRAY_LIST_GET(ext_elements, env, j);
             ext_type = WODEN_EXT_ELEMENT_GET_EXT_TYPE(ext_element, env);
-            if (AXIS2_TRUE == AXIS2_QNAME_EQUALS(ext_type, env, ext_type_l))
+            if(AXIS2_TRUE == AXIS2_QNAME_EQUALS(ext_type, env, ext_type_l))
             {
                 /*ext_element = woden_soap_module_to_soap_module_element (
                                                                ext_element, env);
@@ -826,55 +848,67 @@
                 soap_action_uri = 
                         WODEN_SOAP_BINDING_OP_EXTS_GET_SOAP_ACTION
                                                            (soap_binding_op, env); */
-                soap_action_str = AXIS2_URI_TO_STRING
-                        (soap_action_uri, env, AXIS2_URI_UNP_OMITUSERINFO);
-                w2c_xslt_utils_add_attribute(env, method, "soapaction", soap_action_str);
+                soap_action_str = AXIS2_URI_TO_STRING 
+                                  ( soap_action_uri, env, AXIS2_URI_UNP_OMITUSERINFO);
+                w2c_xslt_utils_add_attribute (env, method, "soapaction", soap_action_str);
             }
         }
     }
-
-
+ 
+   
     return AXIS2_SUCCESS;
-
+        
 }
 axis2_status_t
-w2c_emitter_add_param(w2c_emitter_impl_t *emitter_impl,
-        const axis2_env_t *env,
-        axiom_node_t *param_direction,
-        axis2_qname_t *msg_qname)
+w2c_emitter_add_param( w2c_emitter_impl_t *emitter_impl,
+                            const axis2_env_t *env,
+                            axiom_node_t *param_direction,
+                            axis2_qname_t *msg_qname)
 {
     axiom_node_t *param = NULL;
     axis2_char_t *type = NULL;
     axis2_char_t *name = NULL;
     w2c_typemapper_t *typemapper = NULL;
+    axis2_bool_t is_primitive = AXIS2_FALSE;
 
     param = w2c_xslt_utils_add_child_node(env, "param",
-            param_direction);
-    typemapper = W2C_ENGINE_CONFIGURATION_GET_TYPEMAPPER(
-                emitter_impl-> config, env);
-    type = W2C_TYPEMAPPER_GET_TYPE_NAME(typemapper, env, msg_qname);
-    if (NULL == type) /* this is databinding not present for the message*/
+                                          param_direction);
+    typemapper = W2C_ENGINE_CONFIGURATION_GET_TYPEMAPPER( 
+                            emitter_impl-> config, env);
+    if( msg_qname != NULL)
+    {
+        type = W2C_TYPEMAPPER_GET_TYPE_NAME( typemapper, env, msg_qname);
+    }
+    if ( NULL == type ) /* this is databinding not present for the message*/
+    {
+        msg_qname = W2C_TYPEMAPPER_GET_DEFAULT_QNAME( typemapper, env);
+        type = W2C_TYPEMAPPER_GET_TYPE_NAME( typemapper, env, msg_qname);
+        is_primitive = W2C_TYPEMAPPER_IS_PRIMITIVE( typemapper, env, msg_qname);
+    }
+    if ( !is_primitive)
     {
-        msg_qname = W2C_TYPEMAPPER_GET_DEFAULT_QNAME(typemapper, env);
-        type = W2C_TYPEMAPPER_GET_TYPE_NAME(typemapper, env, msg_qname);
+        w2c_xslt_utils_add_attribute (env, param, "ours", "yes");
     }
-    w2c_xslt_utils_add_attribute(env, param, "type", type);
+    type = AXIS2_STRDUP( type, env);
+    w2c_xslt_utils_add_attribute (env, param, "type", type);
+    type = axis2_string_toupper( type);
+    w2c_xslt_utils_add_attribute (env, param, "caps-type", type);
 
-    name = W2C_TYPEMAPPER_GET_PARAMETER_NAME(typemapper, env, msg_qname);
-    w2c_xslt_utils_add_attribute(env, param, "name", name);
+    name = W2C_TYPEMAPPER_GET_PARAMETER_NAME( typemapper, env, msg_qname);
+    w2c_xslt_utils_add_attribute (env, param, "name", name);
 
     return AXIS2_SUCCESS;
 }
 
 /** do nothing just echo the value*/
-axis2_char_t* w2c_emitter_default_namemaker(axis2_char_t *name,
-        const axis2_env_t *env)
+axis2_char_t* w2c_emitter_default_namemaker( axis2_char_t *name, 
+                             const axis2_env_t *env)
 {
-    return AXIS2_STRDUP(name, env);
+    return AXIS2_STRDUP( name, env);
 }
 
-axis2_char_t* w2c_emitter_default_qname2name(axis2_qname_t *qname,
-        const axis2_env_t *env)
+axis2_char_t* w2c_emitter_default_qname2name( axis2_qname_t *qname,
+                             const axis2_env_t *env)
 {
-    return AXIS2_QNAME_GET_LOCALPART(qname, env);
+    return AXIS2_QNAME_GET_LOCALPART( qname, env);
 }

Modified: webservices/axis2/trunk/c/tools/codegen/src/wsdl/emitter/w2c_emitter_protected.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/emitter/w2c_emitter_protected.h?view=diff&rev=450427&r1=450426&r2=450427
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/emitter/w2c_emitter_protected.h (original)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/emitter/w2c_emitter_protected.h Wed Sep 27 06:07:26 2006
@@ -130,6 +130,9 @@
 axis2_char_t* w2c_emitter_default_namemaker( axis2_char_t *name,
                             const axis2_env_t *env);
 
+axis2_status_t
+w2c_emitter_init( w2c_emitter_impl_t* emitter_impl,
+                  const axis2_env_t *env);
 
 /************************** End of function prototypes ************************/
 



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


Mime
View raw message