It's not a secret anymore!*
The moose likes Web Services and the fly likes Problem with SOAP message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Problem with SOAP message" Watch "Problem with SOAP message" New topic
Author

Problem with SOAP message

Fred Victa
Ranch Hand

Joined: May 01, 2008
Posts: 104
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

Joined: Apr 16, 2008
Posts: 2187
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

Joined: Oct 26, 2008
Posts: 24
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.


[url]http://webservices20.blogspot.com/[/url]
Web Services Performance, Interoperability And Testing Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with SOAP message