GoogleApiAdsCommon
[ class tree: GoogleApiAdsCommon ] [ index: GoogleApiAdsCommon ] [ all elements ]

Class: AdsSoapClient

Source Location: /Common/Lib/AdsSoapClient.php

Class Overview

SoapClient
   |
   --AdsSoapClient

An extension of the SoapClient class intended to prepare the XML before making a request as well as perform any book-keeping on the response.


Author(s):

Variables

Methods


Child classes:

AdWordsSoapClient
An extension of the AdsSoapClient for the AdWords API.

Inherited Methods

Class: SoapClient (Internal Class)

constructor SoapClient ( $wsdl, [$options = ] )
__call ( $function_name, $arguments )
__doRequest ( $request, $location, $action, $version, [$one_way = ] )
__getFunctions ( )
__getLastRequest ( )
__getLastRequestHeaders ( )
__getLastResponse ( )
__getLastResponseHeaders ( )
__getTypes ( )
__setCookie ( $name, [$value = ] )
__setLocation ( [$new_location = ] )
__setSoapHeaders ( $soapheaders )
__soapCall ( $function_name, $arguments, [$options = ], [$input_headers = ], [&$output_headers = ] )

Class Details

[line 43]
An extension of the SoapClient class intended to prepare the XML before making a request as well as perform any book-keeping on the response.



Tags:

abstract:  


[ Top ]


Class Variables

$headers =

[line 56]

The header values.



Tags:

var:  the header values
access:  protected

Type:   array


[ Top ]

$lastArguments =

[line 126]

The last arguments passed to the called SOAP method



Tags:

var:  the last arguments passed to the called SOAP method
access:  protected

Type:   array


[ Top ]

$lastMethodName =

[line 120]

The name of the last method called from this client.



Tags:

var:  the name of the last method called from this client
access:  protected

Type:   string


[ Top ]

$lastRequest =

[line 80]

The last SOAP XML request made to the server after PrepareRequest() and RemoveSensitiveInfo() have been called on it.



Tags:

var:  the last SOAP XML request made to the server
see:  AdsSoapClient::PrepareRequest()
see:  AdsSoapClient::RemoveSensitiveInfo()
access:  protected

Type:   string


[ Top ]

$lastResponse =

[line 98]

The last SOAP XML response from the server.



Tags:

var:  the last SOAP XML response from the server
access:  protected

Type:   string


[ Top ]

$lastSoapFault =

[line 113]

The last SOAP fault generated from the server. NULL if none.



Tags:

var:  the last SOAP fault generated from the server
access:  protected

Type:   SOAPFault


[ Top ]

$serviceName =

[line 63]

The name of the service this client is accessing.



Tags:

var:  the name of the service this client is accessing
access:  protected

Type:   string


[ Top ]

$serviceNamespace =

[line 70]

The namespace of the service this client is accessing.



Tags:

var:  the namespace of the service this client is accessing
access:  protected

Type:   string


[ Top ]

$user =

[line 49]

The AdsUser which generated this client.



Tags:

var:  the user that generated this client
access:  protected

Type:   AdsUser


[ Top ]



Class Methods


constructor __construct [line 139]

AdsSoapClient __construct( string $wsdl, $options, AdsUser $user, string $serviceName, string $serviceNamespace)

The constructor intended to be called by all sub-classes.



Tags:

access:  protected


Overridden in child classes as:

