Class WSResponse

Description

WSResponse class represents the web services response. It will create different types of response required by the client.

WSResponse contains XML data retreive from target service. It contains some utility method to process response data.

WSResponse also provide information about the status of the response and the response message if WebService is failed.

This class throws WSException when created WSResponse is not validate.

Located in /models/WSResponse.php (line 23)


	
			
Method Summary
static void createHttpResponse (string $responseString)
static void createZendHttpResponse ( $response)
string getEncodedReponse ()
string getReponseBody ()
string getResponseForXSLT ()
Zend_Http_Response getRestResponse ( $url,  $service,  $params, string $WebService, string $Service, array $Paramters)
SimpleXMLElement getSimpleXMLResponse ()
int getStatus ()
string getStatusMessage ( $response)
Methods
static method createHttpResponse (line 59)

Create Simple String WSResponse Object. It contains the data comming from the web service response. It will not contians response headers.

  • throws: WSException
  • access: public
static void createHttpResponse (string $responseString)
  • string $responseString
static method createZendHttpResponse (line 42)

Create Zend Http WSResponse Object

  • access: public
static void createZendHttpResponse ( $response)
  • Zend_Http_Response $response
getEncodedReponse (line 104)

Returns encoded response body.

  • access: public
string getEncodedReponse ()
getReponseBody (line 92)

Retrieve response body. It contians xml data.

  • access: public
string getReponseBody ()
getResponseForXSLT (line 142)

This method return well formed XML data that is used by any XSLT based style sheet to furhter process and display it.

  • access: public
string getResponseForXSLT ()
getRestResponse (line 169)

Returns the XML Response by using Zend_Rest api.

  • throws: Zend_Service_Exception
  • access: public
Zend_Http_Response getRestResponse ( $url,  $service,  $params, string $WebService, string $Service, array $Paramters)
  • string $WebService: Location
  • string $Service: Endpoint
  • array $Paramters: ( name => value )
  • $url
  • $service
  • $params
getSimpleXMLResponse (line 117)

This method return XML data in the form of SimpleXMLElement object. Creates light weight response object easy process by php and smarty collections functions.

  • access: public
SimpleXMLElement getSimpleXMLResponse ()
getStatus (line 187)

Return the Status code for the Webservice response.

  • access: public
int getStatus ()
getStatusMessage (line 208)

Return the Status Message for the Webservice response.

  • access: public
string getStatusMessage ( $response)
  • Zend_Http_Response $response

Documentation generated on Wed, 13 Feb 2008 01:57:47 +0500 by phpDocumentor 1.4.0a2