标签归档:soap

如何在Python中使用WSDL(SOAP)Web服务?

问题:如何在Python中使用WSDL(SOAP)Web服务?

我想在Python中使用基于WSDL SOAP的Web服务。我看过Dive Into Python代码,但是SOAPpy模块在Python 2.5下不起作用。

我已经尝试使用肥皂水(:类型未找到:“项目” suds.TypeNotFound),这部分工作,但打破了某些类型。

我也查看了Client,但这似乎不支持WSDL。

我看过ZSI,但它看起来非常复杂。有人有任何示例代码吗?

WSDL是https://ws.pingdom.com/soap/PingdomAPI.wsdl,可与PHP 5 SOAP客户端配合使用。

I want to use a WSDL SOAP based web service in Python. I have looked at the Dive Into Python code but the SOAPpy module does not work under Python 2.5.

I have tried using suds which works partly, but breaks with certain types (suds.TypeNotFound: Type not found: ‘item’).

I have also looked at Client but this does not appear to support WSDL.

And I have looked at ZSI but it looks very complex. Does anyone have any sample code for it?

The WSDL is https://ws.pingdom.com/soap/PingdomAPI.wsdl and works fine with the PHP 5 SOAP client.


回答 0

我建议您看看SUDS

“ Suds是用于使用Web服务的轻量级SOAP python客户端。”

I would recommend that you have a look at SUDS

“Suds is a lightweight SOAP python client for consuming Web Services.”


回答 1

有一个相对较新的库,它很有前途,尽管文档仍然很少,但看起来很干净并且是pythonic的python zeep

另请参见此答案的示例。

There is a relatively new library which is very promising and albeit still poorly documented, seems very clean and pythonic: python zeep.

See also this answer for an example.


回答 2

我最近偶然发现了同样的问题。这是我的解决方案的摘要:

所需的基本组成代码块

以下是客户端应用程序所需的基本代码块

  1. 会话请求部分:请求与提供者进行会话
  2. 会话认证部分:向提供者提供凭据
  3. 客户端部分:创建客户端
  4. 安全标题部分:将WS-Security标头添加到客户端
  5. 消耗部分:根据需要消耗可用的操作(或方法)

您需要什么模块?

许多建议使用Python模块,例如urllib2;但是,这些模块都不起作用-至少对于该特定项目不起作用。

因此,这是您需要获取的模块列表。首先,您需要从以下链接下载并安装最新版本的suds:

pypi.python.org/pypi/suds-jurko/0.4.1.jurko.2

此外,您需要分别从以下链接下载和安装请求和suds_requests模块(免责声明:我是新来此发布者,因此我现在不能发布多个链接)。

pypi.python.org/pypi/requests

pypi.python.org/pypi/suds_requests/0.1

一旦成功下载并安装了这些模块,就可以了。

代码

按照前面概述的步骤,代码如下所示:导入:

import logging
from suds.client import Client
from suds.wsse import *
from datetime import timedelta,date,datetime,tzinfo
import requests
from requests.auth import HTTPBasicAuth
import suds_requests

会话请求和身份验证:

username=input('Username:')
password=input('password:')
session = requests.session()
session.auth=(username, password)

创建客户端:

client = Client(WSDL_URL, faults=False, cachingpolicy=1, location=WSDL_URL, transport=suds_requests.RequestsTransport(session))

添加WS-Security标头:

...
addSecurityHeader(client,username,password)
....

def addSecurityHeader(client,username,password):
    security=Security()
    userNameToken=UsernameToken(username,password)
    timeStampToken=Timestamp(validity=600)
    security.tokens.append(userNameToken)
    security.tokens.append(timeStampToken)
    client.set_options(wsse=security)

请注意,此方法将创建图1所示的安全标头。因此,您的实现可能会有所不同,具体取决于所使用服务的所有者提供的正确安全标头格式。

消耗相关的方法(或操作):

result=client.service.methodName(Inputs)

