summaryrefslogtreecommitdiffstats
path: root/examples/csoap/echoattachments-client.c
diff options
context:
space:
mode:
authorGravatar snowdrop2004-11-01 15:16:22 +0000
committerGravatar snowdrop2004-11-01 15:16:22 +0000
commitc28397f760d22a1e8be126725ff7784b2d8fec23 (patch)
treed1d09522031049fda25d5d98deb9a6aa6b7bcfc7 /examples/csoap/echoattachments-client.c
parent581c961c5b8e511a89addca064f372103d2400ee (diff)
downloadcsoap-c28397f760d22a1e8be126725ff7784b2d8fec23.tar.gz
csoap-c28397f760d22a1e8be126725ff7784b2d8fec23.tar.bz2
added soap_ctx_add_file()
Diffstat (limited to 'examples/csoap/echoattachments-client.c')
-rwxr-xr-xexamples/csoap/echoattachments-client.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/csoap/echoattachments-client.c b/examples/csoap/echoattachments-client.c
index 0f62fa7..a6dfca7 100755
--- a/examples/csoap/echoattachments-client.c
+++ b/examples/csoap/echoattachments-client.c
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: echoattachments-client.c,v 1.5 2004/10/29 09:27:02 snowdrop Exp $
+ * $Id: echoattachments-client.c,v 1.6 2004/11/01 15:16:22 snowdrop Exp $
*
* CSOAP Project: CSOAP examples project
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -96,6 +96,8 @@ int main(int argc, char *argv[])
char href[MAX_HREF_SIZE];
xmlNodePtr fault;
herror_t err;
+
+
if (argc < 2) {
fprintf(stderr, "usage: %s <filename> [url]\n", argv[0]);
@@ -110,7 +112,7 @@ int main(int argc, char *argv[])
return 1;
}
- err = soap_client_ctx_new(urn, method, &ctx);
+ err = soap_ctx_new_with_method(urn, method, &ctx);
if (err != H_OK) {
log_error4("[%d] %s():%s ", herror_code(err), herror_func(err), herror_message(err));
herror_release(err);
@@ -121,6 +123,7 @@ int main(int argc, char *argv[])
soap_ctx_free(ctx);
exit(1);
}
+
soap_env_add_attachment(ctx->env,"source", href);
printf("sending request ...\n");