Clearing Cached Schema
by Chris Spencer
I've just started evaluating SUPS to implement a simple WSDL client,
but I've run into a dead end when I changed a method name in my
schema. Apparently, even though I'm disabling the cache with
client.set_options(cache=None), it's still managed to cache the old
schema. How can I truly disable all caching, and clear any currently
cached wsdl schema? Where does SUPS store cached data on Windows?
Regards,
Chris
14 years, 10 months
Processing Complex Returns
by Tim Sawyer
Hi Folks,
I have a web service that returns the following:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<tns:GetApplicationTraceResponseParameter
xmlns:tns="http://ws.company.com/wsdl"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><tns:ApplicationTrace>
<tns:Application>false</tns:Application>
<tns:CCode>false</tns:CCode>
<tns:CCodeLevel>0</tns:CCodeLevel>
<tns:Concurrency>false</tns:Concurrency>
<tns:Gateway>false</tns:Gateway>
<tns:GatewayPerformance>false</tns:GatewayPerformance>
<tns:Performance>false</tns:Performance>
<tns:PLSQLCode>false</tns:PLSQLCode>
<tns:Security>false</tns:Security>
<tns:TraceOverrideList/></tns:ApplicationTrace>
</tns:GetApplicationTraceResponseParameter>
</SOAP:Body>
</SOAP:Envelope>
I'm trying to write a test, using suds, of this web service. I'm calling
the web service, and then doing this to the results, which isn't working:
self.assertEqual(lResponseParameter.ApplicationTrace.Application, False)
self.assertEqual(lResponseParameter.ApplicationTrace.CCode, False)
self.assertEqual(lResponseParameter.ApplicationTrace.CCodeLevel, '0')
self.assertEqual(lResponseParameter.ApplicationTrace.Concurrency, False)
self.assertEqual(lResponseParameter.ApplicationTrace.Gateway, False)
self.assertEqual(lResponseParameter.ApplicationTrace.GatewayPerformance,
False)
self.assertEqual(lResponseParameter.ApplicationTrace.PLSQLCode, False)
self.assertEqual(lResponseParameter.ApplicationTrace.Security, False)
The error I get is:
AttributeError: 'function' object has no attribute 'Application'
I think it appears to think that ApplicationTrace is an __init__ function?
logging.info(lResponseParameter.ApplicationTrace)
gives:
INFO:root:<bound method ApplicationTrace.__init__ of (ApplicationTrace){
Application = False
CCode = False
CCodeLevel = "0"
Concurrency = False
Gateway = False
GatewayPerformance = False
Performance = False
PLSQLCode = False
Security = False
TraceOverrideList = ""
}>
so the data does appear to be there.
Any clues as to what I'm not understanding anyone?
Cheers,
Tim.
14 years, 10 months
Suds options update
by Jeff Ortel
All,
In revision 520, I renamed the 'schemadoctor' option to simply 'doctor'. Sorry for any
inconvenience to those of you using trunk or 0.3.6 beta.
Added new option named "xstq" which controls how xsi:type attribute values are
qualified/unqualified. By default the option is true and works on most servers. However,
JAXB based (and some other) servers can't handle the namespace prefix in the xsi:type
value so I made this configurable. I've reviewed the specs over-and-over for the past
year or so and I can't find a rule that defines when the value for xsi:type should be
qualified. The value is defined as QName which may or may not be qualified. Any better
ideas very welcome :)
Regards,
Jeff
14 years, 10 months
add NS to attribute in start element?
by Craig Debbo
When I create the following type (which is listed as a valid type when I
run 'print client'),
csvFormat = client.factory.create('ns0:CsvAttachmentFormat')
Suds generates this,
<CsvAttachmentFormat xsi:type="CsvAttachmentFormat">
...
Unfortunately my SOAP server will only accept either,
<CsvAttachmentFormat xsi:type="ns0:CsvAttachmentFormat">
or,
<CsvAttachmentFormat>
How do I get Suds to either add the namespace to the attribute or else
not have any attribute at all for the start element? Is there some
additional binding or option to control this?
Thanks
Craig
14 years, 10 months
Reference wsdl as local file?
by Bo Laurent
I wonder if there is a way to reference the wsdl as a local file (not
with an absolute url starting at filesystem root)?
I'm working with Salesforce.com, and they don't make their wsdls easy
to fetch programmatically (because it exposes schema customizations,
so publishing would undermine organization privacy).
Bo
14 years, 10 months