正在记录

在这种实现中的最佳实践之一是记录日志,以查看通信是如何执行的。万一有问题,它使调试变得容易。以下代码进行基本日志记录。但是,除了代码中描述的内容外,您还可以记录通信的许多方面。

logging.basicConfig(level=logging.INFO) 
logging.getLogger('suds.client').setLevel(logging.DEBUG) 
logging.getLogger('suds.transport').setLevel(logging.DEBUG)

结果:

这是我的情况的结果。请注意,服务器返回了HTTP200。这是HTTP请求响应的标准成功代码。

(200, (collectionNodeLmp){
   timestamp = 2014-12-03 00:00:00-05:00
   nodeLmp[] = 
      (nodeLmp){
         pnodeId = 35010357
         name = "YADKIN"
         mccValue = -0.19
         mlcValue = -0.13
         price = 36.46
         type = "500 KV"
         timestamp = 2014-12-03 01:00:00-05:00
         errorCodeId = 0
      },
      (nodeLmp){
         pnodeId = 33138769
         name = "ZION 1"
         mccValue = -0.18
         mlcValue = -1.86
         price = 34.75
         type = "Aggregate"
         timestamp = 2014-12-03 01:00:00-05:00
         errorCodeId = 0
      },
 })

I recently stumbled up on the same problem. Here is the synopsis of my solution:

Basic constituent code blocks needed

The following are the required basic code blocks of your client application

  1. Session request section: request a session with the provider
  2. Session authentication section: provide credentials to the provider
  3. Client section: create the Client
  4. Security Header section: add the WS-Security Header to the Client
  5. Consumption section: consume available operations (or methods) as needed

What modules do you need?

Many suggested to use Python modules such as urllib2 ; however, none of the modules work-at least for this particular project.

So, here is the list of the modules you need to get. First of all, you need to download and install the latest version of suds from the following link:

pypi.python.org/pypi/suds-jurko/0.4.1.jurko.2

Additionally, you need to download and install requests and suds_requests modules from the following links respectively ( disclaimer: I am new to post in here, so I can’t post more than one link for now).

pypi.python.org/pypi/requests

pypi.python.org/pypi/suds_requests/0.1

Once you successfully download and install these modules, you are good to go.

The code

Following the steps outlined earlier, the code looks like the following: Imports:

import logging
from suds.client import Client
from suds.wsse import *
from datetime import timedelta,date,datetime,tzinfo
import requests
from requests.auth import HTTPBasicAuth
import suds_requests

Session request and authentication:

username=input('Username:')
password=input('password:')
session = requests.session()
session.auth=(username, password)

Create the Client:

client = Client(WSDL_URL, faults=False, cachingpolicy=1, location=WSDL_URL, transport=suds_requests.RequestsTransport(session))

Add WS-Security Header:

...
addSecurityHeader(client,username,password)
....

def addSecurityHeader(client,username,password):
    security=Security()
    userNameToken=UsernameToken(username,password)
    timeStampToken=Timestamp(validity=600)
    security.tokens.append(userNameToken)
    security.tokens.append(timeStampToken)
    client.set_options(wsse=security)

Please note that this method creates the security header depicted in Fig.1. So, your implementation may vary depending on the correct security header format provided by the owner of the service you are consuming.

Consume the relevant method (or operation) :

result=client.service.methodName(Inputs)

Logging:

One of the best practices in such implementations as this one is logging to see how the communication is executed. In case there is some issue, it makes debugging easy. The following code does basic logging. However, you can log many aspects of the communication in addition to the ones depicted in the code.

logging.basicConfig(level=logging.INFO) 
logging.getLogger('suds.client').setLevel(logging.DEBUG) 
logging.getLogger('suds.transport').setLevel(logging.DEBUG)

Result:

Here is the result in my case. Note that the server returned HTTP 200. This is the standard success code for HTTP request-response.

(200, (collectionNodeLmp){
   timestamp = 2014-12-03 00:00:00-05:00
   nodeLmp[] = 
      (nodeLmp){
         pnodeId = 35010357
         name = "YADKIN"
         mccValue = -0.19
         mlcValue = -0.13
         price = 36.46
         type = "500 KV"
         timestamp = 2014-12-03 01:00:00-05:00
         errorCodeId = 0
      },
      (nodeLmp){
         pnodeId = 33138769
         name = "ZION 1"
         mccValue = -0.18
         mlcValue = -1.86
         price = 34.75
         type = "Aggregate"
         timestamp = 2014-12-03 01:00:00-05:00
         errorCodeId = 0
      },
 })

回答 3

现在(截止到2008年),所有可用于Python的SOAP库都非常烂。我建议尽可能避免使用SOAP。上次我们被迫使用Python中的SOAP Web服务时,我们用C#编写了一个包装器,该包装器一方面处理SOAP,另一方面则使COM退出。

Right now (as of 2008), all the SOAP libraries available for Python suck. I recommend avoiding SOAP if possible. The last time we where forced to use a SOAP web service from Python, we wrote a wrapper in C# that handled the SOAP on one side and spoke COM out the other.


回答 4

Zeep是一个适合Python的不错的SOAP库,它可以满足您的要求:http : //docs.python-zeep.org

Zeep is a decent SOAP library for Python that matches what you’re asking for: http://docs.python-zeep.org


回答 5

我定期寻找一个令人满意的答案,但是到目前为止还没有运气。我使用soapUI +请求+体力劳动。

我上次要这样做时放弃并使用了Java ,而上次我这样做时仅放弃了几次,但这并不是必需的。

去年在Project Place的RESTful API中成功使用了请求库之后,我想到也许我可以以类似的方式手动滚动要发送的SOAP请求。

事实证明,这并不是很困难,但是这耗时且容易出错,尤其是如果字段名称不一致(我当前正在使用的字段具有“ jobId”,“ JobId”和“ JobID”。我使用soapUI加载) WSDL,以便更轻松地提取端点等并执行一些手动测试。到目前为止,我很幸运没有受到我正在使用的任何WSDL更改的影响。

I periodically search for a satisfactory answer to this, but no luck so far. I use soapUI + requests + manual labour.

I gave up and used Java the last time I needed to do this, and simply gave up a few times the last time I wanted to do this, but it wasn’t essential.

Having successfully used the requests library last year with Project Place’s RESTful API, it occurred to me that maybe I could just hand-roll the SOAP requests I want to send in a similar way.

Turns out that’s not too difficult, but it is time consuming and prone to error, especially if fields are inconsistently named (the one I’m currently working on today has ‘jobId’, JobId’ and ‘JobID’. I use soapUI to load the WSDL to make it easier to extract endpoints etc and perform some manual testing. So far I’ve been lucky not to have been affected by changes to any WSDL that I’m using.


回答 6

并非如此,SOAPpy不适用于Python 2.5-它可以工作,尽管它非常简单,而且确实非常基础。如果您想与任何更复杂的Web服务进行对话,则ZSI是您唯一的朋友。

我发现的真正有用的演示位于http://www.ebi.ac.uk/Tools/webservices/tutorials/python-这确实帮助我了解了ZSI的工作原理。

It’s not true SOAPpy does not work with Python 2.5 – it works, although it’s very simple and really, really basic. If you want to talk to any more complicated webservice, ZSI is your only friend.

The really useful demo I found is at http://www.ebi.ac.uk/Tools/webservices/tutorials/python – this really helped me to understand how ZSI works.


回答 7

如果您要自己动手,则强烈建议您访问http://effbot.org/zone/element-soap.htm

If you’re rolling your own I’d highly recommend looking at http://effbot.org/zone/element-soap.htm.


回答 8

SOAPpy现在已过时,已经被ZSL取代了AFAIK。这是有争议的,因为在Python 2.5或Python 2.6上我都无法工作,更不用说编译了。

SOAPpy is now obsolete, AFAIK, replaced by ZSL. It’s a moot point, because I can’t get either one to work, much less compile, on either Python 2.5 or Python 2.6


回答 9

#!/usr/bin/python
# -*- coding: utf-8 -*-
# consume_wsdl_soap_ws_pss.py
import logging.config
from pysimplesoap.client import SoapClient

logging.config.dictConfig({
    'version': 1,
    'formatters': {
        'verbose': {
            'format': '%(name)s: %(message)s'
        }
    },
    'handlers': {
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
            'formatter': 'verbose',
        },
    },
    'loggers': {
        'pysimplesoap.helpers': {
            'level': 'DEBUG',
            'propagate': True,
            'handlers': ['console'],
        },
    }
})

WSDL_URL = 'http://www.webservicex.net/stockquote.asmx?WSDL'
client = SoapClient(wsdl=WSDL_URL, ns="web", trace=True)
client['AuthHeaderElement'] = {'username': 'someone', 'password': 'nottelling'}

#Discover operations
list_of_services = [service for service in client.services]
print(list_of_services)

#Discover params
method = client.services['StockQuote']

response = client.GetQuote(symbol='GOOG')
print('GetQuote: {}'.format(response['GetQuoteResult']))
#!/usr/bin/python
# -*- coding: utf-8 -*-
# consume_wsdl_soap_ws_pss.py
import logging.config
from pysimplesoap.client import SoapClient

logging.config.dictConfig({
    'version': 1,
    'formatters': {
        'verbose': {
            'format': '%(name)s: %(message)s'
        }
    },
    'handlers': {
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
            'formatter': 'verbose',
        },
    },
    'loggers': {
        'pysimplesoap.helpers': {
            'level': 'DEBUG',
            'propagate': True,
            'handlers': ['console'],
        },
    }
})

WSDL_URL = 'http://www.webservicex.net/stockquote.asmx?WSDL'
client = SoapClient(wsdl=WSDL_URL, ns="web", trace=True)
client['AuthHeaderElement'] = {'username': 'someone', 'password': 'nottelling'}

#Discover operations
list_of_services = [service for service in client.services]
print(list_of_services)

#Discover params
method = client.services['StockQuote']

response = client.GetQuote(symbol='GOOG')
print('GetQuote: {}'.format(response['GetQuoteResult']))

用于测试soap客户端的公共免费Web服务[关闭]

问题:用于测试soap客户端的公共免费Web服务[关闭]

是否有任何公开可用的SOAP 1.2 / WSDL 2.0兼容的免费Web服务用于测试基于Python的soap客户端库(例如Zolera SOAP Infrastructure)?

到目前为止,在我看来,Google Web API可能是唯一的选择。

否则,如何测试符合SOAP 1.2的客户端库?

Are there any publicly available SOAP 1.2/WSDL 2.0 compliant free web services for testing a Python based soap client library (e.g. Zolera SOAP Infrastructure)?

So far, it appears to me that Google Web API may be the only option.

Otherwise, how can one test a SOAP 1.2 compliant client library?


回答 0

这里有一堆:

http://www.webservicex.net/WS/wscatlist.aspx

只需在Google上搜索“免费WebService”或“开放WebService”,您就会发现大量的开放SOAP端点。

记住,可以通过在URL中添加?WSDL来从任何ASMX端点获取WSDL。

There is a bunch on here:

http://www.webservicex.net/WS/wscatlist.aspx

Just google for “Free WebService” or “Open WebService” and you’ll find tons of open SOAP endpoints.

Remember, you can get a WSDL from any ASMX endpoint by adding ?WSDL to the url.


有哪些适用于Python的SOAP客户端库,它们的文档在哪里?[关闭]

问题:有哪些适用于Python的SOAP客户端库,它们的文档在哪里?[关闭]

我以前从未使用过SOAP,而且对Python还是有点陌生​​。我这样做是为了使自己熟悉这两种技术。我已经安装了SOAPlib,并尝试阅读其Client文档,但是我不太了解它。我还有什么可以寻找的更适合用作Python的SOAP客户端库的东西吗?

编辑:以防万一,我正在使用Python 2.6。

I’ve never used SOAP before and I’m sort of new to Python. I’m doing this to get myself acquainted with both technologies. I’ve installed SOAPlib and I’ve tried to read their Client documentation, but I don’t understand it too well. Is there anything else I can look into which is more suited for being a SOAP Client library for Python?

Edit: Just in case it helps, I’m using Python 2.6.


回答 0

更新(2016):

如果只需要SOAP客户端,则有一个维护良好的库,称为zeep。它同时支持Python 2和3 :)


更新:

除了上面提到的内容外,我还将参考Python WebServices页面,该页面始终是最新的,其中包含针对SOAP和所有其他Webservice类型的所有主动维护和推荐的模块。


不幸的是,目前,我认为没有“最好的” Python SOAP库。每种主流产品都有其优点和缺点。

较旧的库:

  • SOAPy:是“最佳”的,但不再维护。在Python 2.5+上不起作用

  • ZSI:使用起来非常痛苦,并且开发速度很慢。有一个名为“ SOAPpy”的模块,该模块不同于SOAPy(上述)。

“较新的”库:

  • SUDS:非常Pythonic,易于创建消耗WSDL的SOAP客户端。创建SOAP服务器要困难一些。(此软件包不适用于Python3。有关Python3,请参见SUDS-py3)

  • SUDS-py3SUDS的Python3版本

  • spyne:创建服务器很容易,创建客户端要困难一些。缺少文档。

  • ladon:创建服务器非常类似于soaplib(使用装饰器)。Ladon同时公开了比SOAP更多的接口,而无需额外的用户代码。

  • pysimplesoap:非常轻巧,但对客户端和服务器均有用-包括web2py附带的web2py服务器集成。

  • SOAPpy:与上面的ZSI链接上托管的废弃SOAPpy不同,该版本实际上一直维护到2011年,现在似乎也被废弃了。
  • soaplib:易于使用的python库,用于编写和调用soap Web服务。用soaplib编写的Web服务非常简单,轻便,可以与其他SOAP实现一起很好地使用,并且可以作为WSGI应用程序进行部署。
  • osa:快速/精简易用的SOAP python客户端库。

其中,我只是个人使用SUDS,我非常喜欢它。

Update (2016):

If you only need SOAP client, there is well maintained library called zeep. It supports both Python 2 and 3 :)


Update:

Additionally to what is mentioned above, I will refer to Python WebServices page which is always up-to-date with all actively maintained and recommended modules to SOAP and all other webservice types.


Unfortunately, at the moment, I don’t think there is a “best” Python SOAP library. Each of the mainstream ones available has its own pros and cons.

Older libraries:

  • SOAPy: Was the “best,” but no longer maintained. Does not work on Python 2.5+

  • ZSI: Very painful to use, and development is slow. Has a module called “SOAPpy”, which is different than SOAPy (above).

“Newer” libraries:

  • SUDS: Very Pythonic, and easy to create WSDL-consuming SOAP clients. Creating SOAP servers is a little bit more difficult. (This package does not work with Python3. For Python3 see SUDS-py3)

  • SUDS-py3: The Python3 version of SUDS

  • spyne: Creating servers is easy, creating clients a little bit more challenging. Documentation is somewhat lacking.

  • ladon: Creating servers is much like in soaplib (using a decorator). Ladon exposes more interfaces than SOAP at the same time without extra user code needed.

  • pysimplesoap: very lightweight but useful for both client and server – includes a web2py server integration that ships with web2py.

  • SOAPpy: Distinct from the abandoned SOAPpy that’s hosted at the ZSI link above, this version was actually maintained until 2011, now it seems to be abandoned too.
  • soaplib: Easy to use python library for writing and calling soap web services. Webservices written with soaplib are simple, lightweight, work well with other SOAP implementations, and can be deployed as WSGI applications.
  • osa: A fast/slim easy to use SOAP python client library.

