Hi,
I was wondering if I can get some advice on this last 'null alias'
error. I am sure I have some wrong settings somewhere but I am not very
experienced with security. I really would like to see it working :-) .
Upon further log investigation I also saw this error:
08:15:44,320 DEBUG [SOAPPart] Setting current message form to:
FORM_SOAPENVELOPE (currentMessage is now
org.apache.axis.message.SOAPEnvelope)
08:15:44,320 DEBUG [SOAPPart] Exit: SOAPPart::getAsSOAPEnvelope
08:15:44,450 DEBUG [Init] Registered class
org.apache.xml.security.transforms.implementations.FuncHere for XPath
function 'here()' function in internal table
08:15:44,450 INFO [Init] Unable to patch xalan function table.
java.lang.NoSuchFieldException: m_functions
at java.lang.Class.getField(Class.java:919)
at org.apache.xml.security.Init.registerHereFunction(Unknown Source)
at org.apache.xml.security.Init.init(Unknown Source)
at
org.apache.ws.security.WSSecurityEngine.<clinit>(WSSecurityEngine.java:132)
I saw a Jira issue filed on this one. Are you sure that this does not
contribute to my problems?
Stefan.
Stefan Schmidt wrote:
Hi,
The opensaml.jar is not included in the bin or source distribution.
Nevertheless, I have downloaded and included it and now I get more
errors:
java.lang.IllegalArgumentException: null alias passed to
getCertificateChain.
at
org.bouncycastle.jce.provider.JDKPKCS12KeyStore.engineGetCertificateChain(JDKPKCS12KeyStore.java:335)
at java.security.KeyStore.getCertificateChain(KeyStore.java:312)
at
org.apache.ws.security.components.crypto.Merlin.getCertificates(Merlin.java:472)
Any ideas here?
Thanks!
Stefan
Kr wrote:
You are almost there ... download opensaml-1.0.1.jar from
www.opensaml.org and keep it in your classpath. This is your final
dependency :-)
Never stop trying ;-)
On 8/16/05, Stefan Schmidt <[EMAIL PROTECTED]> wrote:
Hi,
I am new to this API and seem to have a couple of problems with it. It
would be nice if someone coud help me out :-) .
Here is what I am trying:
I have written a SOAP message handler as follows:
public class SecurityHandler extends GenericHandler {
QName qn[] = null;
static final WSSecurityEngine wsse = new
WSSecurityEngine().getInstance(WSSConfig.getDefaultWSConfig());
public void init(HandlerInfo info) {
qn = info.getHeaders();
}
public QName[] getHeaders() {
return qn;
}
public boolean handleResponse(MessageContext msgContext) {
try{
SOAPMessageContext smc = (SOAPMessageContext)msgContext;
SOAPMessage msg = smc.getMessage();
SOAPPart sp = msg.getSOAPPart();
Document envelope = sp.getEnvelope().getOwnerDocument();
...
}catch (Exception e){
e.printStackTrace();
}
return true;
}
}
The wss4j.jar is available to the web archive via WEB-INF/lib. Also, I
have donloaded the BouncyCastle bcprov-jdk14-129.jar to the
<jre_home>/lib/ext directory. Furthermore I changed the
java.security as
follows:
security.provider.1=sun.security.provider.Sun
security.provider.2=org.bouncycastle.jce.provider.BouncyCastleProvider
security.provider.3=com.sun.net.ssl.internal.ssl.Provider
security.provider.4=com.sun.rsajca.Provider
security.provider.5=com.sun.crypto.provider.SunJCE
security.provider.6=sun.security.jgss.SunProvider
So far so good. Now after deployment and invokation of the WS I get the
following error:
java.lang.NoClassDefFoundError:
org/apache/xml/security/exceptions/Base64DecodingException which is
thrown during the WSSecurityEngine initialization.
After some searching I found that this class is in xmlsec-1.2.1.jar
so I
included this also to my web application...
Now I am getting a java.lang.NoClassDefFoundError:
org/opensaml/SAMLException. That's where I am giving up - for now :-).
Could someone supply some information about all the dependencies of
WSS4J? I thought I read somewhere that there are no dependencies?
Did I do everything else correctly or did I miss something (coding and
BouncyCastle stuff)?
BTW, I am running the whole web app on Geronimo.
Thanks.
Kind regards,
Stefan Schmidt
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]