tag:help-archives.hannonhill.com,2010-02-09:/discussions/web-services/208-pythonsuds-broken-schemaCascade CMS: Discussion 2018-10-18T20:36:38Ztag:help-archives.hannonhill.com,2010-02-09:Comment/182345882012-08-31T17:36:54Z2012-08-31T17:38:05Zpython/suds, broken schema?<div><p>I was curious about these lines.</p>
<p>data={</p>
<pre>
<code> 'authentication':auth,
'identifier':asset,
}
result = client.service.read(**data)</code>
</pre>
<p>Why are you passing the parameter this way? I've been passing
them as <code>read(auth,asset)</code>.</p></div>cpayantag:help-archives.hannonhill.com,2010-02-09:Comment/182345882012-08-31T17:50:00Z2012-08-31T17:50:00Zpython/suds, broken schema?<div><p>That's an operator that you can use with a dictionary that
converts it to two named arguments - it's identical to your
read(auth,asset) call.</p>
<p>Do you have suds working with WS? If so, please clue me in -
will be much appreciated!</p></div>christiancotag:help-archives.hannonhill.com,2010-02-09:Comment/182345882012-08-31T20:12:21Z2012-08-31T20:12:21Zpython/suds, broken schema?<div><p>Yea I've <a href=
"https://github.com/cpayan/Cascade-Utilities/blob/master/python/ldap2cas.py">
used it a bit</a> but I run it with a parameter list instead of a
dict. Seems to be the only difference, though. I'm at a loss. I'll
try and reproduce your error on my Cascade instance.</p></div>cpayantag:help-archives.hannonhill.com,2010-02-09:Comment/182345882012-08-31T20:28:00Z2012-08-31T20:28:00Zpython/suds, broken schema?<div><p>hmm, ran your code verbatim and came out with the same error.
What version of Cascade are you running. Suppose it could also be
my suds version:</p>
<p>Suds 0.4.1<br>
Python 2.7.3</p>
<p>thanks</p></div>christiancotag:help-archives.hannonhill.com,2010-02-09:Comment/182345882012-09-04T15:52:02Z2012-09-04T15:52:02Zpython/suds, broken schema?<div><p>I'm running Suds 0.4 on Python 2.5.1 which wow, that's pretty
old. I should really update that.</p></div>cpayantag:help-archives.hannonhill.com,2010-02-09:Comment/182345882012-09-04T16:56:34Z2012-09-04T16:56:34Zpython/suds, broken schema?<div><p>well if it's working I wouldn't bother - whatever bug i'm
running into makes working with wsdl impossible in python for
me</p></div>christiancotag:help-archives.hannonhill.com,2010-02-09:Comment/182345882012-12-26T21:11:13Z2012-12-26T21:11:13Zpython/suds, broken schema?<div><p>Hi,</p>
<p>I was going over some older discussions and noticed this one is
still open. Were you able to find a workaround for the error you
were encountering?</p>
<p>Looking over the error message, I'm wondering if you are
experiencing this <a href=
"https://hannonhill.jira.com/browse/CSI-426">known defect</a> in
which certain elements do not return the proper structure as
defined by the WSDL (notice <em>role-assignments</em> is listed
here). This issue does seem to only occur with the
<code>read()</code> operation and for certain asset types (such as
a Site).</p>
<p>Feel free to use the link I have provided to see if it has been
resolved in a future release of Cascade.</p>
<p>Please us know if you have any questions.</p>
<p>Thanks.</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/182345882012-12-26T22:32:09Z2012-12-26T22:32:09Zpython/suds, broken schema?<div><p>Ryan,<br>
This wasn't resolved, although I think the mismatched element
structure<br>
might be the culprit. I still get the same error from version 7.0.5
of<br>
Cascade:</p>
<p>Type not found: 'roleAssignments'</p>
<p>I suppose it is defined but not found. Maybe there's a way to
map these<br>
properly with Suds, but I haven't had time to work it out. Sure
would be<br>
nice if this could get fixed in Cascade WS, but I suppose it would
break<br>
existing scripts. Maybe HH could release updated/fixed WS at a new
url ie:</p>
<p>/ws/services/AssetOperationService?wsdl<em>2</em></p>
<p>thanks,<br>
Cc</p></div>christiancotag:help-archives.hannonhill.com,2010-02-09:Comment/182345882012-12-27T12:49:05Z2012-12-27T12:49:05Zpython/suds, broken schema?<div><p>Hi Christian,</p>
<blockquote>
<p>I think the mismatched element structure might be the
culprit</p>
</blockquote>
<p>I am pretty sure it is the cause. Is there a way to get the the
raw response using something similar to the PHP
<code>__getLastResponse()</code> method? I indicated on the issue
that this does return the entire operation response; however, I
believe the downside here is that you would have to parse the
String into XML.</p>
<blockquote>
<p>Sure would be nice if this could get fixed in Cascade WS, but I
suppose it would break existing scripts.</p>
</blockquote>
<p>I believe this issue is relatively high on the development
timeline. I can't give a date per say, but I think a fix will be
rolling out in one of the next few releases.</p>
<p>As you suggested, this change could potentially affect existing
scripts; however, I am sure we would be documenting the change.</p>
<p>Please let us know if you have any questions.</p>
<p>Thanks</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/182345882012-12-27T20:37:37Z2012-12-27T20:37:37Zpython/suds, broken schema?<div><p>Ryan,<br>
Suds has a last_received() method, and I've tried to get it working
but the<br>
failure takes place in the client.service.read() before I can ask
for<br>
last_received. I can try and pass the TypeNotFound exception but
there's<br>
nothing in last_received() - suds doesn't want to eat the response
the way<br>
it is.<br>
I could use python logger then grab the soap xml from stdout and
treat it<br>
like XML but it's way too much trouble.</p>
<p>I'm stumped, and I guess I will have to wait until WS is fixed
by HH. May<br>
as well close this one up.</p>
<p>thanks,<br>
Christian</p>
<p>On Thu, Dec 27, 2012 at 4:49 AM, Ryan Griffith <<br>
<a href=
"mailto:tender+d7f144f75cb0ee194c8a84d4b9c944bb8c8996c28@tenderapp.com">
tender+d7f144f75cb0ee194c8a84d4b9c944bb8c8996c28@tenderapp.com</a>>
wrote:</p>
<blockquote>
<p>__getLastResponse()</p>
</blockquote></div>christiancotag:help-archives.hannonhill.com,2010-02-09:Comment/182345882012-12-27T21:17:14Z2012-12-27T21:17:14Zpython/suds, broken schema?<div><p>Sounds good, Christian, thanks for looking into the raw response
idea a bit more. Definitely keep an eye on the <a href=
"https://hannonhill.jira.com/browse/CSI-426">known defect</a> and
release notes for upcoming versions.</p>
<p>Have a great day!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/182345882012-12-27T22:17:46Z2012-12-27T22:17:46Zpython/suds, broken schema?<div><p>OK I will thanks Ryan.</p>
<p>Cc</p></div>christianco