Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with SOAP message

 
Fred Victa
Ranch Hand
Posts: 184
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a client who is sending a SOAP message to my web service, but he is getting the following error message. What could be wrong and how can I correct it?

<soap:Text xml:lang="en" xmlns:soap="http://www.w3.org/2003/05/soap-envelope">System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Security.Cryptography.CryptographicException: WSE600: Unable to unwrap a symmetric key using the private key of an X.509 certificate. Please check if the account 'DOMARI\msahi' has permissions to read the private key of certificate with subject name 'CN=Company TestProducer, OU=MIS, O=Company name, S=California, C=US' and thumbprint '3AFF96F50DBB99C4E1783DA3DB9CE141BF7283F2'. ---> System.Security.Cryptography.CryptographicException: WSE593: Unable to decrypt the key. Please check if the process has the right permission to access the private key. ---> System.Security.Cryptography.CryptographicException: Bad Key.



at System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr)

at System.Security.Cryptography.Utils._DecryptKey(SafeKeyHandle hPubKey, Byte[] key, Int32 dwFlags)

at System.Security.Cryptography.RSACryptoServiceProvider.Decrypt(Byte[] rgb, Boolean fOAEP)

at Microsoft.Web.Services3.Security.Cryptography.RSA15KeyExchangeFormatter.DecryptKey(Byte[] cipherKey)

--- End of inner exception stack trace ---

at Microsoft.Web.Services3.Security.Cryptography.RSA15KeyExchangeFormatter.DecryptKey(Byte[] cipherKey)

at Microsoft.Web.Services3.Security.EncryptedKey.Decrypt()

--- End of inner exception stack trace ---

at Microsoft.Web.Services3.Security.EncryptedKey.Decrypt()

at Microsoft.Web.Services3.Security.Security.LoadXml(XmlElement element)

at Microsoft.Web.Services3.Security.SecurityInputFilter.ProcessMessage(SoapEnvelope envelope)

at Microsoft.Web.Services3.Security.Wse2PipelinePolicy.LegacyFilterWrapper.ProcessMessage(SoapEnvelope envelope)

at Microsoft.Web.Services3.Pipeline.ProcessInputMessage(SoapEnvelope envelope)

at Microsoft.Web.Services3.WseProtocol.FilterRequest(SoapEnvelope requestEnvelope)

at Microsoft.Web.Services3.WseProtocol.RouteRequest(SoapServerMessage message)

at System.Web.Services.Protocols.SoapServerProtocol.Initialize()

at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)

at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)

--- End of inner exception stack trace ---</soap:Text>
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post a copy of the SOAP message received?
How is the client application sending the SOAP message?
What kind of SOAP engine do you have on the server?
What is generating the error message above?
[ October 24, 2008: Message edited by: James Clark ]
 
Yaron Naveh
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In addition to James's question:

It seems you wrote your server with WSE3. Do you have WSE3 clients which are working properly with this server? If not I suggest you would start with building such a client as it's easier to debug this way.

Also check that your client & server use the correct X.509 and that your server has permissions to the X.509 private key.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic