Solved

How to load the crypto properties file [WSS4J related]

Posted on 2011-03-09
3
2,050 Views
Last Modified: 2012-05-11
Hi, I am writing a WebService client which is signing the SOAP request using WSS4J api. In the WSDD file I have defined SIG_PROP_FILE which points to the crypto.properties which has keystore specific information.
I am loading the WSDD using:
EngineConfiguration config = new FileProvider("<pathname>/client_deploy.wsdd");

Now, when I send a request to the WebService, I got this error message:

Server.userException:java.lang.RuntimeException: CryptoFactory: Cannot load properties:<fname>
I added the properties file in the classpath, but still getting the same error. Any pointers how can I fix this issue?

Thanks a lot.
Leo
0
Comment
Question by:LeoKris
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:LeoKris
ID: 35080467
Additional comment:

Entry in the WSDD file looks like:

<parameter name="SIG_PROP_FILE" value="<fpath>/crypto.properties"/>  

and, the crypto.properties looks like:

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=keyStorePassword
org.apache.ws.security.crypto.merlin.keystore.alias=myAlias
org.apache.ws.security.crypto.merlin.file=client_keystore.jks
0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 35080528
> <parameter name="SIG_PROP_FILE" value="<fpath>/crypto.properties"/>  

that shouldn't be a filepath, try just:


<parameter name="SIG_PROP_FILE" value="crypto.properties"/>  

and put the properties file in the a directory that is in your classpath
0
 

Author Comment

by:LeoKris
ID: 35090820
Hi Objects,
          thanks a lot for your help, it has fixed the issue with a minor change though.
After making the changes, I got this exception:

org.apache.ws.security.WSSecurityException: WSHandler: Signature: no crypto properties

I had to rename the parameter SIG_PROP_FILE to  signaturePropFile and it fixed the issue.

Thanks
Leo
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Oracle encryption 12 59
Java: The Public Class Main 4 45
java imports not found 4 47
dao vs facade design patterns 2 31
This paper addresses the security of Sennheiser DECT Contact Center and Office (CC&O) headsets. It describes the DECT security chain comprised of “Pairing”, “Per Call Authentication” and “Encryption”, which are all part of the standard DECT protocol.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question