Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is "_WObject__resolved = False" and what is it's function in WSDL? #73

Closed
123firefem opened this issue Mar 15, 2022 · 2 comments
Closed

Comments

@123firefem
Copy link

123firefem commented Mar 15, 2022

Hi

I am neither an IT-professional nor SOAP proficient, but have been using SUDS-jurko for some years to connect to a system.

We are trying to use newer versions of python, and still need to use suds. We were very happy to find this project, but struggle to interact via suds interpretation of WSDL due to the new entry _Wobject__resolved = False

For us, it means the suds.client.factory.create('GetByPathAndCode') does not return the values we expected.

I have tried to play around with the source a bit without getting any real progress and post it here in case it is an issue for others as well.

The wsdl is quite large, so for illustration I will post the difference between the two outputs I get from suds.client.wsdl and one operation:

python 3.10 and suds 1.0
Feedback from print(suds.client.wsdl):

 GetByPathAndCode = 
      (Operation){
         name = "GetByPathAndCode"
         tns[] = 
            "tns",
            "http://www.powel.com/TimeSeries/2013/01",
         input = 
            (Message){
               _WObject__resolved = True
               name = "TimeSeriesFullNameMessageContract"
               qname = "(TimeSeriesFullNameMessageContract, http://www.powel.com/TimeSeries/2013/01)"
               parts[] = 
                  (Part){
                     root = <wsdl:part name="parameters" element="tns:TimeSeriesFullNameMessageContract"/>
                     _WObject__resolved = False
                     name = "parameters"
                     qname[] = 
                        "parameters",
                        "http://www.powel.com/TimeSeries/2013/01",
                     element = "('TimeSeriesFullNameMessageContract', 'http://www.powel.com/TimeSeries/2013/01')"
                     type = "None"
                  },
            }
         output = 
            (Message){
               _WObject__resolved = True
               name = "TimeSeriesMessageContract"
               qname = "(TimeSeriesMessageContract, http://www.powel.com/TimeSeries/2013/01)"
               parts[] = 
                  (Part){
                     root = <wsdl:part name="parameters" element="tns:TimeSeriesMessageContract"/>
                     _WObject__resolved = False
                     name = "parameters"
                     qname[] = 
                        "parameters",
                        "http://www.powel.com/TimeSeries/2013/01",
                     element = "('TimeSeriesMessageContract', 'http://www.powel.com/TimeSeries/2013/01')"
                     type = "None"
                  },
            }
         faults[] = <empty>
      }

python 3.10 and suds 1.0
Feedback from client.factory.create('GetByPathAndCodesRequestDataContract'):

(GetByPathAndCodesRequestDataContract){
   Identities = None
 }

python 3.7 and suds-jurko 0.6:
Feedback from print(suds.client.wsdl):

GetByPathAndCode = 
    (Operation){
       name = "GetByPathAndCode"
       tns[] = 
          "tns",
          "http://www.powel.com/TimeSeries/2013/01",
       input = 
          (Message){
             name = "TimeSeriesFullNameMessageContract"
             qname = "(TimeSeriesFullNameMessageContract, http://www.powel.com/TimeSeries/2013/01)"
             parts[] = 
                (Part){
                   root = <wsdl:part name="parameters" element="tns:TimeSeriesFullNameMessageContract"/>
                   name = "parameters"
                   qname[] = 
                      "parameters",
                      "http://www.powel.com/TimeSeries/2013/01",
                   element = "('TimeSeriesFullNameMessageContract', 'http://www.powel.com/TimeSeries/2013/01')"
                   type = "None"
                },
          }
       output = 
          (Message){
             name = "TimeSeriesMessageContract"
             qname = "(TimeSeriesMessageContract, http://www.powel.com/TimeSeries/2013/01)"
             parts[] = 
                (Part){
                   root = <wsdl:part name="parameters" element="tns:TimeSeriesMessageContract"/>
                   name = "parameters"
                   qname[] = 
                      "parameters",
                      "http://www.powel.com/TimeSeries/2013/01",
                   element = "('TimeSeriesMessageContract', 'http://www.powel.com/TimeSeries/2013/01')"
                   type = "None"
                },
          }
       faults[] = <empty>
    }

python 3.7 and suds-jurko 0.6:
Feedback from client.factory.create('GetByPathAndCodesRequestDataContract')

(GetByPathAndCodesRequestDataContract){
   Identities = 
      (ArrayOfTimeSeriesFullNameDataContract){
         TimeSeriesFullNameDataContract[] = <empty>
      }
 }

Is there a way to make suds 1.0 behave in the same manner as suds-jurko in interpreting this wsdl or an approach to try to remove _WObject__resolved = False to see if that this is indeed the problem?

I can supply the full wsdl if it is of interest.

@phillbaker
Copy link
Member

Hi - please review issue #67, which seems similar. I don't believe this is related to a new attribute appearing, but rather the handling of array objects.

Please see docs here: https://github.com/suds-community/suds#initializing-optional-arrays-with-lists

@123firefem
Copy link
Author

Thank you for a very good reply.

It is indeed the same as issue #67. Reading this issue, we decided to do the resolving of complex sequence manually as this was assessed to be quite easy. It seems to be working well. It also makes the requests to the service a bit more verbatim, which is not a problem for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants