我正在使用DocuSign API並遇到了一些問題。 當發送數據請求到他們的服務器,我收到以下錯誤:SoapFault異常:發送者和接收者時鐘之間缺乏同步
SoapFault exception: [q0:InvalidSecurity] An error was discovered
processing the <Security> header ---> WSE065: Creation time of the
timestamp is in the future. This typically indicates lack of synchronization
between sender and receiver clocks. Make sure the clocks are synchronized
or use the timeToleranceInSeconds element in the microsoft.web.services3
configuration section to adjust tolerance for lack of clock synchronization.
我到處都找過自己的社區論壇,我可以從他們的論壇管理員發現唯一的反應是這樣的:
The message means that the client clock is wrong. The timezone might be set
incorrectly. If the SOAP request is timestamped too far in the future or in the
past, the server will reject it. We generally run into this error with mobile
apps since folks don't always have their devices set to sync to network time.
我檢查了我的服務器時間以及我的電腦時間,以確保一切正常。我的電腦時間設置爲EST,並且服務器設置爲CST。我試過在計算機上更新和同步我的系統時鐘,並嘗試將我的時區調整到CST以確保它們都匹配。我也將計算機時間更改爲GMT,因爲這是他們所說的服務器時間。我也嘗試更新我的服務器的時鐘,因爲它似乎是一個有點關閉。 (我的時鐘和服務器時鐘之間似乎有6分鐘的差異)。
sudo ntpdate ntp.ubuntu.com
響應:
27 Sep 08:51:41 ntpdate[18858]: step time server 91.189.94.4 offset -357.639332 sec
我也試過編輯在服務器上我的GRUB配置文件(/ boot/grub目錄/平頭
我在服務器上運行此命令.conf文件)。 我試圖在內核行的末尾添加這些則params的不同組合:
clock=pit
acpi=off
noapic
除了試圖與此命令更新硬件時鐘:
hwclock=systohc
該皁頭文件如下:
這個請求是在上午10:41(我的電腦時間[EST]),9:47 AM發出的(我的服務器tim e [科技委])。
請求:
POST /api/3.0/api.asmx HTTP/1.1
Host: www.docusign.net
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.3.16
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.docusign.net/API/3.0/CreateEnvelope"
Content-Length: 116157
響應:
HTTP/1.1 500 Internal Server Error
Cache-Control: private
Content-Length: 1696
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Thu, 27 Sep 2012 14:41:13 GMT
Vary: Accept-Encoding
Strict-Transport-Security: max-age=7776000; includeSubDomains
如果任何人有任何想法,以什麼可能會造成這個錯誤,或者如果任何人有關於如何進一步的忠告去同步我的時鐘,我很樂意聽到他們。
預先感謝您的時間和考慮。
首先你需要調試。哪些請求頭與SOAP請求一起發送? http://php.net/manual/en/soapclient.getlastrequestheaders.php – hakre
我看了看我的標題,但我仍然不確定該從哪裏出發。我已將它們添加到我的帖子中。 – ProdigyProgrammer
肥皂請求體中是否有時間戳?我在請求頭文件中看不到任何內容,這可能是在正文中? – hakre