C library for SOAP (Simple Object Access Protocol)


soap-router.h File Reference

Go to the source code of this file.

Data Structures

struct  SoapRouter

Typedefs

typedef int(* soap_auth )(struct SoapEnv *request, const char *user, const char *pass)

Functions

struct SoapRouter * soap_router_new (void)
herror_t soap_router_register_service (struct SoapRouter *router, SoapServiceFunc func, const char *method, const char *urn)
herror_t soap_router_register_default_service (struct SoapRouter *router, SoapServiceFunc func, const char *method, const char *urn)
void soap_router_register_description (struct SoapRouter *router, xmlDocPtr doc)
void soap_router_register_security (struct SoapRouter *router, soap_auth auth)
SoapService * soap_router_find_service (struct SoapRouter *router, const char *urn, const char *method)
void soap_router_free (struct SoapRouter *router)


Typedef Documentation

typedef int(* soap_auth)(struct SoapEnv *request, const char *user, const char *pass)

Authentication callback function for a cSOAP service.


Function Documentation

SoapService* soap_router_find_service ( struct SoapRouter *  router,
const char *  urn,
const char *  method 
)

Searches for a registered soap service.

Parameters:
router The router object
urn URN of the service
method The name under which the service was registered.
Returns:
The service if found, NULL otherwise.

void soap_router_free ( struct SoapRouter *  router  ) 

Frees the router object.

Parameters:
router The router object to free
See also:
soap_router_new

struct SoapRouter* soap_router_new ( void   )  [read]

Creates a new router object. Create a router if you are implementing a soap server. Then register the services to this router.

A router points also to http url context.

Returns:
Soap router
See also:
soap_router_free

herror_t soap_router_register_default_service ( struct SoapRouter *  router,
SoapServiceFunc  func,
const char *  method,
const char *  urn 
)

Register a default service for the router.

void soap_router_register_description ( struct SoapRouter *  router,
xmlDocPtr  doc 
)

Register a service description for the router.

void soap_router_register_security ( struct SoapRouter *  router,
soap_auth  auth 
)

Register a security provider for the router.

herror_t soap_router_register_service ( struct SoapRouter *  router,
SoapServiceFunc  func,
const char *  method,
const char *  urn 
)

Registers a SOAP service (in this case a C function) to the router.

Parameters:
router The router object
func Function to register as a soap service
method Method name to call the function from the client side.
urn The urn for this service


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