googleads / googleads-php-lib

Google Ad Manager SOAP API Client Library for PHP
Apache License 2.0
656 stars 769 forks source link

Unmarshalling Error: unexpected element (uri:"urn:appdynamics", local:"singularityheader") #531

Closed hasangenc0 closed 6 years ago

hasangenc0 commented 6 years ago

I get this error when I call the google adwords api.(AdsSoapClient.php line:149)

My servers runs to AppDynamics and error is relative with it.

Unmarshalling` Error: unexpected element (uri:"urn:appdynamics", local:"singularityheader"). Expected elements are 

<{https://adwords.google.com/api/adwords/cm/v201806}ApiExceptionFault>,

<{https://adwords.google.com/api/adwords/cm/v201806}RequestHeader>,

<{https://adwords.google.com/api/adwords/cm/v201806}ResponseHeader>,

<{https://adwords.google.com/api/adwords/cm/v201806}get>,

<{https://adwords.google.com/api/adwords/cm/v201806}getResponse>,

<{https://adwords.google.com/api/adwords/cm/v201806}mutate>,

<{https://adwords.google.com/api/adwords/cm/v201806}mutateLabel>,

<{https://adwords.google.com/api/adwords/cm/v201806}mutateLabelResponse

>,<{https://adwords.google.com/api/adwords/cm/v201806}mutateResponse>,

<{https://adwords.google.com/api/adwords/cm/v201806}query>,

<{https://adwords.google.com/api/adwords/cm/v201806}queryResponse>
fiboknacky commented 6 years ago

Hello,

Could you be more specific on what you're trying to do, such as adding your code snippet here? The error doesn't seem to related to the AdWords API though.

Best, Knack

hasangenc0 commented 6 years ago

Hello,

I talked with AdWords API Team member Sai Teja on google groups and he said that "Looks like the concern is related to PHP client libraries".

I just making soap call like this.

 $query = (new ReportQueryBuilder())
            ->select([                
                'CampaignName',
            ])
            ->from(ReportDefinitionReportType::CRITERIA_PERFORMANCE_REPORT)
            ->where('Status')->in(['ENABLED', 'PAUSED']) 
            ->during($dates[0],$dates[1])
            ->build();

And error throwing in AdsSoapClient.php in line 149

try {
            ini_set('default_socket_timeout', $this->soapCallTimeout);
            $response = parent::__soapCall(  //  This function call throws an error
                $function_name,
                $arguments,
                $options,
                $input_headers,
                $output_headers
            );
            $this->processResponse($function_name);
        } 

I think Google Servers not accept appdynamics headers

fiboknacky commented 6 years ago

Hi,

I'm not familiar with appdynamics, so can't comment on that. Did you modify any SOAP headers / body before sending to API servers? And is it possible to get the SOAP logs?

Best, Knack

hasangenc0 commented 6 years ago

We solved this error.

The error doesn't related to Google Api like you said before. Appdynamics adds a special singularity header on all soap calls to make correlation between appdynamics monitored application. We created a custom backend rule for disable the correlation for Google Api Calls from the UI controller .