Class soapclientmime

Description

soapclientmime client supporting MIME attachments defined at http://www.w3.org/TR/SOAP-attachments. It depends on the PEAR Mail_MIME library.

  • access: public
  • version: $Id: nusoapmime.php,v 1.7 2005/07/27 19:24:42 snichol Exp $
  • author: Scott Nichol <snichol@sourceforge.net>
  • author: Thanks to Guillaume and Henning Reich for posting great attachment code to the mail list

Located in /nusoapmime.php (line 48)

nusoap_base
   |
   --soapclient
      |
      --soapclientmime
Variable Summary
Method Summary
 string addAttachment (string $data, [string $filename = ''], [string $contenttype = 'application/octet-stream'], [string $cid = false])
 array getAttachments ()
 string getHTTPBody (string $soapmsg)
 string getHTTPContentType ()
 mixed parseResponse (array $headers, string $data)
Variables
string $mimeContentType (line 65)
  • access: private
array $requestAttachments = array() (line 54)
  • var: Each array element in the return is an associative array with keys data, filename, contenttype, cid
  • access: private
array $responseAttachments (line 60)
  • var: Each array element in the return is an associative array with keys data, filename, contenttype, cid
  • access: private

Inherited Variables

Inherited from soapclient

soapclient::$authtype
soapclient::$certRequest
soapclient::$cookies
soapclient::$decode_utf8
soapclient::$defaultRpcParams
soapclient::$document
soapclient::$endpoint
soapclient::$endpointType
soapclient::$fault
soapclient::$faultcode
soapclient::$faultdetail
soapclient::$faultstring
soapclient::$forceEndpoint
soapclient::$http_encoding
soapclient::$operations
soapclient::$password
soapclient::$persistentConnection
soapclient::$proxyhost
soapclient::$proxypassword
soapclient::$proxyport
soapclient::$proxyusername
soapclient::$request
soapclient::$requestHeaders
soapclient::$response
soapclient::$responseData
soapclient::$responseHeaders
soapclient::$response_timeout
soapclient::$timeout
soapclient::$username
soapclient::$xml_encoding

Inherited from nusoap_base

nusoap_base::$charencoding
nusoap_base::$debugLevel
nusoap_base::$debug_str
nusoap_base::$error_str
nusoap_base::$namespaces
nusoap_base::$revision
nusoap_base::$soap_defencoding
nusoap_base::$title
nusoap_base::$typemap
nusoap_base::$usedNamespaces
nusoap_base::$version
nusoap_base::$xmlEntities
nusoap_base::$XMLSchemaVersion
Methods
addAttachment (line 82)

adds a MIME attachment to the current request.

If the $data parameter contains an empty string, this method will read the contents of the file named by the $filename parameter.

If the $cid parameter is false, this method will generate the cid.

  • return: The content-id (cid) of the attachment
  • access: public
string addAttachment (string $data, [string $filename = ''], [string $contenttype = 'application/octet-stream'], [string $cid = false])
  • string $data: The data of the attachment
  • string $filename: The filename of the attachment (default is empty string)
  • string $contenttype: The MIME Content-Type of the attachment (default is application/octet-stream)
  • string $cid: The content-id (cid) of the attachment (default is false)
clearAttachments (line 102)

clears the MIME attachments for the current request.

  • access: public
void clearAttachments ()
getAttachments (line 116)

gets the MIME attachments from the current response.

Each array element in the return is an associative array with keys data, filename, contenttype, cid. These keys correspond to the parameters for addAttachment.

  • return: The attachments.
  • access: public
array getAttachments ()
getHTTPBody (line 127)

gets the HTTP body for the current request.

  • return: The HTTP body, which includes the SOAP payload
  • access: private
string getHTTPBody (string $soapmsg)
  • string $soapmsg: The SOAP payload

Redefinition of:
soapclient::getHTTPBody()
gets the HTTP body for the current request.
getHTTPContentType (line 186)

gets the HTTP content type for the current request.

Note: getHTTPBody must be called before this.

  • return: the HTTP content type for the current request.
  • access: private
string getHTTPContentType ()

Redefinition of:
soapclient::getHTTPContentType()
gets the HTTP content type for the current request.
getHTTPContentTypeCharset (line 202)

gets the HTTP content type charset for the current request.

returns false for non-text content types.

Note: getHTTPBody must be called before this.

  • return: the HTTP content type charset for the current request.
  • access: private
string getHTTPContentTypeCharset ()

Redefinition of:
soapclient::getHTTPContentTypeCharset()
gets the HTTP content type charset for the current request.
parseResponse (line 217)

processes SOAP message returned from server

  • return: value of the message, decoded into a PHP type
  • access: private
mixed parseResponse (array $headers, string $data)
  • array $headers: The HTTP headers
  • string $data: unprocessed response data from server

Redefinition of:
soapclient::parseResponse()
processes SOAP message returned from server

Inherited Methods

Inherited From soapclient

 soapclient::soapclient()
 soapclient::call()
 soapclient::checkCookies()
 soapclient::decodeUTF8()
 soapclient::getCookies()
 soapclient::getDefaultRpcParams()
 soapclient::getHeaders()
 soapclient::getHTTPBody()
 soapclient::getHTTPContentType()
 soapclient::getHTTPContentTypeCharset()
 soapclient::getOperationData()
 soapclient::getProxy()
 soapclient::getProxyClassCode()
 soapclient::parseResponse()
 soapclient::send()
 soapclient::setCookie()
 soapclient::setCredentials()
 soapclient::setDefaultRpcParams()
 soapclient::setEndpoint()
 soapclient::setHeaders()
 soapclient::setHTTPEncoding()
 soapclient::setHTTPProxy()
 soapclient::UpdateCookies()
 soapclient::useHTTPPersistentConnection()
 soapclient::_getProxyClassCode()

Inherited From nusoap_base

 nusoap_base::nusoap_base()
 nusoap_base::appendDebug()
 nusoap_base::clearDebug()
 nusoap_base::contractQname()
 nusoap_base::debug()
 nusoap_base::expandEntities()
 nusoap_base::expandQname()
 nusoap_base::formatDump()
 nusoap_base::getDebug()
 nusoap_base::getDebugAsXMLComment()
 nusoap_base::getDebugLevel()
 nusoap_base::getError()
 nusoap_base::getGlobalDebugLevel()
 nusoap_base::getLocalPart()
 nusoap_base::getmicrotime()
 nusoap_base::getNamespaceFromPrefix()
 nusoap_base::getPrefix()
 nusoap_base::getPrefixFromNamespace()
 nusoap_base::isArraySimpleOrStruct()
 nusoap_base::serializeEnvelope()
 nusoap_base::serialize_val()
 nusoap_base::setDebugLevel()
 nusoap_base::setError()
 nusoap_base::setGlobalDebugLevel()
 nusoap_base::varDump()

Documentation generated on Wed, 3 Aug 2005 21:29:44 -0400 by phpDocumentor 1.3.0RC3