From jortel at redhat.com Wed Oct 1 14:56:09 2008 From: jortel at redhat.com (Jeff Ortel) Date: Wed, 01 Oct 2008 10:56:09 -0400 Subject: [Fedora-suds-list] Suds 0.3.1 released Message-ID: <48E38F89.3060506@redhat.com> All, Suds version 0.3.1 has been released. See https://fedorahosted.org/suds/ for details. If you never upgraded to 0.3, you can disregard the description below. In short, this is a quick follow up to the 0.3 release that enhanced suds support for multi-port services but also made the burden on the user more then necessary. After more consideration (and a good night sleep), it seemed obvious that a few changes would mitigate the impact on users: 1) filter out the non-soap bindings - they were causing the real trouble in 0.2.9 and earlier; 2) be smarter about how suds selects the port. Since most servers are happy with any of the soap (1.1 and 1.2) bindings, ambigious references to methods when invoking them without the port qualification will work just fine in almost every case. I don't want to make the user do anything when it's not necessary. Suds is supposed to be simple & easy :). In most cases, uses on 0.2.9 and earlier will not have to update there code when moving to 0.3.1 as they might have in if they upgraded to 0.3. So, if you've because of the upgrade to 0.3 you've updated your code to: > > client.setport() > -or- > > client.merge_methods() <--- remove this for sure, it no longer exists. > -or (port-qualified invocations) - > > client.service.. > you can probably revert these changes after upgrading to 0.3.1. In some cases, however, you may really need to specify the port. This will be obvious if after upgrading to 0.3.1 and reverting your code to the way it was when working with 0.2.9 and earlier, you are getting MethodNotFound exceptions or WebFaults from your server. Sorry for any inconvenience! Regards, Jeff From jortel at redhat.com Tue Oct 7 14:06:23 2008 From: jortel at redhat.com (Jeff Ortel) Date: Tue, 07 Oct 2008 10:06:23 -0400 Subject: [Fedora-suds-list] SOAP MultiRefs Message-ID: <48EB6CDF.4070504@redhat.com> All, The latest (r300) on trunk contains the 1st pass at SOAP MultiRef support. I've tested against my Axis server but I would appreciate anyone with access to a server that spits out MultiRefs giving it a try. Also, does anyone know of a *public* server (that uses MultiRefs) that I can add to the public.py test module? Thanks, Jeff From reneverschoor at gmail.com Sat Oct 11 15:13:51 2008 From: reneverschoor at gmail.com (Rene) Date: Sat, 11 Oct 2008 17:13:51 +0200 Subject: [Fedora-suds-list] How to start with suds and JIRA? Message-ID: Hi, Having used some of the other libs to write a Python SOAP client, I stumbled upon suds. A relief to see something that's actively being developed, not dependent on outdated libs, and looks easy to use :) And that's exactly what I need. I don't want to become a SOAP expert, my focus is on the client logic. Alas, I hit my first problem. I want to write a client for JIRA (www.atlassian.com). Atlassian exposes their own JIRA instance to the public, so you can test the client against their JIRA. To get access you need to login as user 'soaptester' with password 'soaptester'. Anyone can run this code: import logging from suds.client import Client logging.basicConfig(level=logging.INFO) url = 'http://jira.atlassian.com/rpc/soap/jirasoapservice-v2?wsdl' client = Client(url) # Login auth = client.service.login('soaptester', 'soaptester') # Try to retrieve user information user = client.service.getUser(auth, 'soaptester') print user This results in: ERROR:suds.resolver:(@href) not-found WARNING:suds.bindings.unmarshaller:attribute (href) type, not-found (RemoteUser){ _href = "#id0" } I'm probably missing something stoopidly basic. Any help would be much appreciated. Cheers, rev From jortel at redhat.com Tue Oct 14 13:33:16 2008 From: jortel at redhat.com (Jeff Ortel) Date: Tue, 14 Oct 2008 09:33:16 -0400 Subject: [Fedora-suds-list] How to start with suds and JIRA? In-Reply-To: References: Message-ID: <48F49F9C.4020403@redhat.com> Rene, Alright, just tried this and works using the latest suds version 0.3.2 on trunk. After looking at your error a little more closely, it seems you're using suds 0.3.1 (or earlier). So, to work with this service you need to install the latest (development) version. I added a new section for early development releases under the download section on the project wiki ( https://fedorahosted.org/suds/ ). Regards, Jeff Rene wrote: > Hi, > > Having used some of the other libs to write a Python SOAP client, I > stumbled upon suds. > A relief to see something that's actively being developed, not > dependent on outdated libs, and looks easy to use :) > And that's exactly what I need. > I don't want to become a SOAP expert, my focus is on the client logic. > Alas, I hit my first problem. > > I want to write a client for JIRA (www.atlassian.com). > Atlassian exposes their own JIRA instance to the public, so you can > test the client against their JIRA. > To get access you need to login as user 'soaptester' with password 'soaptester'. > Anyone can run this code: > > import logging > from suds.client import Client > logging.basicConfig(level=logging.INFO) > url = 'http://jira.atlassian.com/rpc/soap/jirasoapservice-v2?wsdl' > client = Client(url) > # Login > auth = client.service.login('soaptester', 'soaptester') > # Try to retrieve user information > user = client.service.getUser(auth, 'soaptester') > print user > > This results in: > > ERROR:suds.resolver:(@href) not-found > WARNING:suds.bindings.unmarshaller:attribute (href) type, not-found > (RemoteUser){ > _href = "#id0" > } > > I'm probably missing something stoopidly basic. > Any help would be much appreciated. > > Cheers, > rev > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From reneverschoor at gmail.com Wed Oct 15 18:25:09 2008 From: reneverschoor at gmail.com (Rene) Date: Wed, 15 Oct 2008 20:25:09 +0200 Subject: [Fedora-suds-list] How to start with suds and JIRA? In-Reply-To: <48F49F9C.4020403@redhat.com> References: <48F49F9C.4020403@redhat.com> Message-ID: Hi Jeff, I was indeed using 0.3.1 (should have mentioned that...). Downloaded 0.3.2 and can confirm my code example is working. Now hitting another problem, not sure yet if it's my stupidity or a suds problem ;) Cheers, rev From belred at gmail.com Sat Oct 18 00:11:17 2008 From: belred at gmail.com (Bryan) Date: Fri, 17 Oct 2008 17:11:17 -0700 Subject: [Fedora-suds-list] authentication error Message-ID: <38f48f590810171711i3ee41d6em6ef40ce1b7a6913f@mail.gmail.com> i'm trying to use suds to connect to scrumworks pro which is hosted in our company. i'm able login with ZSI and i'm able to login manually to the web client, so i know my name and password is correct. i followed the ZSI code internal code and it's simply using http basic auth to authenticate. i followed the suds basic auth example, but i get an unauthorized exception when calling any service api as shown at the end of this email. any ideas why i'm getting this error with suds? thanks, bryan ----- import urllib2 from suds.client import Client baseurl = 'http://scrumworks.mycompany.com/' url = 'http://scrumworks.mycompany.com/scrumworks-api/scrumworks?wsdl' passman = urllib2.HTTPPasswordMgrWithDefaultRealm() passman.add_password(None, baseurl, 'myname', 'mypassword') opener = urllib2.build_opener(urllib2.HTTPBasicAuthHandler(passman)) client = Client(url, urlopener=opener) print client user = client.factory.create('ns0:UserWSO') print user print client.service.getProducts() ----- following is the output ---- suds ( version=0.3.1 ) service ( ScrumWorksService ) prefixes (1) ns0 = "http://api.scrumworks.danube.com/ScrumWorks/types" ports (1): (ScrumWorksEndpointPort) methods (70): addBacklogItemsToTheme(ns0:BacklogItemWSO[] arrayOfBacklogItemWSO_1, ns0:ThemeWSO ThemeWSO_2, ) createBacklogItem(ns0:BacklogItemWSO BacklogItemWSO_1, ) createImpediment(ns0:ImpedimentWSO ImpedimentWSO_1, ns0:ProductWSO ProductWSO_2, ) createRelease(ns0:ReleaseWSO ReleaseWSO_1, ns0:ProductWSO ProductWSO_2, ) createSprint(ns0:SprintWSO SprintWSO_1, ) createSprintWithNonWorkingDays(ns0:SprintWSO SprintWSO_1, xs:long[] arrayOfLong_2, ) createTask(ns0:TaskWSO TaskWSO_1, ) createTheme(ns0:ThemeWSO ThemeWSO_1, ns0:ProductWSO ProductWSO_2, ) deleteBacklogItem(ns0:BacklogItemWSO BacklogItemWSO_1, ) deleteEmptyRelease(ns0:ReleaseWSO ReleaseWSO_1, ) deleteEmptySprint(ns0:SprintWSO SprintWSO_1, ) deleteTask(ns0:TaskWSO TaskWSO_1, ) deleteTaskEstimate(ns0:TaskWSO TaskWSO_1, xs:dateTime Date_2, ) deleteTheme(ns0:ThemeWSO ThemeWSO_1, ) getActiveBacklogItems(ns0:ProductWSO ProductWSO_1, ) getActiveBacklogItemsForRelease(ns0:ReleaseWSO ReleaseWSO_1, ) getActiveBacklogItemsForSprint(ns0:SprintWSO SprintWSO_1, ) getAuthenticatedTest() getBacklogItem(xs:long Long_1, ) getBacklogItemByKey(xs:string String_1, ) getBacklogItemEstimates(ns0:BacklogItemWSO BacklogItemWSO_1, ) getBacklogItems(xs:long[] arrayOfLong_1, ) getBacklogItemsForTheme(ns0:ThemeWSO ThemeWSO_1, ) getDashboardStatistics(ns0:ProductWSO ProductWSO_1, xs:dateTime Date_2, xs:dateTime Date_3, ) getImpediments(ns0:ProductWSO ProductWSO_1, ) getInactiveBacklogItems(ns0:ProductWSO ProductWSO_1, ) getPermissions() getProducts() getReleases(ns0:ProductWSO ProductWSO_1, ) getSprintNonWorkingDays(xs:long Long_1, ) getSprints(ns0:ProductWSO ProductWSO_1, ) getSprintsForTeam(ns0:ProductWSO ProductWSO_1, ns0:TeamWSO TeamWSO_2, ) getTaskEstimates(ns0:TaskWSO TaskWSO_1, ) getTaskHoursSpentForTask(xs:string String_1, ns0:TaskWSO TaskWSO_2, ) getTasks(ns0:BacklogItemWSO BacklogItemWSO_1, ) getTasksForSprint(ns0:SprintWSO SprintWSO_1, ) getTeam(ns0:SprintWSO SprintWSO_1, ) getTeamMembers(ns0:TeamWSO TeamWSO_1, ) getTeams() getTeamsForProduct(ns0:ProductWSO ProductWSO_1, ) getTest() getThemes(ns0:ProductWSO ProductWSO_1, ) getTimezone() getTotalTaskHoursSpentForTask(ns0:TaskWSO TaskWSO_1, ) getUsers() getUsersForSprint(ns0:SprintWSO SprintWSO_1, ) markBacklogItemInactive(ns0:BacklogItemWSO BacklogItemWSO_1, ) mergeThemes(ns0:ThemeWSO ThemeWSO_1, ns0:ThemeWSO ThemeWSO_2, ) moveBacklogItemAfter(ns0:BacklogItemWSO BacklogItemWSO_1, ns0:BacklogItemWSO BacklogItemWSO_2, ) moveBacklogItemIntoRelease(ns0:BacklogItemWSO BacklogItemWSO_1, ns0:ReleaseWSO ReleaseWSO_2, ) moveBacklogItemIntoSprint(ns0:BacklogItemWSO BacklogItemWSO_1, ns0:SprintWSO SprintWSO_2, ) moveBacklogItemsAfter(ns0:BacklogItemWSO[] arrayOfBacklogItemWSO_1, ns0:BacklogItemWSO BacklogItemWSO_2, ) moveBacklogItemsIntoRelease(ns0:BacklogItemWSO[] arrayOfBacklogItemWSO_1, ns0:ReleaseWSO ReleaseWSO_2, ) moveBacklogItemsIntoSprint(ns0:BacklogItemWSO[] arrayOfBacklogItemWSO_1, ns0:SprintWSO SprintWSO_2, ) moveReleaseAfter(ns0:ReleaseWSO ReleaseWSO_1, ns0:ReleaseWSO ReleaseWSO_2, ) moveReleaseBefore(ns0:ReleaseWSO ReleaseWSO_1, ns0:ReleaseWSO ReleaseWSO_2, ) moveTaskAfter(ns0:TaskWSO TaskWSO_1, ns0:TaskWSO TaskWSO_2, ) moveTaskIntoBacklogItem(ns0:TaskWSO TaskWSO_1, ns0:BacklogItemWSO BacklogItemWSO_2, ) moveTasksAfter(ns0:TaskWSO[] arrayOfTaskWSO_1, ns0:TaskWSO TaskWSO_2, ) moveTasksIntoBacklogItem(ns0:TaskWSO[] arrayOfTaskWSO_1, ns0:BacklogItemWSO BacklogItemWSO_2, ) removeBacklogItemsFromTheme(ns0:BacklogItemWSO[] arrayOfBacklogItemWSO_1, ns0:ThemeWSO ThemeWSO_2, ) renameTheme(ns0:ThemeWSO ThemeWSO_1, xs:string String_2, ) updateBacklogItem(ns0:BacklogItemWSO BacklogItemWSO_1, ) updateImpediment(ns0:ImpedimentWSO ImpedimentWSO_1, ) updateRelease(ns0:ReleaseWSO ReleaseWSO_1, ) updateSprint(ns0:SprintWSO SprintWSO_1, ) updateSprintWithNonWorkingDays(ns0:SprintWSO SprintWSO_1, xs:long[] arrayOfLong_2, ) updateTask(ns0:TaskWSO TaskWSO_1, ) updateTaskEstimate(ns0:TaskWSO TaskWSO_1, xs:dateTime Date_2, xs:int int_3, ) updateTaskHoursSpent(ns0:UserWSO UserWSO_1, ns0:TaskWSO TaskWSO_2, xs:dateTime Date_3, xs:double double_4, ) types (297): ns0:getAuthenticatedTest ns0:getAuthenticatedTestResponse ns0:getBacklogItem ns0:getBacklogItemResponse ns0:getBacklogItemByKey ns0:getBacklogItemByKeyResponse ns0:getBacklogItemEstimates ns0:getBacklogItemEstimatesResponse ns0:BacklogItemEstimateWSO ns0:getBacklogItems ns0:getBacklogItemsResponse ns0:getBacklogItemsForTheme ns0:PermissionWSO ns0:getProducts ns0:getProductsResponse ns0:getReleases ns0:getReleasesResponse ns0:getSprintNonWorkingDays ns0:getSprintNonWorkingDaysResponse ns0:getSprints ns0:getSprintsResponse ns0:getSprintsForTeam ns0:updateSprintResponse ns0:updateSprintWithNonWorkingDays ns0:updateSprintWithNonWorkingDaysResponse ns0:updateTask ns0:updateTaskResponse ns0:updateTaskEstimate ns0:updateTaskEstimateResponse ns0:updateTaskHoursSpent ns0:updateTaskHoursSpentResponse ns0:addBacklogItemsToTheme ns0:addBacklogItemsToThemeResponse ns0:ServerException ns0:getTeams ns0:getTeamsResponse ns0:getTasksForSprintResponse ns0:getTeam ns0:getTeamResponse ns0:getTeamMembers ns0:getTeamMembersResponse ns0:UserWSO ns0:getTasksResponse ns0:getTasksForSprint ns0:moveBacklogItemIntoSprintResponse ns0:moveBacklogItemsAfter ns0:moveBacklogItemsAfterResponse ns0:moveBacklogItemsIntoRelease ns0:moveBacklogItemsIntoReleaseResponse ns0:moveBacklogItemsIntoSprint ns0:moveBacklogItemsIntoSprintResponse ns0:moveReleaseAfter ns0:moveReleaseAfterResponse ns0:moveReleaseBefore ns0:createBacklogItem ns0:createBacklogItemResponse ns0:createImpediment ns0:createImpedimentResponse ns0:createRelease ns0:createReleaseResponse ns0:createSprint ns0:createSprintResponse ns0:createSprintWithNonWorkingDays ns0:createSprintWithNonWorkingDaysResponse ns0:createTask ns0:createTaskResponse ns0:createTheme ns0:createThemeResponse ns0:deleteBacklogItem ns0:deleteBacklogItemResponse ns0:deleteEmptyRelease ns0:deleteEmptyReleaseResponse ns0:deleteEmptySprint ns0:deleteEmptySprintResponse ns0:deleteTask ns0:deleteTaskResponse ns0:deleteTaskEstimate ns0:deleteTaskEstimateResponse ns0:deleteTheme ns0:deleteThemeResponse ns0:getActiveBacklogItems ns0:getActiveBacklogItemsResponse ns0:getActiveBacklogItemsForRelease ns0:getActiveBacklogItemsForReleaseResponse ns0:getActiveBacklogItemsForSprint ns0:getActiveBacklogItemsForSprintResponse ns0:getAuthenticatedTest ns0:getActiveBacklogItemsResponse ns0:deleteThemeResponse ns0:getActiveBacklogItems ns0:deleteTaskResponse ns0:deleteTheme ns0:deleteTaskEstimate ns0:getActiveBacklogItemsForRelease ns0:deleteTaskEstimateResponse ns0:getActiveBacklogItemsForSprintResponse ns0:getActiveBacklogItemsForReleaseResponse ns0:getActiveBacklogItemsForSprint ns0:removeBacklogItemsFromTheme ns0:removeBacklogItemsFromThemeResponse ns0:renameTheme ns0:renameThemeResponse ns0:updateBacklogItem ns0:updateBacklogItemResponse ns0:updateImpediment ns0:updateImpedimentResponse ns0:updateRelease ns0:updateReleaseResponse ns0:updateSprint ns0:getBacklogItemsForThemeResponse ns0:getDashboardStatistics ns0:getDashboardStatisticsResponse ns0:DashboardReleaseStatisticsWSO ns0:getImpediments ns0:getImpedimentsResponse ns0:getInactiveBacklogItems ns0:getInactiveBacklogItemsResponse ns0:getPermissions ns0:getPermissionsResponse ns0:getUsersForSprint ns0:getUsersForSprintResponse ns0:markBacklogItemInactive ns0:markBacklogItemInactiveResponse ns0:mergeThemes ns0:mergeThemesResponse ns0:moveBacklogItemAfter ns0:moveBacklogItemAfterResponse ns0:moveBacklogItemIntoRelease ns0:moveBacklogItemIntoReleaseResponse ns0:moveBacklogItemIntoSprint ns0:getAuthenticatedTestResponse ns0:getBacklogItem ns0:getBacklogItemResponse ns0:getBacklogItemByKey ns0:getBacklogItemByKeyResponse ns0:getBacklogItemEstimates ns0:getBacklogItemEstimatesResponse ns0:getBacklogItems ns0:getBacklogItemsResponse ns0:getBacklogItemsForTheme ns0:getBacklogItemsForThemeResponse ns0:getDashboardStatistics ns0:getDashboardStatisticsResponse ns0:getImpediments ns0:getImpedimentsResponse ns0:getInactiveBacklogItems ns0:getInactiveBacklogItemsResponse ns0:getPermissions ns0:getPermissionsResponse ns0:getProducts ns0:getProductsResponse ns0:getReleases ns0:getReleasesResponse ns0:getSprintNonWorkingDays ns0:getSprintNonWorkingDaysResponse ns0:getSprints ns0:getSprintsResponse ns0:getSprintsForTeam ns0:getSprintsForTeamResponse ns0:getTaskEstimates ns0:getTaskEstimatesResponse ns0:getTaskHoursSpentForTask ns0:getTaskHoursSpentForTaskResponse ns0:getTasks ns0:getTaskHoursSpentForTaskResponse ns0:getTaskEstimates ns0:getTasks ns0:getTaskEstimatesResponse ns0:TaskEstimateWSO ns0:getTaskHoursSpentForTask ns0:TeamWSO ns0:getSprintsForTeamResponse ns0:TaskHoursSpentWSO ns0:moveReleaseBeforeResponse ns0:moveTaskAfter ns0:moveTaskAfterResponse ns0:moveTaskIntoBacklogItem ns0:moveTaskIntoBacklogItemResponse ns0:moveTasksAfter ns0:moveTasksAfterResponse ns0:moveTasksIntoBacklogItem ns0:moveTasksIntoBacklogItemResponse ns0:getTeamsForProduct ns0:getTeamsForProductResponse ns0:getTest ns0:getTestResponse ns0:getThemes ns0:getThemesResponse ns0:getTimezone ns0:getTimezoneResponse ns0:getTotalTaskHoursSpentForTask ns0:getTotalTaskHoursSpentForTaskResponse ns0:getUsers ns0:getUsersResponse ns0:getTasksResponse ns0:getTasksForSprint ns0:getTasksForSprintResponse ns0:getTeam ns0:getTeamResponse ns0:getTeamMembers ns0:getTeamMembersResponse ns0:getTeams ns0:getTeamsResponse ns0:getTeamsForProduct ns0:getTeamsForProductResponse ns0:getTest ns0:getTestResponse ns0:getThemes ns0:getThemesResponse ns0:getTimezone ns0:getTimezoneResponse ns0:getTotalTaskHoursSpentForTask ns0:getTotalTaskHoursSpentForTaskResponse ns0:getUsers ns0:getUsersResponse ns0:getUsersForSprint ns0:getUsersForSprintResponse ns0:markBacklogItemInactive ns0:markBacklogItemInactiveResponse ns0:mergeThemes ns0:mergeThemesResponse ns0:moveBacklogItemAfter ns0:moveBacklogItemAfterResponse ns0:moveBacklogItemIntoRelease ns0:moveBacklogItemIntoReleaseResponse ns0:moveBacklogItemIntoSprint ns0:moveBacklogItemIntoSprintResponse ns0:moveBacklogItemsAfter ns0:moveBacklogItemsAfterResponse ns0:moveBacklogItemsIntoRelease ns0:moveBacklogItemsIntoReleaseResponse ns0:moveBacklogItemsIntoSprint ns0:moveBacklogItemsIntoSprintResponse ns0:moveReleaseAfter ns0:moveReleaseAfterResponse ns0:moveReleaseBefore ns0:moveReleaseBeforeResponse ns0:moveTaskAfter ns0:moveTaskAfterResponse ns0:moveTaskIntoBacklogItem ns0:moveTaskIntoBacklogItemResponse ns0:moveTasksAfter ns0:moveTasksAfterResponse ns0:moveTasksIntoBacklogItem ns0:moveTasksIntoBacklogItemResponse ns0:removeBacklogItemsFromTheme ns0:removeBacklogItemsFromThemeResponse ns0:renameTheme ns0:renameThemeResponse ns0:updateBacklogItem ns0:updateBacklogItemResponse ns0:updateImpediment ns0:updateImpedimentResponse ns0:updateRelease ns0:updateReleaseResponse ns0:updateSprint ns0:updateSprintResponse ns0:updateSprintWithNonWorkingDays ns0:updateSprintWithNonWorkingDaysResponse ns0:updateTask ns0:updateTaskResponse ns0:updateTaskEstimate ns0:updateTaskHoursSpent ns0:updateTaskEstimateResponse ns0:updateTaskHoursSpentResponse ns0:addBacklogItemsToTheme ns0:BacklogItemWSO ns0:BusinessWeightWSO ns0:ThemeWSO ns0:addBacklogItemsToThemeResponse ns0:ServerException ns0:createBacklogItem ns0:createBacklogItemResponse ns0:createImpediment ns0:ImpedimentWSO ns0:ProductWSO ns0:createImpedimentResponse ns0:createRelease ns0:ReleaseWSO ns0:createTaskResponse ns0:createTheme ns0:createThemeResponse ns0:deleteBacklogItem ns0:deleteBacklogItemResponse ns0:deleteEmptyRelease ns0:deleteEmptyReleaseResponse ns0:deleteEmptySprint ns0:deleteEmptySprintResponse ns0:deleteTask ns0:SprintWSO ns0:createTask ns0:createSprintWithNonWorkingDaysResponse ns0:TaskWSO ns0:createReleaseResponse ns0:createSprint ns0:createSprintWithNonWorkingDays ns0:createSprintResponse (UserWSO){ displayName = None id = None name = None userName = None } Traceback (most recent call last): File "", line 231, in run_nodebug File "C:\src\sw\sw.py", line 18, in print client.service.getTest() File "C:\python\python25\lib\site-packages\python_suds-0.3.1-py2.5.egg\suds\client.py", line 283, in __call__ File "C:\python\python25\lib\site-packages\python_suds-0.3.1-py2.5.egg\suds\client.py", line 398, in invoke File "C:\python\python25\lib\site-packages\python_suds-0.3.1-py2.5.egg\suds\client.py", line 435, in send File "C:\python\python25\lib\site-packages\python_suds-0.3.1-py2.5.egg\suds\client.py", line 518, in failed Exception: (401, 'Unauthorized') From reneverschoor at gmail.com Sat Oct 18 16:35:33 2008 From: reneverschoor at gmail.com (Rene) Date: Sat, 18 Oct 2008 18:35:33 +0200 Subject: [Fedora-suds-list] arrayType not-found Message-ID: Hi Jeff, Using 0.3.2 beta I'm now able to retrieve some info from JIRA (www.atlassian.com), but not all calls work. The code below can be run by anyone as the site is public and is accessible using the 'soaptester' account. import logging from suds.client import Client logging.basicConfig(level=logging.INFO) url = "http://jira.atlassian.com/rpc/soap/jirasoapservice-v2?wsdl" client = Client(url) # Login auth = client.service.login('soaptester', 'soaptester') # OK - Retrieve user information print client.service.getUser(auth, 'soaptester') # OK - Retrieve project info print client.service.getProjectByKey(auth, 'TST') # NOK - Retrieve issue info print client.service.getIssue(auth, 'TST-3410') The getIssue call results in: ERROR:suds.resolver:(@arrayType) not-found WARNING:suds.bindings.unmarshaller:attribute (arrayType) type, not-found ERROR:suds.resolver:(affectsVersions) not-found Traceback (most recent call last): File "t.py", line 18, in print client.service.getIssue(auth, 'TST-3410') File "c:\python25\lib\site-packages\python_suds-0.3.2-py2.5.egg\suds\client.py", line 283, in __call__ File "c:\python25\lib\site-packages\python_suds-0.3.2-py2.5.egg\suds\client.py", line 398, in invoke File "c:\python25\lib\site-packages\python_suds-0.3.2-py2.5.egg\suds\client.py", line 429, in send File "c:\python25\lib\site-packages\python_suds-0.3.2-py2.5.egg\suds\client.py", line 490, in succeeded File "c:\python25\lib\site-packages\python_suds-0.3.2-py2.5.egg\suds\bindings\binding.py", line 141, in get_reply File "c:\python25\lib\site-packages\python_suds-0.3.2-py2.5.egg\suds\bindings\unmarshaller.py", line 296, in process File "c:\python25\lib\site-packages\python_suds-0.3.2-py2.5.egg\suds\bindings\unmarshaller.py", line 86, in process File "c:\python25\lib\site-packages\python_suds-0.3.2-py2.5.egg\suds\bindings\unmarshaller.py", line 102, in append File "c:\python25\lib\site-packages\python_suds-0.3.2-py2.5.egg\suds\bindings\unmarshaller.py", line 174, in append_children File "c:\python25\lib\site-packages\python_suds-0.3.2-py2.5.egg\suds\bindings\unmarshaller.py", line 102, in append File "c:\python25\lib\site-packages\python_suds-0.3.2-py2.5.egg\suds\bindings\unmarshaller.py", line 174, in append_children File "c:\python25\lib\site-packages\python_suds-0.3.2-py2.5.egg\suds\bindings\unmarshaller.py", line 100, in append File "c:\python25\lib\site-packages\python_suds-0.3.2-py2.5.egg\suds\bindings\unmarshaller.py", line 316, in start suds.TypeNotFound: Type not found: 'affectsVersions' Cheers, rev From reneverschoor at gmail.com Sun Oct 19 20:14:18 2008 From: reneverschoor at gmail.com (Rene) Date: Sun, 19 Oct 2008 22:14:18 +0200 Subject: [Fedora-suds-list] Re: arrayType not-found In-Reply-To: References: Message-ID: Hi, Answering my own post :) I saw version 0.3.2 Beta (r319) was yesterday made available for download. Installed it, got another error, recalled Tips & Tricks section about namespaces, added some extra lines et voila! import logging > from suds.client import Client > from suds.xsd.sxbasic import Import > > logging.basicConfig(level=logging.INFO) > > ns = 'http://schemas.xmlsoap.org/soap/encoding/' > Import.bind(ns) > > url = "http://jira.atlassian.com/rpc/soap/jirasoapservice-v2?wsdl" > client = Client(url) > # Login > auth = client.service.login('soaptester', 'soaptester') > > # OK - Retrieve issue info > print client.service.getIssue(auth, 'TST-3410') > I'm a happy bunny :) Cheers, rev -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at itldo.org Fri Oct 24 20:51:29 2008 From: tim at itldo.org (Tim Butler) Date: Fri, 24 Oct 2008 14:51:29 -0600 Subject: [Fedora-suds-list] assign user-defined soap headers using Elements? Message-ID: <49023551.8040002@itldo.org> Hi, I'm new to this list. First, thanks much for an easy to use library that worked (mostly) out of the box. I have a request that is related to Ticket #6 - Add user defined soap headers https://fedorahosted.org/suds/ticket/6 I need to add custom header elements for authentication that have *not* been defined by the wsdl document. The existing soapheaders mechanism only supports values obtained from client.Factory. My current workaround is to pass Element objects in soapheaders and then crudely inject them in the header: =================================================================== --- binding.py (revision 322) +++ binding.py (working copy) @@ -289,6 +289,10 @@ """ n = 0 content = [] + for h in [ e for e in headers if isinstance(e, Element) ]: + content.append(h) + headers = [ x for x in headers if not isinstance(x, Element)] + if len(headers): if method.soap.input.header is None: raise SoapHeadersNotPermitted(method.name) Could some hook be provided to transform the request doc before sending it so that I could do something similar. I also currently have the need to fix up some type attributes... but that's different message :) Or should I be extending the client.Factory (or whatever schema of types it uses) to support these elements? Thanks -tim From tim at itldo.org Fri Oct 24 22:26:31 2008 From: tim at itldo.org (Tim Butler) Date: Fri, 24 Oct 2008 16:26:31 -0600 Subject: [Fedora-suds-list] names/type confusion on nested elements Message-ID: <49024B97.5080803@itldo.org> I'm having a problem which, with my limited knowledge of xml schema and soap, appears that suds is confusing deeply nested element names with types. For all I know, they should be equivalent and interchangeable, but my Axis SOAP server says not. WSDL snippet: Marshalled request: NAME TEST Axis server gags with error: org.xml.sax.SAXException: No deserializer for {.../model}testId But if I replace the type tns1:testId with xs:string in the raw request, then the request succeeds using: TEST instead of: TEST I can provide the files to reproduce this if it is considered a suds defect. Otherwise I suppose it is an axis defect if axis cannot recognize some equivalence of tns1:testId to xs:string. If it is an axis defect then I need a suds hook (which I have already desperately implemented) so I can workaround the problem and substitute 'type' attributes on the raw request text or document. Thanks By the way, the current subversion release is parsing multiRefs from our Axis server ** THANK YOU **. -tim From geraint.williams at irdeto.com Sat Oct 25 12:10:45 2008 From: geraint.williams at irdeto.com (Geraint Williams) Date: Sat, 25 Oct 2008 14:10:45 +0200 Subject: [Fedora-suds-list] xs:dateTime (nillable) included in message Message-ID: dateTime fields are included in the SOAP message, even when they have no value (fields of other data types are not included - which is desired behavior) Using SUDS : 0.3.1 Server is WCF (.NET) Extract from the xsd: (sorry no public available wsdl, and not sure if I can distribute all wsdl / xsd) Code: from suds.client import Client url = 'http://blah.blah.svc?wsdl' client = Client(url) authen = client.factory.create('ns3:AuthenticationHeader') print authen authen.UserName = 'XXX' authen.Proof = 'XXX' wo = client.factory.create('ns4:WorkOrder') wo.Id = 3202 try: res = client.service.ReopenWorkOrder(wo, soapheaders=authen) except Exception, e: print e print client.last_sent() message (from client.last_sent()) XXX XXX 3202 Thanks, GEraint. From him at online.de Thu Oct 30 15:17:55 2008 From: him at online.de (=?ISO-8859-15?Q?Joachim_K=F6nig?=) Date: Thu, 30 Oct 2008 16:17:55 +0100 Subject: [Fedora-suds-list] Re: using suds client to determine types for parameters and of response In-Reply-To: <4909C6AE.8050803@online.de> References: <4909C6AE.8050803@online.de> Message-ID: <4909D023.8020305@online.de> Joachim K?nig wrote: > Hello, > > I'm using suds (among its normal usage) also to check method > definitions. > > It very easy to determine the methods and the names and types of > the method parameters by looking at: > > methods = client.sd.ports[0][1] Using types instead of ports gives me the information I want. Sorry for the noise, should have searched a bit more. Joachim From him at online.de Thu Oct 30 14:37:34 2008 From: him at online.de (=?ISO-8859-15?Q?Joachim_K=F6nig?=) Date: Thu, 30 Oct 2008 15:37:34 +0100 Subject: [Fedora-suds-list] using suds client to determine types for parameters and of response Message-ID: <4909C6AE.8050803@online.de> Hello, I'm using suds (among its normal usage) also to check method definitions. It very easy to determine the methods and the names and types of the method parameters by looking at: methods = client.sd.ports[0][1] e.g., using the internal information from suds after it parsed the WSDL. It returns a list of (name, params) tuples where the params elements contain, among other things, the name and the type of the arguments. I use this to make sure, a webservice I have to use, confirms to some written specification. Now I'd like to do the same for the response, but I could not find out how to use suds to tell me the type of the respons of a method (without actually calling the method and analyzing the returned object). Can I get this infomation from suds? Thank you