From gary.wilson at gmail.com Sat Aug 1 02:13:02 2009 From: gary.wilson at gmail.com (Gary Wilson Jr.) Date: Fri, 31 Jul 2009 21:13:02 -0500 Subject: [Fedora-suds-list] multiple services in one WSDL Message-ID: Does suds support this? For example, when using the WSDL: http://ops.epo.org/wsdl/ops.wsdl ...the client object seems to only know about the last service defined, OPSLegalAndBiblioService. Do I need to resort to saving this WSDL to a local file and trimming it down to just the service I need to use? Thanks, Gary From ClientServices at theemployernetwork.com Tue Aug 4 13:16:26 2009 From: ClientServices at theemployernetwork.com (The Career-Network) Date: 04 Aug 2009 09:16:26 -0400 Subject: [Fedora-suds-list] Get a winning strategy with Career Network Message-ID: <20090804091626.1405E2DBAE0E8375@theemployernetwork.com> An HTML attachment was scrubbed... URL: From jortel at redhat.com Tue Aug 4 19:11:44 2009 From: jortel at redhat.com (Jeff Ortel) Date: Tue, 04 Aug 2009 14:11:44 -0500 Subject: [Fedora-suds-list] multiple services in one WSDL In-Reply-To: References: Message-ID: <4A7887F0.3070908@redhat.com> Hey Gary, Yup, suds currently only understands single service wsdls. However, I could enhance suds to handle multiple services in a few days. I haven't added support for it yet because *most* wsdls only define (1) service. Maybe the API would look something like: Single service: > > client.service.foo() > Multiple services: > > client.service['MyService'].foo() > Better suggestions? Regards, Jeff Gary Wilson Jr. wrote: > Does suds support this? For example, when using the WSDL: > > http://ops.epo.org/wsdl/ops.wsdl > > ...the client object seems to only know about the last service > defined, OPSLegalAndBiblioService. Do I need to resort to saving this > WSDL to a local file and trimming it down to just the service I need > to use? > > Thanks, > Gary > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From Andrzej.Mleczko at redturtle.net Wed Aug 5 08:06:59 2009 From: Andrzej.Mleczko at redturtle.net (Andrzej.Mleczko at redturtle.net) Date: Wed, 5 Aug 2009 10:06:59 +0200 Subject: [Fedora-suds-list] Problem with TypeNotFound Message-ID: Hi all, I'm trying to use suds (different versions - latest trunk as well) for one of my projects. For most use cases it works well, but I cannot use it for one of the methods from wsdl schema. I'm getting always TypeNotFound. I was trying to validate my wsdl schema (pass). I was trying to use wget to pass envolpe - it works OK. Anybody have a hint? How can I debug it more. The webservice is not public so I cannot share the xml. Here is traceback: http://pastie.org/private/lwx5dtvsctrmkisuatfogq Thanks! ---------------------------------------------------------- Andrew Mleczko - RedTurtle Technology E-mail: andrew.mleczko at redturtle.net Web Site: http://www.redturtle.net Phone: +39 0532 1915958 Mobile: +39 334 7382343 Fax: +39 0532 287070 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew at mleczko.net Wed Aug 5 08:24:11 2009 From: andrew at mleczko.net (Andrzej Mleczko) Date: Wed, 5 Aug 2009 10:24:11 +0200 Subject: [Fedora-suds-list] Problem with TypeNotFound Message-ID: <3eb77d9d0908050124q23778af0o9ee9108df8348a62@mail.gmail.com> Hi all, I'm trying to use suds (different versions - latest trunk as well) for one of my projects. For most use cases it works well, but I cannot use it for one of the methods from wsdl schema. I'm getting always TypeNotFound. I was trying to validate my wsdl schema (pass). I was trying to use wget to pass envolpe - it works OK. Anybody have a hint? How can I debug it more. The webservice is not public so I cannot share the xml. Here is traceback: http://pastie.org/private/lwx5dtvsctrmkisuatfogq Thanks! -- Andrew Mleczko e-mail: andrew at mleczko.net skype: amleczko -------------- next part -------------- An HTML attachment was scrubbed... URL: From zamora at farmerbrown.org Thu Aug 13 13:37:58 2009 From: zamora at farmerbrown.org (Close) Date: Thu, 13 Aug 2009 15:37:58 +0200 Subject: [Fedora-suds-list] character Message-ID: <3B15844A.3010309@farmerbrown.org> Ite out of sight. But the Little Sweetheart did not care. In fact, she had no time to think, for the Queen came sailing in and spoke to her, and crowds of ladies in dresses so bright and beautiful that they dazzled her eyes; and the Prince was there kissing her, and in a minute they were married, and went floating off in a dance, which was so swift it did not feel so much like dancing as it did like being carried through the air by a gentle wind. Through room after room,--there seemed -------------- next part -------------- A non-text attachment was scrubbed... Name: botanist.jpg Type: image/jpeg Size: 33304 bytes Desc: not available URL: From Grant.Kushida at fox.com Thu Aug 13 22:40:05 2009 From: Grant.Kushida at fox.com (Grant Kushida) Date: Thu, 13 Aug 2009 15:40:05 -0700 Subject: [Fedora-suds-list] ValueError parsing date with negative timezone (w/ fix) Message-ID: <2A4CEA37361087479DE07A3F624C1CA6B4D26F@fegcnmsexmb05.ffe.foxeg.com> I've run into an ValueError issue when parsing an xsd:date response with a negative UTC timezone offset. This is happening in suds 0.3.6 as well as on the trunk. Sorry I can't provide the WSDL, since this is internal-only - but instead, I have some patches which fix the issue in sxdate.py, and add two test cases to builtin.py. If these changes look acceptable I'd appreciate it if they were integrated into some future Suds version. The server uses Apache CXF 2.1.1 and JAX-B 2.1.6. The WSDL defines a response element as follows: The response includes the timezone offset (US Pacific time), which happens to be negative: 2008-01-01-08:00 This gives a ValueError exception, similar to the following (this is actually from the test case I implemented, not the original web service client where I found the error): Traceback (most recent call last): File "tests/builtin.py", line 121, in test_should_return_correct_date_object_given_date_with_different_negativ e_timezone date = XDate().translate("1945-08-20-03:00") File "/suds/trunk/suds/xsd/sxdate.py", line 82, in translate return self.toPython(value) File "/suds/trunk/suds/xsd/sxdate.py", line 55, in toPython year, month, day = value.rsplit('-', 3) ValueError: too many values to unpack Here are the diffs from SVN trunk revision 547, for the one-line fix to sxdate.py and the two testcases added to builtin.py. Index: tests/builtin.py =================================================================== --- tests/builtin.py (revision 547) +++ tests/builtin.py (working copy) @@ -117,11 +117,25 @@ self.assertEqual(date.second, 0) self.assertEqual(date.hour, self.getHour(0, 3)) + def test_should_return_correct_date_object_given_date_with_different_negativ e_timezone(self): + date = XDate().translate("1945-08-20-03:00") + self.assertEqual(date.day, self.getDay(20, 0, -3)) + self.assertEqual(date.month, 8) + self.assertEqual(date.year, 1945) + self.assertEqual(date.minute, 0) + self.assertEqual(date.second, 0) + self.assertEqual(date.hour, self.getHour(0, -3)) + def test_should_return_correct_string_from_date_object_given_date_with_timez one(self): date = XDate().translate(XDate().translate("1945-08-20+03:00"), False) self.assertEquals("1945-08-%s%s" % (str(self.getDay(20, 0, 3)), self.getTestersTimezoneString()), date) + def test_should_return_correct_string_from_date_object_given_date_with_negat ive_timezone(self): + date = XDate().translate(XDate().translate("1945-08-20-03:00"), False) + + self.assertEquals("1945-08-%s%s" % (str(self.getDay(20, 0, -3)), self.getTestersTimezoneString()), date) + def test_should_return_correct_date_object_given_date_with_different_utc(sel f): #from where I am, this is 6 hours off and would become a different day date = XDate().translate("1945-08-20Z") Index: suds/xsd/sxdate.py =================================================================== --- suds/xsd/sxdate.py (revision 547) +++ suds/xsd/sxdate.py (working copy) @@ -52,7 +52,7 @@ if len(value) == 0: return None - year, month, day = value.rsplit('-', 3) + year, month, day = value.split('-', 2) #if it has a tz set, convert to user's tz if len(day) > 2: -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.szrajber at ks-software.com Mon Aug 17 13:06:40 2009 From: p.szrajber at ks-software.com (Piotr Szrajber) Date: Mon, 17 Aug 2009 15:06:40 +0200 Subject: [Fedora-suds-list] Empty string instead of xsi:nil in request Message-ID: Hello, I am trying to invoke a php webservice method which expects one of the parameters (for brevity let's call it just "parameter1") as either string or null. Unfortunately, when I invoke it in SUDS client, either with passing it explicitly as None or when ignoring it:
service.method(parameter0, parameter1=None)
service.method(parameter0),
I see in debug information that SUDS is sending empty string instead of xsi:nil:

    
       325
       
    

