Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

WSS4J XML Encryption and D. Signature

843811Sep 6 2006 — edited Sep 7 2006
Good Morning, I'm a student and I'm trying to use wss4j features to secure SOAP messages. The Problem is that I follow step by step the tutorial http://ws.apache.org/wss4j/package.html but there are some problems about the XML Encyption and D.Signature.

I Follow the tutorial but when i run the client with this config file:
<deployment xmlns=" http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java ">
<transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>
<globalConfiguration >
<requestFlow>
<handler type="java: org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="user" value="16c73ab6-b892-458f-abf5-2f875f74882e"/>
<parameter name="passwordCallbackClass" value="org.apache.ws.axis.oasis.PWCallback"/>
<parameter name="action" value="Signature Encrypt"/>
<parameter name="signaturePropFile" value=" crypto.properties" />
</handler>
</requestFlow>
</globalConfiguration >
</deployment>
There is this excepion:

AxisFault
faultCode: {
http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString:
java.lang.RuntimeException : CryptoFactory: Cannot load properties: crypto.properties
faultActor:
faultNode:
faultDetail:
{
http://xml.apache.org/axis/}stackTrace:java.lang.RuntimeException : CryptoFactory: Cannot load properties: crypto.properties
at org.apache.ws.security.components.crypto.CryptoFactory.getProperties(
CryptoFactory.java :185)
at org.apache.ws.security.components.crypto.CryptoFactory.getInstance(
CryptoFactory.java:110 )
at org.apache.ws.security.handler.WSHandler.loadSignatureCrypto(
WSHandler.java:337)
at org.apache.ws.security.handler.WSHandler.doSenderAction (
WSHandler.java:123)
at org.apache.ws.axis.security.WSDoAllSender.invoke(
WSDoAllSender.java :170)
at org.apache.axis.strategies.InvocationStrategy.visit(
InvocationStrategy.java:32 )
at org.apache.axis.SimpleChain.doVisiting(
SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(
SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(
AxisClient.java:127 )
at org.apache.axis.client.Call.invokeEngine(
Call.java:2784)
at org.apache.axis.client.Call.invoke (
Call.java:2767)
at org.apache.axis.client.Call.invoke(
Call.java:2443)
at org.apache.axis.client.Call.invoke(
Call.java:2366)
at org.apache.axis.client.Call.invoke(
Call.java:1812)
at prova2.client.Saluto2SoapBindingStub.saluto (
Saluto2SoapBindingStub.java:106)
at prova2.client.ClientSaluto.main(
ClientSaluto.java :49)
{ http://xml.apache.org/axis/}hostname:Chianti
java.lang.RuntimeException
: CryptoFactory: Cannot load properties: crypto.properties
at org.apache.axis.AxisFault.makeFault(
AxisFault.java:101)
at org.apache.axis.client.AxisClient.invoke(
AxisClient.java:216)
at org.apache.axis.client.Call.invokeEngine(
Call.java:2784)
at org.apache.axis.client.Call.invoke(
Call.java:2767)
at org.apache.axis.client.Call.invoke (
Call.java:2443)
at org.apache.axis.client.Call.invoke(
Call.java:2366 )
at org.apache.axis.client.Call.invoke(
Call.java:1812)
at prova2.client.Saluto2SoapBindingStub.saluto(
Saluto2SoapBindingStub.java:106)
at prova2.client.ClientSaluto.main(
ClientSaluto.java:49 )
Caused by:
java.lang.RuntimeException: CryptoFactory: Cannot load properties: crypto.properties
at org.apache.ws.security.components.crypto.CryptoFactory.getProperties (
CryptoFactory.java:185)
at org.apache.ws.security.components.crypto.CryptoFactory.getInstance(
CryptoFactory.java:110)
at org.apache.ws.security.handler.WSHandler.loadSignatureCrypto(
WSHandler.java:337 )
at org.apache.ws.security.handler.WSHandler.doSenderAction(
WSHandler.java:123)
at org.apache.ws.axis.security.WSDoAllSender.invoke (
WSDoAllSender.java:170)
at org.apache.axis.strategies.InvocationStrategy.visit(
InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(
SimpleChain.java:118 )
at org.apache.axis.SimpleChain.invoke(
SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(
AxisClient.java:127)
... 7 more

the problem is in the crypto.properties files for the client and server, their location and the configuration...Sorry if I'm making easy questions but this is my first approach to the argument!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 5 2006
Added on Sep 6 2006
1 comment
821 views