Skip to Content.
Sympa Menu

mace-opensaml-users - Re: [OpenSAML] Unmarshalling problem - losing the inner ApplyType of a ConditionType

Subject: OpenSAML user discussion

List archive

Re: [OpenSAML] Unmarshalling problem - losing the inner ApplyType of a ConditionType


Chronological Thread 
  • From: "Håkon Sagehaug" <>
  • To:
  • Subject: Re: [OpenSAML] Unmarshalling problem - losing the inner ApplyType of a ConditionType
  • Date: Thu, 19 Jun 2008 12:40:49 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:references:x-google-sender-auth; b=PNOm9sUFW6DSHdhGov2adOhSJ8T6I3Pvl5Xj3shaSBkdQhKzjiuDreseVM9f1bI2T1 wlQikXPcBJtJ3ZoaRtL2RhNWKNE2Z11dn2seyPnMUkHq8C8z6jeuxX9VAESZhaWqoviI jK141IXckSuYlS6fGQ9So34YKS55fKyZBmF+U=

Hi

Can you send me the xml, so I'll have something to play around with

cheers, håkon

2008/6/18 Karen Loughran <>:

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



--
Håkon Sagehaug, Software Developer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)


Archive powered by MHonArc 2.6.16.

Top of Page