ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r373760 - in /webservices/axis2/trunk/c: deploy/client_repository/axis2.xml include/axis2_call.h modules/core/clientapi/call.c modules/core/clientapi/stub.c test/client/echo/Makefile.am test/client/echo/echo_client.c
Date Tue, 31 Jan 2006 08:38:22 GMT
Author: damitha
Date: Tue Jan 31 00:38:04 2006
New Revision: 373760

URL: http://svn.apache.org/viewcvs?rev=373760&view=rev
Log:
Fixing bugs while making request from stub client work

Modified:
    webservices/axis2/trunk/c/deploy/client_repository/axis2.xml
    webservices/axis2/trunk/c/include/axis2_call.h
    webservices/axis2/trunk/c/modules/core/clientapi/call.c
    webservices/axis2/trunk/c/modules/core/clientapi/stub.c
    webservices/axis2/trunk/c/test/client/echo/Makefile.am
    webservices/axis2/trunk/c/test/client/echo/echo_client.c

Modified: webservices/axis2/trunk/c/deploy/client_repository/axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/deploy/client_repository/axis2.xml?rev=373760&r1=373759&r2=373760&view=diff
==============================================================================
--- webservices/axis2/trunk/c/deploy/client_repository/axis2.xml (original)
+++ webservices/axis2/trunk/c/deploy/client_repository/axis2.xml Tue Jan 31 00:38:04 2006
@@ -2,8 +2,163 @@
     <!-- ================================================= -->
     <!-- Parameters -->
     <!-- ================================================= -->
+    <parameter name="hotdeployment" locked="false">false</parameter>
+    <parameter name="hotupdate" locked="false">false</parameter>
+    <parameter name="enableMTOM" locked="false">true</parameter>
+    <!-- Uncomment this to enable REST support -->
+    <!--    <parameter name="enableREST" locked="false">true</parameter>-->
+
+
     <parameter name="userName" locked="false">admin</parameter>
     <parameter name="password" locked="false">axis2</parameter>
 
+    <parameter name="seralizeLocation" locked="false">.</parameter>
+    <hostConfiguration>
+        <ip>127.0.0.1</ip>
+        <port>5555</port>
+    </hostConfiguration>
+
+
+    <!--if you want to extract the service archive file and work with that please uncomment
this-->
+    <!--else , it wont extract archive file or does not take into consideration if someone
drop-->
+    <!--exploded directory into /service directory-->
+    <!--<parameter name="extractServiceArchive" locked="false">true</parameter>-->
+
+
+    <!--    The way of adding listener to the system-->
+    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
+    <!--        <parameter name="RSS_URL" locked="false">http://127.0.0.1/rss</parameter>-->
+    <!--    </listener>-->
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!-- This is the Deafult Message Receiver for the Request Response style Operations
-->
+    <messageReceiver mep="INOUT" class="libaxis2_receivers.so"/>
+
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http" class="libaxis2_http_receiver.so">
+        <parameter name="port" locked="false">6060</parameter>
+    </transportReceiver>
+
+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport
Receiver
+    <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">
+          <parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>
+          <parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>
+          <parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>
+          <parameter name="transport.mail.pop3.port" locked="false">110</parameter>
+          <parameter name="transport.mail.replyToAddress" locked="false">axis2@127.0.0.1</parameter>
+      </transportReceiver> -->
+    
+    <!--
+    <transportReceiver name="tcp" class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port" locked="false">6060</parameter>
+    </transportReceiver>
+    -->
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <!--
+    <transportSender name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>

