【发布时间】:2013-02-05 13:57:42
【问题描述】:
我正在开发一个谷歌应用引擎应用程序,我需要使用 SOAP 连接到一个网络服务。我正在使用 pysimplesoap(使用找到的代码修补 here)来解析 xml,并使用客户端证书触发请求。 当我在本地环境中的简单单元测试中执行此操作时,它可以工作,并且我从 web 服务中得到了正确的响应。 但是,当我在应用引擎中运行完全相同的代码时,我得到了这个:
File "/Users/me/Documents/workspace/blixem/model/communicate/communication_channel.py", line 60, in generate_soap_message_pysimplesoap
response = client.SendDocument('LA.XML', 'TESTCASE', 'data')
File "/Users/me/Documents/workspace/blixem/lib/pysimplesoap/client.py", line 152, in <lambda>
return lambda *args, **kwargs: self.wsdl_call(attr,*args,**kwargs)
File "/Users/me/Documents/workspace/blixem/lib/pysimplesoap/client.py", line 320, in wsdl_call
response = self.call(method, *params)
File "/Users/me/Documents/workspace/blixem/lib/pysimplesoap/client.py", line 215, in call
self.xml_response = self.send(method, self.xml_request)
File "/Users/me/Documents/workspace/blixem/lib/pysimplesoap/client.py", line 241, in send
location,"POST", body=xml, headers=headers )
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/httplib2/httplib2/__init__.py", line 1457, in request
self.disable_ssl_certificate_validation)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/httplib2/httplib2/__init__.py", line 1143, in __init__
strict, timeout, proxy_info, ca_certs, disable_ssl_certificate_validation)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/httplib2/httplib2/__init__.py", line 1092, in __init__
raise NotSupportedOnThisPlatform()
NotSupportedOnThisPlatform
我做了一些阅读,发现 urlfetch 服务还不支持客户端证书。现在还是这样吗?如果是这样,是否有解决方法?
【问题讨论】:
-
Thanx Ingo,我将研究这个出站套接字支持功能。不支持太糟糕的客户端证书。
-
Ingo,我想对您的评论进行投票,但我对在 stackoverflow 上提出问题还很陌生,所以请告诉我如何对您的评论进行投票(我们不应该投票而不是 cmets?)
-
你是对的。我删除了评论并将其添加为答案:)
标签: python google-app-engine pysimplesoap