Fwd: marshallerFactory.getMarshaller(samlToken) returns a "null"
Thomas Lionel SMETS (prof)
tsmets at a3-system.eu
Wed Apr 10 02:31:50 EDT 2013
Hello,
I base my code on what I found here :
https://wiki.shibboleth.net/confluence/plugins/viewsource/viewpagesrc.action?pageId=3277019
As I recuperated some code from another project, so from what I could
gather ... it seems I do most things needed like :
[code]
try {
DefaultBootstrap.bootstrap();
} catch (ConfigurationException e) {
throw new SAMLEngineRuntimeException("Error initializing
Open SAML", e);
}
[/code]
but the marshaller returned by the "marshallerFactory" is always "null"
thought listening to the logger "org.opensaml" shows no warning that the
initialization is not OK :(
Here is a Sniplet of "my" code
[code]
public byte[] marshall(final XMLObject samlToken) throws
MarshallingException, ParserConfigurationException, TransformerException {
if (LOG.isTraceEnabled())
LOG.trace("Request to marshall : " +
LoggingConstant.START_TRACE_TAG + samlToken.toString() +
LoggingConstant.END_TRACE_TAG);
javax.xml.parsers.DocumentBuilder docBuilder;
// Get the marshaller factory
MarshallerFactory marshallerFactory =
Configuration.getMarshallerFactory();
// Get the Subject marshaller
Marshaller marshaller =
marshallerFactory.getMarshaller(samlToken); // marshaller is 'null'
after this statement
docBuilder = dbf.newDocumentBuilder();
Document doc = docBuilder.newDocument();
// Marshall the SAML token
marshaller.marshall(samlToken, doc); // throws Exception
(obviously a NullPointer)
...
[/code]
What step am I missing ???
\T,
--
Thomas Lionel SMETS, CISSP (385434)
PGP = FDF0 8FB8 4F37 3F79 1011 05AB 0DCE 9BAB 5DD0 0E10
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tsmets.vcf
Type: text/x-vcard
Size: 319 bytes
Desc: not available
Url : http://shibboleth.net/pipermail/dev/attachments/20130410/2797b01c/attachment.vcf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 550 bytes
Desc: OpenPGP digital signature
Url : http://shibboleth.net/pipermail/dev/attachments/20130410/2797b01c/attachment.bin
More information about the dev
mailing list