axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r662724 - in /webservices/axis2/trunk/c: samples/server/notify/notify.c samples/server/notify/notify_skeleton.c src/core/receivers/raw_xml_in_out_msg_recv.c
Date Tue, 03 Jun 2008 10:05:32 GMT
Author: damitha
Date: Tue Jun  3 03:05:32 2008
New Revision: 662724

URL: http://svn.apache.org/viewvc?rev=662724&view=rev
Log:
In notify sample there were some printf fuction calls. Replaced them with LOG messages. Also
when an error status code is set in notify service it was not handled in message receiver.
Fixed it.

Modified:
    webservices/axis2/trunk/c/samples/server/notify/notify.c
    webservices/axis2/trunk/c/samples/server/notify/notify_skeleton.c
    webservices/axis2/trunk/c/src/core/receivers/raw_xml_in_out_msg_recv.c

Modified: webservices/axis2/trunk/c/samples/server/notify/notify.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/notify/notify.c?rev=662724&r1=662723&r2=662724&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/notify/notify.c (original)
+++ webservices/axis2/trunk/c/samples/server/notify/notify.c Tue Jun  3 03:05:32 2008
@@ -26,7 +26,9 @@
     axiom_node_t *text_node = NULL;
 
     if (!env || !env)
+    {
         return;
+    }
 
     /* Expected request format is :-
        <m:notify xmlns:m="http://example.org/notify">Message 3</m:notify>
@@ -35,7 +37,7 @@
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INPUT_OM_NODE_NULL,
                         AXIS2_FAILURE);
-        printf("Echo client ERROR: input parameter NULL\n");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Echo client ERROR: input parameter NULL");
         return;
     }
 
@@ -45,7 +47,7 @@
         AXIS2_ERROR_SET(env->error,
                         AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST,
                         AXIS2_FAILURE);
-        printf("Echo client ERROR: invalid XML in request\n");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Echo client ERROR: invalid XML in request");
         return;
     }
 
@@ -57,7 +59,7 @@
         {
             axis2_char_t *text_str =
                 (axis2_char_t *) axiom_text_get_value(text, env);
-            printf("Notification received :  %s \n", text_str);
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Notification received :  %s", text_str);
         }
     }
     else
@@ -65,9 +67,11 @@
         AXIS2_ERROR_SET(env->error,
                         AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST,
                         AXIS2_FAILURE);
-        printf("Echo client ERROR: invalid XML in request\n");
+        printf("\n");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Echo client ERROR: invalid XML in request");
         return;
     }
 
     return;
 }
+

Modified: webservices/axis2/trunk/c/samples/server/notify/notify_skeleton.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/notify/notify_skeleton.c?rev=662724&r1=662723&r2=662724&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/notify/notify_skeleton.c (original)
+++ webservices/axis2/trunk/c/samples/server/notify/notify_skeleton.c Tue Jun  3 03:05:32
2008
@@ -107,9 +107,9 @@
     axiom_node_t *error_node = NULL;
     axiom_node_t *text_node = NULL;
     axiom_element_t *error_ele = NULL;
-    error_ele = axiom_element_create(env, node, "EchoServiceError", NULL,
+    error_ele = axiom_element_create(env, node, "NotifyServiceError", NULL,
                                      &error_node);
-    axiom_element_set_text(error_ele, env, "Echo service failed ", text_node);
+    axiom_element_set_text(error_ele, env, "Notify service failed ", text_node);
     return error_node;
 }
 

Modified: webservices/axis2/trunk/c/src/core/receivers/raw_xml_in_out_msg_recv.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/receivers/raw_xml_in_out_msg_recv.c?rev=662724&r1=662723&r2=662724&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/receivers/raw_xml_in_out_msg_recv.c (original)
+++ webservices/axis2/trunk/c/src/core/receivers/raw_xml_in_out_msg_recv.c Tue Jun  3 03:05:32
2008
@@ -220,7 +220,6 @@
                 AXIS2_SVC_SKELETON_INVOKE(svc_obj, env, om_node, new_msg_ctx);
         }
 
-        axis2_msg_ctx_set_no_content(new_msg_ctx, env, AXIS2_FALSE);
         if (result_node)
         {
             if (0 == axutil_strcmp(style, AXIS2_STYLE_RPC))
@@ -354,6 +353,7 @@
         {
             fault_detail =
                 axiom_soap_fault_detail_create_with_parent(env, soap_fault);
+            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "fault_detail:%s", fault_detail);
             axiom_soap_fault_detail_add_detail_entry(fault_detail, env,
                                                      fault_node);
         }



Mime
View raw message