Tag: soapui

soap 1.1的服务堆栈序列化例外

请求消息: String String String String 响应消息/错误: SerializationException Could not deserialize ‘application/xml’ request using EServices_Response.SendGetAccountNotification’ Error: System.Runtime.Serialization.SerializationException: Error in line 1 position 170. Expecting element ‘SendGetAccountNotification’ from namespace ‘mynamespace’.. Encountered ‘Element’ with name ‘Envelope’, namespace ‘http://schemas.xmlsoap.org/soap/envelope/’. at System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) at ServiceStack.WebHost.Endpoints.Support.EndpointHandlerBase.DeserializeContentType(Type operationType, IHttpRequest httpReq, String […]

WS-Security中PasswordDigest的工作算法

我遇到了WS-Security的问题,并创建了一个正确的随机数和密码摘要。 我成功使用SoapUI将数据发送到Oracle系统。 所以我能够拦截SoapUI的调用(将代理更改为127.0.0.1端口8888以使用Fiddler失败,因为它是通过SSL) – 拦截非常重要,因为这些值只能使用一次。 然后我可以获取nonce,创建时间戳和密码摘要将它们放入我的代码中(我只有30秒的时间来执行此操作,因为值不会持续!)并且我获得了成功。 所以我知道它不是别的 – 只是密码摘要。 我使用的值如下: Nonce: UIYifr1SPoNlrmmKGSVOug== Created Timestamp: 2009-12-03T16:14:49Z Password: test8 Required Password Digest: yf2yatQzoaNaC8BflCMatVch/B8= 我知道创建摘要的算法是: Password_Digest = Base64 ( SHA-1 ( nonce + created + password ) ) 使用以下代码(来自Rick Strahl的post ) protected string GetSHA1String(string phrase) { SHA1CryptoServiceProvider sha1Hasher = new SHA1CryptoServiceProvider(); byte[] hashedDataBytes = sha1Hasher.ComputeHash(Encoding.UTF8.GetBytes(phrase)); return Convert.ToBase64String(hashedDataBytes); } […]