mvantellingen / python-zeep

A Python SOAP client
http://docs.python-zeep.org
Other
1.88k stars 583 forks source link

Missing xsd:all type #363

Open workism opened 7 years ago

workism commented 7 years ago

Hello

zeep version 1.1.0

Site address replaced on example.com !

script

from zeep.transports import Transport
from zeep.cache import InMemoryCache
from requests import Session
from requests.auth import HTTPBasicAuth
import zeep

cache_ = InMemoryCache(timeout=3600)

wsdl = 'http://example.com/ws/OnlineServices.1cws?wsdl'

session = Session()
session.auth = HTTPBasicAuth('login', 'password')

client = zeep.Client(wsdl=wsdl, transport=Transport(session=session, cache=cache_))

response = client.service.SearchByBrands(ClientCode='test', TranscriptionBrand='oc90:knecht;', ShowOff=1, ShowNumber=10000)

error on client = zeep.Client(wsdl=wsdl, transport=Transport(session=session, cache=cache_))

/home/django/cartuz_v3_virtualenv/bin/python /home/django/_projects/cartuz_v3/test_1c_wsdl.py
Traceback (most recent call last):
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/xsd/schema.py", line 460, in _get_instance
    return items[qname]
KeyError: <lxml.etree.QName object at 0x7fa6e9e400a8>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/django/_projects/cartuz_v3/test_1c_wsdl.py", line 15, in <module>
    client = zeep.Client(wsdl=wsdl, transport=Transport(session=session, cache=cache_))
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/client.py", line 120, in __init__
    self.wsdl = Document(wsdl, self.transport)
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/wsdl/wsdl.py", line 65, in __init__
    root_definitions = Definition(self, document, self.location)
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/wsdl/wsdl.py", line 156, in __init__
    self.parse_types(doc)
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/wsdl/wsdl.py", line 272, in parse_types
    self.types.add_documents(schema_nodes, self.location)
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/xsd/schema.py", line 100, in add_documents
    document.resolve()
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/xsd/schema.py", line 370, in resolve
    _resolve_dict(self._elements)
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/xsd/schema.py", line 364, in _resolve_dict
    new = obj.resolve()
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/xsd/elements/element.py", line 220, in resolve
    self.resolve_type()
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/xsd/elements/element.py", line 217, in resolve_type
    self.type = self.type.resolve()
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/xsd/types/complex.py", line 246, in resolve
    self._element = self._element.resolve()
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/xsd/elements/indicators.py", line 163, in resolve
    self[i] = elm.resolve()
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/xsd/elements/element.py", line 220, in resolve
    self.resolve_type()
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/xsd/elements/element.py", line 217, in resolve_type
    self.type = self.type.resolve()
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/xsd/types/base.py", line 79, in resolve
    retval = self.schema.get_type(self.qname)
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/xsd/schema.py", line 121, in get_type
    return self._get_instance(qname, 'get_type', 'type')
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/xsd/schema.py", line 219, in _get_instance
    raise last_exception
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/xsd/schema.py", line 215, in _get_instance
    return method(qname)
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/xsd/schema.py", line 424, in get_type
    return self._get_instance(qname, self._types, 'type')
  File "/home/django/cartuz_v3_virtualenv/lib64/python3.4/site-packages/zeep/xsd/schema.py", line 471, in _get_instance
    'known_items': known_items or ' - '