+    -->
+    <transportSender name="http" class="libaxis2_http_sender.so">
+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+    </transportSender>
+    <!--
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+    </transportSender>
+    -->
+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport
Receiver
+   <transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
+       <parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>
+       <parameter name="transport.mail.smtp.user" locked="false">axis2</parameter>
+       <parameter name="transport.mail.smtp.password" locked="false">axis2</parameter>
+       <parameter name="transport.mail.smtp.port" locked="false">25</parameter>
+   </transportSender>
+   -->
+
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
+    <!-- Comment this to disable Addressing -->
+    <!--<module ref="addressing"/>-->
+
+
+    <!--Configuring module , providing paramters for modules whether they refer or not-->
+    <!--<moduleConfig name="addressing">-->
+    <!--<parameter name="addressingPara" locked="false">N/A</parameter>-->
+    <!--</moduleConfig>-->
+
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="inflow">
+        <!--  System pre defined phases       -->
+        <phase name="TransportIn"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch">
+            <handler name="AddressingBasedDispatcher"
+                     class="axis2_engine.so">
+                <order phase="Dispatch"/>
+            </handler>
+             <handler name="RequestURIBasedDispatcher"
+                     class="axis2_engine.so">
+                <order phase="Dispatch"/>
+            </handler>
+             <handler name="SOAPActionBasedDispatcher"
+                     class="axis2_engine.so">
+                <order phase="Dispatch"/>
+            </handler>
+             <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="axis2_engine.so">
+                <order phase="Dispatch"/>
+            </handler>
+        </phase>
+        <phase name="PostDispatch">
+             <handler name="DispatchPostConditionsEvaluator"
+                     class="axis2_engine.so">
+                <order phase="PostDispatch"/>
+            </handler>
+            <handler name="InstanceDispatcher"
+                     class="axis2_engine.so">
+                <order phase="PostDispatch"/>
+            </handler>
+            <handler name="SOAPProcessingModelChecker"
+                     class="axis2_engine.so">
+                <order phase="PostDispatch"/>
+            </handler>
+        </phase>
+        <!--  System pre defined phases       -->
+        <!--   After Postdispatch phase module author or or service author can add any
phase he want      -->
+        <phase name="userphase1"/>
+	  <phase name="RMPhase"/>
+    </phaseOrder>
+    <phaseOrder type="outflow">
+        <!--      user can add his own phases to this area  -->
+	  <phase name="RMPhase"/>
+        <phase name="userphase1"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+    </phaseOrder>
+    <phaseOrder type="INfaultflow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="userphase1"/>
+	  <phase name="RMPhase"/>
+    </phaseOrder>
+    <phaseOrder type="Outfaultflow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="RMPhase"/>
+        <phase name="userphase1"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+    </phaseOrder>
 </axisconfig>
 

Modified: webservices/axis2/trunk/c/include/axis2_call.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_call.h?rev=373760&r1=373759&r2=373760&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_call.h (original)
+++ webservices/axis2/trunk/c/include/axis2_call.h Tue Jan 31 00:38:04 2006
@@ -210,14 +210,10 @@
     axis2_call_ops_t *ops;    
 };
 
-AXIS2_DECLARE(axis2_call_t*) axis2_call_create(axis2_env_t **env, axis2_svc_ctx_t *svc_ctx);
+AXIS2_DECLARE(axis2_call_t*) axis2_call_create(axis2_env_t **env, 
+    axis2_svc_ctx_t *svc_ctx, 
+    axis2_char_t *client_home);
 
-AXIS2_DECLARE(axis2_call_t*)
-axis2_call_create_with_svc_ctx_and_client_home(axis2_env_t **env,
-                                                axis2_svc_ctx_t *svc_ctx,
-                                                axis2_char_t *client_home);
-
-    
 /************************** Start of function macros **************************/
 
 #define AXIS2_CALL_SET_TO(call, env, to) ((call)->ops->set_to(call, env, to))

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=373760&r1=373759&r2=373760&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/call.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/call.c Tue Jan 31 00:38:04 2006
@@ -164,7 +164,8 @@
 /******************************************************************************/
 
 axis2_call_t* AXIS2_CALL axis2_call_create(axis2_env_t **env, 
-                                            axis2_svc_ctx_t *svc_ctx) 
+                                            axis2_svc_ctx_t *svc_ctx,
+                                            axis2_char_t *client_home) 
 {
     axis2_call_impl_t *call_impl = NULL;
     
@@ -199,9 +200,11 @@
     else
     {
         /*assume svc ctx */
+        call_impl->svc_ctx = axis2_call_assume_svc_ctx(&(call_impl->call), env,

+            client_home);
     }
     
-    call_impl->base = axis2_mep_client_create(env, svc_ctx, AXIS2_MEP_URI_OUT_IN);
+    call_impl->base = axis2_mep_client_create(env, call_impl->svc_ctx, AXIS2_MEP_URI_OUT_IN);
     if (!(call_impl->base))
     {
         axis2_call_free(&(call_impl->call), env);
@@ -240,39 +243,6 @@
     return &(call_impl->call);
 }
 
-axis2_call_t* AXIS2_CALL 
-axis2_call_create_with_svc_ctx_and_client_home(axis2_env_t **env,
-                                                axis2_svc_ctx_t *svc_ctx,
-                                                axis2_char_t *client_home) 
-{
-    axis2_call_impl_t *call_impl = NULL;
-    
-    AXIS2_ENV_CHECK(env, NULL);
-    /*AXIS2_PARAM_CHECK((*env)->error, svc_ctx, NULL);*/
-    
-    call_impl = (axis2_call_impl_t *) axis2_call_create(env, NULL);
-    if (!call_impl)
-    { 
-        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;        
-    }
-    call_impl->svc_ctx = NULL;
-    if(svc_ctx)
-    {
-        call_impl->svc_ctx = svc_ctx;
-    }
-    else
-    {
-        /*assume svc ctx */
-        call_impl->svc_ctx = axis2_call_assume_svc_ctx(&(call_impl->call), env,

-            client_home);
-    }
-    
-    
-    
-    return &(call_impl->call);
-}
-
 /******************************************************************************/
 
 axis2_status_t AXIS2_CALL axis2_call_free(struct axis2_call *call, 
@@ -636,7 +606,11 @@
     }
 
     /* find and set the transport details */
-    conf_ctx = AXIS2_SVC_CTX_GET_CONF_CTX(call_impl->svc_ctx, env);
+    if (call_impl->svc_ctx)
+    {
+        conf_ctx = AXIS2_SVC_CTX_GET_CONF_CTX(call_impl->svc_ctx, env);
+    }
+    
     if (conf_ctx)
     {
         conf = AXIS2_CONF_CTX_GET_CONF(conf_ctx, env);
@@ -708,6 +682,12 @@
         call_impl->sender_transport = AXIS2_MEP_CLIENT_INFER_TRANSPORT(call_impl->base,
env, call_impl->to);
     }
     
+    if (!(call_impl->sender_transport)) 
+    {
+        /** TODO : set an error here */
+        return AXIS2_FAILURE;
+    }
+    
     if (!(call_impl->listener_transport))
     {
         axis2_conf_ctx_t *conf_ctx = AXIS2_SVC_CTX_GET_CONF_CTX(call_impl->svc_ctx, env);
@@ -1112,10 +1092,12 @@
         axis2_array_list_t *remaining_phases = NULL;
         
         op = axis2_op_create_with_qname(env, op_qname);
+        AXIS2_OP_SET_MSG_EXCHANGE_PATTERN(op, env, AXIS2_MEP_URI_OUT_IN);
         if(!op)
         {
             return AXIS2_FAILURE;   
         }
+        call_impl->op_template = op;
         remaining_phases = AXIS2_OP_GET_REMAINING_PHASES_INFLOW(call_impl->
             op_template, env);
         AXIS2_OP_SET_REMAINING_PHASES_INFLOW(op, env, remaining_phases);
@@ -1239,6 +1221,7 @@
             "TemplateOperation")); */
         qtemp_op = axis2_qname_create(env, "TemplateOperation", NULL, NULL);
         call_impl->op_template = axis2_op_create_with_qname(env, qtemp_op);
+        AXIS2_OP_SET_MSG_EXCHANGE_PATTERN(call_impl->op_template, env, AXIS2_MEP_URI_OUT_IN);
         AXIS2_QNAME_FREE(qtemp_op, env);
         info = AXIS2_CONF_GET_PHASESINFO(conf, env);
         /* to set the operation flows */
@@ -1251,8 +1234,8 @@
     }
     svc_grp = AXIS2_SVC_GET_PARENT(axis_svc, env);
     svc_grp_ctx = AXIS2_SVC_GRP_GET_SVC_GRP_CTX(svc_grp, env, conf_ctx);