AdWordsSoapClient::__construct()
Constructor for the AdWords API SOAP client.
BulkMutateJobService::__construct()
Constructor using wsdl location and options array
BidLandscapeService::__construct()
Constructor using wsdl location and options array
UserListService::__construct()
Constructor using wsdl location and options array
MediaService::__construct()
Constructor using wsdl location and options array
CampaignService::__construct()
Constructor using wsdl location and options array
ExperimentService::__construct()
Constructor using wsdl location and options array
AdGroupCriterionService::__construct()
Constructor using wsdl location and options array
CampaignAdExtensionService::__construct()
Constructor using wsdl location and options array
AdExtensionOverrideService::__construct()
Constructor using wsdl location and options array
ReportDefinitionService::__construct()
Constructor using wsdl location and options array
CampaignTargetService::__construct()
Constructor using wsdl location and options array
CampaignCriterionService::__construct()
Constructor using wsdl location and options array
AdGroupService::__construct()
Constructor using wsdl location and options array
GeoLocationService::__construct()
Constructor using wsdl location and options array
AdParamService::__construct()
Constructor using wsdl location and options array
AdGroupAdService::__construct()
Constructor using wsdl location and options array
CustomerSyncService::__construct()
Constructor using wsdl location and options array
InfoService::__construct()
Constructor using wsdl location and options array
ServicedAccountService::__construct()
Constructor using wsdl location and options array
AlertService::__construct()
Constructor using wsdl location and options array
TrafficEstimatorService::__construct()
Constructor using wsdl location and options array
TargetingIdeaService::__construct()
Constructor using wsdl location and options array
DataService::__construct()
Constructor using wsdl location and options array
ConversionTrackerService::__construct()
Constructor using wsdl location and options array
BulkOpportunityService::__construct()
Constructor using wsdl location and options array

Parameters:

string   $wsdl   URI of the WSDL file or NULL if working in non-WSDL mode
array   $options   the SOAP client options
AdsUser   $user   the user which is responsible for this client
string   $serviceName   the name of the service which is making this call
string   $serviceNamespace   the namespace of the service

[ Top ]

method CreateSoapHeader [line 433]

SoapHeader CreateSoapHeader( string $soapHeaderClassName, string $soapHeaderElementName, $headersOverrides, string $namespace)

Creates a SOAP header for the client given the user. It assumes that each element within the header to be filled in is a publicly acessible feild of the SOAP header element.



Tags:

return:  the wrapped SOAP header ready to be set
access:  protected


Parameters:

string   $soapHeaderClassName   the class of the SOAP header to instantiate
string   $soapHeaderElementName   the SOAP element name of the header
string   $namespace   the namespace of the header
   $headersOverrides  

[ Top ]

method GenerateRequestInfoMessage [line 474]

string GenerateRequestInfoMessage( )

Generates the request information using the request and response. This method is called after the request has been made and RemoveSensitiveInfo() has been called as well.



Tags:

return:  the request information ready to be logged
see:  AdsSoapClient::RemoveSensitiveInfo()
abstract:  
access:  protected


Overridden in child classes as:

AdWordsSoapClient::GenerateRequestInfoMessage()
Generates the request info message containing:

[ Top ]

method GenerateSoapHeader [line 420]

SoapHeader GenerateSoapHeader( )

Generates the SOAP header for the client.



Tags:

return:  the instantiated SoapHeader ready to set
abstract:  
access:  protected


Overridden in child classes as:

AdWordsSoapClient::GenerateSoapHeader()
Generates the SOAP header for the client.

[ Top ]

method GetAdsUser [line 257]

AdsUser GetAdsUser( )

Gets the user for this client.



Tags:

return:  the user for this client.
access:  public


[ Top ]

method GetEmail [line 276]

string GetEmail( )

Gets the email of the user making the request.



Tags:

return:  the email of the user making the request
access:  public


[ Top ]

method GetHeaderNames [line 388]

array GetHeaderNames( )

Gets the names of all registered request header elements.



Tags:

return:  the names of the request header elements
access:  public


[ Top ]

method GetHeaderValue [line 398]

string GetHeaderValue( string $key)

Gets the value for a registered request header element.



Tags:

return:  the value of the request header element or NULL if not found
access:  public


Parameters:

string   $key   the name of the request header element

[ Top ]

method GetLastFaultMessage [line 343]

string GetLastFaultMessage( )

Returns the SOAP fault message if there was any



Tags:

return:  the fault message if there was any
access:  public


[ Top ]

method GetLastMethodName [line 292]

string GetLastMethodName( )

Gets the method name for the last method called.



Tags:

return:  the name of last method called
access:  public


[ Top ]

method GetLastRequestDom [line 494]

