Python web服务clien

2024-05-18 21:04:53 发布

您现在位置:Python中文网/ 问答频道 /正文

有人能从下面的JAX-wsapi用python制作webservice客户机吗?在

https://109.231.73.12:8090/API?wsdl

当我运行这个虚拟服务器时,它是自签名的。用户名和密码都是“query123”

我们可以让它在php中正常工作,而不是python。在

所以一个能说明你是如何做到这一点的很好的例子

谢谢


Tags: httpsapiweb密码客户机service用户名例子
1条回答
网友
1楼 · 发布于 2024-05-18 21:04:53

^{}库使其成为一个管理单元Python:

>>> from suds.client import Client
>>> url = 'https://109.231.73.12:8090/API?wsdl'
>>> client = Client(url, username='qwerty123', password='qwerty123')
>>> client.service.addition(1, 2)
3
>>> client.service.hello('John')
HelloJohn
>>> client.service.xToThePowerOfy(2, 16)
18
>>> print client # automagic documentation

Suds ( https://fedorahosted.org/suds/ )  version: 0.4 (beta)  build: R685-20100513

Service ( BasicService ) tns="http://service.basic.com/"
   Prefixes (1)
      ns0 = "http://service.basic.com/"
   Ports (1):
      (BasicPort)
         Methods (3):
            addition(xs:int x, xs:int y, )
            hello(xs:string name, )
            xToThePowerOfy(xs:int x, xs:int y, )
         Types (6):
            addition
            additionResponse
            hello
            helloResponse
            xToThePowerOfy
            xToThePowerOfyResponse

相关问题 更多 >

    热门问题