You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by na...@apache.org on 2006/05/05 12:34:17 UTC
svn commit: r400039 - in /webservices/axis2/trunk/c: include/
include/xml_schema/ modules/xml/om/ modules/xml/xml_schema/
Author: nandika
Date: Fri May 5 03:34:11 2006
New Revision: 400039
URL: http://svn.apache.org/viewcvs?rev=400039&view=rev
Log:
om_element.c set_namespace_with_no_find_in_current_scope function added to om_element
Modified:
webservices/axis2/trunk/c/include/axis2_om_element.h
webservices/axis2/trunk/c/include/xml_schema/axis2_xml_schema_complex_content_restriction.h
webservices/axis2/trunk/c/modules/xml/om/om_element.c
webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_complex_content_restriction.c
webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_content_restriction.c
Modified: webservices/axis2/trunk/c/include/axis2_om_element.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_element.h?rev=400039&r1=400038&r2=400039&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_element.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_element.h Fri May 5 03:34:11 2006
@@ -417,7 +417,20 @@
find_namespace_uri)(axis2_om_element_t *om_element,
axis2_env_t **env,
axis2_char_t *prefix,
- axis2_om_node_t *element_node);
+ axis2_om_node_t *element_node);
+ /**
+ *This will not search the namespace in the scope nor will
+ * declare in the current element, as in set_namespace. This will
+ * just assign the given namespace to the element.
+ * @param om_ns pointer to namespace to be set
+ * @returns
+ */
+ axis2_status_t (AXIS2_CALL *
+ set_namespace_with_no_find_in_current_scope)(
+ axis2_om_element_t *om_element,
+ axis2_env_t **env,
+ axis2_om_namespace_t *om_ns);
+
};
@@ -567,6 +580,10 @@
#define AXIS2_OM_ELEMENT_GET_ATTRIBUTE_VALUE(om_element, env, qname) \
((om_element)->ops->get_attribute_value(om_element, env, qname))
+
+#define AXIS2_OM_ELEMENT_SET_NAMESPACE_WITH_NO_FIND_IN_CURRENT_SCOPE(om_element, env, om_ns) \
+ ((om_element)->ops->set_namespace_with_no_find_in_current_scope(om_element, env, om_ns))
+
/** @} */
Modified: webservices/axis2/trunk/c/include/xml_schema/axis2_xml_schema_complex_content_restriction.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/xml_schema/axis2_xml_schema_complex_content_restriction.h?rev=400039&r1=400038&r2=400039&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/xml_schema/axis2_xml_schema_complex_content_restriction.h (original)
+++ webservices/axis2/trunk/c/include/xml_schema/axis2_xml_schema_complex_content_restriction.h Fri May 5 03:34:11 2006
@@ -33,8 +33,6 @@
* @{
*/
-
-
#ifdef __cplusplus
extern "C"
{
@@ -83,18 +81,20 @@
axis2_env_t **env,
axis2_qname_t *qname);
- axis2_xml_schema_simple_type_t* (AXIS2_CALL*
- get_base_type)(void *cmp_content_res,
- axis2_env_t **env);
-
+ axis2_xml_schema_particle_t* (AXIS2_CALL *
+ get_particle)(void *cmp_content_res,
+ axis2_env_t **env);
+
axis2_status_t (AXIS2_CALL *
- set_base_type)(void *cmp_content_res,
- axis2_env_t **env,
- axis2_xml_schema_simple_type_t *base_type);
-
- axis2_xml_schema_obj_collection_t* (AXIS2_CALL *
- get_facets)(void *cmp_content_res,
- axis2_env_t **env);
+ set_particle)(void *cmp_content_res,
+ axis2_env_t **env,
+ axis2_xml_schema_particle_t *particle);
+
+ axis2_char_t* (AXIS2_CALL *
+ to_string)(void *cmp_content_res,
+ axis2_env_t **env,
+ axis2_char_t *prefix,
+ int tab);
};
struct axis2_xml_schema_complex_content_restriction
@@ -139,19 +139,16 @@
(((axis2_xml_schema_complex_content_restriction_t *) cmp_content_res)->ops->\
set_base_type_name(cmp_content_res, env, base_type_name))
-#define AXIS2_XML_SCHEMA_COMPLEX_CONTENT_RESTRICTION_SET_BASE_TYPE(cmp_content_res, env, base_type) \
+#define AXIS2_XML_SCHEMA_COMPLEX_CONTENT_RESTRICTION_GET_PARTICLE(cmp_content_res, env) \
(((axis2_xml_schema_complex_content_restriction_t *) cmp_content_res)->ops->\
- set_base_type(cmp_content_res, env, base_type))
+ get_particle(cmp_content_res, env))
-#define AXIS2_XML_SCHEMA_COMPLEX_CONTENT_RESTRICTION_GET_BASE_TYPE(cmp_content_res, env)\
+#define AXIS2_XML_SCHEMA_COMPLEX_CONTENT_RESTRICTION_SET_PARTICLE(cmp_content_res, env) \
(((axis2_xml_schema_complex_content_restriction_t *) cmp_content_res)->ops->\
- get_base_type(cmp_content_res, env))
-
-#define AXIS2_XML_SCHEMA_COMPLEX_CONTENT_RESTRICTION_GET_FACETS(cmp_content_res, env)\
- (((axis2_xml_schema_complex_content_restriction_t *) cmp_content_res)->ops->\
- get_facets(cmp_content_res, env))
-
-
+ set_particle(cmp_content_res, env))
+
+#define AXIS2_XML_SCHEMA_COMPLEX_CONTENT_RESTRICTION_TO_STRING(cmp_content_res, env) \
+ (((
/** @} */
#ifdef __cplusplus
}
Modified: webservices/axis2/trunk/c/modules/xml/om/om_element.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/om_element.c?rev=400039&r1=400038&r2=400039&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_element.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_element.c Fri May 5 03:34:11 2006
@@ -191,7 +191,14 @@
axis2_om_element_find_namespace_uri(axis2_om_element_t *om_element,
axis2_env_t **env,
axis2_char_t *prefix,
- axis2_om_node_t *element_node);
+ axis2_om_node_t *element_node);
+
+axis2_status_t AXIS2_CALL
+axis2_om_element_set_namespace_with_no_find_in_current_scope(
+ axis2_om_element_t *om_element,
+ axis2_env_t **env,
+ axis2_om_namespace_t *om_ns);
+
/************************** end function prototypes **********************/
typedef struct axis2_om_element_impl
@@ -401,6 +408,9 @@
element->om_element.ops->build =
axis2_om_element_build;
+
+ element->om_element.ops->set_namespace_with_no_find_in_current_scope =
+ axis2_om_element_set_namespace_with_no_find_in_current_scope;
return &(element->om_element);
}
@@ -489,9 +499,10 @@
/** TODO uri should not be null but when null check added
other services fail, fix them and the fix this */
-
- /*AXIS2_PARAM_CHECK((*env)->error, uri, NULL); */
-
+ /*
+ if(NULL == uri)
+ return NULL;
+ */
if (!element_node || !om_element)
{
AXIS2_ERROR_SET((*env)->error,
@@ -1628,3 +1639,17 @@
}
return NULL;
}
+
+axis2_status_t AXIS2_CALL
+axis2_om_element_set_namespace_with_no_find_in_current_scope(
+ axis2_om_element_t *om_element,
+ axis2_env_t **env,
+ axis2_om_namespace_t *om_ns)
+{
+ axis2_om_element_impl_t *om_ele_impl = NULL;
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, om_ns, AXIS2_FAILURE);
+ om_ele_impl = AXIS2_INTF_TO_IMPL(om_element);
+ om_ele_impl->ns = om_ns;
+ return AXIS2_SUCCESS;
+}
\ No newline at end of file
Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_complex_content_restriction.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_complex_content_restriction.c?rev=400039&r1=400038&r2=400039&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_complex_content_restriction.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_complex_content_restriction.c Fri May 5 03:34:11 2006
@@ -14,18 +14,18 @@
* limitations under the License.
*/
-#include <axis2_xml_schema_simple_content_restriction.h>
+#include <axis2_xml_schema_complex_content_restriction.h>
-typedef struct axis2_xml_schema_simple_content_restriction_impl
- axis2_xml_schema_simple_content_restriction_impl_t;
+typedef struct axis2_xml_schema_complex_content_restriction_impl
+ axis2_xml_schema_complex_content_restriction_impl_t;
/**
* @brief Other Extension Struct Impl
* Axis2 Other Extension
*/
-struct axis2_xml_schema_simple_content_restriction_impl
+struct axis2_xml_schema_complex_content_restriction_impl
{
- axis2_xml_schema_simple_content_restriction_t sim_content_res;
+ axis2_xml_schema_complex_content_restriction_t cmp_content_res;
axis2_xml_schema_annotated_t *annotated;
@@ -33,188 +33,158 @@
axis2_xml_schema_obj_collection_t *attributes;
- axis2_xml_schema_obj_collection_t *facets;
-
axis2_xml_schema_any_attribute_t *any_attribute;
axis2_qname_t *base_type_name;
- axis2_xml_schema_simple_type_t *base_type;
};
-#define AXIS2_INTF_TO_IMPL(sim_content_res) \
- ((axis2_xml_schema_simple_content_restriction_impl_t *) sim_content_res)
+#define AXIS2_INTF_TO_IMPL(cmp_content_res) \
+ ((axis2_xml_schema_complex_content_restriction_impl_t *) cmp_content_res)
axis2_status_t AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_free(void *sim_content_res,
+axis2_xml_schema_complex_content_restriction_free(void *cmp_content_res,
axis2_env_t **env);
axis2_xml_schema_annotated_t *AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_get_base_impl(void *sim_content_res,
+axis2_xml_schema_complex_content_restriction_get_base_impl(void *cmp_content_res,
axis2_env_t **env);
axis2_xml_schema_any_attribute_t* AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_get_any_attribute(
- void *sim_content_res,
+axis2_xml_schema_complex_content_restriction_get_any_attribute(
+ void *cmp_content_res,
axis2_env_t **env);
axis2_status_t AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_set_any_attribute(void *sim_content_res,
+axis2_xml_schema_complex_content_restriction_set_any_attribute(void *cmp_content_res,
axis2_env_t **env,
axis2_xml_schema_any_attribute_t *any_attr);
axis2_xml_schema_obj_collection_t* AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_get_attributes(void *sim_content_res,
+axis2_xml_schema_complex_content_restriction_get_attributes(void *cmp_content_res,
axis2_env_t **env);
axis2_status_t AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_set_base_type_name(
- void *sim_content_res,
+axis2_xml_schema_complex_content_restriction_set_base_type_name(
+ void *cmp_content_res,
axis2_env_t **env,
axis2_qname_t *base_type_name);
axis2_qname_t* AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_get_base_type_name(
- void *sim_content_res,
+axis2_xml_schema_complex_content_restriction_get_base_type_name(
+ void *cmp_content_res,
axis2_env_t **env);
-axis2_status_t AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_set_base_type(void *sim_content_res,
- axis2_env_t **env,
- axis2_xml_schema_simple_type_t *base_type);
-
-axis2_xml_schema_simple_type_t* AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_get_base_type(void *sim_content_res,
- axis2_env_t **env);
-
-axis2_xml_schema_obj_collection_t* AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_get_facets(void *sim_content_res,
- axis2_env_t **env);
-
-
/*****************************************************************************/
-AXIS2_DECLARE(axis2_xml_schema_simple_content_restriction_t *)
-axis2_xml_schema_simple_content_restriction_create(axis2_env_t **env)
+AXIS2_DECLARE(axis2_xml_schema_complex_content_restriction_t *)
+axis2_xml_schema_complex_content_restriction_create(axis2_env_t **env)
{
- axis2_xml_schema_simple_content_restriction_impl_t *sim_content_res_impl = NULL;
+ axis2_xml_schema_complex_content_restriction_impl_t *cmp_content_res_impl = NULL;
axis2_status_t status = AXIS2_FAILURE;
- sim_content_res_impl = (axis2_xml_schema_simple_content_restriction_impl_t*)
- AXIS2_MALLOC((*env)->allocator, sizeof(axis2_xml_schema_simple_content_restriction_impl_t));
+ cmp_content_res_impl = (axis2_xml_schema_complex_content_restriction_impl_t*)
+ AXIS2_MALLOC((*env)->allocator, sizeof(axis2_xml_schema_complex_content_restriction_impl_t));
- if(!sim_content_res_impl)
+ if(!cmp_content_res_impl)
{
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- sim_content_res_impl->annotated = NULL;
- sim_content_res_impl->methods = NULL;
- sim_content_res_impl->sim_content_res.base.ops = NULL;
- sim_content_res_impl->sim_content_res.ops = NULL;
- sim_content_res_impl->attributes = NULL;
- sim_content_res_impl->base_type_name = NULL;
- sim_content_res_impl->any_attribute = NULL;
- sim_content_res_impl->facets = NULL;
- sim_content_res_impl->base_type = NULL;
-
- sim_content_res_impl->sim_content_res.ops = AXIS2_MALLOC((*env)->allocator,
- sizeof(axis2_xml_schema_simple_content_restriction_ops_t));
- if(!sim_content_res_impl->sim_content_res.ops)
+ cmp_content_res_impl->annotated = NULL;
+ cmp_content_res_impl->methods = NULL;
+ cmp_content_res_impl->cmp_content_res.base.ops = NULL;
+ cmp_content_res_impl->cmp_content_res.ops = NULL;
+ cmp_content_res_impl->attributes = NULL;
+ cmp_content_res_impl->base_type_name = NULL;
+ cmp_content_res_impl->any_attribute = NULL;
+
+ cmp_content_res_impl->cmp_content_res.ops = AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_xml_schema_complex_content_restriction_ops_t));
+ if(!cmp_content_res_impl->cmp_content_res.ops)
{
- axis2_xml_schema_simple_content_restriction_free(
- &(sim_content_res_impl->sim_content_res), env);
+ axis2_xml_schema_complex_content_restriction_free(
+ &(cmp_content_res_impl->cmp_content_res), env);
AXIS2_ERROR_SET((*env)->error,
AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- sim_content_res_impl->sim_content_res.ops->free =
- axis2_xml_schema_simple_content_restriction_free;
-
- sim_content_res_impl->sim_content_res.ops->get_base_impl =
- axis2_xml_schema_simple_content_restriction_get_base_impl;
+ cmp_content_res_impl->cmp_content_res.ops->free =
+ axis2_xml_schema_complex_content_restriction_free;
- sim_content_res_impl->sim_content_res.ops->get_any_attribute =
- axis2_xml_schema_simple_content_restriction_get_any_attribute;
+ cmp_content_res_impl->cmp_content_res.ops->get_base_impl =
+ axis2_xml_schema_complex_content_restriction_get_base_impl;
- sim_content_res_impl->sim_content_res.ops->set_any_attribute =
- axis2_xml_schema_simple_content_restriction_set_any_attribute;
+ cmp_content_res_impl->cmp_content_res.ops->get_any_attribute =
+ axis2_xml_schema_complex_content_restriction_get_any_attribute;
- sim_content_res_impl->sim_content_res.ops->get_attributes =
- axis2_xml_schema_simple_content_restriction_get_attributes;
+ cmp_content_res_impl->cmp_content_res.ops->set_any_attribute =
+ axis2_xml_schema_complex_content_restriction_set_any_attribute;
- sim_content_res_impl->sim_content_res.ops->get_base_type_name =
- axis2_xml_schema_simple_content_restriction_get_base_type_name;
+ cmp_content_res_impl->cmp_content_res.ops->get_attributes =
+ axis2_xml_schema_complex_content_restriction_get_attributes;
- sim_content_res_impl->sim_content_res.ops->set_base_type_name =
- axis2_xml_schema_simple_content_restriction_set_base_type_name;
+ cmp_content_res_impl->cmp_content_res.ops->get_base_type_name =
+ axis2_xml_schema_complex_content_restriction_get_base_type_name;
- sim_content_res_impl->sim_content_res.ops->set_base_type =
- axis2_xml_schema_simple_content_restriction_set_base_type;
+ cmp_content_res_impl->cmp_content_res.ops->set_base_type_name =
+ axis2_xml_schema_complex_content_restriction_set_base_type_name;
- sim_content_res_impl->sim_content_res.ops->get_base_type =
- axis2_xml_schema_simple_content_restriction_get_base_type;
-
- sim_content_res_impl->sim_content_res.ops->get_facets =
- axis2_xml_schema_simple_content_restriction_get_facets;
-
-
- sim_content_res_impl->methods = axis2_hash_make(env);
+ cmp_content_res_impl->methods = axis2_hash_make(env);
- if(!sim_content_res_impl->methods)
+ if(!cmp_content_res_impl->methods)
{
- axis2_xml_schema_simple_content_restriction_free(
- &(sim_content_res_impl->sim_content_res), env);
+ axis2_xml_schema_complex_content_restriction_free(
+ &(cmp_content_res_impl->cmp_content_res), env);
AXIS2_ERROR_SET((*env)->error,
AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- axis2_hash_set(sim_content_res_impl->methods, "free",
- AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_content_restriction_free);
- axis2_hash_set(sim_content_res_impl->methods, "get_any_attribute",
- AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_content_restriction_get_any_attribute);
- axis2_hash_set(sim_content_res_impl->methods, "set_any_attribute",
- AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_content_restriction_set_any_attribute);
- axis2_hash_set(sim_content_res_impl->methods, "get_attributes",
- AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_content_restriction_get_attributes);
- axis2_hash_set(sim_content_res_impl->methods, "get_base_type_name",
- AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_content_restriction_get_base_type_name);
- axis2_hash_set(sim_content_res_impl->methods, "set_base_type_name",
- AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_content_restriction_set_base_type_name);
+ axis2_hash_set(cmp_content_res_impl->methods, "free",
+ AXIS2_HASH_KEY_STRING, axis2_xml_schema_complex_content_restriction_free);
+ axis2_hash_set(cmp_content_res_impl->methods, "get_any_attribute",
+ AXIS2_HASH_KEY_STRING, axis2_xml_schema_complex_content_restriction_get_any_attribute);
+ axis2_hash_set(cmp_content_res_impl->methods, "set_any_attribute",
+ AXIS2_HASH_KEY_STRING, axis2_xml_schema_complex_content_restriction_set_any_attribute);
+ axis2_hash_set(cmp_content_res_impl->methods, "get_attributes",
+ AXIS2_HASH_KEY_STRING, axis2_xml_schema_complex_content_restriction_get_attributes);
+ axis2_hash_set(cmp_content_res_impl->methods, "get_base_type_name",
+ AXIS2_HASH_KEY_STRING, axis2_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, axis2_xml_schema_complex_content_restriction_set_base_type_name);
- sim_content_res_impl->annotated = axis2_xml_schema_annotated_create(env);
- if(!sim_content_res_impl->annotated)
+ cmp_content_res_impl->annotated = axis2_xml_schema_annotated_create(env);
+ if(!cmp_content_res_impl->annotated)
{
- axis2_xml_schema_simple_content_restriction_free(
- &(sim_content_res_impl->sim_content_res), env);
+ axis2_xml_schema_complex_content_restriction_free(
+ &(cmp_content_res_impl->cmp_content_res), env);
return NULL;
}
- sim_content_res_impl->attributes = axis2_xml_schema_obj_collection_create(env);
- sim_content_res_impl->facets = axis2_xml_schema_obj_collection_create(env);
- if(!sim_content_res_impl->attributes || !sim_content_res_impl->facets)
+ cmp_content_res_impl->attributes = axis2_xml_schema_obj_collection_create(env);
+ if(!cmp_content_res_impl->attributes)
{
- axis2_xml_schema_simple_content_restriction_free(
- &(sim_content_res_impl->sim_content_res), env);
+ axis2_xml_schema_complex_content_restriction_free(
+ &(cmp_content_res_impl->cmp_content_res), env);
return NULL;
}
status = axis2_xml_schema_annotated_resolve_methods(
- &(sim_content_res_impl->sim_content_res.base), env, sim_content_res_impl->annotated,
- sim_content_res_impl->methods);
+ &(cmp_content_res_impl->cmp_content_res.base), env, cmp_content_res_impl->annotated,
+ cmp_content_res_impl->methods);
- return &(sim_content_res_impl->sim_content_res);
+ return &(cmp_content_res_impl->cmp_content_res);
}
axis2_status_t AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_free(void *sim_content_res,
+axis2_xml_schema_complex_content_restriction_free(void *cmp_content_res,
axis2_env_t **env)
{
- axis2_xml_schema_simple_content_restriction_impl_t *content_res_impl = NULL;
+ axis2_xml_schema_complex_content_restriction_impl_t *content_res_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- content_res_impl = AXIS2_INTF_TO_IMPL(sim_content_res);
+ content_res_impl = AXIS2_INTF_TO_IMPL(cmp_content_res);
if(NULL != content_res_impl->any_attribute)
{
AXIS2_XML_SCHEMA_ANY_ATTRIBUTE_FREE(content_res_impl->any_attribute, env);
@@ -224,10 +194,7 @@
{
/** TODO free attributes */
}
- if(NULL != content_res_impl->facets)
- {
- /** TODO free facets */
- }
+
if(NULL != content_res_impl->base_type_name)
{
AXIS2_QNAME_FREE(content_res_impl->base_type_name, env);
@@ -243,15 +210,15 @@
AXIS2_XML_SCHEMA_ANNOTATED_FREE(content_res_impl->annotated, env);
content_res_impl->annotated = NULL;
}
- if(NULL != content_res_impl->sim_content_res.base.ops)
+ if(NULL != content_res_impl->cmp_content_res.base.ops)
{
- AXIS2_FREE((*env)->allocator, content_res_impl->sim_content_res.base.ops);
- content_res_impl->sim_content_res.base.ops = NULL;
+ AXIS2_FREE((*env)->allocator, content_res_impl->cmp_content_res.base.ops);
+ content_res_impl->cmp_content_res.base.ops = NULL;
}
- if(NULL != content_res_impl->sim_content_res.ops)
+ if(NULL != content_res_impl->cmp_content_res.ops)
{
- AXIS2_FREE((*env)->allocator, content_res_impl->sim_content_res.ops);
- content_res_impl->sim_content_res.ops = NULL;
+ AXIS2_FREE((*env)->allocator, content_res_impl->cmp_content_res.ops);
+ content_res_impl->cmp_content_res.ops = NULL;
}
AXIS2_FREE((*env)->allocator, content_res_impl);
@@ -260,33 +227,33 @@
}
axis2_xml_schema_annotated_t *AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_get_base_impl(void *sim_content_res,
+axis2_xml_schema_complex_content_restriction_get_base_impl(void *cmp_content_res,
axis2_env_t **env)
{
- axis2_xml_schema_simple_content_restriction_impl_t *content_res_impl = NULL;
+ axis2_xml_schema_complex_content_restriction_impl_t *content_res_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- content_res_impl = AXIS2_INTF_TO_IMPL(sim_content_res);
+ content_res_impl = AXIS2_INTF_TO_IMPL(cmp_content_res);
return content_res_impl->annotated;
}
axis2_xml_schema_any_attribute_t* AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_get_any_attribute(void *sim_content_res,
+axis2_xml_schema_complex_content_restriction_get_any_attribute(void *cmp_content_res,
axis2_env_t **env)
{
- axis2_xml_schema_simple_content_restriction_impl_t *cnt_res_impl = NULL;
+ axis2_xml_schema_complex_content_restriction_impl_t *cnt_res_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- cnt_res_impl = AXIS2_INTF_TO_IMPL(sim_content_res);
+ cnt_res_impl = AXIS2_INTF_TO_IMPL(cmp_content_res);
return cnt_res_impl->any_attribute;
}
axis2_status_t AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_set_any_attribute(void *sim_content_res,
+axis2_xml_schema_complex_content_restriction_set_any_attribute(void *cmp_content_res,
axis2_env_t **env,
axis2_xml_schema_any_attribute_t *any_attr)
{
- axis2_xml_schema_simple_content_restriction_impl_t *content_res_impl = NULL;
+ axis2_xml_schema_complex_content_restriction_impl_t *content_res_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK((*env)->error, any_attr, AXIS2_FAILURE);
@@ -300,35 +267,35 @@
}
axis2_xml_schema_obj_collection_t* AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_get_attributes(void *sim_content,
+axis2_xml_schema_complex_content_restriction_get_attributes(void *cmp_content,
axis2_env_t **env)
{
- axis2_xml_schema_simple_content_restriction_impl_t *cnt_res_impl = NULL;
+ axis2_xml_schema_complex_content_restriction_impl_t *cnt_res_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- cnt_res_impl = AXIS2_INTF_TO_IMPL(sim_content);
+ cnt_res_impl = AXIS2_INTF_TO_IMPL(cmp_content);
return cnt_res_impl->attributes;
}
axis2_qname_t* AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_get_base_type_name(
- void *sim_content,
+axis2_xml_schema_complex_content_restriction_get_base_type_name(
+ void *cmp_content,
axis2_env_t **env)
{
- axis2_xml_schema_simple_content_restriction_impl_t *content_res_impl = NULL;
+ axis2_xml_schema_complex_content_restriction_impl_t *content_res_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- content_res_impl = AXIS2_INTF_TO_IMPL(sim_content);
+ content_res_impl = AXIS2_INTF_TO_IMPL(cmp_content);
return content_res_impl->base_type_name;
}
axis2_status_t AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_set_base_type_name(
- void *sim_content,
+axis2_xml_schema_complex_content_restriction_set_base_type_name(
+ void *cmp_content,
axis2_env_t **env,
axis2_qname_t *base_type_name)
{
- axis2_xml_schema_simple_content_restriction_impl_t *content_res_impl = NULL;
+ axis2_xml_schema_complex_content_restriction_impl_t *content_res_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- content_res_impl = AXIS2_INTF_TO_IMPL(sim_content);
+ content_res_impl = AXIS2_INTF_TO_IMPL(cmp_content);
if(NULL != content_res_impl->base_type_name)
{
AXIS2_QNAME_FREE(content_res_impl->base_type_name, env);
@@ -338,36 +305,3 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_set_base_type(void *sim_content_res,
- axis2_env_t **env,
- axis2_xml_schema_simple_type_t *base_type)
-{
- axis2_xml_schema_simple_content_restriction_impl_t *sim_cnt_res_impl = NULL;
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- AXIS2_PARAM_CHECK((*env)->error, base_type, AXIS2_FAILURE);
- sim_cnt_res_impl = AXIS2_INTF_TO_IMPL(sim_content_res);
- if(NULL != sim_cnt_res_impl->base_type)
- {
- AXIS2_XML_SCHEMA_SIMPLE_TYPE_FREE(sim_cnt_res_impl->base_type, env);
- sim_cnt_res_impl->base_type = NULL;
- }
- sim_cnt_res_impl->base_type = base_type;
- return AXIS2_SUCCESS;
-}
-
-
-axis2_xml_schema_simple_type_t* AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_get_base_type(void *sim_content_res,
- axis2_env_t **env)
-{
- return AXIS2_INTF_TO_IMPL(sim_content_res)->base_type;
-}
-
-
-axis2_xml_schema_obj_collection_t* AXIS2_CALL
-axis2_xml_schema_simple_content_restriction_get_facets(void *sim_content_res,
- axis2_env_t **env)
-{
- return AXIS2_INTF_TO_IMPL(sim_content_res)->facets;
-}
\ No newline at end of file
Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_content_restriction.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_content_restriction.c?rev=400039&r1=400038&r2=400039&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_content_restriction.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_content_restriction.c Fri May 5 03:34:11 2006
@@ -14,18 +14,18 @@
* limitations under the License.
*/
-#include <axis2_xml_schema_complex_content_restriction.h>
+#include <axis2_xml_schema_simple_content_restriction.h>
-typedef struct axis2_xml_schema_complex_content_restriction_impl
- axis2_xml_schema_complex_content_restriction_impl_t;
+typedef struct axis2_xml_schema_simple_content_restriction_impl
+ axis2_xml_schema_simple_content_restriction_impl_t;
/**
* @brief Other Extension Struct Impl
* Axis2 Other Extension
*/
-struct axis2_xml_schema_complex_content_restriction_impl
+struct axis2_xml_schema_simple_content_restriction_impl
{
- axis2_xml_schema_complex_content_restriction_t sim_content_res;
+ axis2_xml_schema_simple_content_restriction_t sim_content_res;
axis2_xml_schema_annotated_t *annotated;
@@ -43,64 +43,64 @@
};
#define AXIS2_INTF_TO_IMPL(sim_content_res) \
- ((axis2_xml_schema_complex_content_restriction_impl_t *) sim_content_res)
+ ((axis2_xml_schema_simple_content_restriction_impl_t *) sim_content_res)
axis2_status_t AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_free(void *sim_content_res,
+axis2_xml_schema_simple_content_restriction_free(void *sim_content_res,
axis2_env_t **env);
axis2_xml_schema_annotated_t *AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_get_base_impl(void *sim_content_res,
+axis2_xml_schema_simple_content_restriction_get_base_impl(void *sim_content_res,
axis2_env_t **env);
axis2_xml_schema_any_attribute_t* AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_get_any_attribute(
+axis2_xml_schema_simple_content_restriction_get_any_attribute(
void *sim_content_res,
axis2_env_t **env);
axis2_status_t AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_set_any_attribute(void *sim_content_res,
+axis2_xml_schema_simple_content_restriction_set_any_attribute(void *sim_content_res,
axis2_env_t **env,
axis2_xml_schema_any_attribute_t *any_attr);
axis2_xml_schema_obj_collection_t* AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_get_attributes(void *sim_content_res,
+axis2_xml_schema_simple_content_restriction_get_attributes(void *sim_content_res,
axis2_env_t **env);
axis2_status_t AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_set_base_type_name(
+axis2_xml_schema_simple_content_restriction_set_base_type_name(
void *sim_content_res,
axis2_env_t **env,
axis2_qname_t *base_type_name);
axis2_qname_t* AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_get_base_type_name(
+axis2_xml_schema_simple_content_restriction_get_base_type_name(
void *sim_content_res,
axis2_env_t **env);
axis2_status_t AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_set_base_type(void *sim_content_res,
+axis2_xml_schema_simple_content_restriction_set_base_type(void *sim_content_res,
axis2_env_t **env,
axis2_xml_schema_simple_type_t *base_type);
axis2_xml_schema_simple_type_t* AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_get_base_type(void *sim_content_res,
+axis2_xml_schema_simple_content_restriction_get_base_type(void *sim_content_res,
axis2_env_t **env);
axis2_xml_schema_obj_collection_t* AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_get_facets(void *sim_content_res,
+axis2_xml_schema_simple_content_restriction_get_facets(void *sim_content_res,
axis2_env_t **env);
/*****************************************************************************/
-AXIS2_DECLARE(axis2_xml_schema_complex_content_restriction_t *)
-axis2_xml_schema_complex_content_restriction_create(axis2_env_t **env)
+AXIS2_DECLARE(axis2_xml_schema_simple_content_restriction_t *)
+axis2_xml_schema_simple_content_restriction_create(axis2_env_t **env)
{
- axis2_xml_schema_complex_content_restriction_impl_t *sim_content_res_impl = NULL;
+ axis2_xml_schema_simple_content_restriction_impl_t *sim_content_res_impl = NULL;
axis2_status_t status = AXIS2_FAILURE;
- sim_content_res_impl = (axis2_xml_schema_complex_content_restriction_impl_t*)
- AXIS2_MALLOC((*env)->allocator, sizeof(axis2_xml_schema_complex_content_restriction_impl_t));
+ sim_content_res_impl = (axis2_xml_schema_simple_content_restriction_impl_t*)
+ AXIS2_MALLOC((*env)->allocator, sizeof(axis2_xml_schema_simple_content_restriction_impl_t));
if(!sim_content_res_impl)
{
@@ -119,10 +119,10 @@
sim_content_res_impl->base_type = NULL;
sim_content_res_impl->sim_content_res.ops = AXIS2_MALLOC((*env)->allocator,
- sizeof(axis2_xml_schema_complex_content_restriction_ops_t));
+ sizeof(axis2_xml_schema_simple_content_restriction_ops_t));
if(!sim_content_res_impl->sim_content_res.ops)
{
- axis2_xml_schema_complex_content_restriction_free(
+ axis2_xml_schema_simple_content_restriction_free(
&(sim_content_res_impl->sim_content_res), env);
AXIS2_ERROR_SET((*env)->error,
AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -131,63 +131,63 @@
sim_content_res_impl->sim_content_res.ops->free =
- axis2_xml_schema_complex_content_restriction_free;
+ axis2_xml_schema_simple_content_restriction_free;
sim_content_res_impl->sim_content_res.ops->get_base_impl =
- axis2_xml_schema_complex_content_restriction_get_base_impl;
+ axis2_xml_schema_simple_content_restriction_get_base_impl;
sim_content_res_impl->sim_content_res.ops->get_any_attribute =
- axis2_xml_schema_complex_content_restriction_get_any_attribute;
+ axis2_xml_schema_simple_content_restriction_get_any_attribute;
sim_content_res_impl->sim_content_res.ops->set_any_attribute =
- axis2_xml_schema_complex_content_restriction_set_any_attribute;
+ axis2_xml_schema_simple_content_restriction_set_any_attribute;
sim_content_res_impl->sim_content_res.ops->get_attributes =
- axis2_xml_schema_complex_content_restriction_get_attributes;
+ axis2_xml_schema_simple_content_restriction_get_attributes;
sim_content_res_impl->sim_content_res.ops->get_base_type_name =
- axis2_xml_schema_complex_content_restriction_get_base_type_name;
+ axis2_xml_schema_simple_content_restriction_get_base_type_name;
sim_content_res_impl->sim_content_res.ops->set_base_type_name =
- axis2_xml_schema_complex_content_restriction_set_base_type_name;
+ axis2_xml_schema_simple_content_restriction_set_base_type_name;
sim_content_res_impl->sim_content_res.ops->set_base_type =
- axis2_xml_schema_complex_content_restriction_set_base_type;
+ axis2_xml_schema_simple_content_restriction_set_base_type;
sim_content_res_impl->sim_content_res.ops->get_base_type =
- axis2_xml_schema_complex_content_restriction_get_base_type;
+ axis2_xml_schema_simple_content_restriction_get_base_type;
sim_content_res_impl->sim_content_res.ops->get_facets =
- axis2_xml_schema_complex_content_restriction_get_facets;
+ axis2_xml_schema_simple_content_restriction_get_facets;
sim_content_res_impl->methods = axis2_hash_make(env);
if(!sim_content_res_impl->methods)
{
- axis2_xml_schema_complex_content_restriction_free(
+ axis2_xml_schema_simple_content_restriction_free(
&(sim_content_res_impl->sim_content_res), env);
AXIS2_ERROR_SET((*env)->error,
AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
axis2_hash_set(sim_content_res_impl->methods, "free",
- AXIS2_HASH_KEY_STRING, axis2_xml_schema_complex_content_restriction_free);
+ AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_content_restriction_free);
axis2_hash_set(sim_content_res_impl->methods, "get_any_attribute",
- AXIS2_HASH_KEY_STRING, axis2_xml_schema_complex_content_restriction_get_any_attribute);
+ AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_content_restriction_get_any_attribute);
axis2_hash_set(sim_content_res_impl->methods, "set_any_attribute",
- AXIS2_HASH_KEY_STRING, axis2_xml_schema_complex_content_restriction_set_any_attribute);
+ AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_content_restriction_set_any_attribute);
axis2_hash_set(sim_content_res_impl->methods, "get_attributes",
- AXIS2_HASH_KEY_STRING, axis2_xml_schema_complex_content_restriction_get_attributes);
+ AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_content_restriction_get_attributes);
axis2_hash_set(sim_content_res_impl->methods, "get_base_type_name",
- AXIS2_HASH_KEY_STRING, axis2_xml_schema_complex_content_restriction_get_base_type_name);
+ AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_content_restriction_get_base_type_name);
axis2_hash_set(sim_content_res_impl->methods, "set_base_type_name",
- AXIS2_HASH_KEY_STRING, axis2_xml_schema_complex_content_restriction_set_base_type_name);
+ AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_content_restriction_set_base_type_name);
sim_content_res_impl->annotated = axis2_xml_schema_annotated_create(env);
if(!sim_content_res_impl->annotated)
{
- axis2_xml_schema_complex_content_restriction_free(
+ axis2_xml_schema_simple_content_restriction_free(
&(sim_content_res_impl->sim_content_res), env);
return NULL;
}
@@ -195,7 +195,7 @@
sim_content_res_impl->facets = axis2_xml_schema_obj_collection_create(env);
if(!sim_content_res_impl->attributes || !sim_content_res_impl->facets)
{
- axis2_xml_schema_complex_content_restriction_free(
+ axis2_xml_schema_simple_content_restriction_free(
&(sim_content_res_impl->sim_content_res), env);
return NULL;
}
@@ -208,10 +208,10 @@
}
axis2_status_t AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_free(void *sim_content_res,
+axis2_xml_schema_simple_content_restriction_free(void *sim_content_res,
axis2_env_t **env)
{
- axis2_xml_schema_complex_content_restriction_impl_t *content_res_impl = NULL;
+ axis2_xml_schema_simple_content_restriction_impl_t *content_res_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
content_res_impl = AXIS2_INTF_TO_IMPL(sim_content_res);
@@ -260,10 +260,10 @@
}
axis2_xml_schema_annotated_t *AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_get_base_impl(void *sim_content_res,
+axis2_xml_schema_simple_content_restriction_get_base_impl(void *sim_content_res,
axis2_env_t **env)
{
- axis2_xml_schema_complex_content_restriction_impl_t *content_res_impl = NULL;
+ axis2_xml_schema_simple_content_restriction_impl_t *content_res_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
content_res_impl = AXIS2_INTF_TO_IMPL(sim_content_res);
return content_res_impl->annotated;
@@ -272,21 +272,21 @@
axis2_xml_schema_any_attribute_t* AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_get_any_attribute(void *sim_content_res,
+axis2_xml_schema_simple_content_restriction_get_any_attribute(void *sim_content_res,
axis2_env_t **env)
{
- axis2_xml_schema_complex_content_restriction_impl_t *cnt_res_impl = NULL;
+ axis2_xml_schema_simple_content_restriction_impl_t *cnt_res_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
cnt_res_impl = AXIS2_INTF_TO_IMPL(sim_content_res);
return cnt_res_impl->any_attribute;
}
axis2_status_t AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_set_any_attribute(void *sim_content_res,
+axis2_xml_schema_simple_content_restriction_set_any_attribute(void *sim_content_res,
axis2_env_t **env,
axis2_xml_schema_any_attribute_t *any_attr)
{
- axis2_xml_schema_complex_content_restriction_impl_t *content_res_impl = NULL;
+ axis2_xml_schema_simple_content_restriction_impl_t *content_res_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK((*env)->error, any_attr, AXIS2_FAILURE);
@@ -300,33 +300,33 @@
}
axis2_xml_schema_obj_collection_t* AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_get_attributes(void *sim_content,
+axis2_xml_schema_simple_content_restriction_get_attributes(void *sim_content,
axis2_env_t **env)
{
- axis2_xml_schema_complex_content_restriction_impl_t *cnt_res_impl = NULL;
+ axis2_xml_schema_simple_content_restriction_impl_t *cnt_res_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
cnt_res_impl = AXIS2_INTF_TO_IMPL(sim_content);
return cnt_res_impl->attributes;
}
axis2_qname_t* AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_get_base_type_name(
+axis2_xml_schema_simple_content_restriction_get_base_type_name(
void *sim_content,
axis2_env_t **env)
{
- axis2_xml_schema_complex_content_restriction_impl_t *content_res_impl = NULL;
+ axis2_xml_schema_simple_content_restriction_impl_t *content_res_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
content_res_impl = AXIS2_INTF_TO_IMPL(sim_content);
return content_res_impl->base_type_name;
}
axis2_status_t AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_set_base_type_name(
+axis2_xml_schema_simple_content_restriction_set_base_type_name(
void *sim_content,
axis2_env_t **env,
axis2_qname_t *base_type_name)
{
- axis2_xml_schema_complex_content_restriction_impl_t *content_res_impl = NULL;
+ axis2_xml_schema_simple_content_restriction_impl_t *content_res_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
content_res_impl = AXIS2_INTF_TO_IMPL(sim_content);
if(NULL != content_res_impl->base_type_name)
@@ -339,11 +339,11 @@
}
axis2_status_t AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_set_base_type(void *sim_content_res,
+axis2_xml_schema_simple_content_restriction_set_base_type(void *sim_content_res,
axis2_env_t **env,
axis2_xml_schema_simple_type_t *base_type)
{
- axis2_xml_schema_complex_content_restriction_impl_t *sim_cnt_res_impl = NULL;
+ axis2_xml_schema_simple_content_restriction_impl_t *sim_cnt_res_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK((*env)->error, base_type, AXIS2_FAILURE);
sim_cnt_res_impl = AXIS2_INTF_TO_IMPL(sim_content_res);
@@ -358,7 +358,7 @@
axis2_xml_schema_simple_type_t* AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_get_base_type(void *sim_content_res,
+axis2_xml_schema_simple_content_restriction_get_base_type(void *sim_content_res,
axis2_env_t **env)
{
return AXIS2_INTF_TO_IMPL(sim_content_res)->base_type;
@@ -366,7 +366,7 @@
axis2_xml_schema_obj_collection_t* AXIS2_CALL
-axis2_xml_schema_complex_content_restriction_get_facets(void *sim_content_res,
+axis2_xml_schema_simple_content_restriction_get_facets(void *sim_content_res,
axis2_env_t **env)
{
return AXIS2_INTF_TO_IMPL(sim_content_res)->facets;