Of the above, I’ve only used SUDS personally, and I liked it a lot.


回答 1

我遵循了对该问题的其他答案的建议,并尝试了SUDS。在“愤怒”使用它之后,我必须同意:SUDS非常好!强烈推荐!

我确实从代理后面调用基于HTTPS的Web服务时遇到麻烦。在撰写本文时,这会影响所有使用的 Python Web服务客户端urllib2,因此我将在此处记录该解决方案。

urllib2python 2.6.2及更低版本附带的模块不会CONNECT向HTTPS-over-HTTP-proxy会话的代理发出。这将导致超时,或者如果您幸运的话,将出现以下错误:

abort: error: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

这是Python错误跟踪器上的issue1424152。错误报告附带有补丁程序,可在Python 2.x和Python 3.x中修复此问题。这个问题已经解决

I followed the advice of other answers to this question and gave SUDS a try. After using it “in anger” I must agree: SUDS is very nice! Highly recommended!

I did run into trouble calling HTTPS-based web services from behind a proxy. At the time of this writing, this affects all Python web-service clients that use urllib2, so I’ll document the solution here.

The urllib2 module shipping with python 2.6.2 and below will not issue a CONNECT to the proxy for HTTPS-over-HTTP-proxy sessions. This results in a long timeout, or if you are lucky, an error that looks like:

abort: error: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

This was issue1424152 on the Python bug tracker. There are patches attached to the bug report that will fix this in Python 2.x and Python 3.x. The issue is already fixed.


回答 2

我对SUDS https://fedorahosted.org/suds有很好的经验

使用他们的TestSuite作为文档。

I had good experience with SUDS https://fedorahosted.org/suds

Used their TestSuite as documentation.


回答 3

SUDS是必经之路,毫无疑问。

SUDS is the way to go, no question about it.


回答 4

只是针对查看SUDS的人员提供的FYI警告,在此票证解决之前,SUDS不支持WSDL中的“ choice”标签:

https://fedorahosted.org/suds/ticket/342

请参阅: 泡沫和选择标签

Just an FYI warning for people looking at SUDS, until this ticket is resolved, SUDS does not support the “choice” tag in WSDL:

https://fedorahosted.org/suds/ticket/342

see: suds and choice tag


回答 5

SUDS易于使用,但不能保证可以重入。如果您将WSDL Client()对象保留在线程应用程序中以获得更好的性能,则存在一定的风险。解决此风险的方法clone()方法会引发不可恢复的Python 5508错误,该错误似乎可以打印,但并没有真正引发异常。可能会造成混淆,但是可以。到目前为止,它仍然是最好的Python SOAP客户端。

SUDS is easy to use, but is not guaranteed to be re-entrant. If you’re keeping the WSDL Client() object around in a threaded app for better performance, there’s some risk involved. The solution to this risk, the clone() method, throws the unrecoverable Python 5508 bug, which seems to print but not really throw an exception. Can be confusing, but it works. It is still by far the best Python SOAP client.


回答 6

我们发布了一个新的库:PySimpleSOAP,它为简单而功能强大的客户端/服务器提供支持。它的目标是:易用性和灵活性(不需要类,不需要自动生成的代码或xml),WSDL内省和生成,符合WS-I标准,兼容性(包括Java AXIS,.NET和Jboss WS)。它包含在Web2Py中以启用全栈解决方案(补充其他受支持的协议,例如XML_RPC,JSON,AMF-RPC等)。

如果有人正在学习SOAP或想对其进行调查,那么我认为这是一个不错的选择。

