You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2006/03/21 06:35:12 UTC

svn commit: r387425 - in /webservices/axis2/trunk/c/samples/client: addr_echo/echo_client.c echo_non_blocking/echo_client.c google/google_client.c

Author: samisa
Date: Mon Mar 20 21:35:10 2006
New Revision: 387425

URL: http://svn.apache.org/viewcvs?rev=387425&view=rev
Log:
Fixed the problem of client segfaulting when repo path not set properly. AXIS2C-91

Modified:
    webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c
    webservices/axis2/trunk/c/samples/client/echo_non_blocking/echo_client.c
    webservices/axis2/trunk/c/samples/client/google/google_client.c

Modified: webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c?rev=387425&r1=387424&r2=387425&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c (original)
+++ webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c Mon Mar 20 21:35:10 2006
@@ -106,6 +106,12 @@
     /* Prepare the SOAP envelope, using the SOAP message content to be sent.
      * Get a reference to the message context */
     msg_ctx = AXIS2_MEP_CLIENT_PREPARE_SOAP_ENVELOPE(mep_client, &env, node);
+    if (!msg_ctx)
+    {
+        printf("ERROR: Could not prepare message context. ");
+        printf("May be you havent set the repository corretly.\n");
+        return -1;
+    }
 
     /* Get the reference to message info headers structure from the message context. 
        This can be used to manipulate SOAP header content when using WS-Addressing. */

Modified: webservices/axis2/trunk/c/samples/client/echo_non_blocking/echo_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/samples/client/echo_non_blocking/echo_client.c?rev=387425&r1=387424&r2=387425&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/client/echo_non_blocking/echo_client.c (original)
+++ webservices/axis2/trunk/c/samples/client/echo_non_blocking/echo_client.c Mon Mar 20 21:35:10 2006
@@ -95,6 +95,13 @@
     call = axis2_call_create(&env, NULL, client_home);
     mep_client = AXIS2_CALL_GET_BASE(call, &env);
     msg_ctx = AXIS2_MEP_CLIENT_PREPARE_SOAP_ENVELOPE(mep_client, &env, node);
+    if (!msg_ctx)
+    {
+        printf("ERROR: Could not prepare message context. ");
+        printf("May be you havent set the repository corretly.\n");
+        return -1;
+    }
+    
     msg_info_headers = AXIS2_MSG_CTX_GET_MSG_INFO_HEADERS(msg_ctx, &env);
     endpoint_ref = axis2_endpoint_ref_create(&env, address);
     AXIS2_MSG_INFO_HEADERS_SET_TO(msg_info_headers, &env, endpoint_ref);

Modified: webservices/axis2/trunk/c/samples/client/google/google_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/samples/client/google/google_client.c?rev=387425&r1=387424&r2=387425&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/client/google/google_client.c (original)
+++ webservices/axis2/trunk/c/samples/client/google/google_client.c Mon Mar 20 21:35:10 2006
@@ -121,6 +121,13 @@
     build_soap_body_content(&env, operation, google_key, word_to_spell, body_node);
 
     msg_ctx = AXIS2_MEP_CLIENT_PREPARE_SOAP_ENVELOPE(mep_client, &env, node);
+    if (!msg_ctx)
+    {
+        printf("ERROR: Could not prepare message context. ");
+        printf("May be you havent set the repository corretly.\n");
+        return -1;
+    }
+
     AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(msg_ctx, &env, soap_envelope);
     endpoint_ref = axis2_endpoint_ref_create(&env, address);
     AXIS2_CALL_SET_TO(call, &env, endpoint_ref);