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 sa...@apache.org on 2006/09/26 17:37:37 UTC

svn commit: r450090 - in /webservices/axis2/trunk/c/modules/core: clientapi/mep_client.c clientapi/op_client.c transport/http/sender/soap_over_http_sender.c

Author: samisa
Date: Tue Sep 26 08:37:37 2006
New Revision: 450090

URL: http://svn.apache.org/viewvc?view=rev&rev=450090
Log:
Fixed the problem of one way client not picking the status code

Modified:
    webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c
    webservices/axis2/trunk/c/modules/core/clientapi/op_client.c
    webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c

Modified: webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c?view=diff&rev=450090&r1=450089&r2=450090
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c Tue Sep 26 08:37:37 2006
@@ -634,6 +634,18 @@
     if (status != AXIS2_SUCCESS)
         return NULL;
 
+    op = AXIS2_MSG_CTX_GET_OP(msg_ctx, env);
+    if (op)
+    {
+        /* handle one way case */
+        const axis2_char_t *mep = AXIS2_OP_GET_MSG_EXCHANGE_PATTERN(op, env);
+        if (AXIS2_STRCMP(mep, AXIS2_MEP_URI_OUT_ONLY) == 0 ||
+            AXIS2_STRCMP(mep, AXIS2_MEP_URI_ROBUST_OUT_ONLY) == 0)
+        {
+            return NULL;
+        }
+    }
+
     /* create the response */
     response = axis2_msg_ctx_create(env, conf_ctx,
             AXIS2_MSG_CTX_GET_TRANSPORT_IN_DESC(msg_ctx, env),
@@ -649,7 +661,7 @@
         property = NULL;
     }
 
-    op = AXIS2_MSG_CTX_GET_OP(msg_ctx, env);
+    /*op = AXIS2_MSG_CTX_GET_OP(msg_ctx, env);*/
     if (op)
     {
         AXIS2_OP_REGISTER_OP_CTX(op, env, response, AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env));

Modified: webservices/axis2/trunk/c/modules/core/clientapi/op_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/op_client.c?view=diff&rev=450090&r1=450089&r2=450090
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/op_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/op_client.c Tue Sep 26 08:37:37 2006
@@ -505,7 +505,8 @@
                 if (AXIS2_STRCMP(mep, AXIS2_MEP_URI_OUT_ONLY) == 0 ||
                         AXIS2_STRCMP(mep, AXIS2_MEP_URI_ROBUST_OUT_ONLY) == 0)
                 {
-                    return AXIS2_SUCCESS;
+                    return AXIS2_ERROR_GET_STATUS_CODE(env->error);
+                    /*return AXIS2_SUCCESS;*/
                 }
                 else
                     return AXIS2_FAILURE;

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c?view=diff&rev=450090&r1=450089&r2=450090
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c Tue Sep 26 08:37:37 2006
@@ -436,12 +436,31 @@
     {
         axis2_http_header_t *tmp_header = NULL;
         axis2_char_t *tmp_header_val = NULL;
+        axis2_op_t *op = NULL;
+
+        op = AXIS2_MSG_CTX_GET_OP(msg_ctx, env);
+        if (op)
+        {
+            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_HTTP_CLIENT_TRANSPORT_ERROR,
+                AXIS2_FAILURE);
+            /* handle one way case */
+            const axis2_char_t *mep = AXIS2_OP_GET_MSG_EXCHANGE_PATTERN(op, env);
+            if (AXIS2_STRCMP(mep, AXIS2_MEP_URI_OUT_ONLY) == 0 ||
+                AXIS2_STRCMP(mep, AXIS2_MEP_URI_ROBUST_OUT_ONLY) == 0)
+            {
+                return AXIS2_FAILURE;
+            }
+        }
+            
+        /* set an error to indicate error code status */
         tmp_header = AXIS2_HTTP_SIMPLE_RESPONSE_GET_FIRST_HEADER(response, env,
                 AXIS2_HTTP_HEADER_CONTENT_TYPE);
         if (tmp_header)
         {
             tmp_header_val = AXIS2_HTTP_HEADER_GET_VALUE(tmp_header, env);
         }
+        
+        
         if (tmp_header_val && (AXIS2_STRSTR(tmp_header_val,
                 AXIS2_HTTP_HEADER_ACCEPT_APPL_SOAP) || AXIS2_STRSTR(
                     tmp_header_val, AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML)))



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org