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/08/08 07:57:52 UTC
svn commit: r429593 [1/3] - in /webservices/axis2/trunk/c/xml_schema:
include/ samples/ src/ test/
Author: nandika
Date: Mon Aug 7 22:57:49 2006
New Revision: 429593
URL: http://svn.apache.org/viewvc?rev=429593&view=rev
Log:
methods hash table which was used to store functions, removed
Modified:
webservices/axis2/trunk/c/xml_schema/include/xml_schema_annotated.h
webservices/axis2/trunk/c/xml_schema/include/xml_schema_constants.h
webservices/axis2/trunk/c/xml_schema/include/xml_schema_enum.h
webservices/axis2/trunk/c/xml_schema/include/xml_schema_external.h
webservices/axis2/trunk/c/xml_schema/include/xml_schema_obj.h
webservices/axis2/trunk/c/xml_schema/include/xml_schema_particle.h
webservices/axis2/trunk/c/xml_schema/include/xml_schema_simple_type_content.h
webservices/axis2/trunk/c/xml_schema/include/xml_schema_type.h
webservices/axis2/trunk/c/xml_schema/samples/test_schema.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_annotated.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_annotation.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_any.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_any_attribute.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_app_info.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_attribute.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_attribute_group.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_attribute_group_ref.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_builder.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_collection.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_content.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_content_extension.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_content_restriction.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_type.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_content_processing.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_content_type.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_derivation_method.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_documentation.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_element.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_enum.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_external.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_facet.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_form.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_group.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_group_base.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_group_ref.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_identity_constraint.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_import.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_obj.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_obj_table.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_particle.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_redefine.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_content.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_content_extension.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_content_restriction.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_type.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_type_content.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_type_list.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_type_restriction.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_type_union.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_type.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_use.c
webservices/axis2/trunk/c/xml_schema/src/xml_schema_xpath.c
webservices/axis2/trunk/c/xml_schema/src/xml_severity_type.c
webservices/axis2/trunk/c/xml_schema/src/xml_tokenized_type.c
webservices/axis2/trunk/c/xml_schema/test/xml_schema_test.c
Modified: webservices/axis2/trunk/c/xml_schema/include/xml_schema_annotated.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/include/xml_schema_annotated.h?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/include/xml_schema_annotated.h (original)
+++ webservices/axis2/trunk/c/xml_schema/include/xml_schema_annotated.h Mon Aug 7 22:57:49 2006
@@ -111,7 +111,9 @@
xml_schema_annotated_t *annotated,
const axis2_env_t *env,
xml_schema_annotated_t *annotated_impl,
- axis2_hash_t *methods);
+ XML_SCHEMA_SUPER_OBJS_FN super_objs,
+ XML_SCHEMA_GET_TYPE_FN get_type,
+ XML_SCHEMA_FREE_FN free_fn);
/*************** Macros *******************************************************/
Modified: webservices/axis2/trunk/c/xml_schema/include/xml_schema_constants.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/include/xml_schema_constants.h?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/include/xml_schema_constants.h (original)
+++ webservices/axis2/trunk/c/xml_schema/include/xml_schema_constants.h Mon Aug 7 22:57:49 2006
@@ -23,6 +23,8 @@
*/
#include <axis2_utils.h>
+#include <axis2_hash.h>
+#include <xml_schema_defines.h>
#ifdef __cplusplus
extern "C"
@@ -97,6 +99,14 @@
#define XML_SCHEMA_XSD_LANGUAGE "language"
#define XML_SCHEMA_XSD_ID "ID"
#define XML_SCHEMA_XSD_SCHEMA "schema"
+
+
+typedef axis2_hash_t* (AXIS2_CALL *XML_SCHEMA_SUPER_OBJS_FN)(void *obj,
+ const axis2_env_t *env);
+
+typedef xml_schema_types_t (AXIS2_CALL *XML_SCHEMA_GET_TYPE_FN)(void *obj, const axis2_env_t *env);
+
+typedef int (AXIS2_CALL *XML_SCHEMA_FREE_FN)(void *obj, const axis2_env_t *env);
#ifdef __cplusplus
}
Modified: webservices/axis2/trunk/c/xml_schema/include/xml_schema_enum.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/include/xml_schema_enum.h?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/include/xml_schema_enum.h (original)
+++ webservices/axis2/trunk/c/xml_schema/include/xml_schema_enum.h Mon Aug 7 22:57:49 2006
@@ -30,6 +30,7 @@
#include <axis2_array_list.h>
#include <axis2_hash.h>
#include <xml_schema_defines.h>
+#include <xml_schema_constants.h>
#ifdef __cplusplus
extern "C"
@@ -98,9 +99,11 @@
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
xml_schema_enum_resolve_methods(xml_schema_enum_t *schema_enum,
- const axis2_env_t *env,
- xml_schema_enum_t *schema_enum_impl,
- axis2_hash_t *methods);
+ const axis2_env_t *env,
+ xml_schema_enum_t *schema_enum_impl,
+ XML_SCHEMA_SUPER_OBJS_FN super_objs,
+ XML_SCHEMA_GET_TYPE_FN get_type,
+ XML_SCHEMA_FREE_FN free_fn);
AXIS2_EXTERN int AXIS2_CALL
xml_schema_enum_index(axis2_char_t *value,
Modified: webservices/axis2/trunk/c/xml_schema/include/xml_schema_external.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/include/xml_schema_external.h?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/include/xml_schema_external.h (original)
+++ webservices/axis2/trunk/c/xml_schema/include/xml_schema_external.h Mon Aug 7 22:57:49 2006
@@ -116,7 +116,9 @@
xml_schema_external_t *external,
const axis2_env_t *env,
xml_schema_external_t *external_impl,
- axis2_hash_t *methods);
+ XML_SCHEMA_SUPER_OBJS_FN super_objs,
+ XML_SCHEMA_GET_TYPE_FN get_type,
+ XML_SCHEMA_FREE_FN free_fn);
#define XML_SCHEMA_EXTERNAL_FREE(external, env) \
Modified: webservices/axis2/trunk/c/xml_schema/include/xml_schema_obj.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/include/xml_schema_obj.h?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/include/xml_schema_obj.h (original)
+++ webservices/axis2/trunk/c/xml_schema/include/xml_schema_obj.h Mon Aug 7 22:57:49 2006
@@ -30,6 +30,7 @@
#include <axis2_array_list.h>
#include <axis2_hash.h>
#include <xml_schema_defines.h>
+#include <xml_schema_constants.h>
#ifdef __cplusplus
extern "C"
@@ -108,9 +109,14 @@
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
xml_schema_obj_resolve_methods(xml_schema_obj_t *schema_obj,
- const axis2_env_t *env,
- xml_schema_obj_t *schema_obj_impl,
- axis2_hash_t *methods);
+ const axis2_env_t *env,
+ xml_schema_obj_t *schema_obj_impl,
+ XML_SCHEMA_SUPER_OBJS_FN super_objs,
+ XML_SCHEMA_GET_TYPE_FN get_type,
+ XML_SCHEMA_FREE_FN free_fn);
+
+
+/******************************************************************************/
#define XML_SCHEMA_OBJ_FREE(obj, env) \
(((xml_schema_obj_t *) obj)->ops->free (obj, env))
Modified: webservices/axis2/trunk/c/xml_schema/include/xml_schema_particle.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/include/xml_schema_particle.h?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/include/xml_schema_particle.h (original)
+++ webservices/axis2/trunk/c/xml_schema/include/xml_schema_particle.h Mon Aug 7 22:57:49 2006
@@ -111,7 +111,9 @@
xml_schema_particle_t *particle,
const axis2_env_t *env,
xml_schema_particle_t *particle_impl,
- axis2_hash_t *methods);
+ XML_SCHEMA_SUPER_OBJS_FN super_objs,
+ XML_SCHEMA_GET_TYPE_FN get_type,
+ XML_SCHEMA_FREE_FN free_fn);
#define XML_SCHEMA_PARTICLE_FREE(particle, env) \
(((xml_schema_particle_t *) particle)->ops->\
Modified: webservices/axis2/trunk/c/xml_schema/include/xml_schema_simple_type_content.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/include/xml_schema_simple_type_content.h?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/include/xml_schema_simple_type_content.h (original)
+++ webservices/axis2/trunk/c/xml_schema/include/xml_schema_simple_type_content.h Mon Aug 7 22:57:49 2006
@@ -90,7 +90,9 @@
xml_schema_simple_type_content_t *sim_type_cont,
const axis2_env_t *env,
xml_schema_simple_type_content_t *sim_type_cont_impl,
- axis2_hash_t *methods);
+ XML_SCHEMA_SUPER_OBJS_FN super_objs,
+ XML_SCHEMA_GET_TYPE_FN get_type,
+ XML_SCHEMA_FREE_FN free_fn);
/*************************** Macros **********************************************/
#define XML_SCHEMA_SIMPLE_TYPE_CONTENT_FREE(sim_type_cont, env) \
Modified: webservices/axis2/trunk/c/xml_schema/include/xml_schema_type.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/include/xml_schema_type.h?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/include/xml_schema_type.h (original)
+++ webservices/axis2/trunk/c/xml_schema/include/xml_schema_type.h Mon Aug 7 22:57:49 2006
@@ -136,7 +136,9 @@
xml_schema_type_t *type,
const axis2_env_t *env,
xml_schema_type_t *type_impl,
- axis2_hash_t *methods);
+ XML_SCHEMA_SUPER_OBJS_FN super_objs,
+ XML_SCHEMA_GET_TYPE_FN get_type,
+ XML_SCHEMA_FREE_FN free_fn);
#define XML_SCHEMA_TYPE_FREE(type, env) \
(((xml_schema_type_t *) type)->ops->\
Modified: webservices/axis2/trunk/c/xml_schema/samples/test_schema.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/samples/test_schema.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/samples/test_schema.c (original)
+++ webservices/axis2/trunk/c/xml_schema/samples/test_schema.c Mon Aug 7 22:57:49 2006
@@ -30,7 +30,6 @@
xml_schema_collection_t *schema_collection = NULL;
xml_schema_t *schema = NULL;
axiom_xml_reader_init();
-
xml_reader =
axiom_xml_reader_create_for_file(env, filename, NULL);
if(!xml_reader)
@@ -38,10 +37,9 @@
om_builder = axiom_stax_builder_create(env, xml_reader);
- om_doc = axiom_document_create(env, NULL, om_builder);
+ om_doc = AXIOM_STAX_BUILDER_GET_DOCUMENT(om_builder, env);
AXIOM_DOCUMENT_BUILD_ALL(om_doc, env);
-
schema_collection = xml_schema_collection_create(env);
schema = XML_SCHEMA_COLLECTION_READ_DOCUMENT(
@@ -49,9 +47,12 @@
if(NULL != schema)
{
+ axis2_char_t *buffer = NULL;
printf("\n parsing schema is successful \n");
-
- printf("%s", XML_SCHEMA_SERIALIZE(schema, env));
+ buffer = XML_SCHEMA_SERIALIZE(schema, env);
+ printf("%s", buffer );
+ if(NULL != buffer)
+ AXIS2_FREE(env->allocator, buffer);
}
if(NULL != schema_collection)
{
Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema.c Mon Aug 7 22:57:49 2006
@@ -31,8 +31,6 @@
axis2_hash_t *ht_super;
- axis2_hash_t *methods;
-
xml_schema_form_t *attr_form_default;
xml_schema_form_t *element_form_default;
@@ -295,7 +293,6 @@
schema_impl->annotated = NULL;
schema_impl->ht_super = NULL;
schema_impl->obj_type = XML_SCHEMA;
- schema_impl->methods = NULL;
schema_impl->parent = parent;
schema_impl->attr_form_default = NULL;
schema_impl->element_form_default = NULL;
@@ -437,77 +434,6 @@
schema_impl->schema_types = xml_schema_obj_table_create(env);
- schema_impl->methods = axis2_hash_make(env);
- if(!schema_impl->methods)
- {
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- return NULL;
- }
- axis2_hash_set(schema_impl->methods, "free", AXIS2_HASH_KEY_STRING,
- xml_schema_free);
- axis2_hash_set(schema_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING,
- xml_schema_super_objs);
- axis2_hash_set(schema_impl->methods, "get_type", AXIS2_HASH_KEY_STRING,
- xml_schema_get_type);
- axis2_hash_set(schema_impl->methods, "get_namespace",
- AXIS2_HASH_KEY_STRING, xml_schema_get_namespace);
- axis2_hash_set(schema_impl->methods, "get_attr_form_default",
- AXIS2_HASH_KEY_STRING, xml_schema_get_attr_form_default);
- axis2_hash_set(schema_impl->methods, "set_attr_form_default",
- AXIS2_HASH_KEY_STRING, xml_schema_set_attr_form_default);
- axis2_hash_set(schema_impl->methods, "get_attr_groups",
- AXIS2_HASH_KEY_STRING, xml_schema_get_attr_groups);
- axis2_hash_set(schema_impl->methods, "get_attrs",
- AXIS2_HASH_KEY_STRING, xml_schema_get_attrs);
- axis2_hash_set(schema_impl->methods, "get_block_default",
- AXIS2_HASH_KEY_STRING, xml_schema_get_block_default);
- axis2_hash_set(schema_impl->methods, "set_block_default",
- AXIS2_HASH_KEY_STRING, xml_schema_set_block_default);
- axis2_hash_set(schema_impl->methods, "get_element_form_default",
- AXIS2_HASH_KEY_STRING, xml_schema_get_element_form_default);
- axis2_hash_set(schema_impl->methods, "set_element_form_default",
- AXIS2_HASH_KEY_STRING, xml_schema_set_element_form_default);
- axis2_hash_set(schema_impl->methods, "get_elements",
- AXIS2_HASH_KEY_STRING, xml_schema_get_elements);
- axis2_hash_set(schema_impl->methods, "get_element_by_qname",
- AXIS2_HASH_KEY_STRING, xml_schema_get_element_by_qname);
- axis2_hash_set(schema_impl->methods, "get_type_by_qname",
- AXIS2_HASH_KEY_STRING, xml_schema_get_type_by_qname);
- axis2_hash_set(schema_impl->methods, "get_final_default",
- AXIS2_HASH_KEY_STRING, xml_schema_get_final_default);
- axis2_hash_set(schema_impl->methods, "set_final_default",
- AXIS2_HASH_KEY_STRING, xml_schema_set_final_default);
- axis2_hash_set(schema_impl->methods, "get_groups",
- AXIS2_HASH_KEY_STRING, xml_schema_get_groups);
- axis2_hash_set(schema_impl->methods, "get_includes",
- AXIS2_HASH_KEY_STRING, xml_schema_get_includes);
- axis2_hash_set(schema_impl->methods, "is_compiled",
- AXIS2_HASH_KEY_STRING, xml_schema_is_compiled);
- axis2_hash_set(schema_impl->methods, "get_items",
- AXIS2_HASH_KEY_STRING, xml_schema_get_items);
- axis2_hash_set(schema_impl->methods, "get_notations",
- AXIS2_HASH_KEY_STRING, xml_schema_get_notations);
- axis2_hash_set(schema_impl->methods, "get_schema_types",
- AXIS2_HASH_KEY_STRING, xml_schema_get_schema_types);
- axis2_hash_set(schema_impl->methods, "get_target_namespace",
- AXIS2_HASH_KEY_STRING, xml_schema_get_target_namespace);
- axis2_hash_set(schema_impl->methods, "set_target_namespace",
- AXIS2_HASH_KEY_STRING, xml_schema_set_target_namespace);
- axis2_hash_set(schema_impl->methods, "get_version",
- AXIS2_HASH_KEY_STRING, xml_schema_get_version);
- axis2_hash_set(schema_impl->methods, "compile",
- AXIS2_HASH_KEY_STRING, xml_schema_compile);
- axis2_hash_set(schema_impl->methods, "write_a_out",
- AXIS2_HASH_KEY_STRING, xml_schema_write_with_out);
- axis2_hash_set(schema_impl->methods, "write_a_writer",
- AXIS2_HASH_KEY_STRING, xml_schema_write_with_writer);
- axis2_hash_set(schema_impl->methods, "get_prefix_to_namespace_map",
- AXIS2_HASH_KEY_STRING, xml_schema_get_prefix_to_namespace_map);
- axis2_hash_set(schema_impl->methods, "set_prefix_to_namespace_map",
- AXIS2_HASH_KEY_STRING, xml_schema_set_prefix_to_namespace_map);
- axis2_hash_set(schema_impl->methods, "add_type",
- AXIS2_HASH_KEY_STRING, xml_schema_add_type);
-
schema_impl->annotated = xml_schema_annotated_create(env);
schema_impl->ht_super = axis2_hash_make(env);
@@ -528,7 +454,7 @@
status = xml_schema_annotated_resolve_methods(
&(schema_impl->schema.base), env, schema_impl->annotated,
- schema_impl->methods);
+ xml_schema_super_objs, xml_schema_get_type, xml_schema_free);
return &(schema_impl->schema);
}
@@ -589,12 +515,6 @@
schema_impl->elements = NULL;
}
- if(schema_impl->methods)
- {
- axis2_hash_free(schema_impl->methods, env);
- schema_impl->methods = NULL;
- }
-
if(schema_impl->ht_super)
{
axis2_hash_free(schema_impl->ht_super, env);
@@ -1327,19 +1247,20 @@
AXIS2_XML_PARSER_TYPE_BUFFER);
if(!writer)
{
- return AXIS2_FAILURE;
+ return NULL;
}
output = axiom_output_create(env, writer);
if(!output)
{
- return AXIS2_FAILURE;
+ return NULL;
}
AXIOM_NODE_SERIALIZE(sch_impl->schema_root_node, env, output);
xml_str = AXIOM_XML_WRITER_GET_XML(writer, env);
AXIOM_OUTPUT_FREE(output, env);
+
}
- return NULL;
+ return xml_str;
}
axis2_status_t AXIS2_CALL
Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_annotated.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_annotated.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_annotated.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_annotated.c Mon Aug 7 22:57:49 2006
@@ -35,8 +35,6 @@
axis2_hash_t *ht_super;
- axis2_hash_t *methods;
-
xml_schema_annotation_t *annotation;
axis2_char_t *id;
@@ -117,7 +115,6 @@
annotated_impl->schema_obj = NULL;
annotated_impl->obj_type = XML_SCHEMA_ANNOTATED;
annotated_impl->ht_super = NULL;
- annotated_impl->methods = NULL;
annotated_impl->id = NULL;
annotated_impl->annotation = NULL;
annotated_impl->unhandled_attrs = NULL;
@@ -154,31 +151,6 @@
annotated_impl->annotated.ops->set_unhandled_attrs =
xml_schema_annotated_set_unhandled_attrs;
- annotated_impl->methods = axis2_hash_make(env);
- if(!annotated_impl->methods)
- {
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- return NULL;
- }
- axis2_hash_set(annotated_impl->methods, "free", AXIS2_HASH_KEY_STRING,
- xml_schema_annotated_free);
- axis2_hash_set(annotated_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING,
- xml_schema_annotated_super_objs);
- axis2_hash_set(annotated_impl->methods, "get_type", AXIS2_HASH_KEY_STRING,
- xml_schema_annotated_get_type);
- axis2_hash_set(annotated_impl->methods, "get_id", AXIS2_HASH_KEY_STRING,
- xml_schema_annotated_get_id);
- axis2_hash_set(annotated_impl->methods, "set_id", AXIS2_HASH_KEY_STRING,
- xml_schema_annotated_set_id);
- axis2_hash_set(annotated_impl->methods, "get_annotation",
- AXIS2_HASH_KEY_STRING, xml_schema_annotated_get_annotation);
- axis2_hash_set(annotated_impl->methods, "set_annotation",
- AXIS2_HASH_KEY_STRING, xml_schema_annotated_set_annotation);
- axis2_hash_set(annotated_impl->methods, "get_unhandled_attrs",
- AXIS2_HASH_KEY_STRING, xml_schema_annotated_get_unhandled_attrs);
- axis2_hash_set(annotated_impl->methods, "set_unhandled_attrs",
- AXIS2_HASH_KEY_STRING, xml_schema_annotated_set_unhandled_attrs);
-
annotated_impl->schema_obj = xml_schema_obj_create(env);
if(!annotated_impl->schema_obj)
{
@@ -192,14 +164,19 @@
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- axis2_hash_set(annotated_impl->ht_super, "XML_SCHEMA_ANNOTATED", AXIS2_HASH_KEY_STRING,
- &(annotated_impl->annotated) );
- axis2_hash_set(annotated_impl->ht_super, "XML_SCHEMA_OBJ", AXIS2_HASH_KEY_STRING,
- annotated_impl->schema_obj );
+ axis2_hash_set(annotated_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_ANNOTATED", env),
+ AXIS2_HASH_KEY_STRING, &(annotated_impl->annotated) );
+
+ axis2_hash_set(annotated_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_OBJ", env), AXIS2_HASH_KEY_STRING,
+ annotated_impl->schema_obj );
status = xml_schema_obj_resolve_methods(
&(annotated_impl->annotated.base), env, annotated_impl->schema_obj,
- annotated_impl->methods);
+ xml_schema_annotated_super_objs,
+ xml_schema_annotated_get_type,
+ xml_schema_annotated_free);
return &(annotated_impl->annotated);
}
@@ -238,12 +215,6 @@
annotated_impl->ht_super = NULL;
}
- if(NULL != annotated_impl->methods)
- {
- axis2_hash_free(annotated_impl->methods, env);
- annotated_impl->methods = NULL;
- }
-
if(NULL != annotated_impl->schema_obj)
{
XML_SCHEMA_OBJ_FREE(annotated_impl->schema_obj, env);
@@ -294,13 +265,14 @@
xml_schema_annotated_t *annotated,
const axis2_env_t *env,
xml_schema_annotated_t *annotated_impl,
- axis2_hash_t *methods)
+ XML_SCHEMA_SUPER_OBJS_FN super_objs,
+ XML_SCHEMA_GET_TYPE_FN get_type,
+ XML_SCHEMA_FREE_FN free_fn)
{
xml_schema_annotated_impl_t *sch_annotated_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, annotated_impl, AXIS2_FAILURE);
- AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
sch_annotated_impl = (xml_schema_annotated_impl_t *) annotated_impl;
@@ -311,51 +283,33 @@
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- annotated->ops->free = axis2_hash_get(methods, "free",
- AXIS2_HASH_KEY_STRING);
+ annotated->ops->free = free_fn;
+
+ annotated->ops->super_objs = super_objs;
- annotated->ops->super_objs = axis2_hash_get(methods, "super_objs",
- AXIS2_HASH_KEY_STRING);
+ annotated->ops->get_type = get_type;
- annotated->ops->get_type = axis2_hash_get(methods, "get_type",
- AXIS2_HASH_KEY_STRING);
+ annotated->ops->get_id =
+ sch_annotated_impl->annotated.ops->get_id;
+
+ annotated->ops->set_id =
+ sch_annotated_impl->annotated.ops->set_id;
- annotated->ops->get_id = axis2_hash_get(methods, "get_id",
- AXIS2_HASH_KEY_STRING);
- if(!annotated->ops->get_id)
- annotated->ops->get_id = sch_annotated_impl->annotated.ops->get_id;
-
- annotated->ops->set_id = axis2_hash_get(methods, "set_id",
- AXIS2_HASH_KEY_STRING);
- if(!annotated->ops->set_id)
- annotated->ops->set_id =
- sch_annotated_impl->annotated.ops->set_id;
-
- annotated->ops->get_annotation = axis2_hash_get(methods, "get_annotation",
- AXIS2_HASH_KEY_STRING);
- if(!annotated->ops->get_annotation)
- annotated->ops->get_annotation = sch_annotated_impl->annotated.ops->get_annotation;
-
- annotated->ops->set_annotation = axis2_hash_get(methods, "set_annotation",
- AXIS2_HASH_KEY_STRING);
- if(!annotated->ops->set_annotation)
- annotated->ops->set_annotation =
- sch_annotated_impl->annotated.ops->set_annotation;
-
- annotated->ops->get_unhandled_attrs = axis2_hash_get(methods,
- "get_unhandled_attrs", AXIS2_HASH_KEY_STRING);
- if(!annotated->ops->get_unhandled_attrs)
- annotated->ops->get_unhandled_attrs =
- sch_annotated_impl->annotated.ops->get_unhandled_attrs;
-
- annotated->ops->set_unhandled_attrs = axis2_hash_get(methods,
- "set_unhandled_attrs", AXIS2_HASH_KEY_STRING);
- if(!annotated->ops->set_unhandled_attrs)
- annotated->ops->set_unhandled_attrs =
- sch_annotated_impl->annotated.ops->set_unhandled_attrs;
+ annotated->ops->get_annotation =
+ sch_annotated_impl->annotated.ops->get_annotation;
+
+ annotated->ops->set_annotation =
+ sch_annotated_impl->annotated.ops->set_annotation;
+
+ annotated->ops->get_unhandled_attrs =
+ sch_annotated_impl->annotated.ops->get_unhandled_attrs;
+
+ annotated->ops->set_unhandled_attrs =
+ sch_annotated_impl->annotated.ops->set_unhandled_attrs;
return xml_schema_obj_resolve_methods(&(annotated->base),
- env, sch_annotated_impl->schema_obj, methods);
+ env, sch_annotated_impl->schema_obj,
+ super_objs, get_type,free_fn);
}
axis2_char_t *AXIS2_CALL
Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_annotation.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_annotation.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_annotation.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_annotation.c Mon Aug 7 22:57:49 2006
@@ -32,8 +32,6 @@
axis2_hash_t *ht_super;
- axis2_hash_t *methods;
-
xml_schema_obj_t *schema_obj;
xml_schema_obj_collection_t *items;
@@ -86,7 +84,6 @@
annotation_impl->schema_obj = NULL;
annotation_impl->obj_type = XML_SCHEMA_ANNOTATION;
annotation_impl->ht_super = NULL;
- annotation_impl->methods = NULL;
annotation_impl->items = NULL;
annotation_impl->annotation.base.ops = NULL;
annotation_impl->annotation.ops = NULL;
@@ -123,25 +120,6 @@
return NULL;
}
- annotation_impl->methods = axis2_hash_make(env);
- if(!annotation_impl->methods)
- {
- xml_schema_annotation_free(&(annotation_impl->annotation), env);
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- return NULL;
- }
-
- axis2_hash_set(annotation_impl->methods, "free",
- AXIS2_HASH_KEY_STRING, xml_schema_annotation_free);
-
- axis2_hash_set(annotation_impl->methods, "super_objs",
- AXIS2_HASH_KEY_STRING, xml_schema_annotation_super_objs);
- axis2_hash_set(annotation_impl->methods, "get_type",
- AXIS2_HASH_KEY_STRING, xml_schema_annotation_get_type);
-
- axis2_hash_set(annotation_impl->methods, "get_items",
- AXIS2_HASH_KEY_STRING, xml_schema_annotation_get_items);
-
annotation_impl->schema_obj = xml_schema_obj_create(env);
if(!annotation_impl->schema_obj)
@@ -158,14 +136,19 @@
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- axis2_hash_set(annotation_impl->methods, "XML_SCHEMA_ANNOTATION",
- AXIS2_HASH_KEY_STRING, &(annotation_impl->annotation));
-
- axis2_hash_set(annotation_impl->methods, "XML_SCHEMA_OBJ",
- AXIS2_HASH_KEY_STRING, annotation_impl->schema_obj);
+ axis2_hash_set(annotation_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_ANNOTATION", env),
+ AXIS2_HASH_KEY_STRING, &(annotation_impl->annotation));
+
+ axis2_hash_set(annotation_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_OBJ", env),
+ AXIS2_HASH_KEY_STRING, annotation_impl->schema_obj);
status = xml_schema_obj_resolve_methods(&(annotation_impl->annotation.base),
- env, annotation_impl->schema_obj, annotation_impl->methods);
+ env, annotation_impl->schema_obj,
+ xml_schema_annotation_super_objs,
+ xml_schema_annotation_get_type,
+ xml_schema_annotation_free);
return &(annotation_impl->annotation);
}
@@ -191,12 +174,6 @@
annotation_impl->ht_super = NULL;
}
- if(NULL != annotation_impl->methods)
- {
- axis2_hash_free(annotation_impl->methods, env);
- annotation_impl->methods = NULL;
- }
-
if(NULL != annotation_impl->schema_obj)
{
XML_SCHEMA_OBJ_FREE(annotation_impl->schema_obj, env);
Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_any.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_any.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_any.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_any.c Mon Aug 7 22:57:49 2006
@@ -27,14 +27,13 @@
struct xml_schema_any_impl
{
xml_schema_any_t any;
+
xml_schema_particle_t *particle;
xml_schema_types_t obj_type;
axis2_hash_t *ht_super;
- axis2_hash_t *methods;
-
xml_schema_content_processing_t *process_content;
/**
* Namespaces containing the elements that can be used.
@@ -144,27 +143,6 @@
any_impl->any.ops->set_process_content =
xml_schema_any_set_process_content;
- any_impl->methods = axis2_hash_make(env);
- if(!any_impl->methods)
- {
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- return NULL;
- }
- axis2_hash_set(any_impl->methods, "free", AXIS2_HASH_KEY_STRING,
- xml_schema_any_free);
- axis2_hash_set(any_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING,
- xml_schema_any_super_objs);
- axis2_hash_set(any_impl->methods, "get_type", AXIS2_HASH_KEY_STRING,
- xml_schema_any_get_type);
- axis2_hash_set(any_impl->methods, "get_namespace", AXIS2_HASH_KEY_STRING,
- xml_schema_any_get_namespace);
- axis2_hash_set(any_impl->methods, "set_namespace", AXIS2_HASH_KEY_STRING,
- xml_schema_any_set_namespace);
- axis2_hash_set(any_impl->methods, "get_process_content",
- AXIS2_HASH_KEY_STRING, xml_schema_any_get_process_content);
- axis2_hash_set(any_impl->methods, "set_process_content",
- AXIS2_HASH_KEY_STRING, xml_schema_any_set_process_content);
-
any_impl->particle = xml_schema_particle_create(env);
if(!any_impl->particle)
{
@@ -178,24 +156,31 @@
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- axis2_hash_set(any_impl->ht_super, "AXIS_XML_SCHEMA_ANY", AXIS2_HASH_KEY_STRING,
- &(any_impl->any));
- axis2_hash_set(any_impl->ht_super, "AXIS_XML_SCHEMA_PARTICLE", AXIS2_HASH_KEY_STRING,
- any_impl->particle);
+ axis2_hash_set(any_impl->ht_super,
+ AXIS2_STRDUP("AXIS_XML_SCHEMA_ANY", env),
+ AXIS2_HASH_KEY_STRING, &(any_impl->any));
+
+ axis2_hash_set(any_impl->ht_super,
+ AXIS2_STRDUP("AXIS_XML_SCHEMA_PARTICLE", env),
+ AXIS2_HASH_KEY_STRING, any_impl->particle);
annotated = XML_SCHEMA_PARTICLE_GET_BASE_IMPL(any_impl->particle, env);
if(NULL != annotated)
{
- axis2_hash_set(any_impl->ht_super, "AXIS_XML_SCHEMA_ANNOTATED", AXIS2_HASH_KEY_STRING,
- annotated);
+ axis2_hash_set(any_impl->ht_super,
+ AXIS2_STRDUP("AXIS_XML_SCHEMA_ANNOTATED", env),
+ AXIS2_HASH_KEY_STRING, annotated);
- axis2_hash_set(any_impl->ht_super, "AXIS_XML_SCHEMA_OBJ", AXIS2_HASH_KEY_STRING,
- XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(annotated, env));
+ axis2_hash_set(any_impl->ht_super,
+ AXIS2_STRDUP("AXIS_XML_SCHEMA_OBJ", env),
+ AXIS2_HASH_KEY_STRING, XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(annotated, env));
}
status = xml_schema_particle_resolve_methods(
&(any_impl->any.base), env, any_impl->particle,
- any_impl->methods);
+ xml_schema_any_super_objs,
+ xml_schema_any_get_type,
+ xml_schema_any_free);
return &(any_impl->any);
}
@@ -226,12 +211,6 @@
any_impl->ht_super = NULL;
}
- if(NULL != any_impl->methods)
- {
- axis2_hash_free(any_impl->methods, env);
- any_impl->methods = NULL;
- }
-
if(NULL != any_impl->particle)
{
XML_SCHEMA_PARTICLE_FREE(any_impl->particle, env);
@@ -290,13 +269,14 @@
xml_schema_any_t *any,
const axis2_env_t *env,
xml_schema_any_t *any_impl,
- axis2_hash_t *methods)
+ XML_SCHEMA_SUPER_OBJS_FN super_objs,
+ XML_SCHEMA_GET_TYPE_FN get_type,
+ XML_SCHEMA_FREE_FN free_fn)
{
xml_schema_any_impl_t *sch_any_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, any_impl, AXIS2_FAILURE);
- AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
sch_any_impl = (xml_schema_any_impl_t *) any_impl;
@@ -307,44 +287,25 @@
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- any->ops->free = axis2_hash_get(methods, "free",
- AXIS2_HASH_KEY_STRING);
+ any->ops->free = free_fn;
- any->ops->super_objs = axis2_hash_get(methods, "super_objs",
- AXIS2_HASH_KEY_STRING);
-
- any->ops->get_type = axis2_hash_get(methods, "get_type",
- AXIS2_HASH_KEY_STRING);
- if(!any->ops->get_type)
- any->ops->get_type =
- sch_any_impl->any.ops->get_type;
-
- any->ops->get_namespace = axis2_hash_get(methods,
- "get_namespace", AXIS2_HASH_KEY_STRING);
- if(!any->ops->get_namespace)
+ any->ops->super_objs = super_objs;
+ any->ops->get_type = get_type;
+
any->ops->get_namespace =
sch_any_impl->any.ops->get_namespace;
- any->ops->set_namespace = axis2_hash_get(methods,
- "set_namespace", AXIS2_HASH_KEY_STRING);
- if(!any->ops->set_namespace)
any->ops->set_namespace =
sch_any_impl->any.ops->set_namespace;
- any->ops->get_process_content = axis2_hash_get(methods,
- "get_process_content", AXIS2_HASH_KEY_STRING);
- if(!any->ops->get_process_content)
any->ops->get_process_content =
sch_any_impl->any.ops->get_process_content;
- any->ops->set_process_content = axis2_hash_get(methods,
- "set_process_content", AXIS2_HASH_KEY_STRING);
- if(!any->ops->set_process_content)
any->ops->set_process_content =
sch_any_impl->any.ops->set_process_content;
return xml_schema_particle_resolve_methods(&(any->base),
- env, sch_any_impl->particle, methods);
+ env, sch_any_impl->particle, super_objs, get_type, free_fn);
}
axis2_char_t *AXIS2_CALL
Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_any_attribute.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_any_attribute.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_any_attribute.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_any_attribute.c Mon Aug 7 22:57:49 2006
@@ -30,8 +30,6 @@
xml_schema_annotated_t *annotated;
- axis2_hash_t *methods;
-
xml_schema_content_processing_t *process_content;
/**
* Namespaces containing the elements that can be used.
@@ -100,7 +98,6 @@
any_attr_impl->ns = NULL;
any_attr_impl->annotated = NULL;
any_attr_impl->process_content = NULL;
- any_attr_impl->methods = NULL;
any_attr_impl->ht_super = NULL;
any_attr_impl->obj_type = XML_SCHEMA_ANY_ATTRIBUTE;
any_attr_impl->any_attr.ops = AXIS2_MALLOC(env->allocator,
@@ -144,55 +141,39 @@
any_attr_impl->any_attr.ops->set_process_content =
xml_schema_any_attribute_set_process_content;
- any_attr_impl->methods = axis2_hash_make(env);
- if(!any_attr_impl->methods)
- {
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- return NULL;
- }
- axis2_hash_set(any_attr_impl->methods, "free", AXIS2_HASH_KEY_STRING,
- xml_schema_any_attribute_free);
- axis2_hash_set(any_attr_impl->methods, "get_type", AXIS2_HASH_KEY_STRING,
- xml_schema_any_attribute_get_type);
- axis2_hash_set(any_attr_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING,
- xml_schema_any_attribute_super_objs);
- axis2_hash_set(any_attr_impl->methods, "get_namespace", AXIS2_HASH_KEY_STRING,
- xml_schema_any_attribute_get_namespace);
- axis2_hash_set(any_attr_impl->methods, "set_namespace", AXIS2_HASH_KEY_STRING,
- xml_schema_any_attribute_set_namespace);
- axis2_hash_set(any_attr_impl->methods, "get_process_content",
- AXIS2_HASH_KEY_STRING, xml_schema_any_attribute_get_process_content);
- axis2_hash_set(any_attr_impl->methods, "set_process_content",
- AXIS2_HASH_KEY_STRING, xml_schema_any_attribute_set_process_content);
-
any_attr_impl->annotated = xml_schema_annotated_create(env);
- if(!any_attr_impl->methods)
+ if(!any_attr_impl->annotated)
{
- xml_schema_any_attribute_free(&(any_attr_impl->any_attr), env);
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- return NULL;
+ xml_schema_any_attribute_free(&(any_attr_impl->any_attr),
+ env);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
}
any_attr_impl->ht_super = axis2_hash_make(env);
- if(!any_attr_impl->methods)
+ if(!any_attr_impl->ht_super)
{
xml_schema_any_attribute_free(&(any_attr_impl->any_attr), env);
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- axis2_hash_set(any_attr_impl->ht_super, "XML_SCHEMA_ANY_ATTRIBUTE",
- AXIS2_HASH_KEY_STRING, &(any_attr_impl->any_attr));
+ axis2_hash_set(any_attr_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_ANY_ATTRIBUTE", env),
+ AXIS2_HASH_KEY_STRING, &(any_attr_impl->any_attr));
- axis2_hash_set(any_attr_impl->ht_super, "XML_SCHEMA_ANNOTATED",
- AXIS2_HASH_KEY_STRING, any_attr_impl->annotated);
-
- axis2_hash_set(any_attr_impl->ht_super, "XML_SCHEMA_OBJ",
- AXIS2_HASH_KEY_STRING,
- XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(any_attr_impl->annotated, env));
+ axis2_hash_set(any_attr_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_ANNOTATED", env),
+ AXIS2_HASH_KEY_STRING, any_attr_impl->annotated);
+
+ axis2_hash_set(any_attr_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_OBJ", env),
+ AXIS2_HASH_KEY_STRING,
+ XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(any_attr_impl->annotated, env));
xml_schema_annotated_resolve_methods(
&(any_attr_impl->any_attr.base), env, any_attr_impl->annotated,
- any_attr_impl->methods);
+ xml_schema_any_attribute_super_objs,
+ xml_schema_any_attribute_get_type,
+ xml_schema_any_attribute_free);
return &(any_attr_impl->any_attr);
}
@@ -221,12 +202,6 @@
any_attr_impl->process_content = NULL;
}
- if(NULL != any_attr_impl->methods)
- {
- axis2_hash_free(any_attr_impl->methods, env);
- any_attr_impl->methods = NULL;
- }
-
if(NULL != any_attr_impl->annotated)
{
XML_SCHEMA_ANNOTATED_FREE(any_attr_impl->annotated, env);
Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_app_info.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_app_info.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_app_info.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_app_info.c Mon Aug 7 22:57:49 2006
@@ -17,12 +17,13 @@
#include <xml_schema_app_info.h>
#include <xml_schema_use.h>
#include <axis2_utils.h>
+#include <xml_schema_constants.h>
typedef struct xml_schema_app_info_impl
xml_schema_app_info_impl_t;
/**
- * @brief Other Extension Struct Impl
+ * @brief xml_schema_app_info impl struct
* Axis2 Other Extension
*/
struct xml_schema_app_info_impl
@@ -35,8 +36,6 @@
axis2_hash_t *ht_super;
- axis2_hash_t *methods;
-
axis2_char_t *source;
void *markup; /* TODO Replace (void *) with node list */
@@ -104,7 +103,6 @@
app_info_impl->app_info.ops = NULL;
app_info_impl->obj_type = XML_SCHEMA_APP_INFO;
app_info_impl->ht_super = NULL;
- app_info_impl->methods = NULL;
app_info_impl->source = NULL;
app_info_impl->markup = NULL;
@@ -141,34 +139,6 @@
app_info_impl->app_info.ops->set_markup =
xml_schema_app_info_set_markup;
- app_info_impl->methods = axis2_hash_make(env);
- if(!app_info_impl->methods)
- {
- xml_schema_app_info_free(&(app_info_impl->app_info), env);
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- return NULL;
- }
- axis2_hash_set(app_info_impl->methods, "free",
- AXIS2_HASH_KEY_STRING, xml_schema_app_info_free);
-
- axis2_hash_set(app_info_impl->methods, "super_objs",
- AXIS2_HASH_KEY_STRING, xml_schema_app_info_super_objs);
-
- axis2_hash_set(app_info_impl->methods, "get_type",
- AXIS2_HASH_KEY_STRING, xml_schema_app_info_get_type);
-
- axis2_hash_set(app_info_impl->methods, "get_source",
- AXIS2_HASH_KEY_STRING, xml_schema_app_info_get_source);
-
- axis2_hash_set(app_info_impl->methods, "set_source",
- AXIS2_HASH_KEY_STRING, xml_schema_app_info_set_source);
-
- axis2_hash_set(app_info_impl->methods, "get_markup",
- AXIS2_HASH_KEY_STRING, xml_schema_app_info_get_markup);
-
- axis2_hash_set(app_info_impl->methods, "set_markup",
- AXIS2_HASH_KEY_STRING, xml_schema_app_info_set_markup);
-
app_info_impl->schema_obj = xml_schema_obj_create(env);
if(!app_info_impl->schema_obj)
{
@@ -184,14 +154,20 @@
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- axis2_hash_set(app_info_impl->ht_super, "XML_SCHEMA_APP_INFO",
- AXIS2_HASH_KEY_STRING, &(app_info_impl->app_info));
+ axis2_hash_set(app_info_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_APP_INFO", env),
+ AXIS2_HASH_KEY_STRING, &(app_info_impl->app_info));
- axis2_hash_set(app_info_impl->ht_super, "XML_SCHEMA_OBJ",
- AXIS2_HASH_KEY_STRING, app_info_impl->schema_obj);
+ axis2_hash_set(app_info_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_OBJ", env),
+ AXIS2_HASH_KEY_STRING, app_info_impl->schema_obj);
status = xml_schema_obj_resolve_methods(&(app_info_impl->app_info.base),
- env, app_info_impl->schema_obj, app_info_impl->methods);
+ env, app_info_impl->schema_obj,
+ xml_schema_app_info_super_objs,
+ xml_schema_app_info_get_type,
+ xml_schema_app_info_free);
+
return &(app_info_impl->app_info);
}
@@ -218,12 +194,6 @@
app_info_impl->ht_super = NULL;
}
- if(NULL != app_info_impl->methods)
- {
- axis2_hash_free(app_info_impl->methods, env);
- app_info_impl->methods = NULL;
- }
-
if(NULL != app_info_impl->schema_obj)
{
XML_SCHEMA_OBJ_FREE(app_info_impl->schema_obj, env);
Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_attribute.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_attribute.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_attribute.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_attribute.c Mon Aug 7 22:57:49 2006
@@ -50,8 +50,6 @@
axis2_qname_t *ref_name;
- axis2_hash_t *methods;
-
xml_schema_types_t obj_type;
axis2_hash_t* ht_super;
@@ -189,7 +187,6 @@
attr_impl->attr.base.ops = NULL;
attr_impl->attr.ops = NULL;
attr_impl->annotated = NULL;
- attr_impl->methods = NULL;
attr_impl->ht_super = NULL;
attr_impl->attribute_type = NULL;
attr_impl->default_value = NULL;
@@ -268,41 +265,39 @@
attr_impl->attr.ops->to_string =
xml_schema_attribute_to_string;
- attr_impl->methods = axis2_hash_make(env);
attr_impl->ht_super = axis2_hash_make(env);
- if(!attr_impl->methods || !attr_impl->ht_super)
+ if(!attr_impl->ht_super)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- axis2_hash_set(attr_impl->methods, "free", AXIS2_HASH_KEY_STRING,
- xml_schema_attribute_free);
- axis2_hash_set(attr_impl->methods, "get_type", AXIS2_HASH_KEY_STRING,
- xml_schema_attribute_get_type);
- axis2_hash_set(attr_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING,
- xml_schema_attribute_super_objs);
attr_impl->annotated = xml_schema_annotated_create(env);
- if(!attr_impl->methods)
+ if(!attr_impl->annotated)
{
xml_schema_attribute_free(&(attr_impl->attr), env);
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- axis2_hash_set(attr_impl->ht_super, "XML_SCHEMA_ATTRIBUTE",
- AXIS2_HASH_KEY_STRING, &(attr_impl->attr));
+ axis2_hash_set(attr_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_ATTRIBUTE", env),
+ AXIS2_HASH_KEY_STRING, &(attr_impl->attr));
- axis2_hash_set(attr_impl->ht_super, "XML_SCHEMA_ANNOTATED",
- AXIS2_HASH_KEY_STRING, attr_impl->annotated);
-
- axis2_hash_set(attr_impl->ht_super, "XML_SCHEMA_OBJ",
- AXIS2_HASH_KEY_STRING,
- XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(attr_impl->annotated, env));
+ axis2_hash_set(attr_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_ANNOTATED", env),
+ AXIS2_HASH_KEY_STRING, attr_impl->annotated);
+
+ axis2_hash_set(attr_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_OBJ", env),
+ AXIS2_HASH_KEY_STRING,
+ XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(attr_impl->annotated, env));
status = xml_schema_annotated_resolve_methods(
&(attr_impl->attr.base), env, attr_impl->annotated,
- attr_impl->methods);
+ xml_schema_attribute_super_objs,
+ xml_schema_attribute_get_type,
+ xml_schema_attribute_free);
return &(attr_impl->attr);
}
@@ -351,12 +346,6 @@
attr_impl->use = NULL;
}
- if(NULL != attr_impl->methods)
- {
- axis2_hash_free(attr_impl->methods, env);
- attr_impl->methods = NULL;
- }
-
if(NULL != attr_impl->annotated)
{
XML_SCHEMA_ANNOTATED_FREE(attr_impl->annotated, env);
Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_attribute_group.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_attribute_group.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_attribute_group.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_attribute_group.c Mon Aug 7 22:57:49 2006
@@ -34,9 +34,7 @@
xml_schema_any_attribute_t *any_attribute;
axis2_char_t *name;
-
- axis2_hash_t *methods;
-
+
xml_schema_types_t obj_type;
axis2_hash_t* ht_super;
@@ -111,7 +109,6 @@
attr_impl->attr_grp.base.ops = NULL;
attr_impl->attr_grp.ops = NULL;
attr_impl->annotated = NULL;
- attr_impl->methods = NULL;
attr_impl->ht_super = NULL;
attr_impl->any_attribute = NULL;
attr_impl->name = NULL;
@@ -150,41 +147,39 @@
attr_impl->attr_grp.ops->set_name =
xml_schema_attribute_group_set_name;
- attr_impl->methods = axis2_hash_make(env);
attr_impl->ht_super = axis2_hash_make(env);
- if(!attr_impl->methods || !attr_impl->ht_super)
+ if(!attr_impl->ht_super)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- axis2_hash_set(attr_impl->methods, "free", AXIS2_HASH_KEY_STRING,
- xml_schema_attribute_group_free);
- axis2_hash_set(attr_impl->methods, "get_type", AXIS2_HASH_KEY_STRING,
- xml_schema_attribute_group_get_type);
- axis2_hash_set(attr_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING,
- xml_schema_attribute_group_super_objs);
attr_impl->annotated = xml_schema_annotated_create(env);
- if(!attr_impl->methods)
+ if(!attr_impl->annotated)
{
xml_schema_attribute_group_free(&(attr_impl->attr_grp), env);
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- axis2_hash_set(attr_impl->ht_super, "XML_SCHEMA_ATTRIBUTE",
- AXIS2_HASH_KEY_STRING, &(attr_impl->attr_grp));
+ axis2_hash_set(attr_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_ATTRIBUTE", env),
+ AXIS2_HASH_KEY_STRING, &(attr_impl->attr_grp));
- axis2_hash_set(attr_impl->ht_super, "XML_SCHEMA_ANNOTATED",
- AXIS2_HASH_KEY_STRING, attr_impl->annotated);
-
- axis2_hash_set(attr_impl->ht_super, "XML_SCHEMA_OBJ",
- AXIS2_HASH_KEY_STRING,
- XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(attr_impl->annotated, env));
+ axis2_hash_set(attr_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_ANNOTATED", env),
+ AXIS2_HASH_KEY_STRING, attr_impl->annotated);
+
+ axis2_hash_set(attr_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_OBJ", env),
+ AXIS2_HASH_KEY_STRING,
+ XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(attr_impl->annotated, env));
status = xml_schema_annotated_resolve_methods(
&(attr_impl->attr_grp.base), env, attr_impl->annotated,
- attr_impl->methods);
+ xml_schema_attribute_group_super_objs,
+ xml_schema_attribute_group_get_type,
+ xml_schema_attribute_group_free);
return &(attr_impl->attr_grp);
}
@@ -219,12 +214,6 @@
attr_impl->name = NULL;
}
- if(NULL != attr_impl->methods)
- {
- axis2_hash_free(attr_impl->methods, env);
- attr_impl->methods = NULL;
- }
-
if(NULL != attr_impl->annotated)
{
XML_SCHEMA_ANNOTATED_FREE(attr_impl->annotated, env);
Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_attribute_group_ref.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_attribute_group_ref.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_attribute_group_ref.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_attribute_group_ref.c Mon Aug 7 22:57:49 2006
@@ -33,8 +33,6 @@
axis2_qname_t *ref_qname;
- axis2_hash_t *methods;
-
xml_schema_types_t obj_type;
axis2_hash_t* ht_super;
@@ -92,7 +90,6 @@
attr_impl->grp_ref.base.ops = NULL;
attr_impl->grp_ref.ops = NULL;
attr_impl->annotated = NULL;
- attr_impl->methods = NULL;
attr_impl->ht_super = NULL;
attr_impl->ref_qname = NULL;
attr_impl->obj_type = XML_SCHEMA_ATTRIBUTE_GROUP_REF;
@@ -122,41 +119,39 @@
attr_impl->grp_ref.ops->set_ref_qname =
xml_schema_attribute_group_ref_set_ref_qname;
- attr_impl->methods = axis2_hash_make(env);
attr_impl->ht_super = axis2_hash_make(env);
- if(!attr_impl->methods || !attr_impl->ht_super)
+ if(!attr_impl->ht_super)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- axis2_hash_set(attr_impl->methods, "free", AXIS2_HASH_KEY_STRING,
- xml_schema_attribute_group_ref_free);
- axis2_hash_set(attr_impl->methods, "get_type", AXIS2_HASH_KEY_STRING,
- xml_schema_attribute_group_ref_get_type);
- axis2_hash_set(attr_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING,
- xml_schema_attribute_group_ref_super_objs);
attr_impl->annotated = xml_schema_annotated_create(env);
- if(!attr_impl->methods)
+ if(!attr_impl->annotated)
{
xml_schema_attribute_group_ref_free(&(attr_impl->grp_ref), env);
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- axis2_hash_set(attr_impl->ht_super, "XML_SCHEMA_ATTRIBUTE",
- AXIS2_HASH_KEY_STRING, &(attr_impl->grp_ref));
+ axis2_hash_set(attr_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_ATTRIBUTE", env),
+ AXIS2_HASH_KEY_STRING, &(attr_impl->grp_ref));
- axis2_hash_set(attr_impl->ht_super, "XML_SCHEMA_ANNOTATED",
- AXIS2_HASH_KEY_STRING, attr_impl->annotated);
-
- axis2_hash_set(attr_impl->ht_super, "XML_SCHEMA_OBJ",
- AXIS2_HASH_KEY_STRING,
- XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(attr_impl->annotated, env));
+ axis2_hash_set(attr_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_ANNOTATED", env),
+ AXIS2_HASH_KEY_STRING, attr_impl->annotated);
+
+ axis2_hash_set(attr_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_OBJ", env),
+ AXIS2_HASH_KEY_STRING,
+ XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(attr_impl->annotated, env));
status = xml_schema_annotated_resolve_methods(
&(attr_impl->grp_ref.base), env, attr_impl->annotated,
- attr_impl->methods);
+ xml_schema_attribute_group_ref_super_objs,
+ xml_schema_attribute_group_ref_get_type,
+ xml_schema_attribute_group_ref_free);
return &(attr_impl->grp_ref);
}
@@ -180,12 +175,7 @@
AXIS2_QNAME_FREE(attr_impl->ref_qname, env);
attr_impl->ref_qname = NULL;
}
- if(NULL != attr_impl->methods)
- {
- axis2_hash_free(attr_impl->methods, env);
- attr_impl->methods = NULL;
- }
-
+
if(NULL != attr_impl->annotated)
{
XML_SCHEMA_ANNOTATED_FREE(attr_impl->annotated, env);
Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_builder.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_builder.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_builder.c Mon Aug 7 22:57:49 2006
@@ -448,11 +448,12 @@
xml_schema_builder_impl_t *builder_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
builder_impl = AXIS2_INTF_TO_IMPL(builder);
- if(NULL != builder_impl->collection)
+ if(NULL != builder_impl->schema)
{
- XML_SCHEMA_COLLECTION_FREE(builder_impl->collection, env);
+ XML_SCHEMA_FREE(builder_impl->schema, env);
+ builder_impl->schema = NULL;
}
-
+
if(NULL != builder_impl->builder.ops)
{
AXIS2_FREE(env->allocator, builder_impl->builder.ops);
Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_collection.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_collection.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_collection.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_collection.c Mon Aug 7 22:57:49 2006
@@ -279,7 +279,7 @@
collection_impl->systemid2_schemas = axis2_hash_make(env);
collection_impl->schemas = axis2_array_list_create(env, 10);
collection_impl->unresolved_types = axis2_hash_make(env);
- collection_impl->builder_list = axis2_array_list_create(env, 2);
+ collection_impl->builder_list = axis2_array_list_create(env, 10);
if(!collection_impl->namespaces || !collection_impl->in_scope_namespaces ||
!collection_impl->systemid2_schemas || !collection_impl->schemas ||
@@ -311,8 +311,11 @@
{
xml_schema_builder_t *builder = NULL;
builder = AXIS2_ARRAY_LIST_GET(collec_impl->builder_list, env, i);
- XML_SCHEMA_BUILDER_FREE(builder, env);
- builder = NULL;
+ if(NULL != builder)
+ {
+ XML_SCHEMA_BUILDER_FREE(builder, env);
+ builder = NULL;
+ }
}
AXIS2_ARRAY_LIST_FREE(collec_impl->builder_list, env);
collec_impl->builder_list = NULL;
@@ -481,8 +484,11 @@
axiom_document_t* document)
{
xml_schema_builder_t *sch_builder = NULL;
+ xml_schema_collection_impl_t *collec_impl = NULL;
AXIS2_PARAM_CHECK(env->error , document, NULL);
+ collec_impl = AXIS2_INTF_TO_IMPL(collection);
sch_builder = xml_schema_builder_create(env, collection);
+ AXIS2_ARRAY_LIST_ADD(collec_impl->builder_list, env, sch_builder);
return XML_SCHEMA_BUILDER_BUILD(sch_builder, env, document, NULL);
}
@@ -493,13 +499,15 @@
axiom_node_t *node)
{
xml_schema_builder_t *sch_builder = NULL;
-
+ xml_schema_collection_impl_t *collec_impl = NULL;
AXIS2_PARAM_CHECK(env->error, node, NULL);
sch_builder = xml_schema_builder_create(env, collection);
if(!sch_builder)
return NULL;
+ collec_impl = AXIS2_INTF_TO_IMPL(collection);
+ AXIS2_ARRAY_LIST_ADD(collec_impl->builder_list, env, sch_builder);
return XML_SCHEMA_BUILDER_BUILD_WITH_ROOT_NODE(sch_builder, env, node, NULL);
}
@@ -511,9 +519,12 @@
axis2_char_t *uri)
{
xml_schema_builder_t *sch_builder = NULL;
+ xml_schema_collection_impl_t *sch_collec_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error , document, NULL);
+ sch_collec_impl = AXIS2_INTF_TO_IMPL(collection);
sch_builder = xml_schema_builder_create(env, collection);
+ AXIS2_ARRAY_LIST_ADD(sch_collec_impl->builder_list, env, sch_builder);
return XML_SCHEMA_BUILDER_BUILD(sch_builder, env, document, uri);
}
Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_content.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_content.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_content.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_content.c Mon Aug 7 22:57:49 2006
@@ -187,7 +187,9 @@
status = xml_schema_annotated_resolve_methods(
&(complex_content_impl->complex_content.base),
env, complex_content_impl->annotated,
- complex_content_impl->methods);
+ xml_schema_complex_content_super_objs,
+ xml_schema_complex_content_get_type,
+ xml_schema_complex_content_free);
return &(complex_content_impl->complex_content);
}
Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_content_extension.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_content_extension.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_content_extension.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_content_extension.c Mon Aug 7 22:57:49 2006
@@ -38,8 +38,6 @@
xml_schema_particle_t *particle;
- axis2_hash_t *methods;
-
axis2_hash_t *ht_super;
xml_schema_types_t obj_type;
@@ -137,7 +135,6 @@
cmp_cnt_ext_impl->any_attribute = NULL;
cmp_cnt_ext_impl->particle = NULL;
cmp_cnt_ext_impl->ht_super = NULL;
- cmp_cnt_ext_impl->methods = NULL;
cmp_cnt_ext_impl->obj_type = XML_SCHEMA_COMPLEX_CONTENT_RESTRICTION;
cmp_cnt_ext_impl->cmp_cnt_ext.ops = AXIS2_MALLOC(env->allocator,
@@ -177,40 +174,14 @@
cmp_cnt_ext_impl->cmp_cnt_ext.ops->to_string =
xml_schema_complex_content_extension_to_string;
- cmp_cnt_ext_impl->methods = axis2_hash_make(env);
cmp_cnt_ext_impl->ht_super = axis2_hash_make(env);
- if(!cmp_cnt_ext_impl->ht_super || !cmp_cnt_ext_impl->methods)
+ if(!cmp_cnt_ext_impl->ht_super)
{
xml_schema_complex_content_extension_free(
&(cmp_cnt_ext_impl->cmp_cnt_ext), env);
return NULL;
}
- axis2_hash_set(cmp_cnt_ext_impl->methods,"free", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_extension_free);
-
- axis2_hash_set(cmp_cnt_ext_impl->methods,"get_type", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_extension_get_type);
-
- axis2_hash_set(cmp_cnt_ext_impl->methods,"super_objs", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_extension_super_objs);
-
- axis2_hash_set(cmp_cnt_ext_impl->methods,"get_any_attribute", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_extension_get_any_attribute);
- axis2_hash_set(cmp_cnt_ext_impl->methods,"set_any_attribute", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_extension_set_any_attribute);
- axis2_hash_set(cmp_cnt_ext_impl->methods,"get_attributes", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_extension_get_attributes);
- axis2_hash_set(cmp_cnt_ext_impl->methods,"get_base_type_name", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_extension_get_base_type_name);
- axis2_hash_set(cmp_cnt_ext_impl->methods,"set_base_type_name", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_extension_set_base_type_name);
- axis2_hash_set(cmp_cnt_ext_impl->methods,"get_particle", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_extension_get_particle);
- axis2_hash_set(cmp_cnt_ext_impl->methods,"set_particle", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_extension_set_particle);
- axis2_hash_set(cmp_cnt_ext_impl->methods,"free", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_extension_to_string);
cmp_cnt_ext_impl->annotated = xml_schema_annotated_create(env);
@@ -226,16 +197,19 @@
xml_schema_complex_content_extension_free(&(cmp_cnt_ext_impl->cmp_cnt_ext), env);
return NULL;
}
- axis2_hash_set(cmp_cnt_ext_impl->methods,"XML_SCHEMA_COMPLEX_CONTENT_EXTENSION",
+ axis2_hash_set(cmp_cnt_ext_impl->ht_super, AXIS2_STRDUP("XML_SCHEMA_COMPLEX_CONTENT_EXTENSION", env),
AXIS2_HASH_KEY_STRING, &(cmp_cnt_ext_impl->cmp_cnt_ext));
- axis2_hash_set(cmp_cnt_ext_impl->methods,"XML_SCHEMA_ANNOTATED",
+ axis2_hash_set(cmp_cnt_ext_impl->ht_super,AXIS2_STRDUP("XML_SCHEMA_ANNOTATED", env),
AXIS2_HASH_KEY_STRING, cmp_cnt_ext_impl->annotated);
- axis2_hash_set(cmp_cnt_ext_impl->methods,"XML_SCHEMA_OBJ",
+ axis2_hash_set(cmp_cnt_ext_impl->ht_super,AXIS2_STRDUP("XML_SCHEMA_OBJ", env),
AXIS2_HASH_KEY_STRING,
XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(cmp_cnt_ext_impl->annotated, env));
xml_schema_annotated_resolve_methods(&(cmp_cnt_ext_impl->cmp_cnt_ext.base), env,
- cmp_cnt_ext_impl->annotated, cmp_cnt_ext_impl->methods);
+ cmp_cnt_ext_impl->annotated,
+ xml_schema_complex_content_extension_super_objs,
+ xml_schema_complex_content_extension_get_type,
+ xml_schema_complex_content_extension_free);
return &(cmp_cnt_ext_impl->cmp_cnt_ext);
}
Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_content_restriction.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_content_restriction.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_content_restriction.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_content_restriction.c Mon Aug 7 22:57:49 2006
@@ -38,8 +38,6 @@
xml_schema_particle_t *particle;
- axis2_hash_t *methods;
-
axis2_hash_t *ht_super;
xml_schema_types_t obj_type;
@@ -137,7 +135,6 @@
cmp_content_res_impl->base_type_name = NULL;
cmp_content_res_impl->any_attribute = NULL;
cmp_content_res_impl->particle = NULL;
- cmp_content_res_impl->methods = NULL;
cmp_content_res_impl->ht_super = NULL;
cmp_content_res_impl->obj_type = XML_SCHEMA_COMPLEX_CONTENT_RESTRICTION;
@@ -190,49 +187,14 @@
cmp_content_res_impl->cmp_content_res.ops->to_string =
xml_schema_complex_content_restriction_to_string;
-
- cmp_content_res_impl->methods = axis2_hash_make(env);
cmp_content_res_impl->ht_super = axis2_hash_make(env);
- if(!cmp_content_res_impl->methods || !cmp_content_res_impl->ht_super)
+ if(!cmp_content_res_impl->ht_super)
{
xml_schema_complex_content_restriction_free(
&(cmp_content_res_impl->cmp_content_res), env);
return NULL;
}
- axis2_hash_set(cmp_content_res_impl->methods,"free", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_restriction_free);
-
- axis2_hash_set(cmp_content_res_impl->methods,"get_type", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_restriction_get_type);
-
- axis2_hash_set(cmp_content_res_impl->methods,"super_objs", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_restriction_super_objs);
-
- axis2_hash_set(cmp_content_res_impl->methods,"get_any_attribute", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_restriction_get_any_attribute);
-
- axis2_hash_set(cmp_content_res_impl->methods,"set_any_attribute", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_restriction_set_any_attribute);
-
- axis2_hash_set(cmp_content_res_impl->methods,"get_attributes", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_restriction_get_attributes);
-
- axis2_hash_set(cmp_content_res_impl->methods,"get_base_type_name", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_restriction_get_base_type_name);
-
- axis2_hash_set(cmp_content_res_impl->methods,"set_base_type_name", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_restriction_set_base_type_name);
-
- axis2_hash_set(cmp_content_res_impl->methods,"get_particle", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_restriction_get_particle);
-
- axis2_hash_set(cmp_content_res_impl->methods,"set_particle", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_restriction_set_particle);
-
- axis2_hash_set(cmp_content_res_impl->methods,"to_string", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_content_restriction_to_string);
-
cmp_content_res_impl->annotated = xml_schema_annotated_create(env);
if(!cmp_content_res_impl->annotated)
{
@@ -248,15 +210,19 @@
return NULL;
}
- axis2_hash_set(cmp_content_res_impl->methods,"XML_SCHEMA_COMPLEX_CONTENT_RESTRICTION",
+ axis2_hash_set(cmp_content_res_impl->ht_super,
+ AXIS2_STRDUP("XML_SCHEMA_COMPLEX_CONTENT_RESTRICTION", env),
AXIS2_HASH_KEY_STRING, &(cmp_content_res_impl->cmp_content_res));
- axis2_hash_set(cmp_content_res_impl->methods,"XML_SCHEMA_ANNOTATED",
+ axis2_hash_set(cmp_content_res_impl->ht_super, AXIS2_STRDUP("XML_SCHEMA_ANNOTATED", env),
AXIS2_HASH_KEY_STRING, cmp_content_res_impl->annotated);
- axis2_hash_set(cmp_content_res_impl->methods,"XML_SCHEMA_OBJ",
+ axis2_hash_set(cmp_content_res_impl->ht_super, AXIS2_STRDUP("XML_SCHEMA_OBJ", env),
AXIS2_HASH_KEY_STRING,
XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(cmp_content_res_impl->annotated, env));
xml_schema_annotated_resolve_methods(&(cmp_content_res_impl->cmp_content_res.base),
- env, cmp_content_res_impl->annotated, cmp_content_res_impl->methods);
+ env, cmp_content_res_impl->annotated,
+ xml_schema_complex_content_restriction_super_objs,
+ xml_schema_complex_content_restriction_get_type,
+ xml_schema_complex_content_restriction_free);
return &(cmp_content_res_impl->cmp_content_res);
}
Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_type.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_type.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_type.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_complex_type.c Mon Aug 7 22:57:49 2006
@@ -57,8 +57,6 @@
axis2_hash_t *ht_super;
- axis2_hash_t *methods;
-
};
#define AXIS2_INTF_TO_IMPL(complex_type) \
@@ -231,7 +229,6 @@
complex_type_impl->is_abstract = AXIS2_FALSE;
complex_type_impl->ht_super = NULL;
complex_type_impl->obj_type = XML_SCHEMA_COMPLEX_TYPE;
- complex_type_impl->methods = NULL;
complex_type_impl->complex_type.ops = AXIS2_MALLOC(env->allocator,
sizeof(xml_schema_complex_type_ops_t));
@@ -315,61 +312,14 @@
complex_type_impl->complex_type.ops->to_string =
xml_schema_complex_type_to_string;
- complex_type_impl->methods = axis2_hash_make(env);
complex_type_impl->ht_super = axis2_hash_make(env);
- if(!complex_type_impl->methods || !complex_type_impl->ht_super)
+ if(!complex_type_impl->ht_super)
{
xml_schema_complex_type_free(&(complex_type_impl->complex_type), env);
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- axis2_hash_set(complex_type_impl->methods, "free", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_free);
- axis2_hash_set(complex_type_impl->methods, "get_type", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_get_type);
- axis2_hash_set(complex_type_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_super_objs);
- axis2_hash_set(complex_type_impl->methods, "get_any_attribute", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_get_any_attribute);
- axis2_hash_set(complex_type_impl->methods, "set_any_attribute", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_set_any_attribute);
- axis2_hash_set(complex_type_impl->methods, "get_attributes", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_get_attributes);
- axis2_hash_set(complex_type_impl->methods, "get_attribute_use", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_get_attribute_use);
- axis2_hash_set(complex_type_impl->methods, "get_attribute_wildcare", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_get_attribute_wildcard);
- axis2_hash_set(complex_type_impl->methods, "get_block", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_get_block);
- axis2_hash_set(complex_type_impl->methods, "set_block", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_set_block);
- axis2_hash_set(complex_type_impl->methods, "get_block_resolved", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_get_block_resolved);
- axis2_hash_set(complex_type_impl->methods, "get_content_model", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_get_content_model);
- axis2_hash_set(complex_type_impl->methods, "set_content_model", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_set_content_model);
- axis2_hash_set(complex_type_impl->methods, "get_content_type", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_get_content_type);
- axis2_hash_set(complex_type_impl->methods, "set_content_type", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_set_content_type);
- axis2_hash_set(complex_type_impl->methods, "get_content_type_particle",
- AXIS2_HASH_KEY_STRING, xml_schema_complex_type_get_content_type_particle);
- axis2_hash_set(complex_type_impl->methods, "is_abstract", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_is_abstract);
- axis2_hash_set(complex_type_impl->methods, "set_abstract", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_set_abstract);
- axis2_hash_set(complex_type_impl->methods, "is_mixed", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_is_mixed);
- axis2_hash_set(complex_type_impl->methods, "set_mixed", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_set_mixed);
- axis2_hash_set(complex_type_impl->methods, "get_particle", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_get_particle);
- axis2_hash_set(complex_type_impl->methods, "set_particle", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_set_particle);
- axis2_hash_set(complex_type_impl->methods, "to_string", AXIS2_HASH_KEY_STRING,
- xml_schema_complex_type_to_string);
axis2_hash_set(complex_type_impl->ht_super, "XML_SCHEMA_COMPLEX_TYPE",
AXIS2_HASH_KEY_STRING, &(complex_type_impl->complex_type));
@@ -391,7 +341,10 @@
AXIS2_HASH_KEY_STRING, &(complex_type_impl->complex_type));
xml_schema_type_resolve_methods(&(complex_type_impl->complex_type.base), env,
- complex_type_impl->schema_type, complex_type_impl->methods);
+ complex_type_impl->schema_type,
+ xml_schema_complex_type_super_objs,
+ xml_schema_complex_type_get_type,
+ xml_schema_complex_type_free);
return &(complex_type_impl->complex_type);
}
Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_content_processing.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_content_processing.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_content_processing.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_content_processing.c Mon Aug 7 22:57:49 2006
@@ -35,8 +35,6 @@
axis2_hash_t *ht_super;
- axis2_hash_t *methods;
-
axis2_array_list_t *members;
};
@@ -86,7 +84,6 @@
content_processing_impl->content_processing.base.ops = NULL;
content_processing_impl->obj_type = XML_SCHEMA_CONTENT_PROCESSING;
content_processing_impl->ht_super = NULL;
- content_processing_impl->methods = NULL;
content_processing_impl->members = NULL;
content_processing_impl->content_processing.ops = NULL;
@@ -130,25 +127,6 @@
AXIS2_ARRAY_LIST_ADD(content_processing_impl->members, env,
AXIS2_STRDUP(XML_SCHEMA_CONST_STRICT, env));
- content_processing_impl->methods = axis2_hash_make(env);
- if(!content_processing_impl->methods)
- {
- xml_schema_content_processing_free(
- &(content_processing_impl->content_processing), env);
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- return NULL;
- }
-
- axis2_hash_set(content_processing_impl->methods, "free",
- AXIS2_HASH_KEY_STRING, xml_schema_content_processing_free);
- axis2_hash_set(content_processing_impl->methods, "super_objs",
- AXIS2_HASH_KEY_STRING, xml_schema_content_processing_super_objs);
- axis2_hash_set(content_processing_impl->methods, "get_type",
- AXIS2_HASH_KEY_STRING, xml_schema_content_processing_get_type);
-
- axis2_hash_set(content_processing_impl->methods, "get_values",
- AXIS2_HASH_KEY_STRING, xml_schema_content_processing_get_values);
-
content_processing_impl->schema_enum = xml_schema_enum_create(env, value);
content_processing_impl->ht_super = axis2_hash_make(env);
@@ -160,16 +138,18 @@
return NULL;
}
- axis2_hash_set(content_processing_impl->ht_super, "XML_SCHEMA_CONTENT_PROCESSING",
+ axis2_hash_set(content_processing_impl->ht_super, AXIS2_STRDUP("XML_SCHEMA_CONTENT_PROCESSING", env),
AXIS2_HASH_KEY_STRING, &(content_processing_impl->content_processing));
- axis2_hash_set(content_processing_impl->ht_super, "XML_SCHEMA_ENUM",
+ axis2_hash_set(content_processing_impl->ht_super, AXIS2_STRDUP("XML_SCHEMA_ENUM", env),
AXIS2_HASH_KEY_STRING, content_processing_impl->schema_enum);
status = xml_schema_enum_resolve_methods(
&(content_processing_impl->content_processing.base), env,
content_processing_impl->schema_enum,
- content_processing_impl->methods);
+ xml_schema_content_processing_super_objs,
+ xml_schema_content_processing_get_type,
+ xml_schema_content_processing_free);
return &(content_processing_impl->content_processing);
}
@@ -208,12 +188,7 @@
axis2_hash_free(content_processing_impl->ht_super, env);
content_processing_impl->ht_super = NULL;
}
-
- if(NULL != content_processing_impl->methods)
- {
- axis2_hash_free(content_processing_impl->methods, env);
- content_processing_impl->methods = NULL;
- }
+
if(NULL != content_processing_impl->schema_enum)
{
Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_content_type.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_content_type.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_content_type.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_content_type.c Mon Aug 7 22:57:49 2006
@@ -32,8 +32,6 @@
xml_schema_enum_t *schema_enum;
- axis2_hash_t *methods;
-
xml_schema_types_t obj_type;
axis2_array_list_t *members;
@@ -83,7 +81,6 @@
}
content_type_impl->schema_enum = NULL;
- content_type_impl->methods = NULL;
content_type_impl->members = NULL;
content_type_impl->obj_type = XML_SCHEMA_CONTENT_TYPE;
content_type_impl->ht_super = NULL;
@@ -127,23 +124,6 @@
AXIS2_ARRAY_LIST_ADD(content_type_impl->members, env,
AXIS2_STRDUP(XML_SCHEMA_CONST_TEXT_ONLY, env));
- content_type_impl->methods = axis2_hash_make(env);
- if(!content_type_impl->methods)
- {
- xml_schema_content_type_free(&(content_type_impl->content_type), env);
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- return NULL;
- }
-
- axis2_hash_set(content_type_impl->methods, "free", AXIS2_HASH_KEY_STRING,
- xml_schema_content_type_free);
- axis2_hash_set(content_type_impl->methods, "get_values", AXIS2_HASH_KEY_STRING,
- xml_schema_content_type_get_values);
- axis2_hash_set(content_type_impl->methods, "get_type", AXIS2_HASH_KEY_STRING,
- xml_schema_content_type_get_type);
- axis2_hash_set(content_type_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING,
- xml_schema_content_type_super_objs);
-
content_type_impl->schema_enum = xml_schema_enum_create(env, value);
if(!content_type_impl->schema_enum)
{
@@ -159,14 +139,16 @@
return NULL;
}
- axis2_hash_set(content_type_impl->ht_super, "XML_SCHEMA_CONTENT_TYPE",
+ axis2_hash_set(content_type_impl->ht_super, AXIS2_STRDUP("XML_SCHEMA_CONTENT_TYPE", env),
AXIS2_HASH_KEY_STRING, &(content_type_impl->content_type));
- axis2_hash_set(content_type_impl->ht_super, "XML_SCHEMA_ENUM", AXIS2_HASH_KEY_STRING,
+ axis2_hash_set(content_type_impl->ht_super, AXIS2_STRDUP("XML_SCHEMA_ENUM", env), AXIS2_HASH_KEY_STRING,
content_type_impl->schema_enum);
status = xml_schema_enum_resolve_methods(
&(content_type_impl->content_type.base), env, content_type_impl->schema_enum,
- content_type_impl->methods);
+ xml_schema_content_type_super_objs,
+ xml_schema_content_type_get_type,
+ xml_schema_content_type_free);
return &(content_type_impl->content_type);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org