You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I know the issue looks long but that's just from the example code, the issue title describes the bug exactly, I only add explanations to "Current situation", "Expected behavior" and "Tried solutions"
The example code as well as excerpts from the .xsd file you can find under EXAMPLE CODE
I really appreciate you creating and maintaining this package, I don't know what else we would do
If you can solve this and you have a rate in mind let me know
Current situation: zeep.Client recognizes the extension of a type, so the ClassificationType generated by zeep does extend the RegistryObjectType. But the RegistryObjectType extends the IdentifiableType, and the ClassificationType generated doesn't include the attributes/elements of the IdentifiableType (in particular Slot[] and id)
Expected behavior: zeep.Client traverses the whole extension hierarchy
Tried solutions:
overwriting the types directly using client.wsdl.types.types stuff
creating a prepared_document using from zeep.wsdl.wsdl.Document, overwriting the types, and the creating the client based on the prepared_document
-> the problem here was that client.get_type() was returning my overwritten types, calling the service.Operation() was not using my overwritten types
I am creatting the message based on a dictionary, so I wrote various dictionary-traversing scripts that replace lists of dicts with lists of instantiated zeep elements (using my adulterated types)
-> this creates more and harder to debug errors, like duplicate keys and arrays filled with None (because in reality not all parent types extend all child attributes, but for zeep they do, and instantiating them without specifying the attribute defaults them to None)
-> example error: TypeError: Argument must be bytes or unicode, got '_StaticIdentity'
SKIPPABLE I have a second problem (will open a second issue for it) which is that the type e.g. TListType is defined as having one element T, which is an array of T. The problem is that the array really consists of types that extend T, creating two problems: zeep fails when calling the service and I can't use the .extend approach because O doesn't extend the child-types, so what I tried was appending them to O._element, but this doesn't seem to affect the signature...
The relevant excerpts from the WSDL for convenience
<complexTypename="ClassificationType">
<annotation>
<documentationxml:lang="en">
Classification is the mapping of the same named interface in ebRIM.
It extends RegistryObject.
A Classification specifies references to two registry entrys.
The classifiedObject is id of the Object being classified.
The classificationNode is id of the ClassificationNode classying the object
</documentation>
</annotation>
<complexContent>
<extensionbase="tns:RegistryObjectType">
<attributename="classificationScheme"type="tns:referenceURI"use="optional"/>
<attributename="classifiedObject"type="tns:referenceURI"use="required"/>
<attributename="classificationNode"type="tns:referenceURI"use="optional"/>
<attributename="nodeRepresentation"type="tns:LongName"use="optional"/>
</extension>
</complexContent>
</complexType>
<elementname="Classification"type="tns:ClassificationType"substitutionGroup="tns:Identifiable"/>```
```xml
<complexTypename="RegistryObjectType">
<complexContent>
<extensionbase="tns:IdentifiableType">
<sequenceminOccurs="0"maxOccurs="1">
<elementref="tns:Name"minOccurs="0"maxOccurs="1"/>
<elementref="tns:Description"minOccurs="0"maxOccurs="1"/>
<elementname="VersionInfo"type="tns:VersionInfoType"minOccurs="0"maxOccurs="1"/>
<elementref="tns:Classification"minOccurs="0"maxOccurs="unbounded"/>
<elementref="tns:ExternalIdentifier"minOccurs="0"maxOccurs="unbounded"/>
</sequence>
<attributename="lid"type="anyURI"use="optional"/>
<attributename="objectType"type="tns:referenceURI"use="optional"/>
<attributename="status"type="tns:referenceURI"use="optional"/>
</extension>
</complexContent>
</complexType>
<elementname="RegistryObject"type="tns:RegistryObjectType"substitutionGroup="tns:Identifiable"/>
<complexTypename="IdentifiableType">
<annotation>
<documentationxml:lang="en">
Common base type for all types that have unique identity.
If id is provided and is not in proper URN syntax then it is used for
linkage within document and is ignored by the registry. In this case the
registry generates a UUID URN for id attribute.
id must not be null when object is retrieved from the registry.
</documentation>
</annotation>
<sequence>
<elementref="tns:Slot"minOccurs="0"maxOccurs="unbounded"/>
</sequence>
<attributename="id"type="anyURI"use="required"/>
<attributename="home"type="anyURI"use="optional"/>
<!-- home attribute is required only for remote ObjectRef -->
</complexType>
<elementname="Identifiable"type="tns:IdentifiableType"/>
The text was updated successfully, but these errors were encountered:
Hello, I know the issue looks long but that's just from the example code, the issue title describes the bug exactly, I only add explanations to "Current situation", "Expected behavior" and "Tried solutions"
The example code as well as excerpts from the .xsd file you can find under EXAMPLE CODE
I really appreciate you creating and maintaining this package, I don't know what else we would do
If you can solve this and you have a rate in mind let me know
Current situation: zeep.Client recognizes the extension of a type, so the ClassificationType generated by zeep does extend the RegistryObjectType. But the RegistryObjectType extends the IdentifiableType, and the ClassificationType generated doesn't include the attributes/elements of the IdentifiableType (in particular Slot[] and id)
Expected behavior: zeep.Client traverses the whole extension hierarchy
Tried solutions:
overwriting the types directly using client.wsdl.types.types stuff
creating a prepared_document using from zeep.wsdl.wsdl.Document, overwriting the types, and the creating the client based on the prepared_document
-> the problem here was that client.get_type() was returning my overwritten types, calling the service.Operation() was not using my overwritten types
I am creatting the message based on a dictionary, so I wrote various dictionary-traversing scripts that replace lists of dicts with lists of instantiated zeep elements (using my adulterated types)
-> this creates more and harder to debug errors, like duplicate keys and arrays filled with None (because in reality not all parent types extend all child attributes, but for zeep they do, and instantiating them without specifying the attribute defaults them to None)
-> example:
{"Classification": {"Classification": [None, None]})
-> example error:
TypeError: Argument must be bytes or unicode, got '_StaticIdentity'
SKIPPABLE I have a second problem (will open a second issue for it) which is that the type e.g. TListType is defined as having one element T, which is an array of T. The problem is that the array really consists of types that extend T, creating two problems: zeep fails when calling the service and I can't use the .extend approach because O doesn't extend the child-types, so what I tried was appending them to O._element, but this doesn't seem to affect the signature...
EXAMPLE CODE
All the relevant types come from the "lib-ihe-xds" repository, from the ext\ebRS\rim.xsd type definition file
The relevant excerpts from the WSDL for convenience
The text was updated successfully, but these errors were encountered: