标签:
ladon-0.9.35 在生成描述时 将参数 search_frase 转成了 search-frase,这导致在客户端suds调用时命名参数不可用。。应该是个bug
<element name="listBands"> <complexType> <sequence> <element name="search-frase" type="xsd:string"/> </sequence> </complexType> </element>
# -*- coding: utf-8 -*- ‘‘‘ ‘‘‘ base_url = ‘http://localhost:8088/‘ url = base_url +‘Calculator/soap/description‘ ## 使用 SUDS调用 Ladon服务 from suds.client import Client as SudsClient client = SudsClient(url=url, cache=None) result = client.service.add(a=23,b=45) print(result ) def testAlbumService(): print("\n\nTesting AlbumService:\n") # Load the AlbumService description album_client = SudsClient(base_url + ‘/AlbumService/soap/description‘) # Fetch albums containing the substring "Zoo" in the album title jsonwsp_resp = album_client.service.listAlbums(‘Bowie‘) #search_frase= print (jsonwsp_resp) # Fetch all bands containing the substring "Bowie" in the band name jsonwsp_resp = album_client.service.listBands(‘Bowie‘) #search_frase= print (jsonwsp_resp) testAlbumService() print ( "xx")
标签:
原文地址:http://my.oschina.net/cppblog/blog/530664