-    assumed_svc_name = AXIS2_QNAME_GET_LOCALPART(assumed_svc_qname, env);
-    AXIS2_QNAME_FREE(assumed_svc_qname, env);
+    assumed_svc_name = AXIS2_QNAME_GET_LOCALPART(assumed_svc_qname, env);    
     svc_ctx = AXIS2_SVC_GRP_CTX_GET_SVC_CTX(svc_grp_ctx, env, assumed_svc_name);
+    AXIS2_QNAME_FREE(assumed_svc_qname, env);
     return svc_ctx;
 }

Modified: webservices/axis2/trunk/c/modules/core/clientapi/stub.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/stub.c?rev=373760&r1=373759&r2=373760&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/stub.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/stub.c Tue Jan 31 00:38:04 2006
@@ -274,7 +274,7 @@
         return NULL;  
     }
     /* create call without passing svc_ctx_t struct */
-    stub_impl->call = axis2_call_create_with_svc_ctx_and_client_home(env, NULL,
+    stub_impl->call = axis2_call_create(env, NULL,
         client_home);
     
     if(!stub_impl->call)

Modified: webservices/axis2/trunk/c/test/client/echo/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/client/echo/Makefile.am?rev=373760&r1=373759&r2=373760&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/client/echo/Makefile.am (original)
+++ webservices/axis2/trunk/c/test/client/echo/Makefile.am Tue Jan 31 00:38:04 2006
@@ -18,6 +18,9 @@
                     -laxis2_core_util \
                     -laxis2_clientapi \
                     -laxis2_soap \
+                    -laxis2_http_transport \
+                    -laxis2_http_sender \
+                    -laxis2_http_receiver \
                     -L$(GUTHTHILA_LIB) $(GUTHTHILA_LIBNAME) \
                     -L$(LIBXML2_LIB) $(LIBXML2_LIBNAME)
 

Modified: webservices/axis2/trunk/c/test/client/echo/echo_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/client/echo/echo_client.c?rev=373760&r1=373759&r2=373760&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/client/echo/echo_client.c (original)
+++ webservices/axis2/trunk/c/test/client/echo/echo_client.c Tue Jan 31 00:38:04 2006
@@ -34,7 +34,7 @@
     axis2_error_t *error = NULL;
     axis2_log_t *log = NULL;
     axis2_allocator_t *allocator = NULL;
-    axis2_endpoint_ref_t *epr = NULL;
+    /*axis2_endpoint_ref_t *epr = NULL; */
     axis2_char_t *address = NULL;
     axis2_char_t *client_home = NULL;
     axis2_char_t *temp_path1 = NULL;
@@ -46,18 +46,19 @@
     env = axis2_env_create_with_error_log(allocator, error, log);
     env->log->level = AXIS2_LOG_LEVEL_INFO;
 
-    temp_path1 = AXIS2_GETENV("AXIS2C_HOME");
+    client_home = AXIS2_GETENV("AXIS2C_HOME");
+    /*temp_path1 = AXIS2_GETENV("AXIS2C_HOME");
     temp_path2 = AXIS2_STRACAT(temp_path1, AXIS2_PATH_SEP_STR, &env);
     client_home = AXIS2_STRACAT(temp_path2, "client_repository", &env);
-    AXIS2_FREE((env)->allocator, temp_path1);
+    AXIS2_FREE((env)->allocator, temp_path1);*/
     AXIS2_FREE((env)->allocator, temp_path2);
 
     envelope = build_soap_programatically(&env);
     node = AXIS2_SOAP_ENVELOPE_GET_BASE_NODE(envelope, &env);
-    address = "http://localhost:9090/echo";
-    epr = axis2_endpoint_ref_create(&env, address);
+    address = "http://localhost:9090/axis2/services/echo/echo";
+    /*epr = axis2_endpoint_ref_create(&env, address);*/
     stub = 
-        axis2_echo_stub_create_with_endpoint_ref_and_client_home(&env, epr,
+        axis2_stub_create_with_endpoint_uri_and_client_home(&env, address,
             client_home);
     AXIS2_STUB_SET_TRANSPORT_INFO(stub, &env, AXIS2_TRANSPORT_HTTP, 
         AXIS2_TRANSPORT_HTTP, AXIS2_FALSE);



Mime
View raw message