Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Encrypt/Decrypt SOAP Attachment with XWSS problem.

Reply
Thread Tools

Encrypt/Decrypt SOAP Attachment with XWSS problem.

 
 
cencio1980
Guest
Posts: n/a
 
      01-29-2008
Hi all,

I'm trying to encrypt/decrypt a soap message with attachments with
xwss.

I try doing it to the soap:body and it works.

If i try to do also to attachments i have some problems.

Encrypt works, but when i decrypt it gives me an exception..
It first call
com.sun.xml.wss.impl.callback.SignatureKeyCallback
$DefaultPrivKeyCertRequest
then
com.sun.xml.wss.impl.callback.DecryptionKeyCallbac k
$X509CertificateBasedRequest

and both find the keys but it gives

com.sun.xml.wss.XWSSecurityException:
com.sun.xml.wss.XWSSecurityException: Symmetric Key is null
at
com.sun.xml.wss.impl.misc.XWSSProcessor2_0Impl.ver ifyInboundMessage(XWSSProcessor2_0Impl.java:
146)
at
org.openspcoop.pdd.services.RicezioneContenutiAppl icativiWS.invoke(RicezioneContenutiApplicativiWS.j ava:
82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:585)
.....
.....
Caused by: com.sun.xml.wss.XWSSecurityException: Symmetric Key is null
at
com.sun.xml.wss.impl.apachecrypto.DecryptionProces sor.processEncryptedData(DecryptionProcessor.java:
514)
at
com.sun.xml.wss.impl.apachecrypto.DecryptionProces sor.processEncryptedData(DecryptionProcessor.java:
46
at
com.sun.xml.wss.impl.apachecrypto.DecryptionProces sor.decrypt(DecryptionProcessor.java:
150)



If i try to encrypt only attachments it calls only
com.sun.xml.wss.impl.callback.SignatureKeyCallback
$DefaultPrivKeyCertRequest
then raise the same exception.

This is the config:



<xwss:SecurityConfiguration dumpMessages="false"
xmlnswss="http://java.sun.com/xml/ns/xwss/config">
<xwss:Encrypt>
<xwss:X509Token certificateAlias="pa" />
<xwss:Target type="qname"> {http://schemas.xmlsoap.org/soap/
envelope/}Body</xwss:Target>
<xwss:Target type="uri">cid:*</xwss:Target>
</xwss:Encrypt>
</xwss:SecurityConfiguration>



Any suggestion?

Thx!
/Lorenzo
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to send .zip the file as a soap attachment? ad ASP .Net 0 11-05-2005 10:25 PM
How to send a DIME attachment with SOAP Ipsita ASP .Net 1 10-29-2004 04:45 PM
Problem with streaming a DIME attachment with SOAP Ipsita ASP .Net 3 10-29-2004 04:50 AM
writing a SOAP message service, how do I get the attachment from a message? rabbits77 Java 0 02-26-2004 08:52 PM
Problem of using apache soap to consume WSE 2.0 soap attachment Mullin Yu ASP .Net Web Services 0 10-08-2003 08:09 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57