You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by Edson Camargo <ca...@das.ufsc.br> on 2005/09/29 20:58:32 UTC

using SAMLIssuerFactory.getInstance() with Axis

Hi All,

I am working with SAML assertions and I've been using the 
SAMLIssuerFactory.getInstance() method, from "SAMLIssuerFactory" class 
from "org.apache.ws.security.saml" package, to create them. In my local 
tests the method work very well, the assertion is created, with no problem!

BUT.... :o(

There is a problem when I run the aplication using AXIS (version 1.2.1 
final). The problem seems to be in the line:

"samlIssuer = (SAMLIssuer) c.newInstance(new Object[]{properties});" ( 
around line 127 );

of the method "private static SAMLIssuer loadClass(String samlClassName, 
Properties properties)";

in the "SAMLIssuerFactory" class.

1) The properties variable shows the following content:

{org.apache.ws.security.saml.issuer.key.password=security, 
org.apache.ws.security.saml.subjectNameId.name=uid=joe,ou=people,ou=saml-demo,o=example.com, 
org.apache.ws.security.saml.issuer.cryptoProp.file=crypto.properties, 
org.apache.ws.security.saml.issuer.key.name=16c73ab6-b892-458f-abf5-2f875f74882e, 
org.apache.ws.security.saml.subjectNameId.qualifier=www.example.com, 
org.apache.ws.security.saml.issuerClass=org.apache.ws.security.saml.SAMLIssuerImpl, 
org.apache.ws.security.saml.authenticationMethod=password, 
org.apache.ws.security.saml.issuer=www.example.com, 
org.apache.ws.security.saml.confirmationMethod=senderVouches};

2) The samlClassName variable has the following name:

"org.apache.ws.security.saml.SAMLIssuerImpl"

I am working with wss4j "trunk" version. My CLASSPATH is correctly set 
(everything works fine in the AXIS  until the creation of the SAML 
assertion: SAMLIssuer saml = SAMLIssuerFactory.getInstance() ). These 
are my CLASSPATH files:
\activation.jar
\addressing-1.0.jar
\axis-1.2.1.jar
\axis-ant-1.2.1.jar
\axis-jaxrpc-1.2.1.jar
\axis-saaj-1.2.1.jar
\bcprov-jdk13-129.jar
\commons-codec-1.3.jar
\commons-discovery-0.2.jar
\commons-httpclient-3.0-rc2.jar
\commons-logging-1.0.4.jar
\junit-3.8.1.jar
\log4j-1.2.9.jar
\mailapi-1_3.jar
\opensaml-1.0.1.jar
\serializer-2.7.0.jar
\wsdl4j-1.5.1.jar
\xalan-2.7.0.jar
\xmlsec-1.2.96-dev.jar
\wss4j.jar

I really can't understand the cause of this error, my AXIS shows the 
following message:

Exception in thread "main" AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.NullPointerException
 faultActor:
 faultNode:
 faultDetail:
    {http://xml.apache.org/axis/}hostname:athenas

java.lang.NullPointerException
    at 
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
    at 
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
    at 
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
    at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
    at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
    at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
    at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
    at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
    at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
    at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
    at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
    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:424)
    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:2765)
    at org.apache.axis.client.Call.invoke(Call.java:2748)
    at org.apache.axis.client.Call.invoke(Call.java:1902)
    at 
org.apache.ws.sandbox.security.trust2.samples.SampleSecurityTokenServiceClient.main(SampleSecurityTokenServiceClient.java:110)

Is There another way of doing this (create a SAML assertion)?

Is this an Axis bug?

Thanks in advance.

Edson
Master Degree Student
LCMI / DAS / UFSC
88.040-900 - Brazil - Florianópolis - SC



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