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 di...@apache.org on 2006/10/16 08:47:01 UTC
svn commit: r464397 - in /webservices/axis2/trunk/c/samples: ./
client/dynamic_client/ client/echo/ client/google/ client/math/
client/mtom/ client/notify/ user_guide/clients/
Author: dinesh
Date: Sun Oct 15 23:46:56 2006
New Revision: 464397
URL: http://svn.apache.org/viewvc?view=rev&rev=464397
Log:
fixed: segmentation fault of clients when AXIS2C_HOME not set
Modified:
webservices/axis2/trunk/c/samples/client/dynamic_client/dynamic_client.c
webservices/axis2/trunk/c/samples/client/echo/echo.c
webservices/axis2/trunk/c/samples/client/google/google_client.c
webservices/axis2/trunk/c/samples/client/math/math_client.c
webservices/axis2/trunk/c/samples/client/mtom/mtom_client.c
webservices/axis2/trunk/c/samples/client/notify/notify_client.c
webservices/axis2/trunk/c/samples/configure.ac
webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking.c
webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_addr.c
webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_dual.c
webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_soap11.c
webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking.c
webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking_dual.c
webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c
Modified: webservices/axis2/trunk/c/samples/client/dynamic_client/dynamic_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/client/dynamic_client/dynamic_client.c?view=diff&rev=464397&r1=464396&r2=464397
==============================================================================
--- webservices/axis2/trunk/c/samples/client/dynamic_client/dynamic_client.c (original)
+++ webservices/axis2/trunk/c/samples/client/dynamic_client/dynamic_client.c Sun Oct 15 23:46:56 2006
@@ -100,8 +100,8 @@
* modules that the client uses
*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home)
- client_home = "../../deploy";
+ if (!client_home || !strcmp (client_home, ""))
+ client_home = "../..";
wsdl_svc_qname = axis2_qname_create(env, "Calculator",
"http://localhost/axis/Calculator", NULL);
@@ -111,7 +111,7 @@
env, NULL, wsdl_uri, wsdl_svc_qname, "Calculator", client_home);
if (!svc_client)
{
- printf("Service client is NULL \n");
+ printf("Error creating service client, Please check AXIS2C_HOME again\n");
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Service client is NULL");
return 1;
}
@@ -128,7 +128,7 @@
om_str = AXIOM_NODE_TO_STRING(response, env);
if (om_str)
printf("\nReceived OM : %s\n", om_str);
- printf("status:%s\n", "Success");
+ printf("status:%s\n", "Successful");
}
else
printf("status:%s\n", "Failure");
@@ -162,8 +162,8 @@
* modules that the client uses
*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home)
- client_home = "../../deploy";
+ if (!client_home || !strcmp (client_home, ""))
+ client_home = "../..";
wsdl_svc_qname = axis2_qname_create(env, "reservationService",
"http://greath.example.com/2004/wsdl/resSvc", NULL);
@@ -175,7 +175,7 @@
{
printf("Service client is NULL \n");
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Service client is NULL");
- return 1;
+ return -1;
}
payload = build_om_programatically_for_wsdl2(env);
op_qname = axis2_qname_create(env, "add", "http://localhost/axis/Calculator",
Modified: webservices/axis2/trunk/c/samples/client/echo/echo.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/client/echo/echo.c?view=diff&rev=464397&r1=464396&r2=464397
==============================================================================
--- webservices/axis2/trunk/c/samples/client/echo/echo.c (original)
+++ webservices/axis2/trunk/c/samples/client/echo/echo.c Sun Oct 15 23:46:56 2006
@@ -68,17 +68,18 @@
* modules that the client uses
*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home)
- client_home = "../../deploy";
+ if (!client_home || !strcmp (client_home, ""))
+ client_home = "../..";
/* Create service client */
svc_client = axis2_svc_client_create(env, client_home);
if (!svc_client)
{
- printf("Error creating service client\n");
+ printf("Error creating service client, Please check AXIS2C_HOME again\n");
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
+ return -1;
}
/* Set service client options */
Modified: webservices/axis2/trunk/c/samples/client/google/google_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/client/google/google_client.c?view=diff&rev=464397&r1=464396&r2=464397
==============================================================================
--- webservices/axis2/trunk/c/samples/client/google/google_client.c (original)
+++ webservices/axis2/trunk/c/samples/client/google/google_client.c Sun Oct 15 23:46:56 2006
@@ -81,17 +81,18 @@
/* Set up deploy folder.*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home)
- client_home = "../../deploy";
+ if (!client_home || !strcmp (client_home, ""))
+ client_home = "../..";
/* Create service client */
svc_client = axis2_svc_client_create(env, client_home);
if (!svc_client)
{
- printf("Error creating service client\n");
+ printf("Error creating service client, Please check AXIS2C_HOME again\n");
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
+ return -1;
}
/* Set service client options */
Modified: webservices/axis2/trunk/c/samples/client/math/math_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/client/math/math_client.c?view=diff&rev=464397&r1=464396&r2=464397
==============================================================================
--- webservices/axis2/trunk/c/samples/client/math/math_client.c (original)
+++ webservices/axis2/trunk/c/samples/client/math/math_client.c Sun Oct 15 23:46:56 2006
@@ -44,8 +44,8 @@
env = axis2_env_create_all("math_blocking.log", AXIS2_LOG_LEVEL_TRACE);
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home)
- client_home = "../../deploy";
+ if (!client_home || !strcmp (client_home, ""))
+ client_home = "../..";
address = "http://localhost:9090/axis2/services/math";
if (argc > 1)
@@ -116,6 +116,7 @@
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
printf("math stub invoke FAILED!\n");
+ return -1;
}
if (stub)
Modified: webservices/axis2/trunk/c/samples/client/mtom/mtom_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/client/mtom/mtom_client.c?view=diff&rev=464397&r1=464396&r2=464397
==============================================================================
--- webservices/axis2/trunk/c/samples/client/mtom/mtom_client.c (original)
+++ webservices/axis2/trunk/c/samples/client/mtom/mtom_client.c Sun Oct 15 23:46:56 2006
@@ -89,17 +89,18 @@
* modules that the client uses
*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home)
- client_home = "../../deploy";
+ if (!client_home || !strcmp (client_home, ""))
+ client_home = "../..";
/* Create service client */
svc_client = axis2_svc_client_create(env, client_home);
if (!svc_client)
{
- printf("Error creating service client\n");
+ printf("Error creating service client, Please check AXIS2C_HOME again\n");
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
+ return -1;
}
/* Set service client options */
Modified: webservices/axis2/trunk/c/samples/client/notify/notify_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/client/notify/notify_client.c?view=diff&rev=464397&r1=464396&r2=464397
==============================================================================
--- webservices/axis2/trunk/c/samples/client/notify/notify_client.c (original)
+++ webservices/axis2/trunk/c/samples/client/notify/notify_client.c Sun Oct 15 23:46:56 2006
@@ -66,17 +66,18 @@
* modules that the client uses
*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home)
- client_home = "../../deploy";
+ if (!client_home || !strcmp (client_home, ""))
+ client_home = "../..";
/* Create service client */
svc_client = axis2_svc_client_create(env, client_home);
if (!svc_client)
{
- printf("Error creating service client\n");
+ printf("Error creating service client, Please check AXIS2C_HOME again\n");
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
+ return -1;
}
/* Set service client options */
@@ -91,21 +92,6 @@
/* Send request */
status = AXIS2_SVC_CLIENT_SEND_ROBUST(svc_client, env, payload);
- if (status == AXIS2_SUCCESS)
- {
- printf("\nnotify client invoke SUCCESSFUL!\n");
- }
- else
- {
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
- printf("notify client invoke FAILED!\n");
- }
-
- payload = build_om_programatically(env);
- /* Send request */
- status = AXIS2_SVC_CLIENT_SEND_ROBUST(svc_client, env, payload);
if (status == AXIS2_SUCCESS)
{
printf("\nnotify client invoke SUCCESSFUL!\n");
Modified: webservices/axis2/trunk/c/samples/configure.ac
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/configure.ac?view=diff&rev=464397&r1=464396&r2=464397
==============================================================================
--- webservices/axis2/trunk/c/samples/configure.ac (original)
+++ webservices/axis2/trunk/c/samples/configure.ac Sun Oct 15 23:46:56 2006
@@ -138,3 +138,4 @@
])
AC_OUTPUT
+
Modified: webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking.c?view=diff&rev=464397&r1=464396&r2=464397
==============================================================================
--- webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking.c (original)
+++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking.c Sun Oct 15 23:46:56 2006
@@ -60,17 +60,18 @@
* modules that the client uses
*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home)
- client_home = "../../deploy";
+ if (!client_home || !strcmp (client_home, ""))
+ client_home = "../..";
/* Create service client */
svc_client = axis2_svc_client_create(env, client_home);
if (!svc_client)
{
- printf("Error creating service client\n");
+ printf("Error creating service client, Please check AXIS2C_HOME again\n");
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
+ return -1;
}
/* Set service client options */
Modified: webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_addr.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_addr.c?view=diff&rev=464397&r1=464396&r2=464397
==============================================================================
--- webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_addr.c (original)
+++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_addr.c Sun Oct 15 23:46:56 2006
@@ -62,17 +62,18 @@
* modules that the client uses
*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home)
- client_home = "../../deploy";
+ if (!client_home || !strcmp (client_home, ""))
+ client_home = "../..";
/* Create service client */
svc_client = axis2_svc_client_create(env, client_home);
if (!svc_client)
{
- printf("Error creating service client\n");
+ printf("Error creating service client, Please check AXIS2C_HOME again\n");
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
+ return -1;
}
/* Set service client options */
Modified: webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_dual.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_dual.c?view=diff&rev=464397&r1=464396&r2=464397
==============================================================================
--- webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_dual.c (original)
+++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_dual.c Sun Oct 15 23:46:56 2006
@@ -68,17 +68,18 @@
* modules that the client uses
*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home)
- client_home = "../../deploy";
+ if (!client_home || !strcmp (client_home, ""))
+ client_home = "../..";
/* Create service client */
svc_client = axis2_svc_client_create(env, client_home);
if (!svc_client)
{
- printf("Error creating service client\n");
+ printf("Error creating service client, Please check AXIS2C_HOME again\n");
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
+ return -1;
}
/* Set service client options */
Modified: webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_soap11.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_soap11.c?view=diff&rev=464397&r1=464396&r2=464397
==============================================================================
--- webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_soap11.c (original)
+++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_soap11.c Sun Oct 15 23:46:56 2006
@@ -61,17 +61,18 @@
* modules that the client uses
*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home)
- client_home = "../../deploy";
+ if (!client_home || !strcmp (client_home, ""))
+ client_home = "../..";
/* Create service client */
svc_client = axis2_svc_client_create(env, client_home);
if (!svc_client)
{
- printf("Error creating service client\n");
+ printf("Error creating service client, Please check AXIS2C_HOME again\n");
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
+ return -1;
}
/* Set service client options */
Modified: webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking.c?view=diff&rev=464397&r1=464396&r2=464397
==============================================================================
--- webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking.c (original)
+++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking.c Sun Oct 15 23:46:56 2006
@@ -75,17 +75,18 @@
* modules that the client uses
*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home)
- client_home = "../../deploy";
+ if (!client_home || !strcmp (client_home, ""))
+ client_home = "../..";
/* Create service client */
svc_client = axis2_svc_client_create(env, client_home);
if (!svc_client)
{
- printf("Error creating service client\n");
+ printf("Error creating service client, Please check AXIS2C_HOME again\n");
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
+ return -1;
}
/* Set service client options */
Modified: webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking_dual.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking_dual.c?view=diff&rev=464397&r1=464396&r2=464397
==============================================================================
--- webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking_dual.c (original)
+++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking_dual.c Sun Oct 15 23:46:56 2006
@@ -85,14 +85,14 @@
* modules that the client uses
*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home)
- client_home = "../../deploy";
+ if (!client_home || !strcmp (client_home, ""))
+ client_home = "../..";
/* Create service client */
svc_client = axis2_svc_client_create(env, client_home);
if (!svc_client)
{
- printf("Error creating service client\n");
+ printf("Error creating service client, Please check AXIS2C_HOME again\n");
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
Modified: webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c?view=diff&rev=464397&r1=464396&r2=464397
==============================================================================
--- webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c (original)
+++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c Sun Oct 15 23:46:56 2006
@@ -92,17 +92,18 @@
* modules that the client uses
*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home)
- client_home = "../../deploy";
+ if (!client_home || !strcmp (client_home, ""))
+ client_home = "../..";
/* Create service client */
svc_client = axis2_svc_client_create(env, client_home);
if (!svc_client)
{
- printf("Error creating service client\n");
+ printf("Error creating service client, Please check AXIS2C_HOME again\n");
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
+ return -1;
}
/* Set service client options */
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org