Hi Josh,

Here is the Python logger output, you can find the XML request below (all 
sensitive information replaced by "[removed]"):

DEBUG:suds.transport.http:opening (https:
//adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService?wsdl)
DEBUG:suds.transport.http:sending:
URL: https:
//adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService
HEADERS: {'Content-Type': 'text/xml; charset=utf-8', 'Authorization': 'Bearer 
[removed]', 'SOAPAction': b'""', 'Content-type': 'text/xml; charset=utf-8', 
'Soapaction': b'""'}
MESSAGE:
b'<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:tns="https://adwords.google.com/api/adwords/rm/v201502"; 
xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201502"; 
xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="https://adwords.google.com/api/adwords/rm/v201502"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><SOAP-ENV:Header><tns:RequestHeader><tns:clientCustomerId
 
xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502";>[removed]</tns:clientCustomerId><tns:developerToken
 
xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502";>[removed]</tns:developerToken><tns:userAgent
 
xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502";>[removed] 
(AwApi-Python, googleads/3.5.0, 
Python/3.4.3)</tns:userAgent><tns:validateOnly 
xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502";>false</tns:validateOnly><tns:partialFailure
 
xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502";>false</tns:partialFailure></tns:RequestHeader></SOAP-ENV:Header><ns0:Body><ns1:mutate><ns1:operations><ns2:operator>ADD</ns2:operator><ns1:operand
 
xsi:type="ns1:LogicalUserList"><ns1:name>[removed] list created at 20150717 
14:18:00</ns1:name><ns1:description>Users who visited list A but not B, C 
and 
D</ns1:description><ns1:UserList.Type>LogicalUserList</ns1:UserList.Type><ns1:rules><ns1:operator>ALL</ns1:operator><ns1:ruleOperands
 
xsi:type="ns1:ExpressionRuleUserList"><ns1:id>102489659</ns1:id><ns1:isReadOnly>false</ns1:isReadOnly><ns1:name>List
 
A created at 20150717 14:17:57</ns1:name><ns1:description>Users who visited 
a page where URL contains 
[removed]</ns1:description><ns1:status>OPEN</ns1:status><ns1:accessReason>OWNED</ns1:accessReason><ns1:accountUserListStatus>ACTIVE</ns1:accountUserListStatus><ns1:membershipLifeSpan>30</ns1:membershipLifeSpan><ns1:listType>RULE_BASED</ns1:listType><ns1:UserList.Type>ExpressionRuleUserList</ns1:UserList.Type><ns1:rule><ns1:groups><ns1:items><ns1:StringRuleItem><ns1:key><ns1:name>url__</ns1:name></ns1:key><ns1:op>CONTAINS</ns1:op><ns1:value>[removed]</ns1:value></ns1:StringRuleItem></ns1:items></ns1:groups></ns1:rule></ns1:ruleOperands></ns1:rules><ns1:rules><ns1:operator>NONE</ns1:operator><ns1:ruleOperands
 
xsi:type="ns1:ExpressionRuleUserList"><ns1:id>102489779</ns1:id><ns1:isReadOnly>false</ns1:isReadOnly><ns1:name>List
 
B created at 20150717 14:17:58</ns1:name><ns1:description>Users who visited 
a page where URL contains 
[removed]</ns1:description><ns1:status>OPEN</ns1:status><ns1:accessReason>OWNED</ns1:accessReason><ns1:accountUserListStatus>ACTIVE</ns1:accountUserListStatus><ns1:membershipLifeSpan>30</ns1:membershipLifeSpan><ns1:listType>RULE_BASED</ns1:listType><ns1:UserList.Type>ExpressionRuleUserList</ns1:UserList.Type><ns1:rule><ns1:groups><ns1:items><ns1:StringRuleItem><ns1:key><ns1:name>url__</ns1:name></ns1:key><ns1:op>CONTAINS</ns1:op><ns1:value>[removed]</ns1:value></ns1:StringRuleItem></ns1:items></ns1:groups></ns1:rule></ns1:ruleOperands><ns1:ruleOperands
 
xsi:type="ns1:ExpressionRuleUserList"><ns1:id>102489899</ns1:id><ns1:isReadOnly>false</ns1:isReadOnly><ns1:name>List
 
C created at 20150717 14:17:58</ns1:name><ns1:description>Users who visited 
a page where URL contains 
[removed]</ns1:description><ns1:status>OPEN</ns1:status><ns1:accessReason>OWNED</ns1:accessReason><ns1:accountUserListStatus>ACTIVE</ns1:accountUserListStatus><ns1:membershipLifeSpan>30</ns1:membershipLifeSpan><ns1:listType>RULE_BASED</ns1:listType><ns1:UserList.Type>ExpressionRuleUserList</ns1:UserList.Type><ns1:rule><ns1:groups><ns1:items><ns1:StringRuleItem><ns1:key><ns1:name>url__</ns1:name></ns1:key><ns1:op>CONTAINS</ns1:op><ns1:value>[removed]</ns1:value></ns1:StringRuleItem></ns1:items></ns1:groups></ns1:rule></ns1:ruleOperands><ns1:ruleOperands
 
xsi:type="ns1:ExpressionRuleUserList"><ns1:id>102490019</ns1:id><ns1:isReadOnly>false</ns1:isReadOnly><ns1:name>List
 
D created at 20150717 14:17:59</ns1:name><ns1:description>Users who visited 
a page where URL contains 
[removed]</ns1:description><ns1:status>OPEN</ns1:status><ns1:accessReason>OWNED</ns1:accessReason><ns1:accountUserListStatus>ACTIVE</ns1:accountUserListStatus><ns1:membershipLifeSpan>30</ns1:membershipLifeSpan><ns1:listType>RULE_BASED</ns1:listType><ns1:UserList.Type>ExpressionRuleUserList</ns1:UserList.Type><ns1:rule><ns1:groups><ns1:items><ns1:StringRuleItem><ns1:key><ns1:name>url__</ns1:name></ns1:key><ns1:op>CONTAINS</ns1:op><ns1:value>[removed]</ns1:value></ns1:StringRuleItem></ns1:items></ns1:groups></ns1:rule></ns1:ruleOperands></ns1:rules></ns1:operand></ns1:operations></ns1:mutate></ns0:Body></SOAP-ENV:Envelope>'
ERROR:suds.client:<suds.sax.document.Document object at 0x10b29f4e0>

Thank you for your help,

Damien

On Friday, July 17, 2015 at 9:26:44 AM UTC-4, Josh Radcliff (AdWords API 
Team) wrote:
>
> Hi Damien,
>
> In the past, I've seen this error when the SOAP XML was malformed. Could 
> you post your request XML with sensitive information removed (such as your 
> developer token) so I can check it?
>
> Thanks,
> Josh, AdWords API Team
>
> On Thursday, July 16, 2015 at 8:56:54 AM UTC-4, Damien wrote:
>>
>> Hi,
>>
>> I am currently working on creating Remarketing lists. I am using the 
>> Google AdWords API's Python libraries.
>>
>> I needed to create a LogicalUserList combining two 
>> ExpressionRuleUserList. This is the error I got:
>> suds.WebFault: Server raised fault: 'Cannot construct an instance of 
>> com.google.ads.api.services.datax.userlists.LogicalUserListOperand because 
>> it is abstract.  You are probably missing an @Uses annotation while 
>> invoking public abstract 
>> com.google.ads.api.services.datax.userlists.UserListReturnValue 
>> com.google.ads.api.services.datax.adwordsuserlist.AdwordsUserListService.mutate(java.util.List)
>>  
>> throws com.google.ads.api.services.common.error.ApiException with params 
>> [[com.google.ads.api.services.datax.adwordsuserlist.v201502.jaxbgen.UserListOperation@16687106]].'
>>
>> My source code:
>> #!/usr/bin/python
>> #coding=UTF-8
>>
>> from datetime import date
>> from datetime import datetime
>> from datetime import timedelta
>> from googleads import adwords
>>
>> (...)
>>
>> def createNewList(client, list_a, list_b):
>>   # Initialize appropriate service.
>>   adwords_user_list_service = client.GetService(
>>       'AdwordsUserListService', version='v201502')
>>
>>
>>   rules = [
>>       {
>>           'ruleOperands': [list_a],
>>           'operator': 'ALL'
>>       },
>>       {
>>           'ruleOperands': [list_b],
>>           'operator': 'NONE'
>>       }
>>   ]
>>
>>
>>   # Create the user list with no restrictions on site visit date.
>>   combination_user_list = {
>>       'xsi_type': 'LogicalUserList',
>>       'name': 'Bouncers list created at %s'
>>               % datetime.today().strftime('%Y%m%d %H:%M:%S'),
>>       'description': 'Users who visited list A but not B',
>>       'rules': rules
>>       #'startDate': today.strftime('%Y%m%d'),
>>       #'endDate': end_date.strftime('%Y%m%d')
>>   }
>>
>>
>>   # Create operations to add the user lists.
>>   operations = [
>>       {
>>           'operand': user_list,
>>           'operator': 'ADD',
>>       } for user_list in [combination_user_list]
>>   ]
>>
>>
>>   # Submit the operations.
>>   user_lists = adwords_user_list_service.mutate(operations)
>>
>>
>>   # Display results.
>>   for user_list in user_lists['value']:
>>     print (('User list added with ID %d, name "%s", status "%s", list 
>> type'
>>             ' "%s", accountUserListStatus "%s", description "%s".') %
>>            (user_list['id'], user_list['name'],
>>             user_list['status'], user_list['listType'],
>>             user_list['accountUserListStatus'], user_list['description'
>> ]))
>>
>>
>>
>> adwords_client = adwords.AdWordsClient.LoadFromStorage()
>>
>> createNewList(adwords_client, list_a, list_b)
>>
>> With list_a and list_b being lists I previously created.
>>
>> Can anybody tell me what's wrong?
>>
>> Alternatively, how is it possible to reproduce the "Visitors of a page 
>> who did not visit another page" behaviour with the API? The only way 
>> seemed to used combination lists but even is failing (see the error 
>> above)...
>>
>>
>> Thanks for your help,
>>
>> Damien
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/5c2fba32-cd9d-48d4-9513-7e528c5292b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to