You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by na...@apache.org on 2006/09/01 14:46:04 UTC
svn commit: r439295 [14/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/extensions/c_qname2name_ext.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_qname2name_ext.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_qname2name_ext.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_qname2name_ext.c Fri Sep 1 05:45:57 2006
@@ -0,0 +1,229 @@
+/*
+ * 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 <w2c_qname2name_maker.h>
+
+
+typedef struct w2c_c_qname2name_ext_impl
+{
+ w2c_extension_t extension;
+ w2c_qname2name_maker_t qname2name_maker;
+
+ axis2_hash_t *qname2name;
+ axis2_hash_t *name2number;
+
+} w2c_c_qname2name_ext_impl_t;
+
+#define W2C_EXTENSION_INTF_TO_IMPL(extension) \
+ ((w2c_c_qname2name_ext_impl_t*) extension)
+
+#define W2C_QNAME2NAME_MAKER_INTF_TO_IMPL(qname2name_maker) \
+ ((w2c_c_qname2name_ext_impl_t*) ((void*)(qname2name_maker) - sizeof(w2c_extension_t)))
+
+/**************implmentations for w2c_extension_t methods**********************/
+axis2_status_t AXIS2_CALL
+w2c_c_qname2name_ext_free(w2c_extension_t *extension,
+ const axis2_env_t *env)
+{
+ w2c_c_qname2name_ext_impl_t *impl = NULL;
+ axis2_char_t *key = NULL;
+ axis2_char_t *value =NULL;
+ axis2_hash_index_t *hi = NULL;
+ axis2_hash_t *h = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ impl = W2C_EXTENSION_INTF_TO_IMPL(extension);
+
+ h = impl-> qname2name;
+
+ for (hi = axis2_hash_first(h, env) ;
+ hi; hi = axis2_hash_next(env, hi))
+ {
+ axis2_hash_this(hi, (void*)&key, NULL, (void*)&value);
+ if (key)
+ AXIS2_FREE( env-> allocator, key);
+ if (value)
+ AXIS2_FREE( env-> allocator, value);
+ }
+ axis2_hash_free( h , env);
+
+ axis2_hash_free( impl-> name2number, env);
+
+ if(extension->ops)
+ {
+ AXIS2_FREE(env->allocator, extension->ops);
+ }
+ if((&impl->qname2name_maker)->ops)
+ {
+ AXIS2_FREE(env->allocator,
+ (&impl->qname2name_maker)->ops);
+ }
+ if(impl)
+ {
+ AXIS2_FREE(env->allocator, impl);
+ }
+
+ return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_c_qname2name_ext_engage(w2c_extension_t *extension,
+ const axis2_env_t *env,
+ w2c_engine_configuration_t *conf)
+{
+ w2c_c_qname2name_ext_impl_t *impl = NULL;
+ axis2_char_t *lang = NULL;
+ w2c_qname2name_maker_t *qname2name_maker = NULL;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+ impl = W2C_EXTENSION_INTF_TO_IMPL(extension);
+
+ qname2name_maker = &(impl-> qname2name_maker);
+ lang = W2C_ENGINE_CONFIGURATION_GET_OUTPUT_LANGUAGE( conf, env);
+
+ /* this executes only with following configuration */
+ if ( AXIS2_STRCMP( lang, "c") == 0)
+ {
+ W2C_ENGINE_CONFIGURATION_SET_QNAME2NAME( conf, env,
+ qname2name_maker);
+ }
+
+ return AXIS2_SUCCESS;
+}
+
+/***********implmentations for w2c_qname2name_maker methods********************/
+
+axis2_char_t* AXIS2_CALL
+w2c_c_qname2name_ext_suggest_name(w2c_qname2name_maker_t *qname2name_maker,
+ const axis2_env_t *env,
+ axis2_qname_t *qname)
+{
+ w2c_c_qname2name_ext_impl_t *impl = NULL;
+
+ axis2_char_t *key = NULL;
+ axis2_char_t *local = NULL;
+ int counter = 0;
+ axis2_char_t counter_str[32];
+ axis2_char_t *given_name = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ impl = W2C_QNAME2NAME_MAKER_INTF_TO_IMPL(qname2name_maker);
+
+ key = AXIS2_QNAME_TO_STRING(qname, env);
+ local = (axis2_char_t*)axis2_hash_get( impl-> qname2name, key,
+ AXIS2_HASH_KEY_STRING );
+ if( local != NULL) /* key has been there somewhere */
+ {
+ return local;
+ }
+ /* otherwise */
+ local = AXIS2_QNAME_GET_LOCALPART( qname, env);
+ counter = (int)axis2_hash_get( impl-> name2number, local,
+ AXIS2_HASH_KEY_STRING );
+ if ( counter == 0 ) /** this means name doesnt exist */
+ {
+ axis2_hash_set(impl-> qname2name, key, AXIS2_HASH_KEY_STRING, local);
+ axis2_hash_set(impl-> name2number, local, AXIS2_HASH_KEY_STRING, (void*)1);
+ return local;
+ }
+ /* else qname would already exist */
+ sprintf(counter_str, "%d", counter);
+ given_name = axis2_stracat( local, counter_str, env);
+
+ axis2_hash_set(impl-> qname2name, key, AXIS2_HASH_KEY_STRING, given_name);
+ axis2_hash_set(impl-> name2number, local, AXIS2_HASH_KEY_STRING, (void*)counter+1);
+
+ return given_name;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_c_qname2name_ext_maker_free(w2c_qname2name_maker_t *qname2name_maker,
+ const axis2_env_t *env)
+{
+ w2c_c_qname2name_ext_impl_t *impl = NULL;
+ impl = W2C_QNAME2NAME_MAKER_INTF_TO_IMPL(qname2name_maker);
+
+ return w2c_c_qname2name_ext_free(
+ (w2c_extension_t*)qname2name_maker, env);
+}
+
+/****************** standard create and delete for DLL ************************/
+AXIS2_EXPORT int
+axis2_get_instance(w2c_extension_t **inst,
+ const axis2_env_t *env)
+{
+ w2c_c_qname2name_ext_impl_t *impl = NULL;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+ impl = (w2c_c_qname2name_ext_impl_t*)AXIS2_MALLOC( env-> allocator,
+ sizeof(w2c_c_qname2name_ext_impl_t) );
+
+ if(NULL == impl)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
+ impl->qname2name = axis2_hash_make(env);
+ impl->name2number = axis2_hash_make(env);
+ impl->extension.ops =
+ AXIS2_MALLOC (env->allocator, sizeof(w2c_extension_ops_t));
+ if(NULL == impl->extension.ops)
+ {
+ w2c_c_qname2name_ext_free(&(impl->extension), env);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
+ impl->qname2name_maker.ops =
+ AXIS2_MALLOC (env->allocator, sizeof(w2c_qname2name_maker_ops_t));
+ if(NULL == impl->qname2name_maker.ops)
+ {
+ w2c_c_qname2name_ext_free(&(impl->extension), env);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
+ impl->extension.ops->free =
+ w2c_c_qname2name_ext_free;
+ impl->extension.ops->engage =
+ w2c_c_qname2name_ext_engage;
+ impl->qname2name_maker.ops->suggest_name =
+ w2c_c_qname2name_ext_suggest_name;
+ impl->qname2name_maker.ops->free =
+ w2c_c_qname2name_ext_maker_free;
+
+ *inst = &(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;
+}
+
Added: webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/databinding_default_ext.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/databinding_default_ext.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/databinding_default_ext.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/databinding_default_ext.c Fri Sep 1 05:45:57 2006
@@ -0,0 +1,130 @@
+/*
+ * 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>
+
+#define W2C_DATABINDING_DEFAULT_EXT_FILENAME "c.default.typemap.xml"
+
+typedef struct w2c_databinding_default_ext_impl
+{
+ w2c_extension_t extension;
+
+} w2c_databinding_default_ext_impl_t;
+
+#define W2C_INTF_TO_IMPL(extension) \
+ ((w2c_databinding_default_ext_impl_t*) extension)
+
+/************************* implmentations ********************************/
+axis2_status_t AXIS2_CALL
+w2c_databinding_default_ext_free(w2c_extension_t *extension,
+ const axis2_env_t *env)
+{
+ w2c_databinding_default_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_databinding_default_ext_engage(w2c_extension_t *extension,
+ const axis2_env_t *env,
+ w2c_engine_configuration_t *conf)
+{
+ w2c_databinding_default_ext_impl_t *extension_impl = NULL;
+ w2c_typemapper_t *typemapper = NULL;
+ axis2_char_t *db_type = NULL;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+ extension_impl = W2C_INTF_TO_IMPL(extension);
+
+ db_type = W2C_ENGINE_CONFIGURATION_GET_DATABINDING_TYPE( conf, env);
+
+ /* this executes only with following configuration */
+ if ( NULL == db_type || !AXIS2_STRCMP( db_type, "none" ) )
+ {
+ typemapper = W2C_ENGINE_CONFIGURATION_GET_TYPEMAPPER( conf, env);
+ if ( typemapper != NULL )
+ {
+ W2C_TYPEMAPPER_FREE( typemapper, env );
+ }
+ typemapper = w2c_typemapper_create_from_file( env,
+ W2C_DATABINDING_DEFAULT_EXT_FILENAME );
+ W2C_ENGINE_CONFIGURATION_SET_TYPEMAPPER( conf, env, typemapper);
+ }
+ 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_databinding_default_ext_impl_t *extension_impl = NULL;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+ extension_impl = (w2c_databinding_default_ext_impl_t*)AXIS2_MALLOC( env-> allocator,
+ sizeof(w2c_databinding_default_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_databinding_default_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_databinding_default_ext_free;
+ extension_impl->extension.ops->engage =
+ w2c_databinding_default_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;
+}
+
Added: webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/default_qname2name_ext.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/default_qname2name_ext.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/default_qname2name_ext.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/default_qname2name_ext.c Fri Sep 1 05:45:57 2006
@@ -0,0 +1,171 @@
+/*
+ * 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 <w2c_qname2name_maker.h>
+
+
+typedef struct w2c_default_qname2name_ext_impl
+{
+ w2c_extension_t extension;
+ w2c_qname2name_maker_t qname2name_maker;
+
+} w2c_default_qname2name_ext_impl_t;
+
+#define W2C_EXTENSION_INTF_TO_IMPL(extension) \
+ ((w2c_default_qname2name_ext_impl_t*) extension)
+
+#define W2C_QNAME2NAME_MAKER_INTF_TO_IMPL(qname2name_maker) \
+ ((w2c_default_qname2name_ext_impl_t*) ((qname2name_maker) - sizeof(w2c_extension_t)))
+
+/**************implmentations for w2c_extension_t methods**********************/
+axis2_status_t AXIS2_CALL
+w2c_default_qname2name_ext_free(w2c_extension_t *extension,
+ const axis2_env_t *env)
+{
+ w2c_default_qname2name_ext_impl_t *impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ impl = W2C_EXTENSION_INTF_TO_IMPL(extension);
+
+ if(extension->ops)
+ {
+ AXIS2_FREE(env->allocator, extension->ops);
+ }
+ if((&impl->qname2name_maker)->ops)
+ {
+ AXIS2_FREE(env->allocator,
+ (&impl->qname2name_maker)->ops);
+ }
+ if(impl)
+ {
+ AXIS2_FREE(env->allocator, impl);
+ }
+
+ return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_default_qname2name_ext_engage(w2c_extension_t *extension,
+ const axis2_env_t *env,
+ w2c_engine_configuration_t *conf)
+{
+ w2c_default_qname2name_ext_impl_t *impl = NULL;
+ w2c_qname2name_maker_t *qname2name_maker = NULL;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+ impl = W2C_EXTENSION_INTF_TO_IMPL(extension);
+
+ qname2name_maker = &(impl-> qname2name_maker);
+
+ /* this will executes for all configuration */
+ W2C_ENGINE_CONFIGURATION_SET_QNAME2NAME( conf, env,
+ qname2name_maker);
+
+ return AXIS2_SUCCESS;
+}
+
+/***********implmentations for w2c_default_qname2name_maker methods********************/
+
+axis2_char_t* AXIS2_CALL
+w2c_default_qname2name_ext_suggest_name(w2c_qname2name_maker_t *qname2name_maker,
+ const axis2_env_t *env,
+ axis2_qname_t *qname)
+{
+ w2c_default_qname2name_ext_impl_t *impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ impl = W2C_QNAME2NAME_MAKER_INTF_TO_IMPL(qname2name_maker);
+
+ /** here nothing special would be happened */
+ return AXIS2_QNAME_GET_LOCALPART( qname, env);
+}
+
+axis2_status_t AXIS2_CALL
+w2c_default_qname2name_ext_maker_free(w2c_qname2name_maker_t *qname2name_maker,
+ const axis2_env_t *env)
+{
+ w2c_default_qname2name_ext_impl_t *impl = NULL;
+ impl = W2C_QNAME2NAME_MAKER_INTF_TO_IMPL(qname2name_maker);
+
+ return w2c_default_qname2name_ext_free(
+ (w2c_extension_t*)qname2name_maker, env);
+}
+
+/****************** standard create and delete for DLL ************************/
+AXIS2_EXPORT int
+axis2_get_instance(w2c_extension_t **inst,
+ const axis2_env_t *env)
+{
+ w2c_default_qname2name_ext_impl_t *impl = NULL;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+ impl = (w2c_default_qname2name_ext_impl_t*)AXIS2_MALLOC( env-> allocator,
+ sizeof(w2c_default_qname2name_ext_impl_t) );
+
+ if(NULL == impl)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
+ impl->extension.ops =
+ AXIS2_MALLOC (env->allocator, sizeof(w2c_extension_ops_t));
+ if(NULL == impl->extension.ops)
+ {
+ w2c_default_qname2name_ext_free(&(impl->extension), env);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
+ impl->qname2name_maker.ops =
+ AXIS2_MALLOC (env->allocator, sizeof(w2c_qname2name_maker_ops_t));
+ if(NULL == impl->extension.ops)
+ {
+ w2c_default_qname2name_ext_free(&(impl->extension), env);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
+
+ impl->extension.ops->free =
+ w2c_default_qname2name_ext_free;
+ impl->extension.ops->engage =
+ w2c_default_qname2name_ext_engage;
+ impl->qname2name_maker.ops->suggest_name =
+ w2c_default_qname2name_ext_suggest_name;
+ impl->qname2name_maker.ops->free =
+ w2c_default_qname2name_ext_maker_free;
+
+ *inst = &(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;
+}
+
Added: webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/Makefile.am?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/Makefile.am (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/Makefile.am Fri Sep 1 05:45:57 2006
@@ -0,0 +1,41 @@
+prglibdir=$(prefix)/lib/codegen
+
+noinst_LTLIBRARIES = libw2c_writer_if.la
+libw2c_writer_if_la_SOURCES = writer.c
+
+libw2c_writer_if_la_LIBADD = \
+ $(top_builddir)/src/util/libw2c_util.la \
+ -L$(AXIS2C_HOME)/lib \
+ -laxis2_util \
+ -laxis2_axiom
+
+
+INCLUDES = -I$(top_builddir)/include \
+ @UTILINC@ \
+ @AXIOMINC@
+
+prglib_LTLIBRARIES = \
+ libw2c_cservice_xml_writer.la \
+ libw2c_cskel_header_writer.la \
+ libw2c_cskel_source_writer.la \
+ libw2c_cstub_header_writer.la \
+ libw2c_cstub_source_writer.la \
+ libw2c_csvc_skeleton_writer.la
+
+libw2c_cservice_xml_writer_la_SOURCES = cservice_xml_writer.c
+libw2c_cservice_xml_writer_la_LIBADD = libw2c_writer_if.la
+
+libw2c_cskel_header_writer_la_SOURCES = cskel_header_writer.c
+libw2c_cskel_header_writer_la_LIBADD = libw2c_writer_if.la
+
+libw2c_cskel_source_writer_la_SOURCES = cskel_source_writer.c
+libw2c_cskel_source_writer_la_LIBADD = libw2c_writer_if.la
+
+libw2c_cstub_header_writer_la_SOURCES = cstub_header_writer.c
+libw2c_cstub_header_writer_la_LIBADD = libw2c_writer_if.la
+
+libw2c_cstub_source_writer_la_SOURCES = cstub_source_writer.c
+libw2c_cstub_source_writer_la_LIBADD = libw2c_writer_if.la
+
+libw2c_csvc_skeleton_writer_la_SOURCES = csvc_skeleton_writer.c
+libw2c_csvc_skeleton_writer_la_LIBADD = libw2c_writer_if.la
Added: webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cservice_xml_writer.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cservice_xml_writer.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cservice_xml_writer.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cservice_xml_writer.c Fri Sep 1 05:45:57 2006
@@ -0,0 +1,83 @@
+/*
+ * 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 <writer_protected.h>
+#include <w2c_file_writer.h>
+
+#define W2C_CSERVICE_XML_WRITER_CLASS "w2c_cservice_xml_writer"
+/************************* overrided functions ********************************/
+axis2_char_t* AXIS2_CALL
+w2c_cservice_xml_writer_create_out_file(w2c_writer_t *writer,
+ const axis2_env_t *env,
+ axis2_char_t* package_name,
+ axis2_char_t* file_name)
+{
+ w2c_writer_impl_t* writer_impl = NULL;
+ axis2_char_t* output_locat = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ writer_impl = W2C_INTF_TO_IMPL(writer);
+
+ /* here the file_name, package_name would be build */
+ file_name = "services";
+ package_name = "";
+ output_locat = W2C_ENGINE_CONFIGURATION_GET_OUTPUT_LOCATION (
+ writer_impl-> config, env);
+ writer_impl ->out_filename =
+ w2c_file_writer_create_classfile_name (env, output_locat,
+ package_name,
+ file_name,
+ ".xml");
+ return writer_impl ->out_filename;
+}
+
+/****************** standard create and delete for DLL ************************/
+AXIS2_EXPORT int
+axis2_get_instance(w2c_writer_t **inst,
+ const axis2_env_t *env)
+{
+ w2c_writer_impl_t* writer_impl = NULL;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+ writer_impl = w2c_writer_create_impl (env);
+ if(!writer_impl)
+ {
+ return AXIS2_FAILURE;
+ }
+ w2c_writer_set_self_name ( writer_impl, env, W2C_CSERVICE_XML_WRITER_CLASS );
+ /* bit of overriding */
+ writer_impl->writer.ops->create_out_file =
+ w2c_cservice_xml_writer_create_out_file;
+
+ *inst = &(writer_impl->writer);
+
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXPORT int
+axis2_remove_instance(w2c_writer_t *inst,
+ const axis2_env_t *env)
+{
+ axis2_status_t status = AXIS2_FAILURE;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+ if (inst)
+ {
+ status = W2C_WRITER_FREE(inst, env);
+ }
+ return status;
+}
+
Added: webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cskel_header_writer.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cskel_header_writer.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cskel_header_writer.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cskel_header_writer.c Fri Sep 1 05:45:57 2006
@@ -0,0 +1,83 @@
+/*
+ * 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 <writer_protected.h>
+#include <w2c_file_writer.h>
+
+#define W2C_CSKEL_HEADER_WRITER_CLASS "w2c_cskel_header_writer"
+/************************* overrided functions ********************************/
+axis2_char_t* AXIS2_CALL
+w2c_cskel_header_writer_create_out_file(w2c_writer_t *writer,
+ const axis2_env_t *env,
+ axis2_char_t* package_name,
+ axis2_char_t* file_name)
+{
+ w2c_writer_impl_t* writer_impl = NULL;
+ axis2_char_t* output_locat = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ writer_impl = W2C_INTF_TO_IMPL(writer);
+
+ /* here the package_name would be build */
+ package_name = "";
+ output_locat = W2C_ENGINE_CONFIGURATION_GET_OUTPUT_LOCATION (
+ writer_impl-> config, env);
+ writer_impl ->out_filename =
+ w2c_file_writer_create_classfile_name (env, output_locat,
+ package_name,
+ file_name,
+ ".h");
+
+ return writer_impl ->out_filename;
+}
+
+/****************** standard create and delete for DLL ************************/
+AXIS2_EXPORT int
+axis2_get_instance(w2c_writer_t **inst,
+ const axis2_env_t *env)
+{
+ w2c_writer_impl_t* writer_impl = NULL;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+ writer_impl = w2c_writer_create_impl (env);
+ if(!writer_impl)
+ {
+ return AXIS2_FAILURE;
+ }
+ w2c_writer_set_self_name ( writer_impl, env, W2C_CSKEL_HEADER_WRITER_CLASS );
+ /* bit of overriding */
+ writer_impl->writer.ops->create_out_file =
+ w2c_cskel_header_writer_create_out_file;
+
+ *inst = &(writer_impl->writer);
+
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXPORT int
+axis2_remove_instance(w2c_writer_t *inst,
+ const axis2_env_t *env)
+{
+ axis2_status_t status = AXIS2_FAILURE;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+ if (inst)
+ {
+ status = W2C_WRITER_FREE(inst, env);
+ }
+ return status;
+}
+
Added: webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cskel_source_writer.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cskel_source_writer.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cskel_source_writer.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cskel_source_writer.c Fri Sep 1 05:45:57 2006
@@ -0,0 +1,85 @@
+/*
+ * 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 <writer_protected.h>
+#include <w2c_file_writer.h>
+
+#define W2C_CSKEL_SOURCE_WRITER_CLASS "w2c_cskel_source_writer"
+/************************* overrided functions ********************************/
+axis2_char_t* AXIS2_CALL
+w2c_cskel_source_writer_create_out_file(w2c_writer_t *writer,
+ const axis2_env_t *env,
+ axis2_char_t* package_name,
+ axis2_char_t* file_name)
+{
+ w2c_writer_impl_t* writer_impl = NULL;
+ axis2_char_t* output_locat = NULL;
+ axis2_char_t* ext_name = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ writer_impl = W2C_INTF_TO_IMPL(writer);
+
+ /* here the package_name would be build */
+ package_name = "";
+ ext_name = w2c_writer_get_extension ( writer_impl, env );
+ output_locat = W2C_ENGINE_CONFIGURATION_GET_OUTPUT_LOCATION (
+ writer_impl-> config, env);
+ writer_impl ->out_filename =
+ w2c_file_writer_create_classfile_name (env, output_locat,
+ package_name,
+ file_name,
+ ext_name);
+
+ return writer_impl ->out_filename;
+}
+
+/****************** standard create and delete for DLL ************************/
+AXIS2_EXPORT int
+axis2_get_instance(w2c_writer_t **inst,
+ const axis2_env_t *env)
+{
+ w2c_writer_impl_t* writer_impl = NULL;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+ writer_impl = w2c_writer_create_impl (env);
+ if(!writer_impl)
+ {
+ return AXIS2_FAILURE;
+ }
+ w2c_writer_set_self_name ( writer_impl, env, W2C_CSKEL_SOURCE_WRITER_CLASS );
+ /* bit of overriding */
+ writer_impl->writer.ops->create_out_file =
+ w2c_cskel_source_writer_create_out_file;
+
+ *inst = &(writer_impl->writer);
+
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXPORT int
+axis2_remove_instance(w2c_writer_t *inst,
+ const axis2_env_t *env)
+{
+ axis2_status_t status = AXIS2_FAILURE;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+ if (inst)
+ {
+ status = W2C_WRITER_FREE(inst, env);
+ }
+ return status;
+}
+
Added: webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cstub_header_writer.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cstub_header_writer.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cstub_header_writer.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cstub_header_writer.c Fri Sep 1 05:45:57 2006
@@ -0,0 +1,85 @@
+/*
+ * 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 <writer_protected.h>
+#include <w2c_file_writer.h>
+
+#define W2C_CSTUB_HEADER_WRITER_CLASS "w2c_cstub_header_writer"
+/************************* overrided functions ********************************/
+axis2_char_t* AXIS2_CALL
+w2c_cstub_header_writer_create_out_file(w2c_writer_t *writer,
+ const axis2_env_t *env,
+ axis2_char_t* package_name,
+ axis2_char_t* file_name)
+{
+ w2c_writer_impl_t* writer_impl = NULL;
+ axis2_char_t* output_locat = NULL;
+ axis2_char_t* ext_name = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ writer_impl = W2C_INTF_TO_IMPL(writer);
+ ext_name = ".h";
+
+ /* here the package_name would be build */
+ package_name = "";
+ output_locat = W2C_ENGINE_CONFIGURATION_GET_OUTPUT_LOCATION (
+ writer_impl-> config, env);
+ writer_impl ->out_filename =
+ w2c_file_writer_create_classfile_name (env, output_locat,
+ package_name,
+ file_name,
+ ext_name);
+
+ return writer_impl ->out_filename;
+}
+
+/****************** standard create and delete for DLL ************************/
+AXIS2_EXPORT int
+axis2_get_instance(w2c_writer_t **inst,
+ const axis2_env_t *env)
+{
+ w2c_writer_impl_t* writer_impl = NULL;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+ writer_impl = w2c_writer_create_impl (env);
+ if(!writer_impl)
+ {
+ return AXIS2_FAILURE;
+ }
+ w2c_writer_set_self_name ( writer_impl, env, W2C_CSTUB_HEADER_WRITER_CLASS );
+ /* bit of overriding */
+ writer_impl->writer.ops->create_out_file =
+ w2c_cstub_header_writer_create_out_file;
+
+ *inst = &(writer_impl->writer);
+
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXPORT int
+axis2_remove_instance(w2c_writer_t *inst,
+ const axis2_env_t *env)
+{
+ axis2_status_t status = AXIS2_FAILURE;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+ if (inst)
+ {
+ status = W2C_WRITER_FREE(inst, env);
+ }
+ return status;
+}
+
Added: webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cstub_source_writer.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cstub_source_writer.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cstub_source_writer.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/cstub_source_writer.c Fri Sep 1 05:45:57 2006
@@ -0,0 +1,85 @@
+/*
+ * 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 <writer_protected.h>
+#include <w2c_file_writer.h>
+
+#define W2C_CSTUB_SOURCE_WRITER_CLASS "w2c_cstub_source_writer"
+/************************* overrided functions ********************************/
+axis2_char_t* AXIS2_CALL
+w2c_cstub_source_writer_create_out_file(w2c_writer_t *writer,
+ const axis2_env_t *env,
+ axis2_char_t* package_name,
+ axis2_char_t* file_name)
+{
+ w2c_writer_impl_t* writer_impl = NULL;
+ axis2_char_t* output_locat = NULL;
+ axis2_char_t* ext_name = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ writer_impl = W2C_INTF_TO_IMPL(writer);
+ ext_name = w2c_writer_get_extension ( writer_impl, env );
+
+ /* here the package_name would be build */
+ package_name = "";
+ output_locat = W2C_ENGINE_CONFIGURATION_GET_OUTPUT_LOCATION (
+ writer_impl-> config, env);
+ writer_impl ->out_filename =
+ w2c_file_writer_create_classfile_name (env, output_locat,
+ package_name,
+ file_name,
+ ext_name);
+
+ return writer_impl ->out_filename;
+}
+
+/****************** standard create and delete for DLL ************************/
+AXIS2_EXPORT int
+axis2_get_instance(w2c_writer_t **inst,
+ const axis2_env_t *env)
+{
+ w2c_writer_impl_t* writer_impl = NULL;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+ writer_impl = w2c_writer_create_impl (env);
+ if(!writer_impl)
+ {
+ return AXIS2_FAILURE;
+ }
+ w2c_writer_set_self_name ( writer_impl, env, W2C_CSTUB_SOURCE_WRITER_CLASS );
+ /* bit of overriding */
+ writer_impl->writer.ops->create_out_file =
+ w2c_cstub_source_writer_create_out_file;
+
+ *inst = &(writer_impl->writer);
+
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXPORT int
+axis2_remove_instance(w2c_writer_t *inst,
+ const axis2_env_t *env)
+{
+ axis2_status_t status = AXIS2_FAILURE;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+ if (inst)
+ {
+ status = W2C_WRITER_FREE(inst, env);
+ }
+ return status;
+}
+
Added: webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/csvc_skeleton_writer.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/csvc_skeleton_writer.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/csvc_skeleton_writer.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/csvc_skeleton_writer.c Fri Sep 1 05:45:57 2006
@@ -0,0 +1,85 @@
+/*
+ * 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 <writer_protected.h>
+#include <w2c_file_writer.h>
+
+#define W2C_CSVC_SKELETON_WRITER_CLASS "w2c_csvc_skeleton_writer"
+/************************* overrided functions ********************************/
+axis2_char_t* AXIS2_CALL
+w2c_csvc_skeleton_writer_create_out_file(w2c_writer_t *writer,
+ const axis2_env_t *env,
+ axis2_char_t* package_name,
+ axis2_char_t* file_name)
+{
+ w2c_writer_impl_t* writer_impl = NULL;
+ axis2_char_t* output_locat = NULL;
+ axis2_char_t* ext_name;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ writer_impl = W2C_INTF_TO_IMPL(writer);
+
+ /* here the package_name would be build */
+ package_name = "";
+ ext_name = w2c_writer_get_extension ( writer_impl, env );
+ output_locat = W2C_ENGINE_CONFIGURATION_GET_OUTPUT_LOCATION (
+ writer_impl-> config, env);
+ writer_impl ->out_filename =
+ w2c_file_writer_create_classfile_name (env, output_locat,
+ package_name,
+ file_name,
+ ext_name);
+
+ return writer_impl ->out_filename;
+}
+
+/****************** standard create and delete for DLL ************************/
+AXIS2_EXPORT int
+axis2_get_instance(w2c_writer_t **inst,
+ const axis2_env_t *env)
+{
+ w2c_writer_impl_t* writer_impl = NULL;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+ writer_impl = w2c_writer_create_impl (env);
+ if(!writer_impl)
+ {
+ return AXIS2_FAILURE;
+ }
+ w2c_writer_set_self_name ( writer_impl, env, W2C_CSVC_SKELETON_WRITER_CLASS );
+ /* bit of overriding */
+ writer_impl->writer.ops->create_out_file =
+ w2c_csvc_skeleton_writer_create_out_file;
+
+ *inst = &(writer_impl->writer);
+
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXPORT int
+axis2_remove_instance(w2c_writer_t *inst,
+ const axis2_env_t *env)
+{
+ axis2_status_t status = AXIS2_FAILURE;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+ if (inst)
+ {
+ status = W2C_WRITER_FREE(inst, env);
+ }
+ return status;
+}
+
Added: webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/writer.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/writer.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/writer.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/writer.c Fri Sep 1 05:45:57 2006
@@ -0,0 +1,320 @@
+/*
+ * 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 <writer_protected.h>
+#include <axis2_array_list.h>
+#include <axis2_string.h>
+#include <w2c_string.h>
+#include <w2c_engine_configuration.h>
+#include <w2c_properties.h>
+#include <stdlib.h>
+#include <w2c_file_writer.h>
+#include <w2c_xslt_utils.h>
+
+
+AXIS2_EXTERN w2c_writer_impl_t * AXIS2_CALL
+w2c_writer_create_impl (const axis2_env_t *env)
+{
+ w2c_writer_impl_t *writer_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+
+ writer_impl = (w2c_writer_impl_t *) AXIS2_MALLOC(env->
+ allocator, sizeof(w2c_writer_impl_t));
+
+ if(NULL == writer_impl)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+
+ writer_impl->writer.ops =
+ AXIS2_MALLOC (env->allocator, sizeof(w2c_writer_ops_t));
+ if(NULL == writer_impl->writer.ops)
+ {
+ w2c_writer_free(&(writer_impl->writer), env);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+ writer_impl->self_name = W2C_WRITER_CLASS;
+ writer_impl->xslt_filename = NULL;
+ writer_impl->out_filename = NULL;
+ writer_impl->language = NULL;
+
+ writer_impl->writer.ops->free = w2c_writer_free;
+ writer_impl->writer.ops->create_out_file = w2c_writer_create_out_file;
+ writer_impl->writer.ops->parse = w2c_writer_parse;
+ writer_impl->writer.ops->initialize = w2c_writer_initialize;
+
+ return writer_impl;
+}
+
+
+/***************************Function implementation****************************/
+
+axis2_status_t AXIS2_CALL
+w2c_writer_free(w2c_writer_t *writer,
+ const axis2_env_t *env)
+{
+ w2c_writer_impl_t *writer_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ writer_impl = W2C_INTF_TO_IMPL(writer);
+
+ if( writer_impl->xslt_filename )
+ AXIS2_FREE (env->allocator, writer_impl-> xslt_filename);
+ if( writer_impl->out_filename )
+ AXIS2_FREE (env->allocator, writer_impl-> out_filename);
+ if( writer_impl->language)
+ AXIS2_FREE (env->allocator, writer_impl-> language);
+
+ if(writer->ops)
+ {
+ AXIS2_FREE(env->allocator, writer->ops);
+ writer->ops = NULL;
+ }
+ if(writer_impl)
+ {
+ AXIS2_FREE(env->allocator, writer_impl);
+ writer_impl = NULL;
+ }
+
+ return AXIS2_SUCCESS;
+}
+
+axis2_char_t* AXIS2_CALL
+w2c_writer_create_out_file(w2c_writer_t *writer,
+ const axis2_env_t *env,
+ axis2_char_t* package_name,
+ axis2_char_t* file_name)
+{
+ w2c_writer_impl_t* writer_impl = NULL;
+ axis2_char_t* ext_name = NULL;
+ axis2_char_t* output_locat = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ writer_impl = W2C_INTF_TO_IMPL(writer);
+
+ ext_name = w2c_writer_get_extension ( writer_impl, env );
+ output_locat = W2C_ENGINE_CONFIGURATION_GET_OUTPUT_LOCATION (
+ writer_impl-> config, env);
+ writer_impl ->out_filename =
+ w2c_file_writer_create_classfile_name (env, output_locat,
+ package_name,
+ file_name,
+ ext_name );
+ return writer_impl ->out_filename;
+}
+
+
+axis2_status_t AXIS2_CALL
+w2c_writer_parse(w2c_writer_t *writer,
+ const axis2_env_t *env,
+ axiom_node_t* root)
+{
+ w2c_writer_impl_t *writer_impl = NULL;
+ axis2_char_t* buffer = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ writer_impl = W2C_INTF_TO_IMPL(writer);
+
+ buffer = w2c_xslt_utils_serialize(env, root);
+
+ w2c_xslt_template_processor_parse (env, buffer,
+ writer_impl-> xslt_filename,
+ writer_impl-> out_filename);
+ AXIS2_FREE ( env-> allocator, buffer );
+ return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+w2c_writer_initialize(w2c_writer_t *writer,
+ const axis2_env_t *env,
+ w2c_config_property_loader_t* loader,
+ w2c_engine_configuration_t* config)
+{
+ w2c_writer_impl_t *writer_impl = NULL;
+ axis2_status_t status = AXIS2_SUCCESS;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ writer_impl = W2C_INTF_TO_IMPL(writer);
+ writer_impl-> config = config;
+ writer_impl-> loader = loader;
+
+ w2c_writer_set_language (writer_impl, env);
+ status = w2c_writer_load_template (writer_impl, env);
+
+ return status;
+}
+
+/**
+ * implementation for protected functions
+ */
+axis2_char_t*
+w2c_writer_get_extension( w2c_writer_impl_t *writer_impl,
+ const axis2_env_t *env)
+{
+ axis2_hash_t *lang_map = NULL;
+ axis2_hash_t *lang_speci_map = NULL;
+ axis2_char_t *key = NULL;
+ axis2_char_t *value = NULL;
+ axis2_hash_index_t *hi = NULL;
+ int all_length = 0;
+ int suf_length = 0;
+ int index = 0;
+ axis2_char_t *ext_name = NULL;
+ axis2_array_list_t *arr_list = NULL;
+
+ lang_map = W2C_CONFIG_PROPERTY_LOADER_GET_LANGUAGE_SPECIFIC_PROPERTIES_MAP
+ ( writer_impl->loader, env );
+
+ lang_speci_map = axis2_hash_get( lang_map,
+ writer_impl-> language, AXIS2_HASH_KEY_STRING);
+
+ for (hi = axis2_hash_first(lang_speci_map, env) ;
+ hi; hi = axis2_hash_next(env, hi))
+ {
+ axis2_hash_this(hi, (void*)&key, NULL, (void*)&arr_list);
+ if ( key && arr_list)
+ {
+ suf_length = AXIS2_STRLEN( W2C_WRITER_EXTENSION_SUFFIX );
+ all_length = AXIS2_STRLEN( key);
+ index = w2c_string_indexof_cs
+ (key, W2C_WRITER_EXTENSION_SUFFIX );
+ if ( index + suf_length == all_length )/* this meen its a suf*/
+ {
+ value = AXIS2_ARRAY_LIST_GET( arr_list, env, 0);
+ ext_name = AXIS2_STRDUP (".", env );
+ ext_name = w2c_string_add_string ( ext_name, value, env);
+ break;
+ }
+ }
+ }
+ return ext_name;
+}
+
+axis2_char_t *
+w2c_writer_find_template ( w2c_writer_impl_t *writer_impl,
+ const axis2_env_t *env,
+ axis2_hash_t *lang_speci_map)
+{
+ axis2_char_t *key = NULL;
+ axis2_char_t *value = NULL;
+ axis2_hash_index_t *hi = NULL;
+ int all_length = 0;
+ int suf_length = 0;
+ int index = 0;
+ axis2_char_t *tmpl_name = NULL;
+ axis2_array_list_t *arr_list = NULL;
+
+ for (hi = axis2_hash_first(lang_speci_map, env) ;
+ hi; hi = axis2_hash_next(env, hi))
+ {
+ axis2_hash_this(hi, (void*)&key, NULL, (void*)&arr_list);
+ if ( key && arr_list)
+ {
+ suf_length = AXIS2_STRLEN( W2C_WRITER_TEMPLATE_SUFFIX );
+ all_length = AXIS2_STRLEN(key );
+ index = w2c_string_indexof_cs
+ (key, W2C_WRITER_TEMPLATE_SUFFIX );
+ if ( index + suf_length == all_length )/* this meen its a suf*/
+ {
+ value = AXIS2_ARRAY_LIST_GET ( arr_list, env, 0 );
+ index = w2c_string_indexof_cs
+ (value, writer_impl-> self_name );
+ if (0 == index) /* prefix matches for the first entry*/
+ {
+ value = AXIS2_ARRAY_LIST_GET ( arr_list, env, 1);
+ tmpl_name = AXIS2_STRDUP ("", env );
+ tmpl_name = w2c_string_add_string ( tmpl_name, value, env);
+ break;
+ }
+ }
+ }
+ }
+ return tmpl_name;
+}
+
+axis2_status_t
+w2c_writer_set_self_name( w2c_writer_impl_t* writer_impl,
+ const axis2_env_t* env,
+ axis2_char_t* self_name)
+{
+ writer_impl -> self_name = AXIS2_STRDUP(self_name, env);
+ return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t
+w2c_writer_set_language(w2c_writer_impl_t *writer_impl,
+ const axis2_env_t *env)
+
+{
+ axis2_char_t* lang = NULL;
+ lang =
+ W2C_ENGINE_CONFIGURATION_GET_OUTPUT_LANGUAGE ( writer_impl-> config, env);
+ if (NULL == lang )
+ {
+ lang =
+ W2C_CONFIG_PROPERTY_LOADER_GET_DEFAULT_LANGUAGE(writer_impl->loader, env);
+ if ( NULL == lang )
+ return AXIS2_FAILURE;
+ }
+ writer_impl-> language = AXIS2_STRDUP(lang, env);
+ return AXIS2_SUCCESS;
+}
+
+axis2_status_t
+w2c_writer_load_template(w2c_writer_impl_t *writer_impl,
+ const axis2_env_t *env)
+{
+ axis2_hash_t* lang_map = NULL;
+ axis2_hash_t* lang_speci_map = NULL;
+ axis2_char_t* file_path = NULL;
+ axis2_char_t* tmpl_name = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ if ( NULL == writer_impl-> language )
+ return AXIS2_FAILURE;
+
+
+ file_path = getenv("AXIS2C_HOME");
+ file_path = AXIS2_STRDUP ( file_path, env);
+ if ( NULL == file_path)
+ {
+ return AXIS2_FAILURE;
+ }
+
+ lang_map = W2C_CONFIG_PROPERTY_LOADER_GET_LANGUAGE_SPECIFIC_PROPERTIES_MAP
+ ( writer_impl->loader, env );
+
+ lang_speci_map = axis2_hash_get( lang_map,
+ writer_impl-> language, AXIS2_HASH_KEY_STRING);
+
+ tmpl_name = w2c_writer_find_template( writer_impl, env, lang_speci_map);
+ if ( NULL == tmpl_name || *tmpl_name =='\0')
+ {
+ AXIS2_FREE ( env-> allocator, file_path );
+ return AXIS2_FAILURE;
+ }
+ file_path = w2c_string_add_string(file_path, W2C_WRITER_XSLT_PATH, env );
+ file_path = w2c_string_add_string(file_path, tmpl_name, env );
+ writer_impl-> xslt_filename = file_path;
+ return AXIS2_SUCCESS;
+}
+
Added: webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/writer_protected.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/writer_protected.h?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/writer_protected.h (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/writer/writer_protected.h Fri Sep 1 05:45:57 2006
@@ -0,0 +1,98 @@
+/*
+ * 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_writer.h>
+#include <axis2_string.h>
+#include <w2c_string.h>
+#include <w2c_engine_configuration.h>
+#include <w2c_properties.h>
+
+/* TODO:this would be moved to some header */
+#define W2C_WRITER_EXTENSION_SUFFIX "extension"
+#define W2C_WRITER_TEMPLATE_SUFFIX "template"
+#define W2C_WRITER_CLASS "w2c_writer"
+/**
+ * @brief
+ */
+typedef struct w2c_writer_impl
+{
+ w2c_writer_t writer;
+
+ axis2_char_t* xslt_filename;
+ axis2_char_t* out_filename;
+ axis2_char_t* language;
+ axis2_char_t* self_name;
+ w2c_engine_configuration_t* config;
+ w2c_config_property_loader_t* loader;
+
+} w2c_writer_impl_t;
+
+#define W2C_INTF_TO_IMPL(writer) \
+ ((w2c_writer_impl_t *) writer)
+
+/************************* Function prototypes ********************************/
+
+AXIS2_EXTERN w2c_writer_impl_t * AXIS2_CALL
+w2c_writer_create_impl (const axis2_env_t *env);
+
+axis2_status_t AXIS2_CALL
+w2c_writer_free(w2c_writer_t *writer,
+ const axis2_env_t *env);
+
+axis2_status_t AXIS2_CALL
+w2c_writer_initialize(w2c_writer_t *writer,
+ const axis2_env_t *env,
+ w2c_config_property_loader_t* loader,
+ w2c_engine_configuration_t* config);
+
+axis2_char_t* AXIS2_CALL
+w2c_writer_create_out_file(w2c_writer_t *writer,
+ const axis2_env_t *env,
+ axis2_char_t* package_name,
+ axis2_char_t* file_name);
+
+axis2_status_t AXIS2_CALL
+w2c_writer_parse(w2c_writer_t *writer,
+ const axis2_env_t *env,
+ axiom_node_t* root);
+
+/** protected methods */
+
+axis2_char_t*
+w2c_writer_find_template ( w2c_writer_impl_t* writer_impl,
+ const axis2_env_t* env,
+ axis2_hash_t* lang_speci_map);
+
+axis2_char_t*
+w2c_writer_get_extension( w2c_writer_impl_t* writer_impl,
+ const axis2_env_t* env);
+
+axis2_status_t
+w2c_writer_set_self_name( w2c_writer_impl_t* writer_impl,
+ const axis2_env_t* env,
+ axis2_char_t* self_name);
+
+axis2_status_t
+w2c_writer_set_language(w2c_writer_impl_t *writer_impl,
+ const axis2_env_t *env);
+
+axis2_status_t
+w2c_writer_load_template(w2c_writer_impl_t *writer_impl,
+ const axis2_env_t *env);
+
+
+/************************** End of function prototypes ************************/
+
Added: webservices/axis2/trunk/c/tools/codegen/src/wsdl2code.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl2code.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl2code.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl2code.c Fri Sep 1 05:45:57 2006
@@ -0,0 +1,122 @@
+#include <w2c_cmdline_option_parser.h>
+#include <axis2_utils.h>
+#include <axis2_array_list.h>
+#include <axis2_hash.h>
+#include <w2c_cmdline_option.h>
+#include <w2c_cmdline_option_consts.h>
+#include <w2c_messages.h>
+#include <w2c_engine.h>
+
+static void
+w2c_print_message (const axis2_env_t* env, axis2_properties_t* messageh,
+ axis2_char_t* key);
+
+static void
+w2c_print_usage (const axis2_env_t* env );
+
+static axis2_status_t
+w2c_validate_cmdline_options ( w2c_cmdline_option_parser_t* cmd_opt_parser,
+ const axis2_env_t* env );
+
+int main(int argc, char** argv )
+{
+ w2c_cmdline_option_parser_t* cmd_opt_parser = NULL;
+ axis2_env_t* env = NULL;
+ axis2_allocator_t* allocator = NULL;
+ w2c_engine_t* engine = NULL;
+ axis2_status_t status;
+
+ allocator = axis2_allocator_init(NULL);
+ env = axis2_env_create(allocator);
+
+ cmd_opt_parser = w2c_cmdline_option_parser_create
+ (env, argc-1, argv+1 );/* ommit first arg */
+ if ( NULL == cmd_opt_parser )
+ {
+ w2c_print_usage ( env);
+ }
+ else
+ {
+ status = w2c_validate_cmdline_options ( cmd_opt_parser, env );
+
+ if ( AXIS2_SUCCESS == status )
+ {
+ engine = w2c_engine_create_with_parser ( env, cmd_opt_parser );
+ W2C_ENGINE_GENERATE (engine, env);
+
+ W2C_ENGINE_FREE ( engine, env);
+ }
+ }
+ W2C_CMDLINE_OPTION_PARSER_FREE ( cmd_opt_parser, env);
+ axis2_allocator_free(allocator);
+ axis2_env_free ( env );
+ return 0;
+}
+
+static axis2_status_t
+w2c_validate_cmdline_options ( w2c_cmdline_option_parser_t* cmd_opt_parser,
+ const axis2_env_t* env )
+{
+ axis2_hash_t* h = NULL;
+ axis2_array_list_t* invalid_arr = NULL;
+ w2c_cmdline_option_t* option = NULL;
+ int size = 0;
+ axis2_char_t* val = NULL;
+
+ invalid_arr = W2C_CMDLINE_OPTION_PARSER_GET_INVALID_OPTIONS( cmd_opt_parser, env );
+ size = AXIS2_ARRAY_LIST_SIZE ( invalid_arr, env );
+ AXIS2_ARRAY_LIST_FREE ( invalid_arr, env );
+ if (size > 0 )
+ {
+ w2c_print_usage(env);
+ return AXIS2_FAILURE;
+ }
+ h = W2C_CMDLINE_OPTION_PARSER_GET_OPTIONS( cmd_opt_parser, env );
+ option = (w2c_cmdline_option_t* )
+ axis2_hash_get (h, W2C_CMDLINE_OPTION_CONSTS_WSDL_LOCATION_URI,
+ AXIS2_HASH_KEY_STRING );
+ if ( option == NULL )
+ {
+ w2c_print_usage(env);
+ return AXIS2_FAILURE;
+ }
+ else
+ {
+ val = W2C_CMDLINE_OPTION_GET_VALUE ( option, env );
+ if ( val == NULL || *val == '\0' )
+ {
+ w2c_print_usage(env);
+ return AXIS2_FAILURE;
+ }
+ }
+ return AXIS2_SUCCESS;
+}
+
+static void
+w2c_print_usage (const axis2_env_t* env )
+{
+ axis2_properties_t* props = NULL;
+
+ props = w2c_messages_get_message_properties( env );
+ w2c_print_message ( env, props,"wsdl2code.arg1");
+ w2c_print_message ( env, props,"wsdl2code.arg2");
+ w2c_print_message ( env, props,"wsdl2code.arg3");
+ w2c_print_message ( env, props,"wsdl2code.arg4");
+ w2c_print_message ( env, props,"wsdl2code.arg5");
+ w2c_print_message ( env, props,"wsdl2code.arg6");
+ w2c_print_message ( env, props,"wsdl2code.arg7");
+ w2c_print_message ( env, props,"wsdl2code.arg8");
+ w2c_print_message ( env, props,"wsdl2code.arg9");
+ w2c_print_message ( env, props,"wsdl2code.arg10");
+
+ AXIS2_PROPERTIES_FREE( props, env);
+}
+
+static void
+w2c_print_message (const axis2_env_t* env, axis2_properties_t* messageh, axis2_char_t* key)
+{
+ axis2_char_t* message = NULL;
+ message = (axis2_char_t* )
+ AXIS2_PROPERTIES_GET_PROPERTY(messageh,env, key);
+ printf ( "%s\n", message );
+}
Added: webservices/axis2/trunk/c/tools/codegen/test/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/Makefile.am?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/Makefile.am (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/Makefile.am Fri Sep 1 05:45:57 2006
@@ -0,0 +1 @@
+SUBDIRS = unit
Added: webservices/axis2/trunk/c/tools/codegen/test/resources/codegen-config.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/resources/codegen-config.properties?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/resources/codegen-config.properties (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/resources/codegen-config.properties Fri Sep 1 05:45:57 2006
@@ -0,0 +1,101 @@
+#######################################################################################################################
+##################### code generator property file #################################################################
+#######################################################################################################################
+# Extensions - The extensions are comma separated
+# these are loaded in their lexical order
+# Note the last extension - It includes a check to figure out whether proper databinding has taken place
+# This extension should appear AFTER all the databinding extensions inorder to function properly
+codegen.extension=org.apache.axis2.wsdl.codegen.extension.JaxMeExtension,org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension,org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension,org.apache.axis2.wsdl.codegen.extension.JiBXExtension,org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension,org.apache.axis2.wsdl.codegen.extension.TypeMapperExtension,org.apache.axis2.wsdl.codegen.extension.DefaultDatabindingExtension
+#codegen.extension=org.apache.axis2.wsdl.codegen.extension.AxisBindingBuilder,org.apache.axis2.wsdl.codegen.extension.WSDLValidatorExtension,org.apache.axis2.wsdl.codegen.extension.PackageFinder,org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension
+# The third party schemas to be loaded. e.g. The Xmime extension
+# Note - these will be loaded from the org.apache.axis2.wsdl.codegen.schema package.
+# so whatever the third party schema's that are listed here should be present there
+codegen.thirdparty.schema=xmime.xsd,soap-enc.xsd
+#
+#####################################################################################################################
+#####################################################################################################################
+# Codegen data binding frameworks and their related information
+# The names of the codegeneration frameworks in lexical order
+# these are the names that should be passed onto the tool as arguments as well
+codegen.databinding.frameworks=adb,xmlbeans,jaxme,jibx,jaxbri,none
+# the related extensions for the specified data binding frameworks above
+# Note - these are in the lexical order of the framework names. There is an implicit assumption
+# that a given databinding framework will be processed only by one extension
+codegen.databinding.extensions=org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension,org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension,org.apache.axis2.wsdl.codegen.extension.JaxMeExtension,org.apache.axis2.wsdl.codegen.extension.JiBXExtension,org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension,org.apache.axis2.wsdl.codegen.extension.DefaultDatabindingExtension
+# the default data binding framework name
+codegen.databinding.frameworks.default=adb
+# the databinding template - this should include all the necessary xslt templates for
+# creating the databindsupporters
+codegen.databinding.supporter.template=/org/apache/axis2/wsdl/template/java/DatabindingTemplate.xsl
+
+codegen.databinding.testobject.template=/org/apache/axis2/wsdl/template/java/TestObjectCreationTemplate.xsl
+#####################################################################################################################
+#####################################################################################################################
+# Language types - these are the language types that the code generator understands. Again this is the name of the
+# language that should be passed from the tool as well
+#
+codegen.languages=java,c-sharp,c
+# Emitter class is the major code generator class that should be changed according to the language.
+# The emiiters need to implement the org.apache.axis2.wsdl.codegen.emitter.Emitter interface
+# Note - The emitters should appear in the lexical order of the languages. So the language java in the above
+# list corresponds to the org.apache.axis2.wsdl.codegen.emitter.JavaEmitter
+codegen.emitters=org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter,org.apache.axis2.wsdl.codegen.emitter.CSharpEmitter,org.apache.axis2.wsdl.codegen.emitter.CEmitter
+# Default language, this is the default language that would be picked when no language is specified. it should be
+# one of the languages specified above
+codegen.languages.default=c
+#####################################################################################################################
+######################## Language specific section #################################################################
+#####################################################################################################################
+# The language specific section has a special custom style. The language name comes first and separated from the period
+# a unique name. These parameters will be included in a hashmap that is will be stored in another hash map with the
+# language as the key
+#####################################################################################################################
+# Java section - Templates.
+# The format of the templates is <writer-class-name>,<template-name>
+# Note this section is specific to the emitter logic. One can have anything here!
+java.interface.template=org.apache.axis2.wsdl.codegen.writer.InterfaceWriter,/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl
+java.interface.impl.template=org.apache.axis2.wsdl.codegen.writer.InterfaceImplementationWriter,/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
+java.bean.template=org.apache.axis2.wsdl.codegen.writer.BeanWriter,/org/apache/axis2/wsdl/template/java/BeanTemplate.xsl
+java.callback.template=org.apache.axis2.wsdl.codegen.writer.CallbackHandlerWriter,/org/apache/axis2/wsdl/template/java/CallbackHandlerTemplate.xsl
+java.skeleton.template=org.apache.axis2.wsdl.codegen.writer.SkeletonWriter,/org/apache/axis2/wsdl/template/java/SkeletonTemplate.xsl
+java.skeleton.interface.template=org.apache.axis2.wsdl.codegen.writer.SkeletonInterfaceWriter,/org/apache/axis2/wsdl/template/java/SkeletonInterfaceTemplate.xsl
+java.testclass.template=org.apache.axis2.wsdl.codegen.writer.TestClassWriter,/org/apache/axis2/wsdl/template/java/TestClassTemplate.xsl
+java.service.template=org.apache.axis2.wsdl.codegen.writer.ServiceXMLWriter,/org/apache/axis2/wsdl/template/general/ServiceXMLTemplate.xsl
+java.message.receiver.template=org.apache.axis2.wsdl.codegen.writer.MessageReceiverWriter,/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl
+#
+java.antbuild.jaxme.template=org.apache.axis2.wsdl.codegen.writer.AntBuildWriter,/org/apache/axis2/wsdl/template/general/jaxmeAntBuildTemplate.xsl
+java.antbuild.xmlbeans.template=org.apache.axis2.wsdl.codegen.writer.AntBuildWriter,/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl
+java.antbuild.jibx.template=org.apache.axis2.wsdl.codegen.writer.AntBuildWriter,/org/apache/axis2/wsdl/template/general/jibxAntBuildTemplate.xsl
+java.antbuild.jaxbri.template=org.apache.axis2.wsdl.codegen.writer.AntBuildWriter,/org/apache/axis2/wsdl/template/general/jaxbriAntBuildTemplate.xsl
+java.antbuild.adb.template=org.apache.axis2.wsdl.codegen.writer.AntBuildWriter,/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl
+java.antbuild.none.template=org.apache.axis2.wsdl.codegen.writer.AntBuildWriter,/org/apache/axis2/wsdl/template/general/defaultAntBuildTemplate.xsl
+# file extension for generated files from this language
+java.filename.extension=java
+#
+# ##################################################################################################################
+# C sharp section - Templates
+c-sharp.interface.template=org.apache.axis2.wsdl.codegen.writer.InterfaceWriter,/org/apache/axis2/wsdl/template/csharp/InterfaceTemplate.xsl
+c-sharp.interface.impl.template=org.apache.axis2.wsdl.codegen.writer.InterfaceImplementationWriter,/org/apache/axis2/wsdl/template/csharp/InterfaceImplementationTemplate.xsl
+c-sharp.bean.template=org.apache.axis2.wsdl.codegen.writer.BeanWriter,/org/apache/axis2/wsdl/template/csharp/BeanTemplate.xsl
+c-sharp.callback.template=org.apache.axis2.wsdl.codegen.writer.CallbackHandlerWriter,/org/apache/axis2/wsdl/template/csharp/CallbackHandlerTemplate.xsl
+c-sharp.skeleton.template=org.apache.axis2.wsdl.codegen.writer.SkeletonWriter,/org/apache/axis2/wsdl/template/csharp/SkeletonTemplate.xsl
+c-sharp.testclass.template=org.apache.axis2.wsdl.codegen.writer.TestClassWriter,/org/apache/axis2/wsdl/template/csharp/TestClassTemplate.xsl
+c-sharp.service.template=org.apache.axis2.wsdl.codegen.writer.ServiceXMLWriter,/org/apache/axis2/wsdl/template/general/ServiceXMLTemplate.xsl
+c-sharp.message.receiver.template=org.apache.axis2.wsdl.codegen.writer.MessageReceiverWriter,/org/apache/axis2/wsdl/template/csharp/MessageReceiverTemplate.xsl
+c-sharp.filename.extension=cs
+
+#####################################################################################################################
+# C section - Templates.
+# The format of the templates is <writer-class-name>,<template-name>
+# Note this section is specific to the emitter logic. One can have anything here!
+c.interface.header.template=org.apache.axis2.wsdl.codegen.writer.CStubHeaderWriter,/org/apache/axis2/wsdl/template/c/StubHeaderTemplate.xsl
+c.interface.impl.template=org.apache.axis2.wsdl.codegen.writer.CStubSourceWriter,/org/apache/axis2/wsdl/template/c/StubSourceTemplate.xsl
+c.skeleton.header.template=org.apache.axis2.wsdl.codegen.writer.CSkelHeaderWriter,/org/apache/axis2/wsdl/template/c/SkelHeaderTemplate.xsl
+c.skeleton.impl.template=org.apache.axis2.wsdl.codegen.writer.CSkelSourceWriter,/org/apache/axis2/wsdl/template/c/SkelSourceTemplate.xsl
+c.svc_skeleton.template=org.apache.axis2.wsdl.codegen.writer.CSvcSkeletonWriter,/org/apache/axis2/wsdl/template/c/ServiceSkeleton.xsl
+c.service.template=org.apache.axis2.wsdl.codegen.writer.CServiceXMLWriter,/org/apache/axis2/wsdl/template/c/ServiceXMLTemplate.xsl
+
+
+# file extension for generated source files from this language
+c.filename.extension=c
+
Added: webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/CalculatorDoc.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/CalculatorDoc.wsdl?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/CalculatorDoc.wsdl (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/CalculatorDoc.wsdl Fri Sep 1 05:45:57 2006
@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2003-2004 The Apache Software Foundation. -->
+<!-- (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved -->
+<!-- -->
+<!-- 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. -->
+
+<wsdl:definitions targetNamespace="http://localhost/axis/Calculator" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost/axis/Calculator" xmlns:intf="http://localhost/axis/Calculator" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://localhost/axis/Calculator" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost/axis/Calculator" xmlns:intf="http://localhost/axis/Calculator" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <element name="add">
+ <complexType>
+ <sequence>
+ <element name="arg_0_0" type="xsd:int"/>
+ <element name="arg_1_0" type="xsd:int"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="addResponse">
+ <complexType>
+ <sequence>
+ <element name="addReturn" type="xsd:int"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="sub">
+ <complexType>
+ <sequence>
+ <element name="arg_0_1" type="xsd:int"/>
+ <element name="arg_1_1" type="xsd:int"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="subResponse">
+ <complexType>
+ <sequence>
+ <element name="subReturn" type="xsd:int"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="mul">
+ <complexType>
+ <sequence>
+ <element name="arg_0_2" type="xsd:int"/>
+ <element name="arg_1_2" type="xsd:int"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="mulResponse">
+ <complexType>
+ <sequence>
+ <element name="mulReturn" type="xsd:int"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="div">
+ <complexType>
+ <sequence>
+ <element name="arg_0_3" type="xsd:int"/>
+ <element name="arg_1_3" type="xsd:int"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="divResponse">
+ <complexType>
+ <sequence>
+ <element name="divReturn" type="xsd:int"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="subResponse">
+
+ <wsdl:part element="impl:subResponse" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="mulResponse">
+
+ <wsdl:part element="impl:mulResponse" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="subRequest">
+
+ <wsdl:part element="impl:sub" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="divRequest">
+
+ <wsdl:part element="impl:div" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="divResponse">
+
+ <wsdl:part element="impl:divResponse" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="mulRequest">
+
+ <wsdl:part element="impl:mul" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="addResponse">
+
+ <wsdl:part element="impl:addResponse" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="addRequest">
+
+ <wsdl:part element="impl:add" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:portType name="Calculator">
+
+ <wsdl:operation name="add">
+
+ <wsdl:input message="impl:addRequest" name="addRequest"/>
+
+ <wsdl:output message="impl:addResponse" name="addResponse"/>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="sub">
+
+ <wsdl:input message="impl:subRequest" name="subRequest"/>
+
+ <wsdl:output message="impl:subResponse" name="subResponse"/>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="mul">
+
+ <wsdl:input message="impl:mulRequest" name="mulRequest"/>
+
+ <wsdl:output message="impl:mulResponse" name="mulResponse"/>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="div">
+
+ <wsdl:input message="impl:divRequest" name="divRequest"/>
+
+ <wsdl:output message="impl:divResponse" name="divResponse"/>
+
+ </wsdl:operation>
+
+ </wsdl:portType>
+
+ <wsdl:binding name="CalculatorSoapBinding" type="impl:Calculator">
+
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+ <wsdl:operation name="add">
+
+ <wsdlsoap:operation soapAction="Calculator#add"/>
+
+ <wsdl:input name="addRequest">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="addResponse">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="sub">
+
+ <wsdlsoap:operation soapAction="Calculator#sub"/>
+
+ <wsdl:input name="subRequest">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="subResponse">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="mul">
+
+ <wsdlsoap:operation soapAction="Calculator#mul"/>
+
+ <wsdl:input name="mulRequest">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="mulResponse">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="div">
+
+ <wsdlsoap:operation soapAction="Calculator#div"/>
+
+ <wsdl:input name="divRequest">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="divResponse">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="Calculator">
+
+ <wsdl:port binding="impl:CalculatorSoapBinding" name="Calculator">
+
+ <wsdlsoap:address location="http://localhost/axis/Calculator"/>
+
+ </wsdl:port>
+
+ </wsdl:service>
+
+</wsdl:definitions>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org