Я пытаюсь отправить фильтр в сервис SOAP Magento из Python 2.7. Я пытаюсь использовать пакет Zeep для вызова службы SOAP. Отправка пустого списка в качестве второго аргумента работает нормально, чтобы вернуть все данные. Однако, когда я устанавливаю фильтр во втором аргументе, он игнорируется, и я все равно получаю все данные. Заранее спасибо!
from zeep import Client
client = Client('https://mywebsite.com/api/v2_soap/index/?wsdl=1')
token = client.service.login('myusername', 'mypassword')
# This works fine, returns all of the customers
customer_list = client.service.customerCustomerList(token, [])
# This still returns all of the customers and ignores the filter
filter = [{'created_at': {'from': '2018-07-01 00:00:00'}}]
customer_list_filtered = client.service.customerCustomerList(token, filter)
Я не уверен, актуально это или нет, но я получаю эти предупреждения.
C:\Users\some_path_to_python\lib\site-packages\zeep\wsdl\wsdl.py:335: UserWarning: The wsdl:message for u'{urn:Magento}channelintegrationOrderInfoResponse' contains an invalid part ('result'): invalid xsd type or elements
warnings.warn(str(exc))
C:\Users\some_path_to_python\lib\site-packages\zeep\wsdl\definitions.py:130: UserWarning: The wsdl:operation 'channelintegrationOrderInfo' was not found in the wsdl:portType u'{urn:Magento}PortType'
warnings.warn(str(exc))