Skip to Content.
Sympa Menu

mace-opensaml-users - SAML assertion JAXB Error

Subject: OpenSAML user discussion

List archive

SAML assertion JAXB Error


Chronological Thread 
  • From:
  • To:
  • Subject: SAML assertion JAXB Error
  • Date: Thu, 18 Dec 2008 18:44:41 -0500 (EST)

Hi,

I have been working on a research project that use SAML v2. Currently, I have
created a simple SAML assertion using openSAML and try to bind the SAML
assertion into a SOAP header. However, an error occured states that:

>> org.w3c.dom.Element is an interface, and JAXB can't handle interfaces.

I am using Glassfish v2 to build my web service and JAXB for XML binding. My
SOAP and Marshal code is below:

//Create a SOAP Message
SOAPMessage message = smc.getMessage();
SOAPPart soapPart = message.getSOAPPart();
SOAPEnvelope soapEnvelope = soapPart.getEnvelope();
Name wsseHeaderName = soapEnvelope.createName("Security",
"wsse", WS_SECURITY_NS_URI);
if (soapEnvelope.getHeader() == null) {
soapEnvelope.addHeader();
}
SOAPHeaderElement securityElement =
soapEnvelope.getHeader().addHeaderElement(wsseHeaderName);


// marshall Assertion into SOAP Header
MarshallerFactory marshallerFactory =
Configuration.getMarshallerFactory();
Marshaller marshaller =
marshallerFactory.getMarshaller(assertion);
Element assertionElement = marshaller.marshall(assertion);
securityElement.appendChild(soapPart.importNode(
assertionElement, true));

Does anybody has an idea on how to solve this problem? Any help will be
highly appreciated.

Thanks,

Rick



Archive powered by MHonArc 2.6.16.

Top of Page