I have a problem with WebServient Client which is to use WS-Security. I will remove my client from axis2 It works when I do not enable cryptography (with my server emulator) I have axis.xml :
& Lt; Parameter name = "outflow protection" & gt; & Lt; Action & gt; & Lt; Items & gt; Signature & lt; / Item & gt; & Lt; Users & gt; M.N. & Lt; / User & gt; & Lt; PasswordCallbackClass & gt; PWCallback & lt; / PasswordCallbackClass & gt; & Lt; SignaturePropFile & gt; Client.properties & lt; / SignaturePropFile & gt; & Lt; SignatureKeyIdentifier & gt; SKIKeyIdentifier & lt; / SignatureKeyIdentifier & gt; & Lt; SignatureParts & gt; {Element} {} http://schemas.xmlsoap.org/soap/envelope/ body & lt; / SignatureParts & gt; & Lt; / Action & gt; & Lt; / Parameters & gt; Now, when I open arguments from eclipse to the customer:
-Daxis2.xml = axis-repo / conf / axis2.xml -Daxis2 .repo = Axis-repo I found:
org.apache.axis2.AxisFault: CryptoFactory: Properties can not be loaded: client .properties at org.apache rampart.handler.WSDoAllSender.processMessage (WSDoAllSender.java:67) org.apache.rampart.handler.WSDoAllHandler.invoke (WSDoAllHandler.java:72) on org.apache.axis2.engine.Phase.invoke (on Phase.java: 318) org.apache.axis2.engine.AxisEngine.invoke (AxisEngine.java:251) on org.apache.axis2.engine.AxisEngine.send (AxisEngine.java:416) on org.apache.axis2.description.OutInAxisOperationClient on .send org.apache.axis2.description.OutInAxisOperationClient.executeImpl (OutInAxisOperation.java:402) (OutInAxisOperation.java:229) on org.apache.axis2.client.OperationClient.execute (OperationClient.java:165) ... by: JavaklangkRuntimeException: Kriptofactori: can not load properties: client.properties at org.apache.w s.security.components.crypto.CryptoFactory.getProperties org.apache.ws.security.components .crypto.CryptoFactory.getInstance (CryptoFactory.java:2571) at org.apache.ws.security (CryptoFactory.java:258) handler.WSHandler.loadSignatureCrypto (WSHandler.java:431) org.apache.ws.security.handler.WSHandler.doSenderAction (WSHandler.java:137) on org.apache.rampart.handler.WSDoAllSender.processBasic (WSDoAllSender.java: java.lang.NullPointerException at org.apache.ws.security.components.crypto.CryptoFactory.getProperties: 201) due to ... 9 more org.apache.rampart.handler.WSDoAllSender.processMessage (WSDoAllSender.java:64) From (CryptoFactory.java:253) ... 14 more I open client.properties as the file object I'm able. I tried to keep this file in different directories or changed its name to use the full name (slash and backslash with both while I work on Windows) but nothing helps.
My client.properties file looks like this: / P>
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 = mn org.apache.ws.security.crypto.merlin.file = mn_keystore. Ks Any idea why I got this error?
I have found that I have to add client.properties and Mn_keystore.ks to wss4j-1.5.8.jar . I do not know whether this design is by or not my priority is to have a file out of this .jar library.
Edit : On other environments, I tried different client.properties and it worked! Now in the form of wss4j-1.5.8.jar , without configuration and keystore. I do not know why this work is done, and not previously worked: (
EDIT2 : When the eclipse run application goes, it is likely that the project directory is not in the clips I added resigning .properies file on some .jar and now I use: select Run-> debug configuration from the menu, locate the status of your Java application and its classpath tab. Ian Select "and click on" Advanced "button on the right side panel and select" Add an external folder ". Now add the directory with your .properties files.
Comments
Post a Comment