0 Replies Latest reply on Jun 28, 2010 4:38 PM by Brian Krisler

    Policy Testing, createAttributeBooleanType, Marshal Exception

    Brian Krisler Newbie

      Hi,

       

      I am trying to test a policy with a boolean attribute:

      ...

      <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
        <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:boolean-equal">
          <SubjectAttributeDesignator AttributeId="MyOrg:DataAnalyst" DataType="http://www.w3.org/2001/XMLSchema#boolean" />
          <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#boolean">true</AttributeValue>
        </Apply>
      </Apply>

      ...

       

      I create a test with:

      ...

      attrList.add(RequestAttributeFactory.createBooleanAttributeType("MyOrg:DataAnalyst", issuer, true));  

      ...

       

       

      But I get a Marshal exception (below), is this an issue with the RequestAttributeFactory, or my misuse?

       

      Thanks for any help.

       

      Brian

       

       

      org.picketlink.identity.federation.core.exceptions.ProcessingException: javax.xml.bind.MarshalException
      - with linked exception:
      [com.sun.istack.internal.SAXException2: unable to marshal type "java.lang.Boolean" as an element because it is missing an @XmlRootElement annotation]
          at org.picketlink.identity.federation.api.soap.SOAPSAMLXACML.send(SOAPSAMLXACML.java:119)
          at com.xxx.xyx.test.PolicyTestsBase.testPolicy(PolicyTestsBase.java:62)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
          at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
          at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
          at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
          at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
          at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
          at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
          at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
          at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
          at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
          at org.junit.runners.Suite.runChild(Suite.java:128)
          at org.junit.runners.Suite.runChild(Suite.java:24)
          at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
          at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
          at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
          at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
          at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
          at org.junit.runners.ParentRunner.run(ParentRunner.java:236)