構(gòu)建安全的Xml Web Service系列之wse之錯誤代碼詳解
WSE3.0現(xiàn)在還沒有中文版的可以下載,使用英文版的過程中,難免會遇到各種各樣的錯誤,而面對一堆毫無頭緒的錯誤異常,常常會感到迷茫和無助,我起初就覺得這個框架使用起來真的很難用,有時候一些莫名其妙的錯誤會困擾我半天或者幾天的時間,而一些英文的解釋理解起來似是而非,很難一針見血的獲得哪里出了問題,我將用幾篇文章將wse所涉及到的錯誤代碼和錯誤消息翻譯成中文,并且根據(jù)個人的一點經(jīng)驗,提出引發(fā)錯誤的原因,并總結(jié)出解決建議,不是很準確,只是我所遇到的情況的一個總結(jié)而已,也可能有錯誤,大家辯證的看這個。
下面先列出這么多,好多n多,篇幅太長,分幾次錄入。以后會做成一個文檔,供大家使用
| 異常名稱 | 錯誤消息 | 消息注釋 | 引發(fā)原因 | 解決建議 |
| BodyEncryptionCheckFailed | Protection requirements not satisfied: body of the message is not encrypted, or is encrypted with a token of an unexpected type | 未能滿足保護要求:消息的主體沒有加密或者被一個未知類型的令牌加密 | 客戶端證書于服務(wù)端證書不匹配,或者客戶端未設(shè)置證書,而服務(wù)端要求證書驗證 | |
| Cryptography_Xml_CreatedKeyFailed | Failed to create the signing key. | 無法創(chuàng)建簽名密鑰 | 提供的證書沒有簽名的功能 | 更換證書類型,創(chuàng)建可以用于簽名的證書 |
| Cryptography_Xml_CreateHashAlgorithmFailed | Could not create the hash algorithm object. | 無法創(chuàng)建DigestMethod指定的hash算法對象 | 指定的DigestMethod算法不受指定證書支持 | 更換證書 |
| Cryptography_Xml_CreateTransformFailed | Could not create the XML transformation identified by the URI {0}. | 未能創(chuàng)建標志特定URI的轉(zhuǎn)換器 | ||
| Cryptography_Xml_DigestMethodRequired | A DigestMethod must be specified on a Reference before generating XML. | 生成XML之前必須在一個引用上指定DigestMethod | ||
| Cryptography_Xml_DigestValueRequired | A Reference must contain a DigestValue. | 引用上必須包含DigestValue | ||
| Cryptography_Xml_EnvelopedSignatureRequiresContext | An XmlDocument context is required for enveloped transforms. | 一個XML文檔需要信封轉(zhuǎn)換器 | ||
| Cryptography_Xml_InvalidElement | Malformed element {0}. | 錯誤節(jié)點:{0} | ||
| Cryptography_Xml_InvalidReference | Malformed reference element. | 錯誤的引用節(jié)點:{0} | ||
| Cryptography_Xml_InvalidSignatureLength | The length of the signature with a MAC should be less than the hash output length. | 帶MAC的簽名長度應(yīng)該比輸出的hash值長度短 | ||
| Cryptography_Xml_InvalidSignatureLength2 | The length in bits of the signature with a MAC should be a multiple of 8. | 帶MAC的加密比特長度應(yīng)該是8的倍數(shù) | ||
| Cryptography_Xml_InvalidSignatureTag | The signature element is not valid. | 簽名節(jié)點非法 | ||
| Cryptography_Xml_KeyInfoRequired | A KeyInfo element is required to check the signature. | 一個KeyInfo節(jié)點要求檢查簽名 | ||
| Cryptography_Xml_LoadKeyFailed | A signing key is not loaded. | 簽名密鑰未被加載 | ||
| Cryptography_Xml_ReferenceElementRequired | At least one Reference element is required. | 至少應(yīng)該有一個引用節(jié)點 | ||
| Cryptography_Xml_SelfReferenceRequiresContext | An XmlDocument context is required to resolve the Reference URI {0}. | 一個XML文檔需要處理引用URI:{0} | ||
| Cryptography_Xml_SignatureDescriptionNotCreated | SignatureDescription could not be created for the signature algorithm supplied. | 簽名描述不能用于創(chuàng)建提供的簽名算法 | ||
| Cryptography_Xml_SignatureMethodKeyMismatch | The key does not fit the SignatureMethod. | 密鑰與簽名方法不匹配 |
作者:jillzhang
出處:http://jillzhang.cnblogs.com/
本文版權(quán)歸作者和博客園共有,歡迎轉(zhuǎn)載,但未經(jīng)作者同意必須保留此段聲明,且在文章頁面明顯位置給出原文連接,否則保留追究法律責(zé)任的權(quán)利。
出處:http://jillzhang.cnblogs.com/
本文版權(quán)歸作者和博客園共有,歡迎轉(zhuǎn)載,但未經(jīng)作者同意必須保留此段聲明,且在文章頁面明顯位置給出原文連接,否則保留追究法律責(zé)任的權(quán)利。

浙公網(wǎng)安備 33010602011771號