axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r367552 - in /webservices/axis2/trunk/c/modules: core/clientapi/call.c core/description/op.c core/description/svc.c util/axis2_utils.h util/utils.c wsdl/axis2_wsdl.h wsdl/wsdl_soap_op.c
Date Tue, 10 Jan 2006 10:15:28 GMT
Author: damitha
Date: Tue Jan 10 02:15:12 2006
New Revision: 367552

URL: http://svn.apache.org/viewcvs?rev=367552&view=rev
Log:
added new method create_out_msg_ctx in utils.c


Modified:
    webservices/axis2/trunk/c/modules/core/clientapi/call.c
    webservices/axis2/trunk/c/modules/core/description/op.c
    webservices/axis2/trunk/c/modules/core/description/svc.c
    webservices/axis2/trunk/c/modules/util/axis2_utils.h
    webservices/axis2/trunk/c/modules/util/utils.c
    webservices/axis2/trunk/c/modules/wsdl/axis2_wsdl.h
    webservices/axis2/trunk/c/modules/wsdl/wsdl_soap_op.c

Modified: webservices/axis2/trunk/c/modules/core/clientapi/call.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/call.c?rev=367552&r1=367551&r2=367552&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/call.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/call.c Tue Jan 10 02:15:12 2006
@@ -143,7 +143,7 @@
     if (svc_ctx)
         call_impl->svc_ctx = svc_ctx;
     
-    call_impl->base = axis2_mep_client_create(env, svc_ctx, MEP_URI_OUT_IN);
+    call_impl->base = axis2_mep_client_create(env, svc_ctx, AXIS2_MEP_URI_OUT_IN);
     if (!(call_impl->base))
     {
         axis2_call_free(&(call_impl->call), env);

Modified: webservices/axis2/trunk/c/modules/core/description/op.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/op.c?rev=367552&r1=367551&r2=367552&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/op.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/op.c Tue Jan 10 02:15:12 2006
@@ -302,6 +302,30 @@
                             axis2_env_t **env,
                             struct axis2_msg_ctx *msg_ctx,
                             struct axis2_op_ctx *op_ctx);
+
+axis2_status_t AXIS2_CALL
+axis2_op_add_msg_ctx_in_only(axis2_op_t *op,
+                                axis2_env_t **env,
+                                axis2_msg_ctx_t *msg_ctx,
+                                axis2_op_ctx_t *op_ctx);
+
+axis2_status_t AXIS2_CALL
+axis2_op_add_msg_ctx_out_only(axis2_op_t *op,
+                                axis2_env_t **env,
+                                axis2_msg_ctx_t *msg_ctx,
+                                axis2_op_ctx_t *op_ctx);
+
+axis2_status_t AXIS2_CALL
+axis2_op_add_msg_ctx_in_out(axis2_op_t *op,
+                                axis2_env_t **env,
+                                axis2_msg_ctx_t *msg_ctx,
+                                axis2_op_ctx_t *op_ctx);
+    
+axis2_status_t AXIS2_CALL
+axis2_op_add_msg_ctx_out_in(axis2_op_t *op,
+                                axis2_env_t **env,
+                                axis2_msg_ctx_t *msg_ctx,
+                                axis2_op_ctx_t *op_ctx);                            
                                 
 /************************* End of function headers ****************************/	
 
@@ -324,7 +348,7 @@
     
     op_impl->parent = NULL;
 	op_impl->msg_recv = NULL;
-    op_impl->mep = MEP_CONSTANT_INVALID;
+    op_impl->mep = AXIS2_MEP_CONSTANT_INVALID;
     op_impl->op.param_container = NULL;
     op_impl->op.wsdl_op = NULL;
     op_impl->remaining_phases_inflow = NULL;
@@ -388,7 +412,7 @@
     }
     
     axis2_op_set_msg_exchange_pattern(&(op_impl->op), env, 
-        (axis2_char_t *) MEP_URI_IN_OUT);
+        (axis2_char_t *) AXIS2_MEP_URI_IN_OUT);
     
     param_container_l = axis2_param_container_create(env);
     if(NULL == param_container_l)
@@ -1011,55 +1035,55 @@
     
     op_impl = AXIS2_INTF_TO_IMPL(op);
     
-    if (op_impl->mep != MEP_CONSTANT_INVALID) 
+    if (op_impl->mep != AXIS2_MEP_CONSTANT_INVALID) 
     {
         return op_impl->mep;
     }
 
-    temp = MEP_CONSTANT_INVALID;
+    temp = AXIS2_MEP_CONSTANT_INVALID;
 