zeep.exceptions.LookupError: No type 'all' in namespace http://www.w3.org/2001/XMLSchema. Available types are: {http://www.w3.org/2001/XMLSchema}NMTOKEN, {http://www.w3.org/2001/XMLSchema}Name, {http://www.w3.org/2001/XMLSchema}token, {http://www.w3.org/2001/XMLSchema}ENTITY, {http://www.w3.org/2001/XMLSchema}byte, {http://www.w3.org/2001/XMLSchema}ENTITIES, {http://www.w3.org/2001/XMLSchema}time, {http://www.w3.org/2001/XMLSchema}hexBinary, {http://www.w3.org/2001/XMLSchema}IDREF, {http://www.w3.org/2001/XMLSchema}anyType, {http://www.w3.org/2001/XMLSchema}anySimpleType, {http://www.w3.org/2001/XMLSchema}int, {http://www.w3.org/2001/XMLSchema}gYearMonth, {http://www.w3.org/2001/XMLSchema}IDREFS, {http://www.w3.org/2001/XMLSchema}date, {http://www.w3.org/2001/XMLSchema}anyURI, {http://www.w3.org/2001/XMLSchema}QName, {http://www.w3.org/2001/XMLSchema}positiveInteger, {http://www.w3.org/2001/XMLSchema}nonPositiveInteger, {http://www.w3.org/2001/XMLSchema}negativeInteger, {http://www.w3.org/2001/XMLSchema}NCName, {http://www.w3.org/2001/XMLSchema}short, {http://www.w3.org/2001/XMLSchema}string, {http://www.w3.org/2001/XMLSchema}normalizedString, {http://www.w3.org/2001/XMLSchema}double, {http://www.w3.org/2001/XMLSchema}duration, {http://www.w3.org/2001/XMLSchema}gDay, {http://www.w3.org/2001/XMLSchema}long, {http://www.w3.org/2001/XMLSchema}unsignedByte, {http://www.w3.org/2001/XMLSchema}nonNegativeInteger, {http://www.w3.org/2001/XMLSchema}gMonth, {http://www.w3.org/2001/XMLSchema}gMonthDay, {http://www.w3.org/2001/XMLSchema}gYear, {http://www.w3.org/2001/XMLSchema}decimal, {http://www.w3.org/2001/XMLSchema}unsignedLong, {http://www.w3.org/2001/XMLSchema}integer, {http://www.w3.org/2001/XMLSchema}ID, {http://www.w3.org/2001/XMLSchema}language, {http://www.w3.org/2001/XMLSchema}unsignedInt, {http://www.w3.org/2001/XMLSchema}NOTATION, {http://www.w3.org/2001/XMLSchema}unsignedShort, {http://www.w3.org/2001/XMLSchema}boolean, {http://www.w3.org/2001/XMLSchema}float, {http://www.w3.org/2001/XMLSchema}base64Binary, {http://www.w3.org/2001/XMLSchema}NMTOKENS, {http://www.w3.org/2001/XMLSchema}dateTime

problem in xs:all xs:all is correct option https://habrahabr.ru/post/90696/ also similar xs:sequence

<xs:element name="GetPayments">
<xs:complexType>
<xs:sequence>
<xs:element name="ClientCode" type="xs:string"/>
<xs:element name="FilterSet" type="xs:all" nillable="true"/>
<xs:element name="ShowOff" type="xs:string" nillable="true"/>
<xs:element name="ShowNumber" type="xs:string" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:element>

wsdl

