Thomas, the problem is that the server part (WSSecurityEngine) cannot get the username (i.e. alias) of the encryption key. Usually you need to define a certificate that contains the server's public key to encrypt. The client must transmit some identifiaction of the used certificate to the server.
IMO this is not a problem in the decryption but some problem during the setup of the encryption. Regards, Werner > -----Urspr�ngliche Nachricht----- > Von: Thomas Prommer [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 13. Juni 2005 22:08 > An: [email protected] > Betreff: Error in the decryption process > > > Hi, > > I am working on a university project - using WSS4J for an > axis web service > that gets called from a .NET client. > Right now I am still working on a proper communication > between a Java client > and a axis web service. It seems like I am having problems on > the server > side with the decryption process. I am using my own > crypto1.property file > and own keys - this is the error I get on the server side: > > Exception in thread "main" AxisFault > faultCode: > {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException > faultSubcode: > faultString: WSDoAllReceiver: security processing failed; > nested exception > is: > org.apache.ws.security.WSSecurityException: Cannot > encrypt/decrypt data; > nested exception is: > java.lang.Exception: alias is null > faultActor: > faultNode: > faultDetail: > {http://xml.apache.org/axis/}hostname:I210 > > WSDoAllReceiver: security processing failed; nested exception is: > org.apache.ws.security.WSSecurityException: Cannot > encrypt/decrypt data; > nested exception is: > java.lang.Exception: alias is null > at > org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFault > Builder.java:221) > at > org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultB > uilder.java:128) > at > org.apache.axis.encoding.DeserializationContext.endElement(Des > erializationContext.java:1087) > at > org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) > at > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown > Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragment > ContentDispatcher.dispatch(Unknown > Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocu > ment(Unknown > Source) > at > org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) > at > org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at > org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) > at javax.xml.parsers.SAXParser.parse(Unknown Source) > at > org.apache.axis.encoding.DeserializationContext.parse(Deserial > izationContext.java:227) > at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) > at org.apache.axis.Message.getSOAPEnvelope(Message.java:424) > at > org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(Mus > tUnderstandChecker.java:62) > at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) > at org.apache.axis.client.Call.invokeEngine(Call.java:2765) > at org.apache.axis.client.Call.invoke(Call.java:2748) > at org.apache.axis.client.Call.invoke(Call.java:2424) > at org.apache.axis.client.Call.invoke(Call.java:2347) > at org.apache.axis.client.Call.invoke(Call.java:1804) > at > net.wsls._2004._04.WSLS.Service.RPCWSSJavaReadSearchServiceSoa > pBindingStub.read(RPCWSSJavaReadSearchServiceSoapBindingStub.java:479) > at net.wsls._2004._04.WSLS.Service.Client.main(Client.java:39) > > This is my crypto1.property file - where the alias property is getting > clearly > set: > > org.apache.ws.security.crypto.provider=org.apache.ws.security. > components.crypto.Merlin > org.apache.ws.security.crypto.merlin.keystore.type=jks > org.apache.ws.security.crypto.merlin.keystore.password=*replaced* > org.apache.ws.security.crypto.merlin.keystore.alias=wsls > org.apache.ws.security.crypto.merlin.alias.password=*replaced* > org.apache.ws.security.crypto.merlin.file=wsls.keystore > > my deploy.wsdd on server side: > > <requestFlow> > <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver"> > <parameter name="passwordCallbackClass" > value="de.mwrg.repository.ws.PWCallBackServer"/> > <parameter name="passwordType" value="PasswordDigest"/> > > <!--parameter name="action" value="UsernameToken Timestamp > Encrypt"/--> > <parameter name="action" value="UsernameToken Encrypt Signature"/> > > <parameter name="decryptionPropFile" value="crypto1.properties" /> > <parameter name="signaturePropFile" value="crypto1.properties" /> > > </handler> > </requestFlow> > > > Anyone has any thoughts what could cause the error ? I'd > really appreciate > any help ! > > Thanks in advance, > Thomas > > > > -- > Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie! > Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl >
