axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r328044 - in /webservices/axis2/trunk/c: include/axis2_core.h include/axis2_defines.h modules/core/engine/src/axis2_engine_config.c
Date Mon, 24 Oct 2005 12:08:19 GMT
Author: damitha
Date: Mon Oct 24 05:08:08 2005
New Revision: 328044

URL: http://svn.apache.org/viewcvs?rev=328044&view=rev
Log:
more work on engine config

Modified:
    webservices/axis2/trunk/c/include/axis2_core.h
    webservices/axis2/trunk/c/include/axis2_defines.h
    webservices/axis2/trunk/c/modules/core/engine/src/axis2_engine_config.c

Modified: webservices/axis2/trunk/c/include/axis2_core.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_core.h?rev=328044&r1=328043&r2=328044&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_core.h (original)
+++ webservices/axis2/trunk/c/include/axis2_core.h Mon Oct 24 05:08:08 2005
@@ -60,7 +60,8 @@
 	
 /************************ End of message exchange patters *********************/	
 	
-#define SERVICE_NAME_SPLIT_CHAR ':'	
+#define SERVICE_NAME_SPLIT_CHAR ":"
+
 /** @cond */
 struct axis2_description_param_ops_s;
 struct axis2_description_param_s;

Modified: webservices/axis2/trunk/c/include/axis2_defines.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_defines.h?rev=328044&r1=328043&r2=328044&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_defines.h (original)
+++ webservices/axis2/trunk/c/include/axis2_defines.h Mon Oct 24 05:08:08 2005
@@ -21,6 +21,12 @@
     typedef int axis2_status_t;
     typedef unsigned int axis2_ssize_t;
 
+/* These constant definitions should later be moved to platform dependant
+ * files
+ */
+
+#define AXIS2_EOLN '\0'
+	
 /**
   * Boolean values
   */

Modified: webservices/axis2/trunk/c/modules/core/engine/src/axis2_engine_config.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/src/axis2_engine_config.c?rev=328044&r1=328043&r2=328044&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/src/axis2_engine_config.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/src/axis2_engine_config.c Mon Oct 24 05:08:08
2005
@@ -13,9 +13,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
+#include <string.h>
+
 #include <axis2_engine_config.h>
 
+
 /**
   * @struct axis2_engine_config
   * @brief ENGINE engine_config operations
@@ -192,6 +195,26 @@
 		axis2_environment_t *env, axis2_engine_config_t *engine_config
 		, const axis2_char_t* service_name)
 {
+	axis2_description_servicegroup_t *sg = NULL;
+	int len = strlen(service_name);
+	axis2_char_t *service_st[2];
+	service_st[1] = (axis2_char_t*) axis2_malloc
+		(env->allocator, len * sizeof(axis2_char_t));
+	service_st[2] = (axis2_char_t*) axis2_malloc
+		(env->allocator, len * sizeof(axis2_char_t));
+	if(AXIS2_SUCCESS == split_service_name(env, service_name, service_st))
+	{
+		axis2_char_t *grp_name = *(service_st + 2);
+		sg = axis2_engine_config_ops_get_servicegroup(env, engine_config
+			, grp_name);
+		if(!sg)
+			return NULL;
+	}
+	axis2_char_t *srv_name = *(service_st + 1);
+	axis2_qname_t *qname = (axis2_qname_t*) axis2_qname_create(env, srv_name, NULL, NULL); 
+	
+	/*return axis2_description_servicegroup_get_service(env, sg, qname);*/
+	return NULL;
 			
 }
 
@@ -209,21 +232,28 @@
  * service group name is "foo" and service name is "foo"
  * meaning foo := foo:foo
  * @param service_name
- * @return axis2_char_t* 
+ * @return service name and group name 
  */
 axis2_status_t split_service_name(axis2_environment_t *env
 		, axis2_char_t *service_name, axis2_char_t **service_name_st)
 {
-	char *srv_name = strchr(service_name, SERVICE_NAME_SPLIT_CHAR);
-	if(NULL == srv_name)
-	{
-		*(service_name_st + 1) = srv_name;
-		*(service_name_st + 2) = srv_name;
-	}
-	srv_name = '\0';
-	char *grp_name = service_name;
-	srv_name = srv_name + 1;
-	*(service_name_st + 1) = srv_name;
-	*(service_name_st + 2) = grp_name;
-	return AXIS2_SUCCESS;
+	if(!service_name_st)
+    {
+        return AXIS2_ERROR_INVALID_NULL_PARAMETER;
+    }
+    axis2_char_t *srv_name = strpbrk(service_name, SERVICE_NAME_SPLIT_CHAR);
+    if(NULL == srv_name)
+    {
+        *(service_name_st + 1) = service_name;
+        *(service_name_st + 2) = service_name;
+        return AXIS2_SUCCESS;
+    }
+    srv_name[0] = AXIS2_EOLN;
+    axis2_char_t *grp_name = axis2_malloc(env->allocator, strlen(service_name));
+    sscanf(service_name, "%s", grp_name);
+    srv_name = srv_name + 1;
+    *(service_name_st + 1) = srv_name;
+    *(service_name_st + 2) = grp_name;
+	
+    return AXIS2_SUCCESS;	
 }



Mime
View raw message