From walterpa at sbcglobal.net Sat Nov 1 20:56:49 2008 From: walterpa at sbcglobal.net (Patrick Walter) Date: Sat, 1 Nov 2008 15:56:49 -0500 Subject: [Fedora-suds-list] New To Python & SUDS Message-ID: I have dowloaded/installed the following with no errors: Python 2.5 SUDS I am running on a PC. When running the following python code I get the following errors. THANKS FOR YOUR HELP!!! Patrick import suds.metrics as metrics from suds import WebFault from suds.client import Client wsdlurl = 'http://saintbook.org/MightyMaxims/MightyMaxims.asmx?WSDL' client = Client(wsdlurl) ------------------------------------------------------------------------------------------------------------------------------------ ERROR: Traceback (most recent call last): File "C:\eclipse\workspace\TestCtsWebService\src\root\examples\wsSUDSTest.py", line 13, in client = Client(wsdlurl) File "C:\Python25\lib\site-packages\suds\client.py", line 67, in __init__ client = SoapClient(url, kwargs) File "C:\Python25\lib\site-packages\suds\client.py", line 369, in __init__ self.wsdl = Definitions(url, self.arg.opener) File "C:\Python25\lib\site-packages\suds\wsdl.py", line 166, in __init__ root = p.parse(url=url).root() File "C:\Python25\lib\site-packages\suds\sax\parser.py", line 118, in parse parse(self.urlopen(url), handler) File "C:\Python25\lib\site-packages\_xmlplus\sax\__init__.py", line 31, in parse parser.parse(filename_or_stream) File "C:\Python25\lib\site-packages\_xmlplus\sax\expatreader.py", line 109, in parse xmlreader.IncrementalParser.parse(self, source) File "C:\Python25\lib\site-packages\_xmlplus\sax\xmlreader.py", line 123, in parse self.feed(buffer) File "C:\Python25\lib\site-packages\_xmlplus\sax\expatreader.py", line 220, in feed self._err_handler.fatalError(exc) File "C:\Python25\lib\site-packages\_xmlplus\sax\handler.py", line 38, in fatalError raise exception xml.sax._exceptions.SAXParseException: :1:1: not well-formed (invalid token) -------------- next part -------------- An HTML attachment was scrubbed... URL: From belred at gmail.com Sun Nov 2 00:34:00 2008 From: belred at gmail.com (Bryan) Date: Sat, 1 Nov 2008 17:34:00 -0700 Subject: [Fedora-suds-list] New To Python & SUDS In-Reply-To: References: Message-ID: <38f48f590811011734y558e948cr7fe9fd6e6317e6de@mail.gmail.com> patrick, when i go to this site in a regular browser: http://saintbook.org/MightyMaxims/MightyMaxims.asmx?WSDL all i get is this: <%@ WebService Language="c#" Codebehind="MightyMaxims.asmx.cs" Class="MightyMaxims.Maxim" %> which is not xml (or a wsdl) which is why you are getting the xml parse error. bryan On Sat, Nov 1, 2008 at 1:56 PM, Patrick Walter wrote: > I have dowloaded/installed the following with no errors: > Python 2.5 > SUDS > > I am running on a PC. > > When running the following python code I get the following errors. > > THANKS FOR YOUR HELP!!! > Patrick > > import suds.metrics as metrics > from suds import WebFault > from suds.client import Client > wsdlurl = 'http://saintbook.org/MightyMaxims/MightyMaxims.asmx?WSDL' > client = Client(wsdlurl) > > ------------------------------------------------------------------------------------------------------------------------------------ > ERROR: > > Traceback (most recent call last): > > File > "C:\eclipse\workspace\TestCtsWebService\src\root\examples\wsSUDSTest.py", > line 13, in > > client = Client(wsdlurl) > > File "C:\Python25\lib\site-packages\suds\client.py", line 67, in __init__ > > client = SoapClient(url, kwargs) > > File "C:\Python25\lib\site-packages\suds\client.py", line 369, in __init__ > > self.wsdl = Definitions(url, self.arg.opener) > > File "C:\Python25\lib\site-packages\suds\wsdl.py", line 166, in __init__ > > root = p.parse(url=url).root() > > File "C:\Python25\lib\site-packages\suds\sax\parser.py", line 118, in parse > > parse(self.urlopen(url), handler) > > File "C:\Python25\lib\site-packages\_xmlplus\sax\__init__.py", line 31, in > parse > > parser.parse(filename_or_stream) > > File "C:\Python25\lib\site-packages\_xmlplus\sax\expatreader.py", line 109, > in parse > > xmlreader.IncrementalParser.parse(self, source) > > File "C:\Python25\lib\site-packages\_xmlplus\sax\xmlreader.py", line 123, in > parse > > self.feed(buffer) > > File "C:\Python25\lib\site-packages\_xmlplus\sax\expatreader.py", line 220, > in feed > > self._err_handler.fatalError(exc) > > File "C:\Python25\lib\site-packages\_xmlplus\sax\handler.py", line 38, in > fatalError > > raise exception > > xml.sax._exceptions.SAXParseException: :1:1: not well-formed > (invalid token) > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list > From Patrick.A.Walter at usa-spaceops.com Mon Nov 3 14:45:46 2008 From: Patrick.A.Walter at usa-spaceops.com (Walter, Patrick A) Date: Mon, 3 Nov 2008 08:45:46 -0600 Subject: [Fedora-suds-list] Extracting Attributes Message-ID: <97A0DC25CC967E41B59BB64DEAA717EC03D56E11@usatxcms07.tx.usa-spaceops.com> SUDS is great!! I'm new to python so I'm trying to extract returned values from a web service. >print abcitems[0].ABC <<==== HOW DO I EXTRACT THE desc, name and id attributes (ABC){ desc = "ABC development test data." name = "Software Development" id = "1207232790599" } >print abcitems[0].ABC.desc AttributeError: 'function' object has no attribute 'desc' thanks Patrick >wsdlurl = 'http://localhost:8080/externaldataservicemodule/CtsDataExportService?wsdl' >theclient = Client(wsdlurl) >print theclient service ( CtsDataExportService ) prefixes (2) ns0 = http://data.dataservices.ws.ops ns2 = "http://dataservices.ws.ops/" ports (1): (WsDataExportPort) methods (2): getABCItems() getABC(xs:long id, ) types (85): ns0:ABC >abcItems = theclient.service.getABCItems >print abcItems <<=== there is only 1 item [(ABC){ desc = "ABC development test data." name = "Software Development" id = "1207232790599" }] >print abcitems[0].ABC <<==== HOW DO I EXTRACT THE desc, name and id attributes (ABC){ desc = "ABC development test data." name = "Software Development" id = "1207232790599" } -------------- next part -------------- An HTML attachment was scrubbed... URL: From Patrick.A.Walter at usa-spaceops.com Mon Nov 3 21:51:54 2008 From: Patrick.A.Walter at usa-spaceops.com (Walter, Patrick A) Date: Mon, 3 Nov 2008 15:51:54 -0600 Subject: [Fedora-suds-list] Extracting Attributes In-Reply-To: <490F12CB.6090700@redhat.com> References: <97A0DC25CC967E41B59BB64DEAA717EC03D56E11@usatxcms07.tx.usa-spaceops.com> <490F12CB.6090700@redhat.com> Message-ID: <97A0DC25CC967E41B59BB64DEAA717EC03D56E15@usatxcms07.tx.usa-spaceops.com> I have a web service that requires a complex structure (cartesianVector) to be passed as an argument. Here is partial python code..... cartesianVector = getCartesianVector(theclient) imageTypes = theclient.factory.create("ns0:imageTypes") print imageTypes durationSeconds = 5400.0 stepSize = 200.0 width = 400 height = 400 print cartesianVector #Error occurs at this request bytes = theclient.service.plotGroundTrack(cartesianVector, durationSeconds, stepSize, width, height, imageTypes.GIF) Here is the structure from a "print cartesianVector". (cartesianVector){ attrValues = "" date = 272692290.64 referenceFrame = "J2000" units = "STANDARD_METRIC" VX = 6306.70073861 VY = 2986.87361604 VZ = -3246.75882187 x = 101062.390714 y = -5041562.75123 z = -4446623.59309 } When I call the server service I get the following error... suds.WebFault: Server raised fault: 'java.lang.NullPointerException' Other service methods work, when passing "primitive" types (long, strings) as arguments. Services can also return complex types. The service is a Java 1.6 version. I'm using Python 2.5 THANKS FOR YOUR HELP ERROR:suds.client: 272692290.64 J2000 STANDARD_METRIC 6306.70073861 2986.87361604 -3246.75882187 101062.390714 -5041562.75123 -4446623.59309 5400.0 200.0 400 400 GIF Traceback (most recent call last): File "D:\eclipseJCP\workspace\TestCtsWebService\src\root\examples\ctsWebServiceClient00.py", line 153, in displayPlotGroundTrack(theclient) File "D:\eclipseJCP\workspace\TestCtsWebService\src\root\examples\ctsWebServiceClient00.py", line 70, in displayPlotGroundTrack stepSize, width, height, imageTypes.GIF) File "C:\Python25\lib\site-packages\suds\client.py", line 287, in __call__ raise e suds.WebFault: Server raised fault: 'java.lang.NullPointerException' From Patrick.A.Walter at usa-spaceops.com Tue Nov 4 14:50:19 2008 From: Patrick.A.Walter at usa-spaceops.com (Walter, Patrick A) Date: Tue, 4 Nov 2008 08:50:19 -0600 Subject: [Fedora-suds-list] Not Passing All Data - Complex Type Message-ID: <97A0DC25CC967E41B59BB64DEAA717EC03D56E18@usatxcms07.tx.usa-spaceops.com> Sorry for the long message. I have a web service that receives a complex type and returns a complex type. It does not seem to pass correctly all the data. Web service MyData class constructor gets 0 for 'y' when it should be 123.456 ... See the python code. Below is all the code. THANKS Patrick -------------------------------------------------------------------------------------------------------------------- HERE IS THE JAVA WEB SERVICE package test.ws; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebService; @WebService() public class MyWebService { @WebMethod() public MyData getMyData() { return new MyData(); } @WebMethod() public MyData setMyData(@WebParam(name = "md") MyData md) { return new MyData(md); } } -------------------------------------------------------------------------------------------------------------------- HERE IS THE MyData class package test.ws; import java.io.Serializable; public class MyData implements Serializable { int x = 99; long y = 1207232790599L; String s = "this is MyData String"; public MyData(){ } public MyData(MyData md) { x = md.getX(); y = md.getY(); s = md.getS(); System.out.println("x=" + x + " y=" + y + " s=" + s); //SYSTEM OUT SHOWS IN WEB SERVER --- 08:30:19,884 INFO [STDOUT] x=15 y=0 s=this is test from python } public int getX() { return x; } public String getS() { return s; } public void setS(String s) { this.s = s; } public long getY() { return y; } public void setX(int x) { this.x = x; } public void setY(long y) { this.y = y; } } -------------------------------------------------------------------------------------------------------------------- HERE IS THE PYTHON CODE from suds.client import Client wsdlurl = 'http://localhost:8080/MyWebService/MyWebService?wsdl ' theclient = Client(wsdlurl) print theclient print '\n___________________________________________________' myData = theclient.service.getMyData() print myData print '\n___________________________________________________' myData = theclient.factory.create("ns0:myData") print myData myData.x = 15 myData.y = 123.467 myData.s = 'this is test from python' print 'myData sent to service request setMyData..............' print myData result = theclient.service.setMyData(myData) print 'RESULT from setMyData ................' print result -------------------------------------------------------------------------------------------------------------------- HERE IS THE RESULTS Service ( MyWebServiceService ) tns="http://ws.test/" Prefixes (2) ns0 = "http://ws.test" ns2 = "http://ws.test/" Ports (1): (MyWebServicePort) Methods (2): getMyData() setMyData(ns0:myData md, ) Types (5): getMyData getMyDataResponse ns0:myData setMyData setMyDataResponse ___________________________________________________ (myData){ s = "this is MyData String" x = "99" y = "1207232790599" } ___________________________________________________ (myData){ s = None x = None y = None } myData sent to service request setMyData.............. (myData){ s = "this is test from python" x = 15 y = 123.467 } RESULT from setMyData ................ (myData){ s = "this is test from python" x = "15" y = "0" <<<<<============ THIS IS THE ISSUE -- SHOULD BE 123.456 } From jortel at redhat.com Thu Nov 6 16:02:58 2008 From: jortel at redhat.com (Jeff Ortel) Date: Thu, 06 Nov 2008 11:02:58 -0500 Subject: [Fedora-suds-list] Suds News Message-ID: <49131532.4070202@redhat.com> All, A couple of news items: * r377 seems like good release candidate for 0.3.2. It contains a number of core use case enhancements and bug fixes. See https://fedorahosted.org/suds/ for details. Please take r377+ for a test drive :). * You may also notice that I've been releasing beta builds (kind of like nightly builds). I thought it might be useful to periodically get packaged versions of trunk. * WS Security had to get bumped (again). Sorry, I had too many core use case things to deal with and this is a big feature :( * Suds has been accepted into fedora! I anticipate 0.3.2 will be the initial version available in F8+ and EPEL4,5. However, if 0.3.2 is delayed, it will be 0.3.1. * New APIs (Client) added in 0.3.2: See: http://jortel.fedorapeople.org/suds/doc/public/suds.client.Client-class.html setheaders() Same as /soapheaders/ keyword but works for all invocations. setlocation() Override the location in the wsdl; same as /location/ keyword except for all calls. addprefix() Mapping of namespace prefixes. This will be helpful for those of you working with wsdls that have lots of namespaces that seem to keep changing. This way you can map your own prefixes to the namespaces you use for Client.Factory.create(). Regards, Jeff From mdriscoll at co.marshall.ia.us Fri Nov 7 21:51:52 2008 From: mdriscoll at co.marshall.ia.us (Mike Driscoll) Date: Fri, 07 Nov 2008 15:51:52 -0600 Subject: [Fedora-suds-list] Getting a 401 before I even get a client object Message-ID: <4914B878.5030908@co.marshall.ia.us> Hi, I am trying to connect to the soap process on our corporate Zimbra webmail server with suds 0.3.1. For some reason, It always gives me the following traceback: Traceback (most recent call last): File "v:\PythonPackages\Development\zimbra v2\", line 1, in File "c:\python25\lib\site-packages\suds-0.3.1-py2.5.egg\suds\client.py", line 67, in __init__ File "c:\python25\lib\site-packages\suds-0.3.1-py2.5.egg\suds\client.py", line 369, in __init__ File "c:\python25\lib\site-packages\suds-0.3.1-py2.5.egg\suds\wsdl.py", line 166, in __init__ File "c:\python25\lib\site-packages\suds-0.3.1-py2.5.egg\suds\sax\parser.py", line 118, in parse File "c:\python25\lib\site-packages\suds-0.3.1-py2.5.egg\suds\sax\parser.py", line 131, in urlopen File "c:\Python25\Lib\urllib2.py", line 124, in urlopen return _opener.open(url, data) File "c:\Python25\Lib\urllib2.py", line 387, in open response = meth(req, response) File "c:\Python25\Lib\urllib2.py", line 498, in http_response 'http', request, response, code, msg, hdrs) File "c:\Python25\Lib\urllib2.py", line 425, in error return self._call_chain(*args) File "c:\Python25\Lib\urllib2.py", line 360, in _call_chain result = func(*args) File "c:\Python25\Lib\urllib2.py", line 506, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 401: no authtoken cookie I am using the suds.client.Client(url) method as specified in the docs. Is there some undocumented way to pass a cookie in with the url or something? I am using Python 2.5.2 on Windows XP and I think the Zimbra server is running on Ubuntu (if that matters). I didn't see a way to subscribe to the list, so please CC any answers to me. Thanks! Mike From mdriscoll at co.marshall.ia.us Mon Nov 10 16:05:41 2008 From: mdriscoll at co.marshall.ia.us (Mike Driscoll) Date: Mon, 10 Nov 2008 10:05:41 -0600 Subject: [Fedora-suds-list] Getting a 401 before I even get a client object In-Reply-To: <49184C7E.2060008@redhat.com> References: <4914B878.5030908@co.marshall.ia.us> <49184C7E.2060008@redhat.com> Message-ID: <49185BD5.9090509@co.marshall.ia.us> Hi Jeff, I'm not sure what the wsdl is for Zimbra. Here's what I've found though: http://marsorange.com/archives/wsdl-for-zimbra-the-beginning This is some other user's site so I am not responsible for the garish color scheme there. The SOAP docs are here: http://svn.sourceforge.net/viewvc/zimbra/trunk/ZimbraServer/docs/ I'm not really sure what info you need in that regard, so I apologize if I am sending the wrong information. Here's my short Python test script: from suds.client import Client import urllib2 auth_handler = urllib2.HTTPBasicAuthHandler() auth_handler.add_password(realm="Test", uri="zimbra.ourwebsite.com", user="username", passwd="password") opener = urllib2.build_opener(auth_handler) urllib2.install_opener(opener) urllib2.urlopen("zimbra.ourwebsite.com") client = Client("zimbra.ourwebsite.com/service/content", opener=opener) Let me know if you need more information. Mike > Hey Mike, > > Welcome to suds! > > It's kind of hard to diagnose the problem without more information. > Maybe your Zimbra server is using http authentication? Is there a > login() method you should be calling first? > > If you can send me your wsdl and a code snip, I can try and help you > further. > > Browse here to subscribe > https://www.redhat.com/mailman/listinfo/fedora-suds-list . > > Regards, > > Jeff > > https://fedorahosted.org/suds/ > > > > Mike Driscoll wrote: >> Hi, >> >> I am trying to connect to the soap process on our corporate Zimbra >> webmail server with suds 0.3.1. For some reason, It always gives me >> the following traceback: >> >> Traceback (most recent call last): >> File "v:\PythonPackages\Development\zimbra v2\", line 1, in >> >> File >> "c:\python25\lib\site-packages\suds-0.3.1-py2.5.egg\suds\client.py", >> line 67, in __init__ >> File >> "c:\python25\lib\site-packages\suds-0.3.1-py2.5.egg\suds\client.py", >> line 369, in __init__ >> File >> "c:\python25\lib\site-packages\suds-0.3.1-py2.5.egg\suds\wsdl.py", >> line 166, in __init__ >> File >> "c:\python25\lib\site-packages\suds-0.3.1-py2.5.egg\suds\sax\parser.py", >> line 118, in parse >> File >> "c:\python25\lib\site-packages\suds-0.3.1-py2.5.egg\suds\sax\parser.py", >> line 131, in urlopen >> File "c:\Python25\Lib\urllib2.py", line 124, in urlopen >> return _opener.open(url, data) >> File "c:\Python25\Lib\urllib2.py", line 387, in open >> response = meth(req, response) >> File "c:\Python25\Lib\urllib2.py", line 498, in http_response >> 'http', request, response, code, msg, hdrs) >> File "c:\Python25\Lib\urllib2.py", line 425, in error >> return self._call_chain(*args) >> File "c:\Python25\Lib\urllib2.py", line 360, in _call_chain >> result = func(*args) >> File "c:\Python25\Lib\urllib2.py", line 506, in http_error_default >> raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) >> urllib2.HTTPError: HTTP Error 401: no authtoken cookie >> >> I am using the suds.client.Client(url) method as specified in the >> docs. Is there some undocumented way to pass a cookie in with the url >> or something? I am using Python 2.5.2 on Windows XP and I think the >> Zimbra server is running on Ubuntu (if that matters). I didn't see a >> way to subscribe to the list, so please CC any answers to me. Thanks! >> >> Mike >> >> _______________________________________________ >> fedora-suds-list mailing list >> fedora-suds-list at redhat.com >> https://www.redhat.com/mailman/listinfo/fedora-suds-list From jortel at redhat.com Tue Nov 11 17:55:40 2008 From: jortel at redhat.com (Jeff Ortel) Date: Tue, 11 Nov 2008 12:55:40 -0500 Subject: [Fedora-suds-list] Suds 0.3.2 released Message-ID: <4919C71C.80301@redhat.com> All, Suds version 0.3.2 has been released (r386). See https://fedorahosted.org/suds/ for details. Regards, Jeff From waldemar.osuch at gmail.com Wed Nov 12 03:07:09 2008 From: waldemar.osuch at gmail.com (Waldemar Osuch) Date: Tue, 11 Nov 2008 20:07:09 -0700 Subject: [Fedora-suds-list] SoapClient feature request Message-ID: <6fae95540811111907y36a2c37eq1d841a7c3bd67a01@mail.gmail.com> Hi, Thank you for a modern SOAP client library. Prospects of talking to SOAP services from Python were very bleak before suds showed up on the horizon. The library is very useful as it is but there is one implementation detail that if changed could make it even more useful. I'm talking about the reliance on urllib2 for sending the actual http requests. Since urllib2 throws away a connection after each request is finished it makes it much harder to implement NTLM authentication on top of it. Why NTLM you ask? It is used by default on all those Sharepoint sites that seem to spread all over place. And unfortunately they will not go away anytime soon. Not at my work place at least. I have even written my own SOAP client library so I can talk them. It is inspired by your API but it is based on lxml[1] for all the XML wrangling and httplib2[2] for all the request/response/authentication/cookies stuff. It can handle a subset of WSDL and it works fairly well for the services I have to talk to. It will never will be as general as yours but it can handle NTLM authentication thanks to httplib2 and a plugin I wrote. Currently the plugin works only on windows because it depends on pywin32 being installed. What do you think about switching the transport to httplib2? It is an extra dependency but it makes http handling easier. Or maybe one could come up with a simple interface and make the transport pluggable? With pluggable transport one could use pycurl[3] and have cross platform NTLM authentication solution. Thoughts? [1] - http://codespeak.net/lxml/ [2] - http://code.google.com/p/httplib2/ [3] - http://pycurl.sourceforge.net/ From belred at gmail.com Wed Nov 12 04:38:25 2008 From: belred at gmail.com (Bryan) Date: Tue, 11 Nov 2008 20:38:25 -0800 Subject: [Fedora-suds-list] SoapClient feature request In-Reply-To: <6fae95540811111907y36a2c37eq1d841a7c3bd67a01@mail.gmail.com> References: <6fae95540811111907y36a2c37eq1d841a7c3bd67a01@mail.gmail.com> Message-ID: <38f48f590811112038y2d41c571y36070fd5dbae5df8@mail.gmail.com> i've mentioned to jeff, how great his library is also. we were about to give up on python before i stumbled upon suds. and jeff has quickly followed up and resolved every issue we've had in a very timely manner. i now recommend suds to everyone i know :) regarding use the use of httplib2.. even though this library is very nice and works well for you. it does have it's problems. i used it for one of my projects and it just couldn't handle the threading very well and was very slow. but when i switched to urllib2, threading issues went away and it ran very fast. most projects wouldn't have the stress requirements of this particular project, but still, i would caution making an switch to only use httplib2 for all situations. bryan On Tue, Nov 11, 2008 at 7:07 PM, Waldemar Osuch wrote: > Hi, > > Thank you for a modern SOAP client library. Prospects of talking to > SOAP services from Python were very bleak before suds showed up on the > horizon. > > The library is very useful as it is but there is one implementation > detail that if changed could make it even more useful. I'm talking > about the reliance on urllib2 for sending the actual http requests. > Since urllib2 throws away a connection after each request is finished > it makes it much harder to implement NTLM authentication on top of it. > > Why NTLM you ask? It is used by default on all those Sharepoint sites > that seem to spread all over place. > And unfortunately they will not go away anytime soon. Not at my work > place at least. > > I have even written my own SOAP client library so I can talk them. > It is inspired by your API but it is based on lxml[1] for all the XML > wrangling and httplib2[2] for all the > request/response/authentication/cookies stuff. > > It can handle a subset of WSDL and it works fairly well for the > services I have to talk to. > It will never will be as general as yours but it can handle NTLM > authentication thanks to httplib2 and a plugin I wrote. Currently the > plugin works only on windows because it depends on pywin32 being > installed. > > What do you think about switching the transport to httplib2? > It is an extra dependency but it makes http handling easier. > Or maybe one could come up with a simple interface and make the > transport pluggable? > With pluggable transport one could use pycurl[3] and have cross > platform NTLM authentication solution. > > Thoughts? > > [1] - http://codespeak.net/lxml/ > [2] - http://code.google.com/p/httplib2/ > [3] - http://pycurl.sourceforge.net/ > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list > From waldemar.osuch at gmail.com Wed Nov 12 22:16:54 2008 From: waldemar.osuch at gmail.com (Waldemar Osuch) Date: Wed, 12 Nov 2008 15:16:54 -0700 Subject: [Fedora-suds-list] SoapClient feature request In-Reply-To: <491B3B2B.1020404@redhat.com> References: <6fae95540811111907y36a2c37eq1d841a7c3bd67a01@mail.gmail.com> <491B3B2B.1020404@redhat.com> Message-ID: <6fae95540811121416q85bcddcp61025afd3f3eac5a@mail.gmail.com> On Wed, Nov 12, 2008 at 1:23 PM, Jeff Ortel wrote: > Hey Waldemar, > > Thanks for you kind comments about suds and for your suggestions. > --8<--- >> >> I have even written my own SOAP client library so I can talk them. >> It is inspired by your API but it is based on lxml[1] for all the XML >> wrangling and httplib2[2] for all the >> request/response/authentication/cookies stuff. > > Very cool. > > As for lxml, Suds started with lxml and ran into limitations. It's a good > lib but lacks tools for dealing with namespaces. Specifically, it's lack of > support for prefixes. Given the lack of alternatives, I decided to just > write what I needed and be done with it. After all, it was only about a 2 > day job. > Yes, I know what you are talking about. The prefixes needed special handling but then again I knew that I am not capable of writing XML parsing library so I stuck with lxml. I found lxml.objectify especially useful for handling the results of SOAP calls. --8<--- >> >> What do you think about switching the transport to httplib2? >> It is an extra dependency but it makes http handling easier. >> Or maybe one could come up with a simple interface and make the >> transport pluggable? > > Yes, I think making the transport pluggable is a good solution. It could > ship with a default transport based on urllib2 as is and users can then > switch it out for anything they choose without introducing dependencies on > the core. > Yes that sounds as a good plan. If you designated a place where contributions can go (wiki?) I could upload what I have got as a recipe. I will tweak it as needed to fit into the plugin architecture. Now the only thing left is to come up with one :-). Waldemar From steffen.steidten at amd.com Mon Nov 17 16:26:22 2008 From: steffen.steidten at amd.com (Steidten, Steffen) Date: Mon, 17 Nov 2008 17:26:22 +0100 Subject: [Fedora-suds-list] Problem marshalling array of complexType Message-ID: <5F9AA86D37D40D4E850C5558C9305E33055A3133@SDRSEXMB1.amd.com> Hi, While suds has recently made very good progress in handling arrays, I'm currently struggling with a message, containing an array of complex type. The array seems not being marshalled correctly. The expected request must look like this: ... MyLot Facility 1 1 true ... Instead, suds (v0.3.2) generates an answer like this: ... 1 1 MyLot true Facility Note the element tag in line #2 is generated as string type. Instead it should have no attributes or be of type LotListReqData. The code to generate this message is: ... cl = Client(url) ll = cl.factory.create('ns0:LotListReqData') ll.blocking = 1 ll.duration = 1 ll.reset = True ll.lotID = "MyLot" ll.targetFacility = "Facility" aa = cl.factory.create("ArrayOf_tns4_LotListReqData") aa.value = ll ... Did I miss something, or is this possibly a bug or a missing feature in suds? Regards, Steffen From matt at tplus1.com Tue Nov 18 15:41:53 2008 From: matt at tplus1.com (Matthew Wilson) Date: Tue, 18 Nov 2008 10:41:53 -0500 Subject: [Fedora-suds-list] easy_install suds installs a module named tests into the top-level site-package Message-ID: I just ran easy_install suds, then went into a python session, and imported tests and got the suds tests module. Is it possible to move this module inside of the suds namespace? It is causing me problems to have a top-level thing named tests, because several other packages also want to make top-level things named tests. I'm going to send messages to all of them asking them not to put something in the top-level. Here's the transcript of the issue: $ virtualenv --no-site-packages junk New python executable in junk/bin/python Installing setuptools............done. $ source junk/bin/activate $ easy_install suds Searching for suds Reading http://pypi.python.org/simple/suds/ Reading https://fedorahosted.org/suds Best match: suds 0.3.2 Downloading http://pypi.python.org/packages/source/s/suds/suds-0.3.2.tar.gz#md5=d54e6dc0fecd901380e436035f9aad19 Processing suds-0.3.2.tar.gz Running suds-0.3.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-1Yw7Uj/suds-0.3.2/egg-dist-tmp--KWdza zip_safe flag not set; analyzing archive contents... Adding suds 0.3.2 to easy-install.pth file Installed /home/matt/virtualenvs/junk/lib/python2.5/site-packages/suds-0.3.2-py2.5.egg Processing dependencies for suds Finished processing dependencies for suds $ python Python 2.5.2 (r252:60911, May 7 2008, 15:19:09) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import tests >>> tests.__file__ '/home/matt/virtualenvs/junk/lib/python2.5/site-packages/suds-0.3.2-py2.5.egg/tests/__init__.pyc' >>> Matt -- Matthew Wilson matt at tplus1.com http://tplus1.com From matt at tplus1.com Tue Nov 18 16:12:31 2008 From: matt at tplus1.com (Matthew Wilson) Date: Tue, 18 Nov 2008 11:12:31 -0500 Subject: [Fedora-suds-list] PATCH: don't install tests into the site-packages Message-ID: The problem is that suds is putting a tests module in the top level namespace. This change to setup.py means that easy_install suds will skip the tests directory. An alternate solution would be to move the tests directory inside the suds directory. Index: setup.py =================================================================== --- setup.py (revision 389) +++ setup.py (working copy) @@ -28,6 +28,6 @@ author_email="jortel at redhat.com", maintainer="Jeff Ortel", maintainer_email="jortel at redhat.com", - packages=find_packages(), + packages=find_packages(exclude=['tests']), url="https://fedorahosted.org/suds", ) -- Matthew Wilson matt at tplus1.com http://tplus1.com From jortel at redhat.com Wed Nov 19 16:54:15 2008 From: jortel at redhat.com (Jeff Ortel) Date: Wed, 19 Nov 2008 11:54:15 -0500 Subject: [Fedora-suds-list] API update Proposal Message-ID: <492444B7.90009@redhat.com> All, There have been several requests to support named (kwargs) arguments to service methods. I've drafted a proposal to support this but it requires and API change so I'd like the suds community to review and provide comments. https://fedorahosted.org/suds/wiki/Api3Proposal Comments should be posted on the mailing list or the IRC channel. Pending general approval, this change would be included in 0.3.3. Thanks, Jeff From jesper at noehr.org Wed Nov 19 16:58:50 2008 From: jesper at noehr.org (Jesper Noehr) Date: Wed, 19 Nov 2008 17:58:50 +0100 Subject: [Fedora-suds-list] API update Proposal In-Reply-To: <492444B7.90009@redhat.com> References: <492444B7.90009@redhat.com> Message-ID: On Nov 19, 2008, at 5:54 PM, Jeff Ortel wrote: > All, > > There have been several requests to support named (kwargs) arguments > to service methods. I've drafted a proposal to support this but it > requires and API change so I'd like the suds community to review and > provide comments. > > https://fedorahosted.org/suds/wiki/Api3Proposal > > Comments should be posted on the mailing list or the IRC channel. +1. The API makes the code, IMHO, so I'm all for making it more convenient to use. Good proposal, Jeff! Jesper From rjalves at igc.gulbenkian.pt Wed Nov 19 17:28:29 2008 From: rjalves at igc.gulbenkian.pt (Renato Alves) Date: Wed, 19 Nov 2008 17:28:29 +0000 Subject: [Fedora-suds-list] API update Proposal In-Reply-To: References: <492444B7.90009@redhat.com> Message-ID: <49244CBD.6090404@igc.gulbenkian.pt> I vote for evolution too... Cheers, Renato Quoting Jesper Noehr on 11/19/2008 04:58 PM: > On Nov 19, 2008, at 5:54 PM, Jeff Ortel wrote: > >> All, >> >> There have been several requests to support named (kwargs) arguments >> to service methods. I've drafted a proposal to support this but it >> requires and API change so I'd like the suds community to review and >> provide comments. >> >> https://fedorahosted.org/suds/wiki/Api3Proposal >> >> Comments should be posted on the mailing list or the IRC channel. > > +1. The API makes the code, IMHO, so I'm all for making it more > convenient to use. > > Good proposal, Jeff! > > > Jesper > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From jortel at redhat.com Wed Nov 26 16:00:36 2008 From: jortel at redhat.com (Jeff Ortel) Date: Wed, 26 Nov 2008 11:00:36 -0500 Subject: [Fedora-suds-list] API-3 Message-ID: <492D72A4.8010005@redhat.com> All, Thanks to everyone for taking the time to review and provide comments on the API-3 proposal ( https://fedorahosted.org/suds/wiki/Api3Proposal ). These comments have been very positive so the proposal has been implemented in trunk/0.3.3 (beta). The proposal was expanded to support: - Pluggable Transport - Http (basic) authentication provided in the default transport (using urllib2). Pending serious issues, 0.3.3 is on schedule for release at the end of November. Regards, Jeff From jortel at redhat.com Wed Nov 26 16:02:47 2008 From: jortel at redhat.com (Jeff Ortel) Date: Wed, 26 Nov 2008 11:02:47 -0500 Subject: [Fedora-suds-list] API-3 In-Reply-To: <492D72A4.8010005@redhat.com> References: <492D72A4.8010005@redhat.com> Message-ID: <492D7327.7020202@redhat.com> Jeff Ortel wrote: > All, > > Thanks to everyone for taking the time to review and provide comments on > the API-3 proposal ( https://fedorahosted.org/suds/wiki/Api3Proposal ). > > These comments have been very positive so the proposal has been > implemented in trunk/0.3.3 (beta). > > The proposal was expanded to support: > > - Pluggable Transport > - Http (basic) authentication provided in the default transport (using > urllib2). > > Pending serious issues, 0.3.3 is on schedule for release at the end of > November. I meant 'Barring' any serious issues :) So far, 0.3.3 seems very clean. > > Regards, > > Jeff > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From jortel at redhat.com Wed Nov 26 16:42:47 2008 From: jortel at redhat.com (Jeff Ortel) Date: Wed, 26 Nov 2008 11:42:47 -0500 Subject: [Fedora-suds-list] trunk (r407) - 0.3.3 release candidate Message-ID: <492D7C87.5070909@redhat.com> All, Trunk (r407) is 0.3.3 release candidate. See details at: https://fedorahosted.org/suds. jeff