How can I deal with that? If it's service provider fault, can I somewhat manually filter the request to replace "" with ""? Kind Regards, Piotr Szrajber From unendurably at resch.or.at Mon Aug 17 18:58:35 2009 From: unendurably at resch.or.at (Eckl Loyal) Date: Mon, 17 Aug 2009 20:58:35 +0200 Subject: [Fedora-suds-list] flecked with spots of white fo Message-ID: <68A7894A.8080306@resch.or.at> Ayments to meet . . ." "Oh, don't bother about the money. Imagine that I am giving you this for your name day as a small token of friendship . . will you?" he asked, slipping the bracelet upon her plump wrist. "Oh, Counselor, Counselor! if I did not love my John -------------- next part -------------- A non-text attachment was scrubbed... Name: bust.jpg Type: image/jpeg Size: 15352 bytes Desc: not available URL: From jortel at redhat.com Mon Aug 17 22:25:54 2009 From: jortel at redhat.com (Jeff Ortel) Date: Mon, 17 Aug 2009 17:25:54 -0500 Subject: [Fedora-suds-list] Empty string instead of xsi:nil in request In-Reply-To: References: Message-ID: <4A89D8F2.70706@redhat.com> Hey Piotr :) See below: On 08/17/2009 08:06 AM, Piotr Szrajber wrote: > Hello, > > I am trying to invoke a php webservice method which expects one of the > parameters (for brevity let's call it just "parameter1") as either > string or null. Unfortunately, when I invoke it in SUDS client, either > with passing it explicitly as None or when ignoring it: > >
> service.method(parameter0, parameter1=None)
> service.method(parameter0),
> 
> > I see in debug information that SUDS is sending empty string instead of > xsi:nil: > >
> 
> 
> 325
> 
> 
> 
> 
> > How can I deal with that? Suds should set the xsi:nil="true" when the schema defines that element as nillable. Does the schema do that? > > If it's service provider fault, can I somewhat manually filter the > request to replace "" with > ""? In any case, suds currently doesn't provide a way to "doctor up" the message but probably should do something like the schema doctor. Let me see what I can do. > > Kind Regards, > Piotr Szrajber > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3360 bytes Desc: S/MIME Cryptographic Signature URL: From gary.wilson at gmail.com Tue Aug 18 04:35:08 2009 From: gary.wilson at gmail.com (Gary Wilson Jr.) Date: Mon, 17 Aug 2009 23:35:08 -0500 Subject: [Fedora-suds-list] multiple services in one WSDL In-Reply-To: <4A7887F0.3070908@redhat.com> References: <4A7887F0.3070908@redhat.com> Message-ID: On Tue, Aug 4, 2009 at 2:11 PM, Jeff Ortel wrote: > Maybe the API would look something like: > > Single service: >> >> client.service.foo() >> > > Multiple services: > >> >> client.service['MyService'].foo() >> > > Better suggestions? Nope, this seems fine to me. I went ahead and created a ticket to track this feature: https://fedorahosted.org/suds/ticket/247 Thanks, Gary From p.szrajber at ks-software.com Tue Aug 18 06:44:25 2009 From: p.szrajber at ks-software.com (Piotr Szrajber) Date: Tue, 18 Aug 2009 08:44:25 +0200 Subject: [Fedora-suds-list] Empty string instead of xsi:nil in request In-Reply-To: <4A89D8F2.70706@redhat.com> References: <4A89D8F2.70706@redhat.com> Message-ID: Hello Jeff, thanks for the reply. On Tue, 18 Aug 2009 00:25:54 +0200, Jeff Ortel wrote: > Suds should set the xsi:nil="true" when the schema defines that element > as nillable. Does the schema do that? Unfortunately the schema doesn't set xsi:nil="true", but what it does in the webservice definition is: AFAIK with use="optional/required", it should also have something like ref="wsdl:required" to work although I am not sure. I would be most happy with a solution similar to Binding.replyfilter when it goes about "patching" the response, although I will be glad with everything that works. As I mentioned, the Webservice I am using is a PHP Webservice and the PHP example that service provider gave me works and, as I investigated, it sends xsi:nil="true" in the request. But I don't want to use ugly PHP, I want to use pretty SUDS since I like it very much :-) Regards, Piotr Szrajber From memory at m-p-trade.com Thu Aug 20 08:48:04 2009 From: memory at m-p-trade.com (Selgrade Elliem) Date: Thu, 20 Aug 2009 10:48:04 +0200 Subject: [Fedora-suds-list] ) "Love which by gentle Message-ID: <430C8D4A.9020803@m-p-trade.com> Ispatched. The greatest dexterity is required in this manoeuvre by all practising it, as the slacking of either lasso enables the bull to turn upon his caudal persecutor, who is certain to be gored to death. This, indeed, not unfrequently happens. But a Llanero cares little for death. He faces it daily in his lonely converse with thousands of intractable beasts, in his bath in the river swarming with alligators,--in the swamp teeming with serpents, against whose poison there is no antidote, and whose bite will destroy the life of a man in a single hour. Content with the wild excitement of his daily round of duty and recreation, with his meal of dried beef and cassava-cake, washed down, it is likely, with a gourdful of _guarapo_, a species of rum, in comparison with which the New England beverage is innocent and weak, and with the occasional recurrence of some such turbulent festival as that of the branding, he cares nothing for the future, and bestows no thought upon the past. The Llanero may be call -------------- next part -------------- A non-text attachment was scrubbed... Name: incorporate.jpg Type: image/jpeg Size: 14363 bytes Desc: not available URL: From bandobust at verdienst.com Fri Aug 21 13:40:18 2009 From: bandobust at verdienst.com (Indeck Belnap) Date: Fri, 21 Aug 2009 15:40:18 +0200 Subject: [Fedora-suds-list] Us, my liege.' 'Trust you, my friends!' said James, deeply to Message-ID: <12A38E4A.9090801@verdienst.com> Ave lived in castle or in cloister.' Little had Esclairmonde expected to hear the greeting with which the Countess received her, breaking out into peals of merriment as she told her of the choice destiny in store for her, to be wedded to the little lame Scot, pretending to read her a grave lecture on the consequences of the advances she had made to him. Esclairmonde was not put out of countenance; in fact, she did not think the Countess in earnest, and merely replied with a smile that at least there was less harm in Lord Malcolm than in the suitors at home. Jaqueline clapped her hands and cried, 'Good tidings, Clairette. I'll never forgive you if you make me lose my emerald carcanet! So the arrow was winged, after all. She prefers him--her heart is touched by the dainty step.' 'Madame!' entreated Esclairmonde, with agitation; 'at least, infirmity should be spared.' 'It touches her deeply!' exclaimed the Duchess. 'Ah! to see her in the mountains teaching the wild men to say their Aye, and to wear _culottes_, the little prince interpreting for her, as King James told us in his story of the saint his ancestor.' Raillery about Malcolm had been attempted before, but never so pertinaciously; and Esclairmonde heeded it not at all, till James himself sought her out, and, within all his own persuasive grace, told her that he was rejoiced to hear from Madame of Hainault that she had spoken kindly of his youthful kinsman, for whose improvement he was sure he had in great measure to thank her. Esclai -------------- next part -------------- A non-text attachment was scrubbed... Name: spoiler.jpg Type: image/jpeg Size: 9055 bytes Desc: not available URL: From gutter at macfix.nl Sun Aug 23 14:40:45 2009 From: gutter at macfix.nl (Tritten Siter) Date: Sun, 23 Aug 2009 16:40:45 +0200 Subject: [Fedora-suds-list] about equal to Message-ID: Privateers, shall be exchanged for officers of equal rank, or three privates or common seamen; Second Captains, Lieutenants or mates of merchant vessels or privateers, and all petty officers in the Navy, and all noncommissioned officers in the Army or marines, shall be severally exchanged for persons of equal rank, or for two privates or common seamen; and private soldiers or common seamen shall be exchanged for each other man for man. ARTICLE II.--Local, State, civil and militia rank held by persons not in actua -------------- next part -------------- A non-text attachment was scrubbed... Name: gunsel.jpg Type: image/jpeg Size: 9045 bytes Desc: not available URL: From barrett at positiontech.com Mon Aug 24 20:12:50 2009 From: barrett at positiontech.com (Stephen Barrett) Date: Mon, 24 Aug 2009 15:12:50 -0500 Subject: [Fedora-suds-list] Too many values to unpack in sxdate.py Message-ID: <17B81990-15CA-4EFB-B2CD-7D3103702CB6@positiontech.com> I am getting a value error trying to unmarshall a date in a reply. 2009-07-27-05:00 File "build/bdist.macosx-10.5-i386/egg/suds/xsd/sxdate.py", line 56, in toPython ValueError: too many values to unpack looking at the code shows this line. year, month, day = value.rsplit('-', 3) when there is a "-" in front of the time zone there will 4 items in the unpacked list Has anyone else run into this problem? Thanks, Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From Grant.Kushida at fox.com Mon Aug 24 20:23:27 2009 From: Grant.Kushida at fox.com (Grant Kushida) Date: Mon, 24 Aug 2009 13:23:27 -0700 Subject: [Fedora-suds-list] Too many values to unpack in sxdate.py In-Reply-To: <17B81990-15CA-4EFB-B2CD-7D3103702CB6@positiontech.com> References: <17B81990-15CA-4EFB-B2CD-7D3103702CB6@positiontech.com> Message-ID: <2A4CEA37361087479DE07A3F624C1CA6BA11D0@fegcnmsexmb05.ffe.foxeg.com> Yes ? see here: https://www.redhat.com/archives/fedora-suds-list/2009-August/msg00006.html From: fedora-suds-list-bounces at redhat.com [mailto:fedora-suds-list-bounces at redhat.com] On Behalf Of Stephen Barrett Sent: Monday, August 24, 2009 1:13 PM To: fedora-suds-list at redhat.com Subject: [Fedora-suds-list] Too many values to unpack in sxdate.py I am getting a value error trying to unmarshall a date in a reply. 2009-07-27-05:00 File "build/bdist.macosx-10.5-i386/egg/suds/xsd/sxdate.py", line 56, in toPython ValueError: too many values to unpack looking at the code shows this line. year, month, day = value.rsplit('-', 3) when there is a "-" in front of the time zone there will 4 items in the unpacked list Has anyone else run into this problem? Thanks, Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From frantzcj at gmail.com Mon Aug 24 22:55:54 2009 From: frantzcj at gmail.com (Chris Frantz) Date: Mon, 24 Aug 2009 17:55:54 -0500 Subject: [Fedora-suds-list] Question about the soap envelope namespace Message-ID: Hello, It appears that the soap envelope namespace is hardcoded to ' http://schemas.xmlsoap.org/soap/envelope/' in binding.py. I'm trying to talk to a gSOAP based web service that insists the envelope namespace be ' http://www.w3.org/2003/05/soap-envelope'. Unfortunately, I don't have permission to share the WSDL file. Any suggestions? --Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From frantzcj at gmail.com Mon Aug 24 23:10:33 2009 From: frantzcj at gmail.com (Chris Frantz) Date: Mon, 24 Aug 2009 18:10:33 -0500 Subject: [Fedora-suds-list] How to deal with this data type Message-ID: I'm trying to talk to a service that defines this data type (names changed to protect the guilty): In the vendor's Java and C# examples, FooThing is always setup like this: FooThing foo = new FooThing(); foo.arg = "somename"; foo.Value = "Help"; int rc = doFoo(foo) Which leads to this XML representation on the wire: <_this xsi:type="FooThing" arg="somename">Help I'm a bit confused on how I would accomplish the same with suds. FooThing is an extension of the string type... how to I assign a value to it after creating it with the factory? foo = client.factory.create('FooThing') print foo (FooThing){ arg = "" } I've tried the "Including Literal XML" trick, but I get "Exception: raw XML not valid as attribute value". Thanks, --Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From centrale at barsportief.nl Tue Aug 25 16:22:17 2009 From: centrale at barsportief.nl (Runquist) Date: Tue, 25 Aug 2009 18:22:17 +0200 Subject: [Fedora-suds-list] herein they were both slaine, t Message-ID: <4A940E20.10401@barsportief.nl> True storie of the forenamed king Oswald, his desire to restore christian religion, Cormans preaching taking small effect among the Northumbers, persuadeth him to depart into his owne countrie, he slandereth them before the Scotish clergie, Aidan a godlie man telleth the cause of the peoples not profiting by Cormans preaching, Aidan commeth into England to instruct the people in the faith, he varieth in the obseruation of Easter from the English churches custome, the Northumbers haue him & his doc -------------- next part -------------- A non-text attachment was scrubbed... Name: netter.jpg Type: image/jpeg Size: 9892 bytes Desc: not available URL: From msommerville at gmail.com Tue Aug 25 16:44:07 2009 From: msommerville at gmail.com (Michael Sommerville) Date: Tue, 25 Aug 2009 17:44:07 +0100 Subject: [Fedora-suds-list] Question about the soap envelope namespace In-Reply-To: References: Message-ID: <4d395ead0908250944j7b7cf8d0se158661a2a1e8089@mail.gmail.com> On Mon, Aug 24, 2009 at 11:55 PM, Chris Frantz wrote: > Hello, > > It appears that the soap envelope namespace is hardcoded to > 'http://schemas.xmlsoap.org/soap/envelope/' in binding.py.? I'm trying to > talk to a gSOAP based web service that insists the envelope namespace be > 'http://www.w3.org/2003/05/soap-envelope'. > > Unfortunately, I don't have permission to share the WSDL file. > > Any suggestions? We have the same issue with our gSOAP service. I'm sure there are other cleaner ways of achieving the same result, but what about simply replacing the envns object before you make any calls to the web service? For example: suds.bindings.binding.envns = ('SOAP-ENV', 'http://www.w3.org/2003/05/soap-envelope') -Mike From jortel at redhat.com Tue Aug 25 18:00:35 2009 From: jortel at redhat.com (Jeff Ortel) Date: Tue, 25 Aug 2009 13:00:35 -0500 Subject: [Fedora-suds-list] How to deal with this data type In-Reply-To: References: Message-ID: <4A9426C3.5070904@redhat.com> Chris, I'll run through this example and get back with you. Regards, Jeff On 08/24/2009 06:10 PM, Chris Frantz wrote: > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3360 bytes Desc: S/MIME Cryptographic Signature URL: From frantzcj at gmail.com Wed Aug 26 15:53:26 2009 From: frantzcj at gmail.com (Chris Frantz) Date: Wed, 26 Aug 2009 10:53:26 -0500 Subject: [Fedora-suds-list] Can I use the xsd processor for converting between XML and python objects Message-ID: Hello again, Is it possible to use the schema processor in suds to convert between XML representation and python object representation? I'm rather new to all this XML schema stuff, so my apologies if I'm not asking the question the right way. I would like to do something like this: p = Parser() root = p.parse(url='file:xyz.xsd').root() s = Schema(root, 'file:xyz.xsd', Options()) p2 = Parser() data = p2.parse(url='http://somewhere/xyz.xml').root() obj = unmarshall(data with respect to schema s) I think (hope) I'm on the right track, but the suds library has a little more Python magic in it than I'm used to, so if anyone has any tips, I'd appreciate it. I would also like to do the converse: convert a python object created by the schema into it's XML representation. Thank you for your time, --Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From historicism at goudsoft.nl Wed Aug 26 18:03:44 2009 From: historicism at goudsoft.nl (Holten Gegenheimer) Date: Wed, 26 Aug 2009 15:03:44 -0300 Subject: [Fedora-suds-list] Urled him bodily out upon the deck, delivering him to Message-ID: <4A95766F.5050202@goudsoft.nl> of Nikolas Rokoff from the French prison where they had hoped he was permanently confined. As Tarzan and his wife stood planning the wisest course to pursue, the telephone bell rang in the library at their right. Tarzan quickly answered the call in person. "Lord Greystoke?" asked a man's voice at the other end of the line. "Yes." "Your son has been stolen," continued the voice, "and I alone may help you to recover him. I am conversant with the plot of those who took him. In fact, I was a party to it, and was to share in the reward, but now they are trying to ditch me, and to be quits with them I will aid you to recover him on condition that you will -------------- next part -------------- A non-text attachment was scrubbed... Name: dolly.jpg Type: image/jpeg Size: 9420 bytes Desc: not available URL: From gary.wilson at gmail.com Thu Aug 27 03:38:28 2009 From: gary.wilson at gmail.com (Gary Wilson Jr.) Date: Wed, 26 Aug 2009 22:38:28 -0500 Subject: [Fedora-suds-list] error using the EPO's Open Patent Services Message-ID: So, playing with the EPO service again (with the new multi-service feature, thanks!), I'm using the following code: from suds.client import Client wsdl = 'http://ops.epo.org/wsdl/ops.wsdl' client = Client(wsdl) retrieve = getattr(client.service['OPSBiblioRetrievalService'], 'biblio-retrieval') pub = client.factory.create('exch:publication-reference') setattr(pub, '_data-format', "docdb") doc = getattr(pub, 'document-id') doc.country = "EP" setattr(doc, 'doc-number', 1000000) doc.kind = "A1" retrieve(pub) ...which results in a server fault. The generated request content is: EP 1000000 A1 ...and what seems to be causing the problems are the empty elements within the biblio-retrieval element. Using the soapUI client [1], I get a successful response if I remove those empty elements from the above message. From what soapUI reports, only one of the six parameters there should be given, though I'm unsure of where that fact can be inferred. Is there a way I can make suds not put those empty elements in the message, or is this a bug? Thanks, Gary [1] http://www.soapui.org/ From jortel at redhat.com Thu Aug 27 14:19:07 2009 From: jortel at redhat.com (Jeff Ortel) Date: Thu, 27 Aug 2009 09:19:07 -0500 Subject: [Fedora-suds-list] error using the EPO's Open Patent Services In-Reply-To: References: Message-ID: <4A9695DB.2000302@redhat.com> Gary, Glad to hear the multi-service stuff works for you :) This is a real edge case. A document/literal wrapper element containing a list of choices. Anyway, I fixed (r554) the (doc/lit) binding to deal with this and the method works now. But a side effect is that the method signature no longer contains the choices (and is empty). But, the signature containing __all__ the choices was incorrect as well. Hope this helps. Regards, Jeff On 08/26/2009 10:38 PM, Gary Wilson Jr. wrote: > retrieve = getattr(client.service['OPSBiblioRetrievalService'], > 'biblio-retrieval') > pub = client.factory.create('exch:publication-reference') > setattr(pub, '_data-format', "docdb") > doc = getattr(pub, 'document-id') > doc.country = "EP" > setattr(doc, 'doc-number', 1000000) > doc.kind = "A1" > retrieve(pub) -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3360 bytes Desc: S/MIME Cryptographic Signature URL: From diplococcus at saia-burgess.nl Thu Aug 27 23:32:42 2009 From: diplococcus at saia-burgess.nl (Reihe) Date: Fri, 28 Aug 2009 01:32:42 +0200 Subject: [Fedora-suds-list] Mont Marbore, from the sum Message-ID: <4A9715DE.2050504@saia-burgess.nl> Ation was accomplished with such dexterity, that many of those present at the spectacle asked of their neighbours if it was already finished; and were told that it was; upon which they remarked, that it was the last time they would put themselves so much out of the way for so little. Three months had passed since the head and body of Peter Leroux had been cast into a corner of the cemetery, and, in all probability, the grave no longer concealed aught but his bones, when a new session of assizes was opened, and M. Desalleux had again to support a capital indictment. The day previous, he quitted at an early hour a ball to which he had been invited with all his family, at a chateau in the environs, and returned alone to the city, in order to prepare his case for the morrow. The night was dark; a warm wind from the south whistled drearily, while the buzz of the gay scene that he had left seemed to linger in his ears. A feeling of melancholy stole over him. The memory of many people whom he had known, and who were dead, returned to his mind; and, scarcely knowing why, he began to think of Peter Leroux. Nevertheless, as he drew near the city, and the first lights of the suburbs began to appear, all his sombre ideas vanished, and as soon as he found himself again at his desk, surrounded by his books and papers, he thought no longer of anything but his oration, which he had determined should be even yet more brilliant than any that had preceded it. His system of indictment was already nearly settled. It is singular, by the way, that French legal expression, a 'system of indictment'--that is to say, an absolute manner of grouping an _ensemble_ of facts and proofs, in virtue of which the prosecutor appropriates to himself the head of a man--as one would say, 'a system of philosophy'--that is, an _ensemble_ of reasonings and sophisms, by the aid of which we establish some harmless truth, theory, or fancy. His system of indictment was nearly completed, when the deposition of a witness which he had not examined, suddenly presented itself, with such an aspect as threatened to overturn all the edifice of his logic. He hesitated for some moments; but, as we have already seen, M. Desalleux, in his functions -------------- next part -------------- A non-text attachment was scrubbed... Name: sook.jpg Type: image/jpeg Size: 10035 bytes Desc: not available URL: From pragmatists at sandman.ca Fri Aug 28 14:53:10 2009 From: pragmatists at sandman.ca (Risler) Date: Fri, 28 Aug 2009 16:53:10 +0200 Subject: [Fedora-suds-list] Ty were in high spirits; for the little Maud had Message-ID: <4A97EE71.2090106@sandman.ca> W ship, about five hundred feet long, and others nearly as large. "This big ditch across the isthmus has an average width of three hundred feet, or two hundred less than the length of the Ophir. She could not, therefore, get across the channel. There is a current in this water, and fierce winds sometimes blow across it, and both of these affect the inertia of the vessels. A comparatively small steamer like the Guardian-Mother can be twisted about by these causes, and her bow or her stern may catch on the sloping sides." "You have made out your case, Captain Ringgold; and the moral is that general truths are not invariably true," said Uncle Moses good-naturedly. "I only hope we shall not get aground," added Mrs. Belgrave. "We are fairly started now, and we have Lake Menzaleh on one side, and a low sandy plain, once covered with water, on the other," continued the commander. "It is difficult to believe that the swamp and lagoon on the starboard were once covered with fertile fields, watered by two of the branches of the Nile, where wheat was raised in abundance, from which Rome and other countries were supplied with food." "What vast flocks of birds!" exclaimed Mrs. Woolridge. "Those are flamingoes, just rising from their resting-place," added the captain. "They were white just now as we looked at them; notice the color of -------------- next part -------------- A non-text attachment was scrubbed... Name: coiling.jpg Type: image/jpeg Size: 8933 bytes Desc: not available URL: From frantzcj at gmail.com Fri Aug 28 19:53:07 2009 From: frantzcj at gmail.com (Chris Frantz) Date: Fri, 28 Aug 2009 14:53:07 -0500 Subject: [Fedora-suds-list] How to deal with this data type In-Reply-To: <4A9426C3.5070904@redhat.com> References: <4A9426C3.5070904@redhat.com> Message-ID: Jeff, I was able to 'punt' on this issue and I have what appears to be a functional workaround in suds-0.3.7: 1. In suds/umx/core.py, it appears you forgot to import 'merge' from sudsobject. 2. In suds/mx/appender.py, I changed ElementAppender to not raise the "raw XML not valid..." exception (comment out two lines). I can now use the raw XML trick to construct a FooThing manually. Furthermore, it appears that I can just use any FooThings handed back to me from the SOAP service. So far so good. If I run into any other problems with this issue, I'll let you know. I hope you can find and integrate a proper solution into the next release. Thanks, --Chris On Tue, Aug 25, 2009 at 1:00 PM, Jeff Ortel wrote: > Chris, > > I'll run through this example and get back with you. > > Regards, > > Jeff > > > On 08/24/2009 06:10 PM, Chris Frantz wrote: > >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.poulet at gmail.com Sat Aug 29 10:56:45 2009 From: paul.poulet at gmail.com (Paul Poulet) Date: Sat, 29 Aug 2009 12:56:45 +0200 Subject: [Fedora-suds-list] TypeNotFound exception : how to import XSD schema with Python Suds (version 0.3.6) SOAP library ? Message-ID: <6bb38c9c0908290356o471c808emc669c261fce42c27@mail.gmail.com> I'm trying to use SABRE travel web services with Python Suds 0.3.6, but one XSD seems not well-formed (maybe namespace is missing in this schema). from suds.client import Client wsdl = ' http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl' client = Client(wsdl, cache=None) Debug trace returns : .DEBUG:suds.wsdl:reading wsdl at: http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl... DEBUG:suds.transport.http:opening ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl) DEBUG:suds.metrics:sax ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl) duration: 406 (ms) DEBUG:suds.xsd.sxbasic:Import:0x7f90196fd5f0, importing ns=" http://webservices.sabre.com/sabreXML/2003/07", location="OTA_AirPriceLLSRQRS.xsd" DEBUG:suds.transport.http:opening ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQRS.xsd ) DEBUG:suds.metrics:sax ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQRS.xsd) duration: 504 (ms) DEBUG:suds.xsd.sxbasic:Include:0x7f90196fdf80, importing ns="None", location="OTA_AirPriceLLSRQ.xsd" DEBUG:suds.transport.http:opening ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd) DEBUG:suds.metrics:sax ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd) duration: 1.363 (seconds) DEBUG:suds.xsd.schema:built: Schema:0x7f9019708e60 (...) DEBUG:suds.xsd.query:(u'MessageHeader', http://www.ebxml.org/namespaces/messageHeader), found as: DEBUG:suds.xsd.query:(u'Security', http://schemas.xmlsoap.org/ws/2002/12/secext), found as: DEBUG:suds.xsd.query:(u'OTA_AirPriceRQ', http://webservices.sabre.com/sabreXML/2003/07), not-found . ---------------------------------------------------------------------- Ran 2 tests in 11.669s Type not found: '(OTA_AirPriceRQ, http://webservices.sabre.com/sabreXML/2003/07, )' It's logic : Python Suds loads OTA_AirPriceRQ in a "None" namespace. I read "fix broken schema" Python Suds documentation ( https://fedorahosted.org/suds/wiki/Documentation#FIXINGBROKENSCHEMAs): from suds.client import Client from suds.xsd.doctor import ImportDoctor, Import wsdl = ' http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl' imp = Import(' http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ', ' http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd') d = ImportDoctor(imp) client = Client(wsdl, cache=None, doctor=d) But script return another exception : .DEBUG:suds.wsdl:reading wsdl at: http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl... DEBUG:suds.transport.http:opening ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl) DEBUG:suds.metrics:sax ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl) duration: 617 (ms) DEBUG:suds.xsd.doctor:inserting: DEBUG:suds.xsd.sxbasic:Import:0xe6cf80, importing ns=" http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ", location=" http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd" DEBUG:suds.transport.http:opening ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd) DEBUG:suds.metrics:sax ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd) duration: 1.375 (seconds) DEBUG:suds.xsd.doctor:inserting: (...) Error maximum recursion depth exceeded while calling a Python object I don't understand how to use "doctor" functions. Somebody can help me, please ? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From griffin5 at cs.umbc.edu Sat Aug 29 17:30:27 2009 From: griffin5 at cs.umbc.edu (Wesley Griffin) Date: Sat, 29 Aug 2009 13:30:27 -0400 Subject: [Fedora-suds-list] Type not found: xs:complexType? Message-ID: Hi, I'm trying to use suds to work with the ServiceU WSDL . I used ImportDoctor to import both the XMLSchema and soap encoding: xml = Import('http://www.w3.org/2001/XMLSchema') xml.filter.add('http://webservices.serviceU.com/') enc = Import('http://schemas.xmlsoap.org/soap/encoding/') enc.filter.add('http://webservices.serviceU.com/') doc = ImportDoctor(xml, enc) and when I create and print a Client, everything appears happy: url = 'http://webservices.serviceu.com/v1/PublicCalendar.asmx?WSDL' client = Client(url, doctor=doc) print client [See attached file for the output] Now, when I try and call a method: try: result = client.service.GetCategories(ORG_ID, error) print result, error except Exception, e print "exception:", e I get the following output: exception: Type not found: 'xs:complexType' Unfortunately, I am not an expert when it comes to SOAP, so I'm not sure how to fix this error. Looking at the examples, the WSDL defines complex types as , however, the ServiceU WSDL has this: Do I need to be manually importing another schema? Thanks, Wes Thanks, Wes -------------- next part -------------- A non-text attachment was scrubbed... Name: output Type: application/octet-stream Size: 8709 bytes Desc: not available URL: From gloss at hiattwatson.com Sat Aug 29 20:03:20 2009 From: gloss at hiattwatson.com (Journot) Date: Sat, 29 Aug 2009 22:03:20 +0200 Subject: [Fedora-suds-list] ppy--John C. Fremont--Drake Message-ID: <4A99872D.9030606@hiattwatson.com> Mericans who were teaching the Chinese the English language. This night school is popular with young, ambitious Chinamen, for when they learn our language it is much easier for them to obtain work in stores and offices, and even as house servants. The books used had the Chinese words on one page and the English sentences opposite. S -------------- next part -------------- A non-text attachment was scrubbed... Name: tonelessness.jpg Type: image/jpeg Size: 9253 bytes Desc: not available URL: From cesar.canassa at gmail.com Sun Aug 30 22:37:56 2009 From: cesar.canassa at gmail.com (Cesar Canassa) Date: Sun, 30 Aug 2009 19:37:56 -0300 Subject: [Fedora-suds-list] Suds question (attribute vs element) Message-ID: Hello everyone, I have a service that its expecting a call like this: But when I run the method from sud I get the following output: client.service.initCloseItems(1) 1 The Suds is generating the maxNumberOfPackages as a element instead of a inputInitCloseItems attribute, why does it do that? This is XSD part: Thanks, Cesar -------------- next part -------------- An HTML attachment was scrubbed... URL: From babassu at mafo.nl Mon Aug 31 02:10:43 2009 From: babassu at mafo.nl (Carrino) Date: Mon, 31 Aug 2009 05:10:43 +0300 Subject: [Fedora-suds-list] O your really think he will? Because I'm sure I'll like your M Message-ID: <4A9B2F85.6030809@mafo.nl> Ngs will be somewhat clearer." He leaned back in his chair. Malone shifted his feet again and transferred his hat from his right to his left hand. "We put one of our test subjects in the insulated room," Dr. O'Connor said, "and connected him to the detector. He was to read from a book-- a book that was not too common. This was, of course, to obviate the chance that some other person nearby might be reading it, or might have read it in the past. We picked _The Blood is the Death_ by Hieronymus Melanchthon, which, as you may know, is a very rare book indeed." "Sure," Malone said. He had never heard of the book, but he was, after all, willing to take Dr. O'Connor's word for it. The telepathy expert went on: "Our test subject read it carefully, scanning rather than skimming. Cameras recorded the movements of his eyes in order for us to tell just what he was reading at any given moment, in order to correlate what was going on in his mind with the reactions of the machine's indicators, if you follow me." Malone nodded helplessly. "At the same time," Dr. O'Connor continued blithely, "we had Charlie in a nearby room, recording his babblings. Every so often, he would come out with quotations from _The Blood is the Death_, and these quotations corresponded exactly with what our test subject was reading at the time, and also corresponded with the abnormal fluctuations of the detector." Dr. O'Connor paused. Something, Malone realized, was expected of him. He thought of several responses and chose one. "I see," he said. "But the important thing here," Dr. O'Connor said, "is the timing. You see, Charlie was incapable of continued concentration. He could not keep his mind focused on another mind for very l -------------- next part -------------- A non-text attachment was scrubbed... Name: bevellings.jpg Type: image/jpeg Size: 10916 bytes Desc: not available URL: From paul.poulet at gmail.com Mon Aug 31 10:42:41 2009 From: paul.poulet at gmail.com (Paul Poulet) Date: Mon, 31 Aug 2009 12:42:41 +0200 Subject: [Fedora-suds-list] TypeNotFound exception : how to import XSD schema with Python Suds (version 0.3.6) SOAP library ? In-Reply-To: <6bb38c9c0908290356o471c808emc669c261fce42c27@mail.gmail.com> References: <6bb38c9c0908290356o471c808emc669c261fce42c27@mail.gmail.com> Message-ID: <6bb38c9c0908310342y39802027hdcc626fcec2b9c6@mail.gmail.com> I'm trying to use SABRE travel web services with Python Suds 0.3.6, but one XSD seems not well-formed (maybe namespace is missing in this schema). from suds.client import Client wsdl = ' http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl' client = Client(wsdl, cache=None) Debug trace returns : .DEBUG:suds.wsdl:reading wsdl at: http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl... DEBUG:suds.transport.http:opening ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl) DEBUG:suds.metrics:sax ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl) duration: 406 (ms) DEBUG:suds.xsd.sxbasic:Import:0x7f90196fd5f0, importing ns=" http://webservices.sabre.com/sabreXML/2003/07", location="OTA_AirPriceLLSRQRS.xsd" DEBUG:suds.transport.http:opening ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQRS.xsd ) DEBUG:suds.metrics:sax ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQRS.xsd) duration: 504 (ms) DEBUG:suds.xsd.sxbasic:Include:0x7f90196fdf80, importing ns="None", location="OTA_AirPriceLLSRQ.xsd" DEBUG:suds.transport.http:opening ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd) DEBUG:suds.metrics:sax ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd) duration: 1.363 (seconds) DEBUG:suds.xsd.schema:built: Schema:0x7f9019708e60 (...) DEBUG:suds.xsd.query:(u'MessageHeader', http://www.ebxml.org/namespaces/messageHeader), found as: DEBUG:suds.xsd.query:(u'Security', http://schemas.xmlsoap.org/ws/2002/12/secext), found as: DEBUG:suds.xsd.query:(u'OTA_AirPriceRQ', http://webservices.sabre.com/sabreXML/2003/07), not-found . ---------------------------------------------------------------------- Ran 2 tests in 11.669s Type not found: '(OTA_AirPriceRQ, http://webservices.sabre.com/sabreXML/2003/07, )' It's logic : Python Suds loads OTA_AirPriceRQ in a "None" namespace. I read "fix broken schema" Python Suds documentation ( https://fedorahosted.org/suds/wiki/Documentation#FIXINGBROKENSCHEMAs): from suds.client import Client from suds.xsd.doctor import ImportDoctor, Import wsdl = ' http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl' imp = Import(' http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ', ' http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd') d = ImportDoctor(imp) client = Client(wsdl, cache=None, doctor=d) But script return another exception : .DEBUG:suds.wsdl:reading wsdl at: http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl... DEBUG:suds.transport.http:opening ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl) DEBUG:suds.metrics:sax ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl) duration: 617 (ms) DEBUG:suds.xsd.doctor:inserting: DEBUG:suds.xsd.sxbasic:Import:0xe6cf80, importing ns=" http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ", location=" http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd" DEBUG:suds.transport.http:opening ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd) DEBUG:suds.metrics:sax ( http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd) duration: 1.375 (seconds) DEBUG:suds.xsd.doctor:inserting: (...) Error maximum recursion depth exceeded while calling a Python object I don't understand how to use "doctor" functions. Somebody can help me, please ? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jortel at redhat.com Mon Aug 31 15:06:15 2009 From: jortel at redhat.com (Jeff Ortel) Date: Mon, 31 Aug 2009 10:06:15 -0500 Subject: [Fedora-suds-list] TypeNotFound exception : how to import XSD schema with Python Suds (version 0.3.6) SOAP library ? In-Reply-To: <6bb38c9c0908290356o471c808emc669c261fce42c27@mail.gmail.com> References: <6bb38c9c0908290356o471c808emc669c261fce42c27@mail.gmail.com> Message-ID: <4A9BE6E7.1050802@redhat.com> Hey Paul, After quick review, I believe the implementation of is broken in suds. I'll run through it and get back with you. Regards, Jeff On 08/29/2009 05:56 AM, Paul Poulet wrote: > I'm trying to use SABRE travel web services with Python Suds 0.3.6, but > one XSD seems not well-formed (maybe namespace is missing in this schema). > > from suds.client import Client > wsdl = > 'http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl' > client = Client(wsdl, cache=None) > > Debug trace returns : > > .DEBUG:suds.wsdl:reading wsdl at: > http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl > ... > DEBUG:suds.transport.http:opening > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl) > DEBUG:suds.metrics:sax > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl) > duration: 406 (ms) > DEBUG:suds.xsd.sxbasic:Import:0x7f90196fd5f0, importing > ns="http://webservices.sabre.com/sabreXML/2003/07", > location="OTA_AirPriceLLSRQRS.xsd" > DEBUG:suds.transport.http:opening > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQRS.xsd) > DEBUG:suds.metrics:sax > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQRS.xsd) > duration: 504 (ms) > DEBUG:suds.xsd.sxbasic:Include:0x7f90196fdf80, importing ns="None", > location="OTA_AirPriceLLSRQ.xsd" > DEBUG:suds.transport.http:opening > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd) > DEBUG:suds.metrics:sax > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd) > duration: 1.363 (seconds) > DEBUG:suds.xsd.schema:built: > Schema:0x7f9019708e60 > (...) > DEBUG:suds.xsd.query:(u'MessageHeader', > http://www.ebxml.org/namespaces/messageHeader), found as: > > DEBUG:suds.xsd.query:(u'Security', > http://schemas.xmlsoap.org/ws/2002/12/secext), found as: > > DEBUG:suds.xsd.query:(u'OTA_AirPriceRQ', > http://webservices.sabre.com/sabreXML/2003/07), not-found > . > ---------------------------------------------------------------------- > Ran 2 tests in 11.669s > > Type not found: '(OTA_AirPriceRQ, > http://webservices.sabre.com/sabreXML/2003/07, )' > > It's logic : Python Suds loads OTA_AirPriceRQ in a "None" namespace. > I read "fix broken schema" Python Suds documentation > (https://fedorahosted.org/suds/wiki/Documentation#FIXINGBROKENSCHEMAs): > > from suds.client import Client > from suds.xsd.doctor import ImportDoctor, Import > wsdl = > 'http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl' > imp = > Import('http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ', 'http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd') > d = ImportDoctor(imp) > client = Client(wsdl, cache=None, doctor=d) > > But script return another exception : > .DEBUG:suds.wsdl:reading wsdl at: > http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl > ... > DEBUG:suds.transport.http:opening > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl) > DEBUG:suds.metrics:sax > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl) > duration: 617 (ms) > DEBUG:suds.xsd.doctor:inserting: xmlns:xs="http://www.w3.org/2001/XMLSchema" > namespace="http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ" > schemaLocation="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd"/> > DEBUG:suds.xsd.sxbasic:Import:0xe6cf80, importing > ns="http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ", > location="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd" > DEBUG:suds.transport.http:opening > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd) > DEBUG:suds.metrics:sax > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd) > duration: 1.375 (seconds) > DEBUG:suds.xsd.doctor:inserting: xmlns:xs="http://www.w3.org/2001/XMLSchema" > namespace="http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ" > schemaLocation="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd"/> > (...) > Error maximum recursion depth exceeded while calling a Python object > > > I don't understand how to use "doctor" functions. Somebody can help me, > please ? > Thank you. > > > > ------------------------------------------------------------------------ > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3360 bytes Desc: S/MIME Cryptographic Signature URL: From jortel at redhat.com Mon Aug 31 16:20:07 2009 From: jortel at redhat.com (Jeff Ortel) Date: Mon, 31 Aug 2009 11:20:07 -0500 Subject: [Fedora-suds-list] TypeNotFound exception : how to import XSD schema with Python Suds (version 0.3.6) SOAP library ? In-Reply-To: <6bb38c9c0908310342y39802027hdcc626fcec2b9c6@mail.gmail.com> References: <6bb38c9c0908290356o471c808emc669c261fce42c27@mail.gmail.com> <6bb38c9c0908310342y39802027hdcc626fcec2b9c6@mail.gmail.com> Message-ID: <4A9BF837.6010605@redhat.com> Paul, Yup, the was broken. Fixed in r558 and will be released in 0.3.7. I tried with your wsdl and loads fine. Thanks for bringing this to our attention. Regards, Jeff On 08/31/2009 05:42 AM, Paul Poulet wrote: > > I'm trying to use SABRE travel web services with Python Suds 0.3.6, but > one XSD seems not well-formed (maybe namespace is missing in this schema). > > from suds.client import Client > wsdl = > 'http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl' > client = Client(wsdl, cache=None) > > Debug trace returns : > > .DEBUG:suds.wsdl:reading wsdl at: > http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl > ... > DEBUG:suds.transport.http:opening > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl) > DEBUG:suds.metrics:sax > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl) > duration: 406 (ms) > DEBUG:suds.xsd.sxbasic:Import:0x7f90196fd5f0, importing > ns="http://webservices.sabre.com/sabreXML/2003/07", > location="OTA_AirPriceLLSRQRS.xsd" > DEBUG:suds.transport.http:opening > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQRS.xsd) > DEBUG:suds.metrics:sax > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQRS.xsd) > duration: 504 (ms) > DEBUG:suds.xsd.sxbasic:Include:0x7f90196fdf80, importing ns="None", > location="OTA_AirPriceLLSRQ.xsd" > DEBUG:suds.transport.http:opening > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd) > DEBUG:suds.metrics:sax > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd) > duration: 1.363 (seconds) > DEBUG:suds.xsd.schema:built: > Schema:0x7f9019708e60 > (...) > DEBUG:suds.xsd.query:(u'MessageHeader', > http://www.ebxml.org/namespaces/messageHeader), found as: > > DEBUG:suds.xsd.query:(u'Security', > http://schemas.xmlsoap.org/ws/2002/12/secext), found as: > > DEBUG:suds.xsd.query:(u'OTA_AirPriceRQ', > http://webservices.sabre.com/sabreXML/2003/07), not-found > . > ---------------------------------------------------------------------- > Ran 2 tests in 11.669s > > Type not found: '(OTA_AirPriceRQ, > http://webservices.sabre.com/sabreXML/2003/07, )' > > It's logic : Python Suds loads OTA_AirPriceRQ in a "None" namespace. > I read "fix broken schema" Python Suds documentation > (https://fedorahosted.org/suds/wiki/Documentation#FIXINGBROKENSCHEMAs): > > from suds.client import Client > from suds.xsd.doctor import ImportDoctor, Import > wsdl = > 'http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl' > imp = > Import('http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ', 'http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd') > d = ImportDoctor(imp) > client = Client(wsdl, cache=None, doctor=d) > > But script return another exception : > .DEBUG:suds.wsdl:reading wsdl at: > http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl > ... > DEBUG:suds.transport.http:opening > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl) > DEBUG:suds.metrics:sax > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl) > duration: 617 (ms) > DEBUG:suds.xsd.doctor:inserting: xmlns:xs="http://www.w3.org/2001/XMLSchema" > namespace="http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ" > schemaLocation="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd"/> > DEBUG:suds.xsd.sxbasic:Import:0xe6cf80, importing > ns="http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ", > location="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd" > DEBUG:suds.transport.http:opening > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd) > DEBUG:suds.metrics:sax > (http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd) > duration: 1.375 (seconds) > DEBUG:suds.xsd.doctor:inserting: xmlns:xs="http://www.w3.org/2001/XMLSchema" > namespace="http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ" > schemaLocation="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd"/> > (...) > Error maximum recursion depth exceeded while calling a Python object > > > I don't understand how to use "doctor" functions. Somebody can help me, > please ? > Thank you. > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3360 bytes Desc: S/MIME Cryptographic Signature URL: From paul.poulet at gmail.com Mon Aug 31 22:11:31 2009 From: paul.poulet at gmail.com (Paul Poulet) Date: Tue, 1 Sep 2009 00:11:31 +0200 Subject: [Fedora-suds-list] TypeNotFound exception : how to import XSD schema with Python Suds (version 0.3.6) SOAP library ? In-Reply-To: <4A9BF837.6010605@redhat.com> References: <6bb38c9c0908290356o471c808emc669c261fce42c27@mail.gmail.com> <6bb38c9c0908310342y39802027hdcc626fcec2b9c6@mail.gmail.com> <4A9BF837.6010605@redhat.com> Message-ID: <6bb38c9c0908311511u6bc6183p5a6a7b7dce99e1a8@mail.gmail.com> Jeff, Thank a lot ! I'll try with 0.3.7 version. Do you know when 0.3.7 will be released ? Python Suds is a great project. I'm not good developer but if I can contribute : say me ! Regards, PS. Sorry for my poor english : I'm french :-) Thank you very much. 2009/8/31 Jeff Ortel > Paul, > > Yup, the was broken. Fixed in r558 and will be released in > 0.3.7. I tried with your wsdl and loads fine. > > Thanks for bringing this to our attention. > > Regards, > > Jeff > > > On 08/31/2009 05:42 AM, Paul Poulet wrote: > >> >> I'm trying to use SABRE travel web services with Python Suds 0.3.6, but >> one XSD seems not well-formed (maybe namespace is missing in this schema). >> >> from suds.client import Client >> wsdl = >> ' >> http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl >> ' >> client = Client(wsdl, cache=None) >> >> Debug trace returns : >> >> .DEBUG:suds.wsdl:reading wsdl at: >> >> http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl >> ... >> DEBUG:suds.transport.http:opening >> ( >> http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl >> ) >> DEBUG:suds.metrics:sax >> ( >> http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl >> ) >> duration: 406 (ms) >> DEBUG:suds.xsd.sxbasic:Import:0x7f90196fd5f0, importing >> ns="http://webservices.sabre.com/sabreXML/2003/07", >> location="OTA_AirPriceLLSRQRS.xsd" >> DEBUG:suds.transport.http:opening >> ( >> http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQRS.xsd >> ) >> DEBUG:suds.metrics:sax >> ( >> http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQRS.xsd >> ) >> duration: 504 (ms) >> DEBUG:suds.xsd.sxbasic:Include:0x7f90196fdf80, importing ns="None", >> location="OTA_AirPriceLLSRQ.xsd" >> DEBUG:suds.transport.http:opening >> ( >> http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd >> ) >> DEBUG:suds.metrics:sax >> ( >> http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd >> ) >> duration: 1.363 (seconds) >> DEBUG:suds.xsd.schema:built: >> Schema:0x7f9019708e60 >> (...) >> DEBUG:suds.xsd.query:(u'MessageHeader', >> http://www.ebxml.org/namespaces/messageHeader), found as: >> >> DEBUG:suds.xsd.query:(u'Security', >> http://schemas.xmlsoap.org/ws/2002/12/secext), found as: >> >> DEBUG:suds.xsd.query:(u'OTA_AirPriceRQ', >> http://webservices.sabre.com/sabreXML/2003/07), not-found >> . >> ---------------------------------------------------------------------- >> Ran 2 tests in 11.669s >> >> Type not found: '(OTA_AirPriceRQ, >> http://webservices.sabre.com/sabreXML/2003/07, )' >> >> It's logic : Python Suds loads OTA_AirPriceRQ in a "None" namespace. >> I read "fix broken schema" Python Suds documentation >> (https://fedorahosted.org/suds/wiki/Documentation#FIXINGBROKENSCHEMAs): >> >> from suds.client import Client >> from suds.xsd.doctor import ImportDoctor, Import >> wsdl = >> ' >> http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl >> ' >> imp = >> Import('http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ', >> ' >> http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd >> ') >> d = ImportDoctor(imp) >> client = Client(wsdl, cache=None, doctor=d) >> >> But script return another exception : >> .DEBUG:suds.wsdl:reading wsdl at: >> >> http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl >> ... >> DEBUG:suds.transport.http:opening >> ( >> http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl >> ) >> DEBUG:suds.metrics:sax >> ( >> http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl >> ) >> duration: 617 (ms) >> DEBUG:suds.xsd.doctor:inserting: > xmlns:xs="http://www.w3.org/2001/XMLSchema" >> namespace=" >> http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ" >> schemaLocation=" >> http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd >> "/> >> DEBUG:suds.xsd.sxbasic:Import:0xe6cf80, importing >> ns="http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ", >> location=" >> http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd >> " >> DEBUG:suds.transport.http:opening >> ( >> http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd >> ) >> DEBUG:suds.metrics:sax >> ( >> http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd >> ) >> duration: 1.375 (seconds) >> DEBUG:suds.xsd.doctor:inserting: > xmlns:xs="http://www.w3.org/2001/XMLSchema" >> namespace=" >> http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ" >> schemaLocation=" >> http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd >> "/> >> (...) >> Error maximum recursion depth exceeded while calling a Python object >> >> >> I don't understand how to use "doctor" functions. Somebody can help me, >> please ? >> Thank you. >> >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> fedora-suds-list mailing list >> fedora-suds-list at redhat.com >> https://www.redhat.com/mailman/listinfo/fedora-suds-list >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: