[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wss4j-dev
Subject:    Re: Crypto.properties (repost now not in RTF format)
From:       "Dave Bagguley" <davebagguley () hotmail ! com>
Date:       2006-10-18 15:28:09
Message-ID: BAY125-F23AF3CFA960A585DDE9B10DF0F0 () phx ! gbl
[Download RAW message or body]

Hi everyone, I've worked out what was causing the error i mentioned in my 
last post.  It was because I hadn't included xalan.jar in my build.xml file 
and thus it was missing from the war file. It was working at the client side 
because I had added the xalan.jar file as a library for the eclipse project 
but this is not accessed on the server side


> From: "Dave Bagguley" <davebagguley@hotmail.com>
> To: wss4j-dev@ws.apache.org
> Subject: Re: Crypto.properties (repost now not in RTF format)
> Date: Tue, 17 Oct 2006 10:24:37 +0000
> 
> Hi, I think I've got the server side crypto.properties file to be picked up 
> now, I put it inside the jar file contained in the war file.  When I run my 
> test client now I don't get an exception about not being able to find the 
> crypto.properties file but instead I get the following error:
> 
> AxisFault
> faultCode: 
> {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
> faultSubcode:
> faultString: java.lang.NoClassDefFoundError: 
> org/apache/xml/utils/URI$MalformedURIException; nested exception is:
> 	java.lang.NoClassDefFoundError: 
> org/apache/xml/utils/URI$MalformedURIException
> faultActor:
> faultNode:
> faultDetail:
> 	{http://xml.apache.org/axis/}hostname:shelly
> 
> java.lang.NoClassDefFoundError: 
> org/apache/xml/utils/URI$MalformedURIException; nested exception is:
> 	java.lang.NoClassDefFoundError: 
> org/apache/xml/utils/URI$MalformedURIException
> 	at 
> org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
> 	at 
> org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
> 	at 
> org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
>   at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown 
> Source)
> 	at 
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown \
>  Source)
> 	at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown \
>  Source)
> 	at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown \
>  Source)
> 	at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
> Source)
> 	at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
> Source)
> 	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown 
> Source)
> 	at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
> Source)
> 	at javax.xml.parsers.SAXParser.parse(Unknown Source)
> 	at 
> org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
>   at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
> 	at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
> 	at 
> org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
>   at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
> 	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 
> com.exampleService2.service.ExampleWebService2WSSoapBindingStub.getMessage(ExampleWebService2WSSoapBindingStub.java:141)
>   at testClient.TestClient.<init>(TestClient.java:26)
> 	at testClient.TestClient.main(TestClient.java:40)
> 
> 
> Please can somebody give me some more advice about how to fix this? thanks
> 
> > From: "Dave Bagguley" <davebagguley@hotmail.com>
> > To: wss4j-dev@ws.apache.org
> > Subject: Re: Crypto.properties (repost now not in RTF format)
> > Date: Mon, 16 Oct 2006 11:33:32 +0000
> > 
> > Hi, I tried putting crypto.properties in both of the places that you 
> > suggested but the same exception was still thrown.  I also made sure that 
> > the file was added to the axis class path using the windows system 
> > properties technique.
> > Can anyone help me any further?
> > thanks
> > 
> > 
> > > From: Andreas Heizenreder <aheizen@gmx.de>
> > > To: wss4j-dev@ws.apache.org
> > > Subject: Re: Crypto.properties (repost now not in RTF format)
> > > Date: Thu, 12 Oct 2006 10:46:19 +0200
> > > 
> > > Hi Dave,
> > > 
> > > this error get you, while wss4j can not find your crypto.property file on 
> > > Axis classpath. To solve this on server side copy crypto.properties file 
> > > in $CATALINA_HOME/webapps/axis/Web-Inf/lib or 
> > > $CATALINA_HOME/webapps/axis/Web-Inf/classes folders.
> > > 
> > > Andreas Heizenreder
> > > 
> > > Dave Bagguley schrieb:
> > > > Hello, sorry I just noticed that the last post I made was in RTF and 
> > > > didn't display properly in the forum archive web page. Here it is again 
> > > > in plain text.
> > > > 
> > > > Hi, I've followed the tutorial at http://ws.apache.org/wss4j/axis.html 
> > > > and got a service protected with a username and password. I'm now trying 
> > > > to user signatures and certificates instead. I've searched all over the 
> > > > web but i can't find a tutorial of how to do this anywhere.
> > > > 
> > > > So far I've managed to cobble together the following:
> > > > 
> > > > the handler of the request flow of the server-config.wsdd contains the 
> > > > following parameters:
> > > > 
> > > > <parameter name="passwordCallbackClass" 
> > > > value="com.exampleService2.security.PWCallbackClass"/>
> > > > <parameter name="action" value="Signature"/>
> > > > <parameter name="signaturePropFile" value="crypto.properties"/>
> > > > 
> > > > the handler of the request flow of the client-config.wsdd contains the 
> > > > following parameters:
> > > > 
> > > > <parameter name="user" value="16c73ab6-b892-458f-abf5-2f875f74882e"/>
> > > > <parameter name="passwordCallbackClass" value="testClient.PWCallback2"/>
> > > > <parameter name="action" value="Signature"/>
> > > > <parameter name="signaturePropFile" value="testClient/crypto.properties" 
> > > > />
> > > > <parameter name="signatureKeyIdentifier" value="DirectReference" />
> > > > <parameter name="encryptionKeyIdentifier" value="X509KeyIdentifier" />
> > > > 
> > > > The crypto.properties file is:
> > > > 
> > > > org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
> > > >  
> > > > org.apache.ws.security.crypto.merlin.keystore.type=pkcs12
> > > > org.apache.ws.security.crypto.merlin.keystore.password=security
> > > > org.apache.ws.security.crypto.merlin.keystore.alias=16c73ab6-b892-458f-abf5-2f875f74882e
> > > >  
> > > > org.apache.ws.security.crypto.merlin.alias.password=security
> > > > org.apache.ws.security.crypto.merlin.file=C:/keys/x509.PFX.MSFT
> > > > 
> > > > When I run my test client program I get the following error:
> > > > 
> > > > 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/}hostname:shelly
> > > > java.lang.RuntimeException: CryptoFactory: Cannot load properties: 
> > > > crypto.properties
> > > > .........
> > > > 
> > > > By using TCPMon and something other debug techniques I know that the 
> > > > soap is being signed by the client and gets sent to the server ok. The 
> > > > problem is that for some reason the server cannot locate 
> > > > crypto.properties. I have tried putting crypto.properties in various 
> > > > locations and also changing server-config.wsdd to reference the new 
> > > > location but to no avail.
> > > > 
> > > > Please can somebody tell me how to solve this problem. Or even better, 
> > > > can someone please provide me with a simple tutorial of how to use wss4j 
> > > > with certificates rather than just username and password. thanks
> > > > 
> > > > 
> > > > 
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: wss4j-dev-help@ws.apache.org
> > > > 
> > > > 
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: wss4j-dev-help@ws.apache.org
> > > 
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: wss4j-dev-help@ws.apache.org
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: wss4j-dev-help@ws.apache.org
> 

_________________________________________________________________
Windows Live™ Messenger has arrived. Click here to download it for free! 
http://imagine-msn.com/messenger/launch80/?locale=en-gb


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic