Hi,
i have googled for the problem and figured out, that the problem maybe is, that RSA1.5 is used by the client und the server is expecting RSA-OAEP.

Can someone tell me, where i have to change this?

Thanks!



ansgar thobe schrieb:
Hi,

i have some trouble with the encryption of my xfire client.


If i call a web service method, i got the following exception:


DEBUG - WSSecEncrypt                   - Beginning Encryption...
Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: WSHandler: Encryption: error during message processingorg.apache.ws.security.WSSecurityException: An unsupported signature or encryption algorithm was used (unsupported key transport encryption algorithm: No such algorithm: http://www.w3.org/2001/04/xmlenc#rsa-1_5) org.codehaus.xfire.fault.XFireFault: WSHandler: Encryption: error during message processingorg.apache.ws.security.WSSecurityException: An unsupported signature or encryption algorithm was used (unsupported key transport encryption algorithm: No such algorithm: http://www.w3.org/2001/04/xmlenc#rsa-1_5) at org.codehaus.xfire.security.wss4j.WSS4JOutHandler.invoke(WSS4JOutHandler.java:180) at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
   at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
   at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
   at org.codehaus.xfire.client.Client.invoke(Client.java:336)
at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
   at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
   at $Proxy6.ping(Unknown Source)
at de.einsundeins.indiv.webserviceclient.KundenManagerClient.ping(KundenManagerClient.java:148)
   at xFire.TestPing.ping(TestPing.java:13)
   at xFire.TestPing.main(TestPing.java:24)
Caused by: org.apache.ws.security.WSSecurityException: WSHandler: Encryption: error during message processingorg.apache.ws.security.WSSecurityException: An unsupported signature or encryption algorithm was used (unsupported key transport encryption algorithm: No such algorithm: http://www.w3.org/2001/04/xmlenc#rsa-1_5) at org.apache.ws.security.action.EncryptionAction.execute(EncryptionAction.java:64) at org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:192) at org.codehaus.xfire.security.wss4j.WSS4JOutHandler.invoke(WSS4JOutHandler.java:158)
   ... 10 more



I have added a DOMOutHandler and a WSS4JOutHandler to my client:

Service serviceModel = new ObjectServiceFactory().create(KundeManagerServiceSoap.class,"KatalogManagerServiceSoap", url, null);
             try {
managerService = (KundeManagerServiceSoap) new XFireProxyFactory().create(serviceModel, url);
       } catch (MalformedURLException e) {
           e.printStackTrace();
       }
client = ((XFireProxy) Proxy.getInvocationHandler(managerService)).getClient();
         client.addOutHandler(new DOMOutHandler());
       client.addOutHandler(new WSS4JOutHandler(getOutProperties()));


The properties of the WSS4JOutHandler are :

       properties.setProperty(WSHandlerConstants.ACTION, "usertoken");
properties.setProperty(WSHandlerConstants.USER, "usertokenpassword"); properties.setProperty(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT); properties.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS, PasswordHandler.class.getName()); properties.setProperty(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT + " "
               + WSHandlerConstants.SIGNATURE);
properties.setProperty(WSHandlerConstants.ENCRYPTION_USER, "user"); properties.setProperty(WSHandlerConstants.ENC_SYM_ALGO, WSConstants.TRIPLE_DES;); properties.setProperty(WSHandlerConstants.ENC_PROP_FILE, "outsecurity_encr.properties"); properties.setProperty(WSHandlerConstants.SIG_PROP_FILE, "outsecurity_sig.properties"); properties.setProperty(WSHandlerConstants.SIG_KEY_ID, "IssuerSerial");

The outsecurity_encr.properties file has the following entries:

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=passwordkeystore
   org.apache.ws.security.crypto.merlin.alias.password=aliaspassword
   org.apache.ws.security.crypto.merlin.keystore.alias=alias
   org.apache.ws.security.crypto.merlin.file=newstore.jks

Is there something wrong in the way i try to encrypt the client?
I have allready tried different entries for the WSHandlerContets.ENC_SYM_ALGO , but without any success.

Someone can help me???

Thanks





---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

__________ NOD32 2659 (20071115) Information __________

Diese E-Mail wurde vom NOD32 antivirus system geprüft
http://www.nod32.com





---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to