Hi Lupin.

On 28.5.2014. 6:56, Lupin Deterd wrote:
I'm using suds for accessing SOAP server but it's failling. Same with
this issue unfortunately the suggested work-around isn't working. suds
failed without internet access
<https://mail.python.org/pipermail/soap/2011-May/000453.html>

The problem with suds is that it tries to download from the internet
XMLSchema.xsd without success:

|DEBUG:suds.xsd.sxbasic:Import:0xb7808a6cL,  importing ns="
http://www.w3.org/2001/XMLSchema";,  location="
http://www.w3.org/2001/XMLSchema.xsd";
DEBUG:suds.transport.http:opening(http://www.w3.org/2001/XMLSchema.xsd)
Traceback  (most recent call last):
.....
urllib2.URLError:  <urlopen error timed out>|

I am not a full time developer, so my question are:

-> Why does a library like that need to reference an online link?
-> Is there any work-around for this that will work without this suds
client access to internet?

I know there is a less clear solution using some global data in the basic suds release, but if you use the suds-jurko fork (https://bitbucket.org/jurko/suds, or available on PyPI as suds-jurko), you should be able to provide your suds client with such external resources locally like this:

store = suds.store.DocumentStore({
    "http://www.w3.org/2001/XMLSchema.xsd": xmlSchema_data})
client = suds.client.Client(my_ws_URL, documentStore=store)


For more detailed usage examples look through the suds-jurko test suite. Some related links:

https://bitbucket.org/jurko/suds/src/25c1cdbede47d2dbbd18ff4685c3f9f59bd6fe05/tests/test_request_construction.py#cl-483
https://bitbucket.org/jurko/suds/src/25c1cdbede47d2dbbd18ff4685c3f9f59bd6fe05/tests/test_client.py#cl-718


  Hope this helps.

  Best regards,
    Jurko Gospodnetić


_______________________________________________
Soap mailing list
[email protected]
https://mail.python.org/mailman/listinfo/soap

Reply via email to