Main Page | Class List | File List | Class Members | File Members | Related Pages

# /Users/wzhang/Research/Projects/ios_plugin/ios_plugin/gsoapios.m File Reference

## Functions
id | init
| Constructor.
void | dealloc
| Destructor.
int | soap_ios_copy (struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src)
| Duplicates the plugin context for the soap context.
void | soap_ios_delete (struct soap *soap, struct soap_plugin *p)
| Destroys the plugin context.
int | soap_ios_init (struct soap *soap, struct soap_ios_data *data)
| Initializes the plugin data.
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.
int | soap_ios_close (struct soap *soap)
int | soap_ios_send (struct soap *soap, const char *buf, size_t len)
| Buffers the http/soap request in plugin data.
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)
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
implementation GSoapiOSURLData synthesize | endpoint
| Set or get endpoint.
synthesize | host
| Set or get host name.
synthesize | soap_action
| Set or get soap action.
synthesize | http_method
| Set or get HTTP method.
synthesize | content_type
| Set or get content type.
synthesize | http_req_msg
| Set or get HTTP request message.
synthesize | soap_req_msg
| Set or get SOAP request.
synthesize | soap_res_msg
| Set or get SOAP response.
synthesize | port
| Set or get port.
synthesize | received_length
| Set or get received message length.
synthesize | request_sent
| Set or get the flag for the first time sending.
synthesize | req_content_length
| Set or get request message length.
synthesize | timeout_interval
| Set or get timeout interval.
synthesize | cache_policy
| Set or get cache policy.
synthesize | user_name
| Set or get user ID for authentication.
synthesize | password
| Set or get password for authentication.
end const char | soap_ios_id [13] = SOAP_IOS_ID

## Function Documentation

dealloc | ( |  | ) | `[virtual]`

| Destructor.

init | ( |  | ) | `[virtual]`

| Constructor.

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

int soap_ios_close | ( | struct soap * | soap | ) | `[static]`

  | Parameters:
  | soap | The soap context
  `[in]` | endpoint | The Web service's endpoint
  `[in]` | host | The host name
  `[in]` | port | The port numer
Returns: 0 Note: This open function does not create a real socket for communication. The actual connection establishment happens in the frecv callback

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
  `[in]` | arg | The arguments for plugin (optional)
Returns: SOAP_OK if registration is successfull; SOAP_ERR otherwise

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

  | Destroys the plugin context. Parameters:
  | soap | context
  `[in]` | p | plugin data

int soap_ios_init | ( | struct soap * | soap,
|  | struct 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_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

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.

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)

## Variable Documentation

synthesize cache_policy

| Set or get cache policy.

synthesize content_type

| Set or get content type.

implementation GSoapiOSURLData synthesize endpoint

| Set or get endpoint. Class GSoapiOSURLData

synthesize host

| Set or get host name.

synthesize http_method

| Set or get HTTP method.

synthesize http_req_msg

| Set or get HTTP request message.

synthesize password

| Set or get password for authentication.

synthesize port

| Set or get port.

synthesize received_length

| Set or get received message length.

synthesize req_content_length

| Set or get request message length.

synthesize request_sent

| Set or get the flag for the first time sending.

synthesize soap_action

| Set or get soap action.

end const char soap_ios_id[13] = SOAP_IOS_ID

| plugin identification for plugin registry

synthesize soap_req_msg

| Set or get SOAP request.

synthesize soap_res_msg

| Set or get SOAP response.

synthesize timeout_interval

| Set or get timeout interval.

synthesize user_name

| Set or get user ID for authentication.