Skip to Content.
Sympa Menu

mace-opensaml-users - Unmarshalling problem - losing the inner ApplyType of a ConditionType

Subject: OpenSAML user discussion

List archive

Unmarshalling problem - losing the inner ApplyType of a ConditionType


Chronological Thread 
  • From: Karen Loughran <>
  • To:
  • Subject: Unmarshalling problem - losing the inner ApplyType of a ConditionType
  • Date: Wed, 18 Jun 2008 16:49:09 +0100
  • Organization: BeSC


Hi,

I have an XACMLPolicyStatement which contains a PolicyType and in its only
Rule the Condition contains 2 nested ApplyTypes (outter & inner).

After I marsall the policystatement I can still see the nested ApplyTypes in
the resulting string. However, when I subsequently unmarshall I have lost
the inner ApplyType within the condition.



My unmarshalling code for an XACMLPolicyStatement is as follows:

public static
XACMLPolicyStatementType buildPolicyStatementTypeFromString(String policyStr)
{
XACMLPolicyStatementType policyStatementType = null;
BasicParserPool parser = new BasicParserPool();
parser.setNamespaceAware(true);

try
{
ByteArrayInputStream bis = new
ByteArrayInputStream(policyStr.getBytes("UTF-16"));
Document policyStatementDoc = parser.parse(bis);
Unmarshaller unmarshaller =
Configuration.getUnmarshallerFactory().getUnmarshaller(

policyStatementDoc.getDocumentElement());

policyStatementType =
(XACMLPolicyStatementType)unmarshaller

.unmarshall(policyStatementDoc.getDocumentElement());

}

The code base was checked out earlier today - revision 1322

Thanks

Karen



Archive powered by MHonArc 2.6.16.

Top of Page