suds-community / suds

Suds is a lightweight SOAP python client for consuming Web Services. A community fork of the jurko fork.
https://suds.readthedocs.io/
GNU Lesser General Public License v3.0
173 stars 56 forks source link

Xml attributes #95

Closed dedalus2000 closed 9 months ago

dedalus2000 commented 1 year ago

Hi, I have to manage an XML attribute as the following wdsl:

<xsd:element name="SalesQuoteLine" >
    <xsd:complexType>
        <xsd:sequence>
            <xsd:element name="quoteLine" type="bo:tcpono" minOccurs="0"/>
            ...
        </xsd:sequence>
        <xsd:attribute name="actionType" type="bo:actionType" />
    </xsd:complexType>
</xsd:element>

"actionType" can be "change" or "create", and it is a SalesQuoteLine attribute (ie: <SalesQuoteLine actionType="change"><quoteLine>10</quoteLine></SalesQuoteLine>)

What is the best way to handle that attribute?

I see from the tutorial that suds is able to add attributes via plugin. Is there easier way? I don't like to modify the Client instantiation.

Thanks

phillbaker commented 1 year ago

Hi @dedalus2000, unfortunately, I'm not understanding the issue. Can you share a runnable code snippet illustrating the problem?

Please clarify the package and version of suds being used.

phillbaker commented 9 months ago

Closing this as there's been no clarification.