-    if (AXIS2_STRCMP(MEP_URI_IN_OUT, 
+    if (AXIS2_STRCMP(AXIS2_MEP_URI_IN_OUT, 
             axis2_op_get_msg_exchange_pattern(op, env))) 
     {
-        temp = MEP_CONSTANT_IN_OUT;
+        temp = AXIS2_MEP_CONSTANT_IN_OUT;
     } 
-    else if (AXIS2_STRCMP(MEP_URI_IN_ONLY, 
+    else if (AXIS2_STRCMP(AXIS2_MEP_URI_IN_ONLY, 
             axis2_op_get_msg_exchange_pattern(op, env))) 
     {
-        temp = MEP_CONSTANT_IN_ONLY;
+        temp = AXIS2_MEP_CONSTANT_IN_ONLY;
     } 
-    else if (AXIS2_STRCMP(MEP_URI_IN_OPTIONAL_OUT, 
+    else if (AXIS2_STRCMP(AXIS2_MEP_URI_IN_OPTIONAL_OUT, 
             axis2_op_get_msg_exchange_pattern(op, env))) 
     {
-        temp = MEP_CONSTANT_IN_OPTIONAL_OUT;
+        temp = AXIS2_MEP_CONSTANT_IN_OPTIONAL_OUT;
     } 
-    else if (AXIS2_STRCMP(MEP_URI_OUT_IN, 
+    else if (AXIS2_STRCMP(AXIS2_MEP_URI_OUT_IN, 
             axis2_op_get_msg_exchange_pattern(op, env))) 
     {
-        temp = MEP_CONSTANT_OUT_IN;
+        temp = AXIS2_MEP_CONSTANT_OUT_IN;
     } 
-    else if (AXIS2_STRCMP(MEP_URI_OUT_ONLY, 
+    else if (AXIS2_STRCMP(AXIS2_MEP_URI_OUT_ONLY, 
             axis2_op_get_msg_exchange_pattern(op, env))) 
     {
-        temp = MEP_CONSTANT_OUT_ONLY;
+        temp = AXIS2_MEP_CONSTANT_OUT_ONLY;
     } 
-    else if (AXIS2_STRCMP(MEP_URI_OUT_OPTIONAL_IN, 
+    else if (AXIS2_STRCMP(AXIS2_MEP_URI_OUT_OPTIONAL_IN, 
             axis2_op_get_msg_exchange_pattern(op, env))) 
     {
-        temp = MEP_CONSTANT_OUT_OPTIONAL_IN;
+        temp = AXIS2_MEP_CONSTANT_OUT_OPTIONAL_IN;
     } 
-    else if (AXIS2_STRCMP(MEP_URI_ROBUST_IN_ONLY, 
+    else if (AXIS2_STRCMP(AXIS2_MEP_URI_ROBUST_IN_ONLY, 
             axis2_op_get_msg_exchange_pattern(op, env))) 
     {
-        temp = MEP_CONSTANT_ROBUST_IN_ONLY;
+        temp = AXIS2_MEP_CONSTANT_ROBUST_IN_ONLY;
     } 
-    else if (AXIS2_STRCMP(MEP_URI_ROBUST_OUT_ONLY, 
+    else if (AXIS2_STRCMP(AXIS2_MEP_URI_ROBUST_OUT_ONLY, 
             axis2_op_get_msg_exchange_pattern(op, env))) 
     {
-        temp = MEP_CONSTANT_ROBUST_OUT_ONLY;
+        temp = AXIS2_MEP_CONSTANT_ROBUST_OUT_ONLY;
     }
 
-    if (temp == MEP_CONSTANT_INVALID) 
+    if (temp == AXIS2_MEP_CONSTANT_INVALID) 
     {
         AXIS2_ERROR_SET((*env)->error, 
             AXIS2_ERROR_COULD_NOT_MAP_MEP_URI_TO_MEP_CONSTANT, AXIS2_FAILURE);
@@ -1587,6 +1611,142 @@
     if(AXIS2_TRUE == AXIS2_OP_CTX_GET_IS_COMPLETE(op_ctx, env))
     {
         AXIS2_OP_CTX_CLEANUP(op_ctx, env);
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_op_add_msg_ctx_in_only(axis2_op_t *op,
+                                axis2_env_t **env,
+                                axis2_msg_ctx_t *msg_ctx,
+                                axis2_op_ctx_t *op_ctx)
+{
+    axis2_op_impl_t *op_impl = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(op, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, msg_ctx, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, op_ctx, AXIS2_FAILURE);
+    op_impl = AXIS2_INTF_TO_IMPL(op);
+    if(AXIS2_TRUE != AXIS2_OP_CTX_GET_IS_COMPLETE(op_ctx, env))
+    {
+        axis2_hash_t *msg_ctxs = NULL;
+        msg_ctxs = AXIS2_OP_CTX_GET_MSG_CTX_MAP(op_ctx, env);
+        axis2_hash_set(msg_ctxs, AXIS2_MESSAGE_LABEL_IN_VALUE,
+            AXIS2_HASH_KEY_STRING, msg_ctx);
+        AXIS2_OP_CTX_SET_IS_COMPLETE(op_ctx, env, AXIS2_TRUE);
+    }
+    else
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_MESSAGE_ADDITION,
+            AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }
+    
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_op_add_msg_ctx_out_only(axis2_op_t *op,
+                                axis2_env_t **env,
+                                axis2_msg_ctx_t *msg_ctx,
+                                axis2_op_ctx_t *op_ctx)
+{
+    AXIS2_FUNC_PARAM_CHECK(op, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, msg_ctx, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, op_ctx, AXIS2_FAILURE);
+    
+    if(AXIS2_TRUE != AXIS2_OP_CTX_GET_IS_COMPLETE(op_ctx, env))
+    {
+        axis2_hash_t *msg_ctxs = NULL;
+        msg_ctxs = AXIS2_OP_CTX_GET_MSG_CTX_MAP(op_ctx, env);
+        axis2_hash_set(msg_ctxs, AXIS2_MESSAGE_LABEL_OUT_VALUE,
+            AXIS2_HASH_KEY_STRING, msg_ctx);
+        AXIS2_OP_CTX_SET_IS_COMPLETE(op_ctx, env, AXIS2_TRUE);
+    }
+    else
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_MESSAGE_ADDITION,
+            AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }
+    
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_op_add_msg_ctx_in_out(axis2_op_t *op,
+                                axis2_env_t **env,
+                                axis2_msg_ctx_t *msg_ctx,
+                                axis2_op_ctx_t *op_ctx)
+{
+    axis2_hash_t *mep = NULL;
+    axis2_msg_ctx_t *in_msg_ctx = NULL;
+    axis2_msg_ctx_t *out_msg_ctx = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(op, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, msg_ctx, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, op_ctx, AXIS2_FAILURE);
+    
+    mep = AXIS2_OP_CTX_GET_MSG_CTX_MAP(op_ctx, env);
+    in_msg_ctx = (axis2_msg_ctx_t *) axis2_hash_get(mep, 
+        AXIS2_MESSAGE_LABEL_IN_VALUE, AXIS2_HASH_KEY_STRING);
+    out_msg_ctx = (axis2_msg_ctx_t *) axis2_hash_get(mep, 
+        AXIS2_MESSAGE_LABEL_OUT_VALUE, AXIS2_HASH_KEY_STRING);
+    if(NULL != in_msg_ctx && NULL != out_msg_ctx)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_MESSAGE_ADDITION,
+            AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }
+    if(NULL == in_msg_ctx)
+    {
+        axis2_hash_set(mep, AXIS2_MESSAGE_LABEL_IN_VALUE, AXIS2_HASH_KEY_STRING,
+            msg_ctx);        
+    }
+    else
+    {
+        axis2_hash_set(mep, AXIS2_MESSAGE_LABEL_OUT_VALUE, AXIS2_HASH_KEY_STRING,
+            msg_ctx);
+        AXIS2_OP_CTX_SET_IS_COMPLETE(op_ctx, env, AXIS2_TRUE);        
+    }
+    return AXIS2_SUCCESS;
+}
+    
+axis2_status_t AXIS2_CALL
+axis2_op_add_msg_ctx_out_in(axis2_op_t *op,
+                                axis2_env_t **env,
+                                axis2_msg_ctx_t *msg_ctx,
+                                axis2_op_ctx_t *op_ctx)
+{
+    axis2_hash_t *mep = NULL;
+    axis2_msg_ctx_t *in_msg_ctx = NULL;
+    axis2_msg_ctx_t *out_msg_ctx = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(op, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, msg_ctx, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, op_ctx, AXIS2_FAILURE);
+    
+    mep = AXIS2_OP_CTX_GET_MSG_CTX_MAP(op_ctx, env);
+    in_msg_ctx = (axis2_msg_ctx_t *) axis2_hash_get(mep, 
+        AXIS2_MESSAGE_LABEL_IN_VALUE, AXIS2_HASH_KEY_STRING);
+    out_msg_ctx = (axis2_msg_ctx_t *) axis2_hash_get(mep, 
+        AXIS2_MESSAGE_LABEL_OUT_VALUE, AXIS2_HASH_KEY_STRING);
+    if(NULL != in_msg_ctx && NULL != out_msg_ctx)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_MESSAGE_ADDITION,
+            AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }
+    if(NULL == out_msg_ctx)
+    {
+        axis2_hash_set(mep, AXIS2_MESSAGE_LABEL_OUT_VALUE, AXIS2_HASH_KEY_STRING,
+            msg_ctx);        
+    }
+    else
+    {
+        axis2_hash_set(mep, AXIS2_MESSAGE_LABEL_IN_VALUE, AXIS2_HASH_KEY_STRING,
+            msg_ctx);
+        AXIS2_OP_CTX_SET_IS_COMPLETE(op_ctx, env, AXIS2_TRUE);        
     }
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/modules/core/description/svc.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/svc.c?rev=367552&r1=367551&r2=367552&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/svc.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/svc.c Tue Jan 10 02:15:12 2006
@@ -32,7 +32,7 @@
     /** to keep the time that last update time of the service */
     long last_update;
     axis2_char_t *filename;
-    struct axis2_wsdl_svc *service_impl;
+    /* struct axis2_wsdl_svc *service_impl; */
     /** to store module ref at deploy time parsing */
     axis2_array_list_t *module_list;    
 
@@ -1233,7 +1233,7 @@
         
     svc_impl = AXIS2_INTF_TO_IMPL(svc);
     
-    type_1 = axis2_qname_create(env, "op", SOAP_11_OP, NULL);
+    type_1 = axis2_qname_create(env, "op", AXIS2_SOAP_11_OP, NULL);
     binding_ops = AXIS2_WSDL_BINDING_GET_BINDING_OPS(
         AXIS2_WSDL_ENDPOINT_GET_BINDING(axis2_svc_get_endpoint(svc, env, endpoint),
             env), env);

Modified: webservices/axis2/trunk/c/modules/util/axis2_utils.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/axis2_utils.h?rev=367552&r1=367551&r2=367552&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/axis2_utils.h (original)
+++ webservices/axis2/trunk/c/modules/util/axis2_utils.h Tue Jan 10 02:15:12 2006
@@ -21,6 +21,7 @@
 #include <axis2_defines.h>
 #include <axis2_error.h>
 #include <axis2_env.h>
+#include <axis2_msg_ctx.h>
 
 #ifdef __cplusplus
 extern "C"
@@ -44,6 +45,10 @@
      */
     AXIS2_DECLARE(axis2_char_t**)
     axis2_parse_request_url_for_svc_and_op(axis2_env_t **env, axis2_char_t *request);
+    
+    AXIS2_DECLARE(axis2_msg_ctx_t *)
+    axis2_utils_create_out_msg_ctx(axis2_env_t **env,
+                                axis2_msg_ctx_t *in_msg_ctx);
 
 /** @} */
     

Modified: webservices/axis2/trunk/c/modules/util/utils.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/utils.c?rev=367552&r1=367551&r2=367552&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/utils.c (original)
+++ webservices/axis2/trunk/c/modules/util/utils.c Tue Jan 10 02:15:12 2006
@@ -18,6 +18,10 @@
 #include <stdlib.h>
 #include <axis2_string.h>
 #include <string.h>
+#include <axis2_conf.h>
+#include <axis2_relates_to.h>
+#include <axis2_addr.h>
+#include <axis2_http_transport.h>
 
 AXIS2_DECLARE(axis2_char_t**)
 axis2_parse_request_url_for_svc_and_op(axis2_env_t **env, 
@@ -88,3 +92,269 @@
     }
     return ret;
 }
+
+/*
+public static void addHandler(Flow flow,
+                              Handler handler,
+                              String phaseName) {
+    HandlerDescription handlerDesc = new HandlerDescription();
+    PhaseRule rule = new PhaseRule(phaseName);
+    handlerDesc.setRules(rule);
+    handler.init(handlerDesc);
+    handlerDesc.setHandler(handler);
+    flow.addHandler(handlerDesc);
+}
+*/
+
+axis2_msg_ctx_t *AXIS2_CALL
+axis2_utils_create_out_msg_ctx(axis2_env_t **env,
+                                axis2_msg_ctx_t *in_msg_ctx)
+{
+    axis2_msg_ctx_t *new_msg_ctx = NULL;
+    axis2_conf_ctx_t *conf_ctx = NULL;
+    axis2_transport_in_desc_t *transport_in = NULL;
+    axis2_transport_out_desc_t *transport_out = NULL;
+    axis2_msg_info_headers_t *old_msg_info_headers = NULL;
+    axis2_msg_info_headers_t *msg_info_headers = NULL;
+    axis2_endpoint_ref_t *reply_to = NULL;
+    axis2_endpoint_ref_t *fault_to = NULL;
+    axis2_endpoint_ref_t *to = NULL;
+    axis2_char_t *msg_id = NULL;
+    axis2_relates_to_t *relates_to = NULL;
+    axis2_char_t *action = NULL;
+    axis2_op_ctx_t *op_ctx = NULL;
+    axis2_svc_ctx_t *svc_ctx = NULL;
+    void *trt_property = NULL;
+    void *trt_out_info_property = NULL;
+    void *char_set_encoding_property = NULL;
+    axis2_bool_t doing_rest = AXIS2_FALSE;
+    axis2_bool_t doing_mtom = AXIS2_FALSE;
+    axis2_bool_t server_side = AXIS2_FALSE;
+    axis2_svc_grp_ctx_t *svc_grp_ctx = NULL;
+    
+    AXIS2_PARAM_CHECK((*env)->error, in_msg_ctx, NULL);
+    
+    conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(in_msg_ctx, env);
+    transport_in = AXIS2_MSG_CTX_GET_TRANSPORT_IN_DESC(in_msg_ctx, env);
+    transport_out = AXIS2_MSG_CTX_GET_TRANSPORT_OUT_DESC(in_msg_ctx, env);
+    
+    new_msg_ctx = axis2_msg_ctx_create(env, conf_ctx, transport_in, transport_out);
+    if(!new_msg_ctx)
+    {
+        return NULL;
+    }
+    old_msg_info_headers = AXIS2_MSG_CTX_GET_MSG_INFO_HEADERS(in_msg_ctx, env);
+    if(!old_msg_info_headers)
+    {
+        return NULL;
+    }
+    msg_info_headers = axis2_msg_info_headers_create(env, NULL, NULL);
+    if(!msg_info_headers)
+    {
+        return NULL;
+    }
+    /* TODO UUID is hard coded until it is generated */
+    AXIS2_MSG_INFO_HEADERS_SET_MESSAGE_ID(msg_info_headers, env, "UUID");
+    /*messageInformationHeaders.setMessageId(UUIDGenerator.getUUID());*/
+    reply_to = AXIS2_MSG_INFO_HEADERS_GET_REPLY_TO(old_msg_info_headers, env);
+    AXIS2_MSG_INFO_HEADERS_SET_TO(msg_info_headers, env, reply_to);
+    
+    fault_to = AXIS2_MSG_INFO_HEADERS_GET_FAULT_TO(old_msg_info_headers, env);
+    AXIS2_MSG_INFO_HEADERS_SET_FAULT_TO(msg_info_headers, env, fault_to);
+    
+    to = AXIS2_MSG_INFO_HEADERS_GET_TO(old_msg_info_headers, env);
+    AXIS2_MSG_INFO_HEADERS_SET_FROM(msg_info_headers, env, to);
+    
+    msg_id = AXIS2_MSG_INFO_HEADERS_GET_MESSAGE_ID(old_msg_info_headers, env);
+    relates_to = axis2_relates_to_create(env, msg_id, 
+        AXIS2_WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE);
+    AXIS2_MSG_INFO_HEADERS_SET_RELATES_TO(msg_info_headers, env, relates_to);
+    
+    action = AXIS2_MSG_INFO_HEADERS_GET_ACTION(old_msg_info_headers, env);
+    AXIS2_MSG_INFO_HEADERS_SET_ACTION(msg_info_headers, env, action);
+    AXIS2_MSG_CTX_SET_MSG_INFO_HEADERS(new_msg_ctx, env, msg_info_headers);
+    
+    op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(in_msg_ctx, env);
+    AXIS2_MSG_CTX_SET_OP_CTX(new_msg_ctx, env, op_ctx);
+    
+    svc_ctx = AXIS2_MSG_CTX_GET_SVC_CTX(in_msg_ctx, env);
+    AXIS2_MSG_CTX_SET_SVC_CTX(new_msg_ctx, env, svc_ctx);
+    
+    trt_property = AXIS2_MSG_CTX_GET_PROPERTY(in_msg_ctx, env, 
+            AXIS2_TRANSPORT_OUT, AXIS2_FALSE);
+            
+    AXIS2_MSG_CTX_SET_PROPERTY(new_msg_ctx, env, AXIS2_TRANSPORT_OUT, trt_property,
+        AXIS2_FALSE);
+    
+    trt_out_info_property = AXIS2_MSG_CTX_GET_PROPERTY(in_msg_ctx, env, 
+            AXIS2_HTTP_OUT_TRANSPORT_INFO, AXIS2_FALSE);
+            
+    AXIS2_MSG_CTX_SET_PROPERTY(new_msg_ctx, env, AXIS2_HTTP_OUT_TRANSPORT_INFO, 
+            trt_out_info_property, AXIS2_FALSE);
+
+    /* Setting the charater set encoding */
+    
+    char_set_encoding_property = AXIS2_MSG_CTX_GET_PROPERTY(in_msg_ctx, env, 
+            AXIS2_CHARACTER_SET_ENCODING, AXIS2_FALSE);         
+    AXIS2_MSG_CTX_SET_PROPERTY(new_msg_ctx, env, AXIS2_CHARACTER_SET_ENCODING, 
+            char_set_encoding_property, AXIS2_FALSE);
+            
+    doing_rest = AXIS2_MSG_CTX_GET_DOING_REST(in_msg_ctx, env);
+    AXIS2_MSG_CTX_SET_DOING_REST(new_msg_ctx, env, doing_rest);
+    
+    doing_mtom = AXIS2_MSG_CTX_GET_DOING_MTOM(in_msg_ctx, env);
+    AXIS2_MSG_CTX_SET_DOING_MTOM(new_msg_ctx, env, doing_mtom);
+    
+    server_side = AXIS2_MSG_CTX_GET_SERVER_SIDE(in_msg_ctx, env);
+    AXIS2_MSG_CTX_SET_SERVER_SIDE(new_msg_ctx, env, server_side);
+    
+    svc_grp_ctx = AXIS2_MSG_CTX_GET_SVC_GRP_CTX(new_msg_ctx, env);
+    AXIS2_MSG_CTX_SET_SVC_GRP_CTX(new_msg_ctx, env, svc_grp_ctx);
+    
+    return new_msg_ctx;
+}
+/*
+public static AxisService createSimpleService(QName serviceName,
+                                                     MessageReceiver messageReceiver,
+                                                     String className,
+                                                     QName opName) throws AxisFault {
+    AxisService service = new AxisService(serviceName);
+    service.setClassLoader(Thread.currentThread().getContextClassLoader());
+    service.addParameter(
+            new ParameterImpl(AbstractMessageReceiver.SERVICE_CLASS,
+                    className));
+
+    //todo I assumed in-out mep , this has to be imroved : Deepal
+    AxisOperation axisOp = new InOutAxisOperation(opName);
+    axisOp.setMessageReceiver(messageReceiver);
+    axisOp.setStyle(WSDLService.STYLE_RPC);
+    service.addOperation(axisOp);
+    return service;
+}
+
+//    public static ServiceContext createServiceContext(
+//        AxisService service,
+//        ConfigurationContext engineContext)
+//        throws AxisFault {
+//        ServiceContext serviceContext = new ServiceContext(service, engineContext);
+//        createExecutionChains(serviceContext);
+//        return serviceContext;
+//    }
+
+public static AxisService createSimpleService(QName serviceName,
+                                                     String className,
+                                                     QName opName) throws AxisFault {
+    return createSimpleService(serviceName,
+            new RawXMLINOutMessageReceiver(),
+            className,
+            opName);
+}
+
+//    public static void addHandlers(Flow flow, Phase phase) throws AxisFault {
+//        if (flow != null) {
+//            int handlerCount = flow.getHandlerCount();
+//            for (int i = 0; i < handlerCount; i++) {
+//                phase.addHandler(flow.getHandler(i).getHandler());
+//            }
+//        }
+//    }
+public static void resolvePhases(AxisConfiguration axisconfig,
+                                 AxisService axisService)
+        throws AxisFault, PhaseException {
+    //todo we do not need this
+//        PhaseResolver pr = new PhaseResolver(axisconfig, axisService);
+//        pr.buildchains();
+    // fixing the BUG AXIS2-278
+    // we do not need to  do this , since when adding a service this automatically done
+}
+
+public static String getParameterValue(Parameter param) {
+    if (param == null) {
+        return null;
+    } else {
+        return (String) param.getValue();
+    }
+}
+
+
+public static String[] parseRequestURLForServiceAndOperation(
+        String filePart) {
+    String[] values = new String[2];
+
+    int index = filePart.lastIndexOf(Constants.REQUEST_URL_PREFIX);
+    String serviceStr = null;
+    if (-1 != index) {
+        serviceStr =
+                filePart.substring(
+                        index + Constants.REQUEST_URL_PREFIX.length() + 1);
+        if ((index = serviceStr.indexOf('/')) > 0) {
+            values[0] = serviceStr.substring(0, index);
+            int lastIndex = serviceStr.indexOf('?');
+            if (lastIndex >= 0) {
+                values[1] = serviceStr.substring(index + 1, lastIndex);
+            } else {
+                values[1] = serviceStr.substring(index + 1);
+            }
+        } else {
+            values[0] = serviceStr;
+        }
+    }
+    return values;
+}
+
+public static void extractServiceGroupAndServiceInfo(String filePart, MessageContext messageContext)
throws AxisFault {
+    String[] values = parseRequestURLForServiceAndOperation(
+            filePart);
+    String serviceNameAndGroup = values[0];
+    if (serviceNameAndGroup != null) {
+        String[] serviceNameAndGroupStrings = serviceNameAndGroup.split(":");
+        AxisConfiguration registry =
+                messageContext.getSystemContext().getAxisConfiguration();
+        if (serviceNameAndGroupStrings[0] != null) {
+            AxisServiceGroup axisServiceGroup = registry.getServiceGroup(serviceNameAndGroupStrings[0]);
+            String serviceNameStr = "";
+            if (serviceNameAndGroupStrings.length == 1) {
+                // This means user has not given a service name.
+                // the notations is ...../axis2/services/<ServiceGroupName>
+                serviceNameStr = serviceNameAndGroupStrings[0];
+            }
+            AxisService axisService = registry.getService(serviceNameStr);
+            if (axisServiceGroup != null && axisService != null) {
+                messageContext.setAxisServiceGroup(axisServiceGroup);
+                messageContext.setAxisService(axisService);
+            }
+        }
+    }
+}
+
+public static ServiceContext fillContextInformation(AxisOperation axisOperation, AxisService
axisService, ConfigurationContext configurationContext) throws AxisFault {
+    MessageContext msgContext;
+    //  2. if null, create new opCtxt
+    OperationContext operationContext = new OperationContext(axisOperation);
+//        OperationContext operationContext = OperationContextFactory.createOperationContext(axisOperation.getAxisSpecifMEPConstant(),
axisOperation);
+
+    //  fill the service group context and service context info
+    return fillServiceContextAndServiceGroupContext(axisService, configurationContext);
+
+}
+
+private static ServiceContext fillServiceContextAndServiceGroupContext(AxisService axisService,
ConfigurationContext configurationContext) throws AxisFault {
+    String serviceGroupContextId = UUIDGenerator.getUUID();
+    ServiceGroupContext serviceGroupContext = new ServiceGroupContext(configurationContext,
axisService.getParent());
+    serviceGroupContext.setId(serviceGroupContextId);
+    configurationContext.registerServiceGroupContext(serviceGroupContext);
+    return new ServiceContext(axisService, serviceGroupContext);
+}
+
+public static ConfigurationContext getNewConfigurationContext(String repositry) throws Exception
{
+    ConfigurationContextFactory erfac = new ConfigurationContextFactory();
+    File file = new File(repositry);
+    if (!file.exists()) {
+        throw new Exception(
+                "repository directory " + file.getAbsolutePath() +
+                        " does not exists");
+    }
+    return erfac.buildConfigurationContext(
+            file.getAbsolutePath());
+}
+*/

Modified: webservices/axis2/trunk/c/modules/wsdl/axis2_wsdl.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/axis2_wsdl.h?rev=367552&r1=367551&r2=367552&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/axis2_wsdl.h (original)
+++ webservices/axis2/trunk/c/modules/wsdl/axis2_wsdl.h Tue Jan 10 02:15:12 2006
@@ -33,24 +33,24 @@
 /**
  * Field WSDL2_0_NAMESPACE
  */
-#define WSDL2_0_NAMESPACE "http://www.w3.org/2004/03/wsdl"
+#define AXIS2_WSDL2_0_NAMESPACE "http://www.w3.org/2004/03/wsdl"
 
 /**
  * Field WSDL1_1_NAMESPACE
  */
-#define WSDL1_1_NAMESPACE "http://schemas.xmlsoap.org/wsdl/"
+#define AXIS2_WSDL1_1_NAMESPACE "http://schemas.xmlsoap.org/wsdl/"
 
 
 /**
  * Field WSDL_MESSAGE_DIRECTION_IN
  */
-#define WSDL_MESSAGE_DIRECTION_IN "in"
+#define AXIS2_WSDL_MESSAGE_DIRECTION_IN "in"
 
 
 /**
  * Field WSDL_MESSAGE_DIRECTION_OUT
  */
-#define WSDL_MESSAGE_DIRECTION_OUT "out"
+#define AXIS2_WSDL_MESSAGE_DIRECTION_OUT "out"
 
 
 /*********************Message Exchange Pattern Constants***********************/
@@ -59,61 +59,61 @@
 /**
  * Field MEP_URI_IN_ONLY
  */
-#define MEP_URI_IN_ONLY "http://www.w3.org/2004/08/wsdl/in-only"
+#define AXIS2_MEP_URI_IN_ONLY "http://www.w3.org/2004/08/wsdl/in-only"
 
-#define MEP_CONSTANT_IN_ONLY 10
+#define AXIS2_MEP_CONSTANT_IN_ONLY 10
 
 /**
  * Field MEP_URI_ROBUST_IN_ONLY
  */
-#define MEP_URI_ROBUST_IN_ONLY "http://www.w3.org/2004/08/wsdl/robust-in-only"
+#define AXIS2_MEP_URI_ROBUST_IN_ONLY "http://www.w3.org/2004/08/wsdl/robust-in-only"
 
-#define MEP_CONSTANT_ROBUST_IN_ONLY 11
+#define AXIS2_MEP_CONSTANT_ROBUST_IN_ONLY 11
 
 /**
  * Field MEP_URI_IN_OUT
  */
-#define MEP_URI_IN_OUT "http://www.w3.org/2004/08/wsdl/in-out"
+#define AXIS2_MEP_URI_IN_OUT "http://www.w3.org/2004/08/wsdl/in-out"
 
-#define MEP_CONSTANT_IN_OUT 12
+#define AXIS2_MEP_CONSTANT_IN_OUT 12
 
 /**
  * Field MEP_URI_IN_OPTIONAL_OUT
  */
-#define MEP_URI_IN_OPTIONAL_OUT "http://www.w3.org/2004/08/wsdl/in-opt-out"
+#define AXIS2_MEP_URI_IN_OPTIONAL_OUT "http://www.w3.org/2004/08/wsdl/in-opt-out"
 
-#define MEP_CONSTANT_IN_OPTIONAL_OUT 13
+#define AXIS2_MEP_CONSTANT_IN_OPTIONAL_OUT 13
 
 /**
  * Field MEP_URI_OUT_ONLY
  */
-#define MEP_URI_OUT_ONLY "http://www.w3.org/2004/08/wsdl/out-only"
+#define AXIS2_MEP_URI_OUT_ONLY "http://www.w3.org/2004/08/wsdl/out-only"
 
-#define MEP_CONSTANT_OUT_ONLY 14
+#define AXIS2_MEP_CONSTANT_OUT_ONLY 14
 
 /**
  * Field MEP_URI_ROBUST_OUT_ONLY
  */
-#define MEP_URI_ROBUST_OUT_ONLY "http://www.w3.org/2004/08/wsdl/robust-out-only"
+#define AXIS2_MEP_URI_ROBUST_OUT_ONLY "http://www.w3.org/2004/08/wsdl/robust-out-only"
 
-#define MEP_CONSTANT_ROBUST_OUT_ONLY 15
+#define AXIS2_MEP_CONSTANT_ROBUST_OUT_ONLY 15
 
 /**
  * Field MEP_URI_OUT_IN
  */
-#define MEP_URI_OUT_IN "http://www.w3.org/2004/08/wsdl/out-in"
+#define AXIS2_MEP_URI_OUT_IN "http://www.w3.org/2004/08/wsdl/out-in"
 
-#define MEP_CONSTANT_OUT_IN 16
+#define AXIS2_MEP_CONSTANT_OUT_IN 16
 
 /**
  * Field MEP_URI_OUT_OPTIONL_IN
  */
-#define MEP_URI_OUT_OPTIONAL_IN "http://www.w3.org/2004/08/wsdl/out-opt-in"
+#define AXIS2_MEP_URI_OUT_OPTIONAL_IN "http://www.w3.org/2004/08/wsdl/out-opt-in"
 
-#define MEP_CONSTANT_OUT_OPTIONAL_IN 17
+#define AXIS2_MEP_CONSTANT_OUT_OPTIONAL_IN 17
 
 
-#define MEP_CONSTANT_INVALID -1
+#define AXIS2_MEP_CONSTANT_INVALID -1
 
 /******************************Message Labels**********************************/
 
@@ -122,46 +122,46 @@
  * following WSDL 2.0 defined MEPs: In-Only, Robust In-Only, In-Out,
  * In-Optional-Out, Out-In, Out-Optional-In.
  */
-#define MESSAGE_LABEL_IN 0
+#define AXIS2_MESSAGE_LABEL_IN 0
 
-#define MESSAGE_LABEL_IN_VALUE "In"
+#define AXIS2_MESSAGE_LABEL_IN_VALUE "In"
 
 /**
  * Constant to represent the message label "Out" which is used by the
  * following WSDL 2.0 defined MEPs: In-Out, In-Optional-Out, Out-Only,
  * Robust Out-Only, Out-In, Out-Optional-In.
  */
-#define MESSAGE_LABEL_OUT 1
+#define AXIS2_MESSAGE_LABEL_OUT 1
 
-#define MESSAGE_LABEL_OUT_VALUE "Out"
+#define AXIS2_MESSAGE_LABEL_OUT_VALUE "Out"
 
 /**
  *
  */
-#define WSDL_USE_LITERAL "literal"
-#define WSDL_USE_ENCODED "encoded"
+#define AXIS2_WSDL_USE_LITERAL "literal"
+#define AXIS2_WSDL_USE_ENCODED "encoded"
 
 /********************wsdl extensible constants*********************************/
 /**
  * The Type name for the SOAP Address defined in the Port/Endpoint
  */
-#define SOAP_11_ADDRESS "http://schemas.xmlsoap.org/wsdl/soap/"
-#define SOAP_12_ADDRESS "http://schemas.xmlsoap.org/wsdl/soap12/"
+#define AXIS2_SOAP_11_ADDRESS "http://schemas.xmlsoap.org/wsdl/soap/"
+#define AXIS2_SOAP_12_ADDRESS "http://schemas.xmlsoap.org/wsdl/soap12/"
 
 
-#define SOAP_11_OP "http://schemas.xmlsoap.org/wsdl/soap/"
- #define SOAP_12_OP "http://schemas.xmlsoap.org/wsdl/soap12/"
+#define AXIS2_SOAP_11_OP "http://schemas.xmlsoap.org/wsdl/soap/"
+ #define AXIS2_SOAP_12_OP "http://schemas.xmlsoap.org/wsdl/soap12/"
 
-#define SCHEMA "http://www.w3.org/2001/XMLSchema"
+#define AXIS2_SCHEMA "http://www.w3.org/2001/XMLSchema"
 
-#define SOAP_11_BODY "http://schemas.xmlsoap.org/wsdl/soap/"
-#define SOAP_12_BODY "http://schemas.xmlsoap.org/wsdl/soap12/"
+#define AXIS2_SOAP_11_BODY "http://schemas.xmlsoap.org/wsdl/soap/"
+#define AXIS2_SOAP_12_BODY "http://schemas.xmlsoap.org/wsdl/soap12/"
 
-#define SOAP_11_HEADER "http://schemas.xmlsoap.org/wsdl/soap/"
-#define SOAP_12_HEADER "http://schemas.xmlsoap.org/wsdl/soap12/"
+#define AXIS2_SOAP_11_HEADER "http://schemas.xmlsoap.org/wsdl/soap/"
+#define AXIS2_SOAP_12_HEADER "http://schemas.xmlsoap.org/wsdl/soap12/"
 
-#define SOAP_11_BINDING "http://schemas.xmlsoap.org/wsdl/soap/"
-#define SOAP_12_BINDING "http://schemas.xmlsoap.org/wsdl/soap12/"
+#define AXIS2_SOAP_11_BINDING "http://schemas.xmlsoap.org/wsdl/soap/"
+#define AXIS2_SOAP_12_BINDING "http://schemas.xmlsoap.org/wsdl/soap12/"
 
 /*********************************** Constants*********************************/	
 	

Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_soap_op.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_soap_op.c?rev=367552&r1=367551&r2=367552&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_soap_op.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_soap_op.c Tue Jan 10 02:15:12 2006
@@ -82,7 +82,7 @@
     soap_op_impl->soap_op.ops = NULL;
     axis2_qname_t *type_l = NULL;
     
-    type_l = axis2_qname_create(env, "op", SOAP_11_OP, NULL);
+    type_l = axis2_qname_create(env, "op", AXIS2_SOAP_11_OP, NULL);
     
     AXIS2_WSDL_EXTENSIBLE_ELEMENT_SET_TYPE(soap_op_impl->soap_op.
         extensible_element, env, type_l);



Mime
View raw message