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/01/30 11:04:30 UTC
svn commit: r373481 - in /webservices/axis2/trunk/c:
include/axis2_soap_header.h modules/util/axis2_string.h modules/util/string.c
modules/xml/om/om_children_with_specific_attribute_iterator.c
modules/xml/soap/soap_header.c
Author: nandika
Date: Mon Jan 30 02:04:00 2006
New Revision: 373481
URL: http://svn.apache.org/viewcvs?rev=373481&view=rev
Log:
get_all_header_blocks function added
Modified:
webservices/axis2/trunk/c/include/axis2_soap_header.h
webservices/axis2/trunk/c/modules/util/axis2_string.h
webservices/axis2/trunk/c/modules/util/string.c
webservices/axis2/trunk/c/modules/xml/om/om_children_with_specific_attribute_iterator.c
webservices/axis2/trunk/c/modules/xml/soap/soap_header.c
Modified: webservices/axis2/trunk/c/include/axis2_soap_header.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_soap_header.h?rev=373481&r1=373480&r2=373481&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_soap_header.h (original)
+++ webservices/axis2/trunk/c/include/axis2_soap_header.h Mon Jan 30 02:04:00 2006
@@ -151,6 +151,9 @@
axis2_status_t (AXIS2_CALL *set_builder)(axis2_soap_header_t *header,
axis2_env_t **env,
struct axis2_soap_builder* builder);
+
+ axis2_hash_t* (AXIS2_CALL *get_all_header_blocks)(axis2_soap_header_t *header,
+ axis2_env_t **env);
};
@@ -224,6 +227,9 @@
#define AXIS2_SOAP_HEADER_GET_HEADER_BLOCK_WITH_NAMESPACE_URI(header, env, uri)\
((header)->ops->get_header_block_with_namespace_uri(header, env, uri))
+
+#define AXIS2_SOAP_HEADER_GET_ALL_HEADER_BLOCKS(header, env) \
+ ((header)->ops->get_all_header_blocks(header, env))
/** @} */
#ifdef __cplusplus
Modified: webservices/axis2/trunk/c/modules/util/axis2_string.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/axis2_string.h?rev=373481&r1=373480&r2=373481&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/axis2_string.h (original)
+++ webservices/axis2/trunk/c/modules/util/axis2_string.h Mon Jan 30 02:04:00 2006
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright 2004,2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Modified: webservices/axis2/trunk/c/modules/util/string.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/string.c?rev=373481&r1=373480&r2=373481&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/string.c (original)
+++ webservices/axis2/trunk/c/modules/util/string.c Mon Jan 30 02:04:00 2006
@@ -115,9 +115,16 @@
}
-AXIS2_DECLARE(axis2_char_t *)
-axis2_rindex(const axis2_char_t *s, axis2_char_t c)
-{
- return rindex(s, c);
+AXIS2_DECLARE(axis2_char_t *)
+axis2_rindex(const axis2_char_t *_s, axis2_char_t _ch)
+{
+ int i,ilen = strlen(_s);
+ if (ilen < 1)
+ return NULL;
+ for (i=ilen-1;i>=0;i--)
+ {
+ if (_s[i] == _ch)
+ return _s+i;
+ }
+ return NULL;
}
-
Modified: webservices/axis2/trunk/c/modules/xml/om/om_children_with_specific_attribute_iterator.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/om_children_with_specific_attribute_iterator.c?rev=373481&r1=373480&r2=373481&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_children_with_specific_attribute_iterator.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_children_with_specific_attribute_iterator.c Mon Jan 30 02:04:00 2006
@@ -92,7 +92,7 @@
iterator_impl->next_called = AXIS2_FALSE;
iterator_impl->remove_called = AXIS2_FALSE;
- iterator_impl->attr_qname = attr_qname;
+ iterator_impl->attr_qname = AXIS2_QNAME_CLONE(attr_qname, env);
iterator_impl->attr_value = attr_value;
iterator_impl->detach = detach;
@@ -182,9 +182,6 @@
axis2_om_element_t *om_ele = NULL;
om_ele = (axis2_om_element_t *)AXIS2_OM_NODE_GET_DATA_ELEMENT(
iterator_impl->current_child, env);
- if(!om_ele)
- printf(" om element null");
- printf("\n localname %s", AXIS2_OM_ELEMENT_GET_LOCALNAME(om_ele, env));
om_attr = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(om_ele, env,
iterator_impl->attr_qname);
if(om_attr &&
Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_header.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_header.c?rev=373481&r1=373480&r2=373481&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_header.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_header.c Mon Jan 30 02:04:00 2006
@@ -106,7 +106,11 @@
axis2_soap_header_get_header_block_with_namespace_uri
(axis2_soap_header_t* header,
axis2_env_t **env,
- axis2_char_t *ns_uri);
+ axis2_char_t *ns_uri);
+
+axis2_hash_t* AXIS2_CALL
+axis2_soap_header_get_all_header_blocks(axis2_soap_header_t *header,
+ axis2_env_t **env);
/*************** function implementations *************************************/
@@ -164,6 +168,9 @@
axis2_soap_header_set_builder;
header_impl->soap_header.ops->get_header_block_with_namespace_uri =
axis2_soap_header_get_header_block_with_namespace_uri;
+ header_impl->soap_header.ops->get_all_header_blocks =
+ axis2_soap_header_get_all_header_blocks;
+
return &(header_impl->soap_header);
}
@@ -478,7 +485,7 @@
axis2_char_t *hb_namespace_uri = NULL;
int found = 0;
void *hb = NULL;
- AXIS2_PARAM_CHECK((*env)->error, ns_uri, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, ns_uri, NULL);
header_impl = AXIS2_INTF_TO_IMPL(header);
header_block_list = axis2_array_list_create(env, 10);
for(hash_index = axis2_hash_first(header_impl->header_blocks, env);
@@ -514,3 +521,12 @@
}
return NULL;
}
+
+axis2_hash_t* AXIS2_CALL
+axis2_soap_header_get_all_header_blocks(axis2_soap_header_t *header,
+ axis2_env_t **env)
+{
+ axis2_soap_header_impl_t *header_impl = NULL;
+ header_impl = AXIS2_INTF_TO_IMPL(header);
+ return header_impl->header_blocks;
+}
\ No newline at end of file