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
166 stars 51 forks source link

Question: Parsing of Attributes <s:attribute> #102

Open danboe90 opened 2 weeks ago

danboe90 commented 2 weeks ago

Hello

I am having some troubles parsing attribute elements inside my wsdl file. My WSDL File example:

<types>
<s:element name="Search">
  <s:sequence>
    <s:element name="Param1">
    </s:element>
  </s:sequence>
  <s:attribute name="Param2">
  <s:attribute name="Param3">
  <s:attribute name="Param4">
</s:element>
</types>

When making use of print(client) my method "Search" shows up, but only 'Param1' is listed and all the attributes are missing. When calling client.service.Search(**search) I am faced with a TypeError Exception "Search() got an unexpected keyword argument 'Param2'"

What am I missing in order to parse attributes correctly? If there is information missing please let me know to help you help me :P

Thank you for your help!

phillbaker commented 1 week ago

Hi, please include the entire WSDL file you're parsing.

You can also see example WSDL files in the unit tests in this repo: https://github.com/suds-community/suds/blob/ff8a698af1255e176e4d7a740704d695b41655c8/tests/test_suds.py#L299-L348

phillbaker commented 1 week ago

This issue tracker is for reporting bugs on the library, not user support. You may try posting this issue on a site like stackoverflow to get support.

If you think this is a bug with the library, in order to investigate this further, we'll need the following:

publicly available url for the wsdl in question
runnable python code snippet
package and version of suds being used

Note: if these can't be provided, we'll have to close this issue.