DOMDocument GetLastRequestDom( )

Get the DOMDocument representing the last request from this client.



Tags:

return:  the DOMDocument representing the last request
throws:  DOMException if the DOMDocument could not be loaded
access:  public


[ Top ]

method GetLastRequestId [line 317]

string GetLastRequestId( )

Gets the request ID for the last call



Tags:

return:  the request ID of the last call
access:  public


[ Top ]

method GetLastResponseDom [line 481]

DOMDocument GetLastResponseDom( )

Gets the DOMDocument representing the last response from this client.



Tags:

return:  the DOMDocument representing the last response
throws:  DOMException if the DOMDocument could not be loaded
access:  public


[ Top ]

method GetLastResponseTime [line 300]

double GetLastResponseTime( )

Gets the response time for the last call



Tags:

return:  the response time of the last call
access:  public


[ Top ]

method GetServer [line 265]

string GetServer( )

Gets the server that the request was made to.



Tags:

return:  the server that the request was made to
access:  public


[ Top ]

method GetServiceName [line 284]

string GetServiceName( )

Gets the service name for this client.



Tags:

return:  the service name for this client
access:  public


[ Top ]

method IsFault [line 335]

boolean IsFault( )

Returns TRUE if there was a SOAP fault during the last call.



Tags:

return:  TRUE if there was a SOAP fault during the last call
access:  public


[ Top ]

method PrepareRequest [line 357]

string PrepareRequest( string $request, $arguments)

Depending on the version of PHP, the xsi:types need to be added and empty tags may need to be removed. The SoapRequestXmlFixer class can facilitate these changes.



Tags:

return:  the XML request ready to be sent to the server
access:  protected


Parameters:

string   $request   the request to be modified
array   $arguments   the arguments passed to the SOAP method

[ Top ]

method RemoveSensitiveInfo [line 464]

string RemoveSensitiveInfo( string $request)

Removes any sensitive information from the request XML. This method is called after the request has been made and before logging any XML.



Tags:

return:  the request with any sensitive information removed ready to be logged.
abstract:  
access:  protected


Overridden in child classes as:

AdWordsSoapClient::RemoveSensitiveInfo()
Removes the authentication token from the request before being logged.

Parameters:

string   $request   the request just made to the server

[ Top ]

method SetHeaderValue [line 411]

void SetHeaderValue( string $key, string $value)

Sets the value for a request header.



Tags:

access:  public


Parameters:

string   $key   the name of the request header element
string   $value   the value for the request header element

[ Top ]

method __doRequest [line 156]

string __doRequest( string $request, string $location, string $action, string $version, [ $one_way = 0])

Overrides the method SoapClient.__doRequest() to perform a clean up of the request XML before marshalling.



Tags:

return:  the XML SOAP response


Overridden in child classes as:

AdWordsSoapClient::__doRequest()
Overrides the method __doRequest(). When OAuth authentication is used the URL has OAuth parameters added.

Overrides SoapClient::__doRequest ( $request, $location, $action, $version, [$one_way = ] ) (parent method not documented)

Parameters:

string   $request   the request XML
string   $location   the URL to request
string   $action   the SOAP action
string   $version   the SOAP version
   $one_way  

[ Top ]

method __soapCall [line 174]

mixed __soapCall( string $function_name, array $arguments, [array $options = NULL], [array $input_headers = NULL], [ &$output_headers = NULL], array $output_headers)

Overrides the method SoapClient.__soapCall() to process the response from the SOAP call.



Tags:

return:  the return from the parent __soapCall
throws:  SOAPFault if there was an exception making the request


Overrides SoapClient::__soapCall ( $function_name, $arguments, [$options = ], [$input_headers = ], [&$output_headers = ] ) (parent method not documented)

Parameters:

string   $function_name   the name of the function being called
array   $arguments   the arguments to that function
array   $options   the options for the SOAP call
array   $input_headers   the optional input headers
array   $output_headers   the options output headers
   &$output_headers  

[ Top ]


Documentation generated by phpDocumentor 1.4.3