summaryrefslogtreecommitdiffstats
path: root/examples/csoap
diff options
context:
space:
mode:
Diffstat (limited to 'examples/csoap')
-rwxr-xr-xexamples/csoap/echoattachments-client.c13
-rwxr-xr-xexamples/csoap/echoattachments-server.c9
2 files changed, 12 insertions, 10 deletions
diff --git a/examples/csoap/echoattachments-client.c b/examples/csoap/echoattachments-client.c
index fbee05e..4ad908e 100755
--- a/examples/csoap/echoattachments-client.c
+++ b/examples/csoap/echoattachments-client.c
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: echoattachments-client.c,v 1.16 2006/11/30 14:23:59 m0gg Exp $
+ * $Id: echoattachments-client.c,v 1.17 2007/01/01 22:54:46 m0gg Exp $
*
* CSOAP Project: CSOAP examples project
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -101,6 +101,7 @@ compareFiles(const char *received, const char *sent)
fclose(f1);
fclose(f2);
+ return;
}
int
@@ -122,7 +123,7 @@ main(int argc, char **argv)
err = soap_client_init_args(argc, argv);
if (err != H_OK)
{
- printf("[%d] %s():%s ", herror_code(err), herror_func(err), herror_message(err));
+ printf("[%d] %s():%s \n", herror_code(err), herror_func(err), herror_message(err));
herror_release(err);
return 1;
}
@@ -132,7 +133,7 @@ main(int argc, char **argv)
err = soap_ctx_new_with_method(urn, method, &ctx);
if (err != H_OK)
{
- printf("[%d] %s():%s ", herror_code(err), herror_func(err), herror_message(err));
+ printf("[%d] %s():%s \n", herror_code(err), herror_func(err), herror_message(err));
herror_release(err);
return 1;
}
@@ -142,7 +143,7 @@ main(int argc, char **argv)
err = soap_ctx_add_file(ctx, argv[1], "application/octet-stream", href);
if (err != H_OK)
{
- printf("%s():%s [%d]", herror_func(err), herror_message(err), herror_code(err));
+ printf("%s():%s [%d]\n", herror_func(err), herror_message(err), herror_code(err));
herror_release(err);
return 1;
}
@@ -161,7 +162,7 @@ main(int argc, char **argv)
if (err != H_OK)
{
- printf("%s():%s [%d]", herror_func(err), herror_message(err), herror_code(err));
+ printf("%s():%s [%d]\n", herror_func(err), herror_message(err), herror_code(err));
herror_release(err);
return 1;
}
@@ -179,7 +180,7 @@ main(int argc, char **argv)
}
else
{
- printf("No attachments!");
+ printf("No attachments!\n");
xmlDocDump(stdout, ctx2->env->root->doc);
}
diff --git a/examples/csoap/echoattachments-server.c b/examples/csoap/echoattachments-server.c
index ea45aa8..e6b4872 100755
--- a/examples/csoap/echoattachments-server.c
+++ b/examples/csoap/echoattachments-server.c
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: echoattachments-server.c,v 1.12 2006/11/25 15:06:57 m0gg Exp $
+ * $Id: echoattachments-server.c,v 1.13 2007/01/01 22:54:46 m0gg Exp $
*
* CSOAP Project: CSOAP examples project
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -57,6 +57,7 @@ echo_attachments(struct SoapCtx * req, struct SoapCtx * res)
{
for (part = req->attachments->parts; part != NULL; part = part->next)
{
+ printf("attaching \"%s\"\n", part->filename);
soap_ctx_add_file(res, part->filename, part->content_type, href);
soap_env_add_attachment(res->env, "echoFile", href);
}
@@ -76,7 +77,7 @@ main(int argc, char **argv)
err = soap_server_init_args(argc, argv);
if (err != H_OK)
{
- printf("%s():%s [%d]", herror_func(err), herror_message(err), herror_code(err));
+ printf("%s():%s [%d]\n", herror_func(err), herror_message(err), herror_code(err));
herror_release(err);
return 1;
}
@@ -85,10 +86,10 @@ main(int argc, char **argv)
soap_router_register_service(router, echo_attachments, method, urn);
soap_server_register_router(router, url);
- log_info1("send SIGTERM to shutdown");
+ printf("send SIGTERM to shutdown");
soap_server_run();
- log_info1("shutting down\n");
+ printf("shutting down\n");
soap_server_destroy();
return 0;