<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12bind="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapbind="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://example.com/common_data_local" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://example.com/common_data_local" name="OnlineServices" targetNamespace="http://example.com/common_data_local">
<types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs1="http://example.com/common_data_local" targetNamespace="http://example.com/common_data_local" attributeFormDefault="unqualified" elementFormDefault="qualified">
<xs:complexType name="CheckListItem">
<xs:sequence>
<xs:element name="BasketID" type="xs:string"/>
<xs:element name="Result" type="xs:string"/>
<xs:element name="DocNumber" type="xs:string"/>
<xs:element name="DocDate" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Consigment">
<xs:sequence>
<xs:element name="ConsignmentItem" type="tns:ConsignmentItem" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ConsignmentItem">
<xs:sequence>
<xs:element name="Articul" type="xs:string" minOccurs="0"/>
<xs:element name="Brand" type="xs:string" minOccurs="0"/>
<xs:element name="Product_Name" type="xs:string" minOccurs="0"/>
<xs:element name="Qty" type="xs:string" minOccurs="0"/>
<xs:element name="Price" type="xs:string" minOccurs="0"/>
<xs:element name="Sum" type="xs:string" minOccurs="0"/>
<xs:element name="Weight" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="PriceKG" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="Total" type="xs:string" minOccurs="0"/>
<xs:element name="Delivery" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="BarCode" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="Comment" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="ID" type="xs:string" nillable="true" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ElSearchResults">
<xs:sequence>
<xs:element name="ElSearchResults" type="tns:SearchResult" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="OrderSavingResult">
<xs:sequence>
<xs:element name="OrderNumber" type="xs:string" nillable="true"/>
<xs:element name="OrderDate" type="xs:string"/>
<xs:element name="ErrorMessage" type="xs:string" nillable="true"/>
<xs:element name="Products1CResult" type="xs:string"/>
<xs:element name="ProductsAdeoResult" type="xs:string"/>
<xs:element name="ProductsDeliveryResult" type="xs:string"/>
<xs:element name="ProcessingErrors" type="tns:CheckListItem" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="OrdersGroup">
<xs:sequence>
<xs:element name="Items" type="tns:OrdersList" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="TotalNumber" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="OrdersList">
<xs:sequence>
<xs:element name="OrdersDate" type="xs:string" minOccurs="0"/>
<xs:element name="Order_Id" type="xs:string" minOccurs="0"/>
<xs:element name="Product_Id" type="xs:string" minOccurs="0"/>
<xs:element name="Articul" type="xs:string" minOccurs="0"/>
<xs:element name="Brand" type="xs:string" minOccurs="0"/>
<xs:element name="Product_Name" type="xs:string" minOccurs="0"/>
<xs:element name="Supplier" type="xs:string" minOccurs="0"/>
<xs:element name="Supplier_Id_Adeo" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="Price" type="xs:string" minOccurs="0"/>
<xs:element name="PriceSale" type="xs:string" minOccurs="0"/>
<xs:element name="Qty" type="xs:string" minOccurs="0"/>
<xs:element name="Status_Order" type="xs:string" minOccurs="0"/>
<xs:element name="Orders_Comment" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="Status_Comment" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="Qty_In_Progress" type="xs:string" minOccurs="0"/>
<xs:element name="Qty_Rejected" type="xs:string" minOccurs="0"/>
<xs:element name="Qty_Expected" type="xs:string" minOccurs="0"/>
<xs:element name="Qty_On_Stock" type="xs:string" minOccurs="0"/>
<xs:element name="Qty_Packet" type="xs:string" minOccurs="0"/>
<xs:element name="Qty_Issued" type="xs:string" minOccurs="0"/>
<xs:element name="Qty_Returned" type="xs:string" minOccurs="0"/>
<xs:element name="Status_List" type="tns:Status" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="CreatedBy" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="Transit" type="xs:string" nillable="true" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Payments">
<xs:sequence>
<xs:element name="Date" type="xs:string" minOccurs="0"/>
<xs:element name="Income" type="xs:string" minOccurs="0"/>
<xs:element name="Expenditure" type="xs:string" minOccurs="0"/>
<xs:element name="DocumentName" type="xs:string" minOccurs="0"/>
<xs:element name="Comments" type="xs:string" minOccurs="0"/>
<xs:element name="DocumentID" type="xs:string" minOccurs="0"/>
<xs:element name="DocumentType" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PaymentsList">
<xs:sequence>
<xs:element name="Items" type="tns:Payments" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="SummaryIncom" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="SummaryExpenditure" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="TotalNumber" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="TotalDebt" type="xs:string" nillable="true" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SaveBasket">
<xs:sequence>
<xs:element name="client_code"/>
<xs:element name="parts" type="xs:string" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SaveBasketParts">
<xs:sequence>
<xs:element name="caption" type="xs:string" nillable="true"/>
<xs:element name="article" type="xs:string" nillable="true"/>
<xs:element name="brand" type="xs:string" nillable="true"/>
<xs:element name="b_id" type="xs:string" nillable="true"/>
<xs:element name="comment" type="xs:string" nillable="true"/>
<xs:element name="source" type="xs:string" nillable="true"/>
<xs:element name="stock" type="xs:string" nillable="true"/>
<xs:element name="client_selling_price" type="xs:decimal"/>
<xs:element name="price" type="xs:decimal"/>
<xs:element name="quantity" type="xs:integer"/>
<xs:element name="allowable_percent" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SearchResult">
<xs:sequence>
<xs:element name="Transcription" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="Brand" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="Name" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="Price" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="Balance" type="xs:string" minOccurs="0"/>
<xs:element name="Store" type="xs:string" minOccurs="0"/>
<xs:element name="Code" type="xs:string" minOccurs="0"/>
<xs:element name="Delivery" type="xs:string" minOccurs="0"/>
<xs:element name="DeliveryCode" type="xs:string" minOccurs="0"/>
<xs:element name="DeliveryDate" type="xs:string" minOccurs="0"/>
<xs:element name="Period" type="xs:string" minOccurs="0"/>
<xs:element name="Multiplicity" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="QuickDelivery" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="Price_ID" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="OutputTime" type="xs:string" minOccurs="0"/>
<xs:element name="Source" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SearchResults">
<xs:sequence>
<xs:element name="TotalSearchResults" type="tns:ElSearchResults" minOccurs="0"/>
<xs:element name="TotalNumber" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Status">
<xs:sequence>
<xs:element name="Date" type="xs:string" minOccurs="0"/>
<xs:element name="Status" type="xs:string" minOccurs="0"/>
<xs:element name="Qty" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="Status_Comment" type="xs:string" nillable="true" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="StatusList">
<xs:sequence>
<xs:element name="Items" type="tns:Status" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:element name="SearchByTranscription">
<xs:complexType>
<xs:sequence>
<xs:element name="ClientCode" type="xs:string"/>
<xs:element name="Transcription" type="xs:string"/>
<xs:element name="ShowOff" type="xs:integer"/>
<xs:element name="ShowNumber" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SearchByTranscriptionResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" type="tns:ElSearchResults"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SearchByBrands">
<xs:complexType>
<xs:sequence>
<xs:element name="ClientCode" type="xs:string"/>
<xs:element name="TranscriptionBrand" type="xs:string"/>
<xs:element name="ShowOff" type="xs:integer"/>
<xs:element name="ShowNumber" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SearchByBrandsResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" type="tns:ElSearchResults"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="DeliveryInfo">
<xs:complexType>
<xs:sequence>
<xs:element name="ClientCode" type="xs:string"/>
<xs:element name="DeliveryID" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="DeliveryInfoResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" type="xs:string" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetPayments">
<xs:complexType>
<xs:sequence>
<xs:element name="ClientCode" type="xs:string"/>
<xs:element name="FilterSet" type="xs:all" nillable="true"/>
<xs:element name="ShowOff" type="xs:string" nillable="true"/>
<xs:element name="ShowNumber" type="xs:string" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetPaymentsResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" type="tns:PaymentsList"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetConsignmentDocument">
<xs:complexType>
<xs:sequence>
<xs:element name="ClientCode" type="xs:string"/>
<xs:element name="documentId" type="xs:string"/>
<xs:element name="documentType" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetConsignmentDocumentResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" type="tns:Consigment"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetOrderStateHistory">
<xs:complexType>
<xs:sequence>
<xs:element name="ClientCode" type="xs:string"/>
<xs:element name="OrderID" type="xs:integer"/>
<xs:element name="ID" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetOrderStateHistoryResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" type="tns:StatusList" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetOrders">
<xs:complexType>
<xs:sequence>
<xs:element name="ClientCode" type="xs:string"/>
<xs:element name="FilterSet" type="xs:all" nillable="true"/>
<xs:element name="ShowOff" type="xs:string" nillable="true"/>
<xs:element name="ShowNumber" type="xs:string" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetOrdersResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" type="tns:OrdersGroup" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SaveOrder">
<xs:complexType>
<xs:sequence>
<xs:element name="ClientCode" type="xs:string"/>
<xs:element name="Products1C" type="xs:string"/>
<xs:element name="ProductsAdeo" type="xs:string"/>
<xs:element name="ProductsDelivery" type="xs:string"/>
<xs:element name="CreatedBy" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SaveOrderResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" type="tns:OrderSavingResult"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CancelAnOrder">
<xs:complexType>
<xs:sequence>
<xs:element name="ClientCode" type="xs:string"/>
<xs:element name="ID" type="xs:string" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CancelAnOrderResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" type="xs:string" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SaveBasket">
<xs:complexType>
<xs:sequence>
<xs:element name="client_code" type="xs:string"/>
<xs:element name="parts" type="xs:all" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SaveBasketResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</types>
<message name="SearchByTranscriptionRequestMessage">
<part name="parameters" element="tns:SearchByTranscription"/>
</message>
<message name="SearchByTranscriptionResponseMessage">
<part name="parameters" element="tns:SearchByTranscriptionResponse"/>
</message>
<message name="SearchByBrandsRequestMessage">
<part name="parameters" element="tns:SearchByBrands"/>
</message>
<message name="SearchByBrandsResponseMessage">
<part name="parameters" element="tns:SearchByBrandsResponse"/>
</message>
<message name="DeliveryInfoRequestMessage">
<part name="parameters" element="tns:DeliveryInfo"/>
</message>
<message name="DeliveryInfoResponseMessage">
<part name="parameters" element="tns:DeliveryInfoResponse"/>
</message>
<message name="GetPaymentsRequestMessage">
<part name="parameters" element="tns:GetPayments"/>
</message>
<message name="GetPaymentsResponseMessage">
<part name="parameters" element="tns:GetPaymentsResponse"/>
</message>
<message name="GetConsignmentDocumentRequestMessage">
<part name="parameters" element="tns:GetConsignmentDocument"/>
</message>
<message name="GetConsignmentDocumentResponseMessage">
<part name="parameters" element="tns:GetConsignmentDocumentResponse"/>
</message>
<message name="GetOrderStateHistoryRequestMessage">
<part name="parameters" element="tns:GetOrderStateHistory"/>
</message>
<message name="GetOrderStateHistoryResponseMessage">
<part name="parameters" element="tns:GetOrderStateHistoryResponse"/>
</message>
<message name="GetOrdersRequestMessage">
<part name="parameters" element="tns:GetOrders"/>
</message>
<message name="GetOrdersResponseMessage">
<part name="parameters" element="tns:GetOrdersResponse"/>
</message>
<message name="SaveOrderRequestMessage">
<part name="parameters" element="tns:SaveOrder"/>
</message>
<message name="SaveOrderResponseMessage">
<part name="parameters" element="tns:SaveOrderResponse"/>
</message>
<message name="CancelAnOrderRequestMessage">
<part name="parameters" element="tns:CancelAnOrder"/>
</message>
<message name="CancelAnOrderResponseMessage">
<part name="parameters" element="tns:CancelAnOrderResponse"/>
</message>
<message name="SaveBasketRequestMessage">
<part name="parameters" element="tns:SaveBasket"/>
</message>
<message name="SaveBasketResponseMessage">
<part name="parameters" element="tns:SaveBasketResponse"/>
</message>
<portType name="OnlineServicesPortType">
<operation name="SearchByTranscription">
<input message="tns:SearchByTranscriptionRequestMessage"/>
<output message="tns:SearchByTranscriptionResponseMessage"/>
</operation>
<operation name="SearchByBrands">
<input message="tns:SearchByBrandsRequestMessage"/>
<output message="tns:SearchByBrandsResponseMessage"/>
</operation>
<operation name="DeliveryInfo">
<input message="tns:DeliveryInfoRequestMessage"/>
<output message="tns:DeliveryInfoResponseMessage"/>
</operation>
<operation name="GetPayments">
<input message="tns:GetPaymentsRequestMessage"/>
<output message="tns:GetPaymentsResponseMessage"/>
</operation>
<operation name="GetConsignmentDocument">
<input message="tns:GetConsignmentDocumentRequestMessage"/>
<output message="tns:GetConsignmentDocumentResponseMessage"/>
</operation>
<operation name="GetOrderStateHistory">
<input message="tns:GetOrderStateHistoryRequestMessage"/>
<output message="tns:GetOrderStateHistoryResponseMessage"/>
</operation>
<operation name="GetOrders">
<input message="tns:GetOrdersRequestMessage"/>
<output message="tns:GetOrdersResponseMessage"/>
</operation>
<operation name="SaveOrder">
<input message="tns:SaveOrderRequestMessage"/>
<output message="tns:SaveOrderResponseMessage"/>
</operation>
<operation name="CancelAnOrder">
<input message="tns:CancelAnOrderRequestMessage"/>
<output message="tns:CancelAnOrderResponseMessage"/>
</operation>
<operation name="SaveBasket">
<input message="tns:SaveBasketRequestMessage"/>
<output message="tns:SaveBasketResponseMessage"/>
</operation>
</portType>
<binding name="OnlineServicesSoapBinding" type="tns:OnlineServicesPortType">
<soapbind:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="SearchByTranscription">
<soapbind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:SearchByTranscription"/>
<input>
<soapbind:body use="literal"/>
</input>
<output>
<soapbind:body use="literal"/>
</output>
</operation>
<operation name="SearchByBrands">
<soapbind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:SearchByBrands"/>
<input>
<soapbind:body use="literal"/>
</input>
<output>
<soapbind:body use="literal"/>
</output>
</operation>
<operation name="DeliveryInfo">
<soapbind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:DeliveryInfo"/>
<input>
<soapbind:body use="literal"/>
</input>
<output>
<soapbind:body use="literal"/>
</output>
</operation>
<operation name="GetPayments">
<soapbind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:GetPayments"/>
<input>
<soapbind:body use="literal"/>
</input>
<output>
<soapbind:body use="literal"/>
</output>
</operation>
<operation name="GetConsignmentDocument">
<soapbind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:GetConsignmentDocument"/>
<input>
<soapbind:body use="literal"/>
</input>
<output>
<soapbind:body use="literal"/>
</output>
</operation>
<operation name="GetOrderStateHistory">
<soapbind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:GetOrderStateHistory"/>
<input>
<soapbind:body use="literal"/>
</input>
<output>
<soapbind:body use="literal"/>
</output>
</operation>
<operation name="GetOrders">
<soapbind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:GetOrders"/>
<input>
<soapbind:body use="literal"/>
</input>
<output>
<soapbind:body use="literal"/>
</output>
</operation>
<operation name="SaveOrder">
<soapbind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:SaveOrder"/>
<input>
<soapbind:body use="literal"/>
</input>
<output>
<soapbind:body use="literal"/>
</output>
</operation>
<operation name="CancelAnOrder">
<soapbind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:CancelAnOrder"/>
<input>
<soapbind:body use="literal"/>
</input>
<output>
<soapbind:body use="literal"/>
</output>
</operation>
<operation name="SaveBasket">
<soapbind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:SaveBasket"/>
<input>
<soapbind:body use="literal"/>
</input>
<output>
<soapbind:body use="literal"/>
</output>
</operation>
</binding>
<binding name="OnlineServicesSoap12Binding" type="tns:OnlineServicesPortType">
<soap12bind:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="SearchByTranscription">
<soap12bind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:SearchByTranscription"/>
<input>
<soap12bind:body use="literal"/>
</input>
<output>
<soap12bind:body use="literal"/>
</output>
</operation>
<operation name="SearchByBrands">
<soap12bind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:SearchByBrands"/>
<input>
<soap12bind:body use="literal"/>
</input>
<output>
<soap12bind:body use="literal"/>
</output>
</operation>
<operation name="DeliveryInfo">
<soap12bind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:DeliveryInfo"/>
<input>
<soap12bind:body use="literal"/>
</input>
<output>
<soap12bind:body use="literal"/>
</output>
</operation>
<operation name="GetPayments">
<soap12bind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:GetPayments"/>
<input>
<soap12bind:body use="literal"/>
</input>
<output>
<soap12bind:body use="literal"/>
</output>
</operation>
<operation name="GetConsignmentDocument">
<soap12bind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:GetConsignmentDocument"/>
<input>
<soap12bind:body use="literal"/>
</input>
<output>
<soap12bind:body use="literal"/>
</output>
</operation>
<operation name="GetOrderStateHistory">
<soap12bind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:GetOrderStateHistory"/>
<input>
<soap12bind:body use="literal"/>
</input>
<output>
<soap12bind:body use="literal"/>
</output>
</operation>
<operation name="GetOrders">
<soap12bind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:GetOrders"/>
<input>
<soap12bind:body use="literal"/>
</input>
<output>
<soap12bind:body use="literal"/>
</output>
</operation>
<operation name="SaveOrder">
<soap12bind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:SaveOrder"/>
<input>
<soap12bind:body use="literal"/>
</input>
<output>
<soap12bind:body use="literal"/>
</output>
</operation>
<operation name="CancelAnOrder">
<soap12bind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:CancelAnOrder"/>
<input>
<soap12bind:body use="literal"/>
</input>
<output>
<soap12bind:body use="literal"/>
</output>
</operation>
<operation name="SaveBasket">
<soap12bind:operation style="document" soapAction="http://example.com/common_data_local#OnlineServices:SaveBasket"/>
<input>
<soap12bind:body use="literal"/>
</input>
<output>
<soap12bind:body use="literal"/>
</output>
</operation>
</binding>
<service name="OnlineServices">
<port name="OnlineServicesSoap" binding="tns:OnlineServicesSoapBinding">
<documentation>
<wsi:Claim xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" conformsTo="http://ws-i.org/profiles/basic/1.1"/>
</documentation>
<soapbind:address location="http://example.com/ws/onlineservices.1cws"/>
</port>
<port name="OnlineServicesSoap12" binding="tns:OnlineServicesSoap12Binding">
<soap12bind:address location="http://example.com/ws/onlineservices.1cws"/>
</port>
</service>
</definitions>
mvantellingen commented 7 years ago

Hi,

Thanks for the report. It is unfortunately missing an example script as explained in the documentation (see http://docs.python-zeep.org/en/master/reporting_bugs.html). This is also mentioned when you create the issue on github.

I realise this will result in extra work on your side, but I can really use the extra help.

workism commented 7 years ago

I create script like http://docs.python-zeep.org/en/master/reporting_bugs.html

Errors when creating the request

but the script crashes on connect

client = Client('http://..

and does not reach

node = client.service._binding.create_message

maybe need real address site for debug ? I'm just not allowed to publish it

from lxml import etree
from zeep import Client
from requests import Session
from requests.auth import HTTPBasicAuth
from zeep.transports import Transport

session = Session()
session.auth = HTTPBasicAuth('login', 'pass')

client = Client('http://.../ws/OnlineServices.1cws?wsdl',transport=Transport(session=session))

# client.service.OPERATION_NAME(args, kwargs) becomes
node = client.service._binding.create_message(
    'OPERATION_NAME')

print(etree.tostring(node, pretty_print=True))
mvantellingen commented 7 years ago

Ah yeah i understand it now, zeep doesn't expose the All as an xsd:type. i'll look into it