|  | Home | Documentation | gsoapios.mm File Reference updated by Robert van Engelen |

Functions | Variables
gsoapios.mm File Reference
`import "gsoapios.h"`
`import <Foundation/Foundation.h>`
`import <UIKit/UIKit.h>`
Include dependency graph for gsoapios.mm:

## Functions

static int | soap_ios_copy (struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src)
| Duplicates the plugin context for the soap context.
static void | soap_ios_delete (struct soap *soap, struct soap_plugin *p)
| Destroys the plugin context.
static int | soap_ios_init (struct soap *soap, soap_ios_data *data)
| Initializes the plugin data.
static SOAP_SOCKET | soap_ios_open (struct soap *soap, const char *endpoint, const char *host, int port)
| Extracts states from soap context and saves states for soap connection.
static int | soap_ios_close (struct soap *soap)
static int | soap_ios_send (struct soap *soap, const char *buf, size_t len)
| Buffers the http/soap request in plugin data.
static size_t | soap_ios_recv (struct soap *soap, char *buf, size_t len)
| Sends soap request, buffers soap response and serialize the response.
int | soap_ios (struct soap *soap, struct soap_plugin *p, void *arg)
| Save the old callbacks and set new callbacks to handle soap client applications on iOS platforms (iPhone and iPad).
void | soap_ios_setcachepolicy (struct soap *soap, unsigned int policy)
| Sets cache policy The constants used to specify interaction with the cached responses are:
void | soap_ios_settimeoutinterval (struct soap *soap, double seconds)
| Sets timeout interval.

## Variables

const char | soap_ios_id [13] = SOAP_IOS_ID

## Function Documentation

## ◆ soap_ios()

int soap_ios | ( | struct soap * | soap,
|  | struct soap_plugin * | p,
|  | void * | arg )

Save the old callbacks and set new callbacks to handle soap client applications on iOS platforms (iPhone and iPad).

Parameters

  | soap | The soap context
  [in] | p | The soap plugin data
  [in] | arg | The arguments for soap plugin

Returns
  SOAP_OK if registration is successfull; SOAP_EOM otherwise

Usage:

struct soap *soap = soap_new();
soap_register_plugin(soap, soap_ios);
soap_ios
int soap_ios(struct soap *soap, struct soap_plugin *p, void *arg)
Save the old callbacks and set new callbacks to handle soap client applications on iOS platforms (iPh...
Definition gsoapios.mm:139

## ◆ soap_ios_close()

int soap_ios_close | ( | struct soap * | soap | ) |

static

Parameters

  soap | The soap context

Returns
  0

Note: This open function does not create a real socket for communication. The actual connection establishment happens in the frecv callback

## ◆ soap_ios_copy()

int soap_ios_copy | ( | struct soap * | soap,
|  | struct soap_plugin * | dst,
|  | struct soap_plugin * | src )

static

Duplicates the plugin context for the soap context.

Parameters

  | soap | The soap context
  [out] | dst | The destination plugin data to store to
  [in] | src | The sources plugin data to be copied from

Returns
  SOAP_OK if registration is successfull; SOAP_ERR otherwise

## ◆ soap_ios_delete()

void soap_ios_delete | ( | struct soap * | soap,
|  | struct soap_plugin * | p )

static

Destroys the plugin context.

Parameters

  | soap | context
  [in] | p | plugin data

## ◆ soap_ios_init()

int soap_ios_init | ( | struct soap * | soap,
|  | soap_ios_data * | data )

static

Initializes the plugin data.

Parameters

  | soap | The soap context
  [out] | data | The plugin data to be initialized

Returns
  SOAP_OK if initialization is sucessful; SOAP_ERR otherwise

## ◆ soap_ios_open()

SOAP_SOCKET soap_ios_open | ( | struct soap * | soap,
|  | const char * | endpoint,
|  | const char * | host,
|  | int | port )

static

Extracts states from soap context and saves states for soap connection.

Parameters

  | soap | The soap context
  [in] | endpoint | The Web service's endpoint
  [in] | host | The host name
  [in] | port | The port numer

Returns
  1 A valid socket

Note: This open function does not create a real socket for communication. The actual connection establishment happens in the frecv callback

## ◆ soap_ios_recv()

size_t soap_ios_recv | ( | struct soap * | soap,
|  | char * | buf,
|  | size_t | len )

static

Sends soap request, buffers soap response and serialize the response.

Parameters

  | soap | The soap context
  [out] | buf | The buffer for the received data
  [in] | len | The number of bytes received

Returns
  The number of bytes received

Note: This recv function sends a synchronous soap request through NSURLRequest, receives soap response, serializes response.

## ◆ soap_ios_send()

int soap_ios_send | ( | struct soap * | soap,
|  | const char * | buf,
|  | size_t | len )

static

Buffers the http/soap request in plugin data.

Parameters

  | soap | The soap context
  [in] | buf | The buffer holding the serialized http/soap request
  [in] | len | The buffer size

Returns
  The number of bytes buffered

Note: This send function does not send any data to its peer. Rather it buffers the serialied soap request including http header to the plugin data. The sending happens actually in frecv function.

## ◆ soap_ios_setcachepolicy()

void soap_ios_setcachepolicy | ( | struct soap * | soap,
|  | unsigned int | policy )

Sets cache policy The constants used to specify interaction with the cached responses are:

enum { NSURLRequestUseProtocolCachePolicy = 0, NSURLRequestReloadIgnoringLocalCacheData = 1, NSURLRequestReloadIgnoringCacheData = NSURLRequestReloadIgnoringLocalCacheData, NSURLRequestReturnCacheDataElseLoad = 2, NSURLRequestReturnCacheDataDontLoad = 3, NSURLRequestReloadIgnoringLocalAndRemoteCacheData =4, NSURLRequestReloadRevalidatingCacheData = 5 };

Parameters

  | soap | The soap context
  [in] | policy | The policy to be specified for he request

## ◆ soap_ios_settimeoutinterval()

void soap_ios_settimeoutinterval | ( | struct soap * | soap,
|  | double | seconds )

Sets timeout interval.

Parameters

  | soap | The soap context
  [in] | seconds | The value for the timeout interval to be specifed (in seconds)
  | soap | The soap context
  [in] | seconds | The value for the timeout interval to be specified (in seconds)

## Variable Documentation

## ◆ soap_ios_id

const char soap_ios_id[13] = SOAP_IOS_ID

plugin identification for plugin registry