2013-02-05 57 views
4

我正在開發一個谷歌應用程序引擎應用程序,並且需要使用SOAP連接到一個web服務。我使用pysimplesoap(使用代碼here進行修補)來解析xml,並使用客戶端證書激發請求。 當我從我的本地環境進行簡單的單元測試時,它可以正常工作,並且可以從web服務獲得正確的響應。 然而,當我從應用程序引擎中運行完全相同的代碼,我得到這個:在App Engine中支持客戶端證書

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 

我做了一些閱讀,並發現客戶端證書沒有在網址抓取服務被支持。這仍然是這樣嗎?如果是這樣,是否有解決方法?

+0

Thanx Ingo,我會研究這個出站套接字支持功能。太糟糕的客戶端證書不受支持。 – user1734726

+0

Ingo,我想投票評論你的評論,但是Im在stackoverflow上提出問題相當新,所以請告訴我如何對你的評論進行增加投票(我們不應該是投票回答而不是評論?) – user1734726

+0

你說得對。我刪除了評論,並將其添加爲答案:) – Ingo

回答