C library for SOAP (Simple Object Access Protocol)


soap-ctx.h File Reference

Go to the source code of this file.

Data Structures

struct  SoapCtx

Defines

#define SOAP_ERROR_NO_FILE_ATTACHED   4001
#define SOAP_ERROR_EMPTY_ATTACHMENT   4002
#define MAX_HREF_SIZE   150

Functions

struct SoapCtx * soap_ctx_new (struct SoapEnv *env)
herror_t soap_ctx_new_with_method (const char *urn, const char *method, struct SoapCtx **out)
void soap_ctx_free (struct SoapCtx *ctx)
struct part_t * soap_ctx_get_file (struct SoapCtx *ctx, xmlNodePtr node)
herror_t soap_ctx_add_file (struct SoapCtx *ctx, const char *filename, const char *content_type, char *dest_href)
void soap_ctx_add_files (struct SoapCtx *ctx, struct attachments_t *attachments)


Define Documentation

#define MAX_HREF_SIZE   150

#define SOAP_ERROR_EMPTY_ATTACHMENT   4002

#define SOAP_ERROR_NO_FILE_ATTACHED   4001


Function Documentation

herror_t soap_ctx_add_file ( struct SoapCtx *  ctx,
const char *  filename,
const char *  content_type,
char *  dest_href 
)

Size of destination dest_href should be MAX_HREF_SIZE

void soap_ctx_add_files ( struct SoapCtx *  ctx,
struct attachments_t *  attachments 
)

Used internally. Will switch the deleteOnExit flag from the given one to the added part.

void soap_ctx_free ( struct SoapCtx *  ctx  ) 

struct part_t* soap_ctx_get_file ( struct SoapCtx *  ctx,
xmlNodePtr  node 
) [read]

Returns the attached file if any found.

Parameters:
ctx the SoapCtx object which should contain the part
node the xml node which points to a file via the "href" xml attribute
Returns:
a part_t object of attachment was found, NULL otherwise.

struct SoapCtx* soap_ctx_new ( struct SoapEnv *  env  )  [read]

should only be used internally

herror_t soap_ctx_new_with_method ( const char *  urn,
const char *  method,
struct SoapCtx **  out 
)

Creates a new soap context object.


csoap project homepage: http://csoap.sourceforge.net