Using BingAds SDK for Python I am not able to perform any operation to update because of a bug that I cannot resolve.
The SDK uses Suds for the handling of SOAP operation.
# This function internally configures the authorization for BingAdsAPI
campaign_service = bc.get_bing_ads_client(account=account, service='CampaignManagementService')
update_ad_groups_request = campaign_service.factory.create('UpdateAdGroupsRequest')
update_ad_groups_request.CampaignId = campaign_id
ad_group = campaign_service.factory.create('AdGroup')
ad_group.Id = ad_group_id
bid = campaign_service.factory.create('Bid')
bid.Amount = new_bid
ad_group.CpcBid = bid
update_ad_groups_request.AdGroups = campaign_service.factory.create('ArrayOfAdGroup')
update_ad_groups_request.AdGroups.AdGroup.append(ad_group)
campaign_service.UpdateAdGroups(update_ad_groups_request)
When I send it it fails saying:
suds.WebFault: Server raised fault: 'The formatter threw an exception
while trying to deserialize the message: There was an error while
trying to deserialize parameter
https://bingads.microsoft.com/CampaignManagement/v13:CampaignId. The
InnerException message was 'There was an error deserializing the
object of type System.Int64. The value '' cannot be parsed as the type
'Int64'.'. Please see InnerException for more details.'
Note how the Campaign ID is twice and also it wraps the whole envelope. I tried also directly with Suds and I have the same issue, other functions also have the same issue.
Because moving to parsing the envelopes by myself, I was wondering if someone has had this issue and what could be the reason.
Using BingAds SDK for Python I am not able to perform any operation to update because of a bug that I cannot resolve. The SDK uses Suds for the handling of SOAP operation.
Here is the wsdl: https://campaign.api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v13/CampaignManagementService.svc?singleWsdl
When I send it it fails saying:
When I open the soap Envelope:
Note how the Campaign ID is twice and also it wraps the whole envelope. I tried also directly with Suds and I have the same issue, other functions also have the same issue.
Because moving to parsing the envelopes by myself, I was wondering if someone has had this issue and what could be the reason.