|  | Home | Documentation | gsoapios.mm File Reference updated Wed Aug 17 2016 |

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

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. More...
static void | soap_ios_delete (struct soap *soap, struct soap_plugin *p)
| Destroys the plugin context. More...
static int | soap_ios_init (struct soap *soap, soap_ios_data *data)
| Initializes the plugin data. More...
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. More...
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. More...
static size_t | soap_ios_recv (struct soap *soap, char *buf, size_t len)
| Sends soap request, buffers soap response and serialize the response. More...
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) More...
void | soap_ios_setcachepolicy (struct soap *soap, unsigned int policy)
| Sets cache policy The constants used to specify interaction with the cached responses are: More...
void | soap_ios_settimeoutinterval (struct soap *soap, double seconds)
| Sets timeout interval. More...

## Variables
const char | soap_ios_id [13] = SOAP_IOS_ID

## Function Documentation

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:

1 struct soap *soap = soap_new();
2 soap_register_plugin(soap, soap_ios);

static 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

static 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

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

Destroys the plugin context.

Parameters

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

static 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

static 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

static 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.

static 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.

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

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

const char soap_ios_id[13] = SOAP_IOS_ID

plugin identification for plugin registry