From c28397f760d22a1e8be126725ff7784b2d8fec23 Mon Sep 17 00:00:00 2001 From: snowdrop Date: Mon, 1 Nov 2004 15:16:22 +0000 Subject: added soap_ctx_add_file() --- examples/csoap/echoattachments-client.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'examples/csoap/echoattachments-client.c') 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 [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"); -- cgit v1.1-32-gdbae