We released a new library: PySimpleSOAP, that provides support for simple and functional client/server. It goals are: ease of use and flexibility (no classes, autogenerated code or xml is required), WSDL introspection and generation, WS-I standard compliance, compatibility (including Java AXIS, .NET and Jboss WS). It is included into Web2Py to enable full-stack solutions (complementing other supported protocols such as XML_RPC, JSON, AMF-RPC, etc.).

If someone is learning SOAP or want to investigate it, I think it is a good choice to start.


回答 7

我相信soaplib已弃用其SOAP客户端(“发送者”),而改为使用肥皂水。在这一点上,soaplib致力于成为一个与Web框架无关的SOAP服务器(“接收器”)。当前soaplib正在积极开发中,通常在Python SOAP邮件列表中进行讨论:

http://mail.python.org/mailman/listinfo/soap

I believe soaplib has deprecated its SOAP client (‘sender’) in favor of suds. At this point soaplib is focused on being a web framework agnostic SOAP server (‘receiver’). Currently soaplib is under active development and is usually discussed in the Python SOAP mailing list:

http://mail.python.org/mailman/listinfo/soap


回答 8

我的结论,我们有这样的:

肥皂客户端:

使用Suds-jurko (2016年更新) 可以很好地维护和更新泡沫。

更新06/2017:suds -jurko库未更新,显然已被放弃

我测试ZEEP库,但得到周围令牌的限制,现在只支持用户名令牌,我报告一个错误创建时间戳标记和作者更新的代码来修复它。

Zeep的启动良好,并且具有良好的文档,因此我最近将代码从suds迁移到了zeep,并且运行良好。

肥皂服务器端:

我们有TGWS,soaplib(未经测试的pysimplesoap)恕我直言使用,并且必须选择soaplib帮助。

最好的祝福,

In my conclusion we have this:

Soap client side:

use only Suds-jurko (updated 2016) suds is well maintained and updated.

UPDATE 06/2017: suds-jurko library is not updated and apparently abandoned,

I tested zeep library but got limitations around tokens, by now just support UsernameToken, i report a bug to create timestamp token and author update the code to fix it.

Zeep start good and has good documentation , so i recently migrated my code from suds to zeep and works fine.

Soap server side:

We have TGWS, soaplib (pysimplesoap not tested) IMHO use and help soaplib must be the choice.

Best regards,


回答 9

正如我在这里建议的那样我建议您自己滚动。实际上并不是那么困难,我怀疑这就是那里没有更好的Python SOAP库的原因。

As I suggested here I recommend you roll your own. It’s actually not that difficult and I suspect that’s the reason there aren’t better Python SOAP libraries out there.


回答 10

泡沫非常好。我尝试了SOAPpy,但没有按照我需要的方式正常工作,而肥皂水却很快就起作用了。

suds is pretty good. I tried SOAPpy but didn’t get it to work in quite the way I needed whereas suds worked pretty much straight away.


回答 11

能否提供帮助:http : //users.skynet.be/pascalbotte/rcx-ws-doc/python.htm#SOAPPY

我通过搜索wsdland来找到它,python从本质上讲,您将需要对SOAP服务器进行wsdl描述才能进行任何有用的客户端包装…。

Could this help: http://users.skynet.be/pascalbotte/rcx-ws-doc/python.htm#SOAPPY

I found it by searching for wsdl and python, with the rational being, that you would need a wsdl description of a SOAP server to do any useful client wrappers….


回答 12

我们使用了Python Web Services的 SOAPpy ,但似乎ZSI(相同的源)正在取代它。

We’d used SOAPpy from Python Web Services, but it seems that ZSI (same source) is replacing it.


回答 13

我在生产环境中将SOAPpy与Python 2.5.3结合使用。

我不得不在SOAPpy中手动编辑几个文件(关于标头代码放置在错误的位置),但除此之外,它仍然可以并且非常可靠地继续工作。

Im using SOAPpy with Python 2.5.3 in a production setting.

I had to manually edit a couple of files in SOAPpy (something about header code being in the wrong place) but other than that it worked and continues to do so very reliably.