[picketlink-commits] Picketlink SVN: r658 - in integration-tests/trunk: picketlink-pdp-tests and 9 other directories.

picketlink-commits at lists.jboss.org picketlink-commits at lists.jboss.org
Wed Jan 26 21:22:28 EST 2011


Author: anil.saldhana at jboss.com
Date: 2011-01-26 21:22:27 -0500 (Wed, 26 Jan 2011)
New Revision: 658

Added:
   integration-tests/trunk/picketlink-pdp-tests/
   integration-tests/trunk/picketlink-pdp-tests/.classpath
   integration-tests/trunk/picketlink-pdp-tests/.project
   integration-tests/trunk/picketlink-pdp-tests/ant-build.xml
   integration-tests/trunk/picketlink-pdp-tests/pom.xml
   integration-tests/trunk/picketlink-pdp-tests/src/
   integration-tests/trunk/picketlink-pdp-tests/src/test/
   integration-tests/trunk/picketlink-pdp-tests/src/test/java/
   integration-tests/trunk/picketlink-pdp-tests/src/test/java/org/
   integration-tests/trunk/picketlink-pdp-tests/src/test/java/org/picketlink/
   integration-tests/trunk/picketlink-pdp-tests/src/test/java/org/picketlink/test/
   integration-tests/trunk/picketlink-pdp-tests/src/test/java/org/picketlink/test/integration/
   integration-tests/trunk/picketlink-pdp-tests/src/test/java/org/picketlink/test/integration/pdp/
   integration-tests/trunk/picketlink-pdp-tests/src/test/java/org/picketlink/test/integration/pdp/SOAPSAMLXACMLUnitTestCase.java
   integration-tests/trunk/picketlink-pdp-tests/src/test/resources/
   integration-tests/trunk/picketlink-pdp-tests/src/test/resources/log4j.xml
Log:
PDP integration tests

Added: integration-tests/trunk/picketlink-pdp-tests/.classpath
===================================================================
--- integration-tests/trunk/picketlink-pdp-tests/.classpath	                        (rev 0)
+++ integration-tests/trunk/picketlink-pdp-tests/.classpath	2011-01-27 02:22:27 UTC (rev 658)
@@ -0,0 +1,18 @@
+<classpath>
+  <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
+  <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/ant/ant/1.5/ant-1.5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/ant-contrib/ant-contrib/1.0b2/ant-contrib-1.0b2.jar" sourcepath="M2_REPO/ant-contrib/ant-contrib/1.0b2/ant-contrib-1.0b2-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/httpunit/httpunit/1.7/httpunit-1.7.jar" sourcepath="M2_REPO/httpunit/httpunit/1.7/httpunit-1.7-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/security/jbossxacml/2.0.4/jbossxacml-2.0.4.jar" sourcepath="M2_REPO/org/jboss/security/jbossxacml/2.0.4/jbossxacml-2.0.4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/rhino/js/1.6R7/js-1.6R7.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jtidy/jtidy/4aug2000r7-dev/jtidy-4aug2000r7-dev.jar" sourcepath="M2_REPO/jtidy/jtidy/4aug2000r7-dev/jtidy-4aug2000r7-dev-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/nekohtml/nekohtml/1.9.12/nekohtml-1.9.12.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/picketlink/picketlink-fed/2.0.0-SNAPSHOT/picketlink-fed-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/picketlink/picketlink-fed/2.0.0-SNAPSHOT/picketlink-fed-2.0.0-SNAPSHOT-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+</classpath>
\ No newline at end of file

Added: integration-tests/trunk/picketlink-pdp-tests/.project
===================================================================
--- integration-tests/trunk/picketlink-pdp-tests/.project	                        (rev 0)
+++ integration-tests/trunk/picketlink-pdp-tests/.project	2011-01-27 02:22:27 UTC (rev 658)
@@ -0,0 +1,13 @@
+<projectDescription>
+  <name>picketlink-integration-pdp-tests</name>
+  <comment>PicketLink Federation Tests to be run in a continous integration environment such as Hudson</comment>
+  <projects/>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: integration-tests/trunk/picketlink-pdp-tests/ant-build.xml
===================================================================
--- integration-tests/trunk/picketlink-pdp-tests/ant-build.xml	                        (rev 0)
+++ integration-tests/trunk/picketlink-pdp-tests/ant-build.xml	2011-01-27 02:22:27 UTC (rev 658)
@@ -0,0 +1,40 @@
+<project default="install-jboss" name="PicketLink Federation Integration Test Suite">
+
+  <property name="JBAS_ZIP" location="${basedir}/../common-dist/jbossas/5.1.0.GA/jboss-5.1.0.GA-jdk6.zip"/>
+  <property name="JBAS_DEPLOY" location="${basedir}/target/jboss-5.1.0.GA/server/default/deploy/" />
+  <property name="OPENID4JAVA_VERSION" value="0.9.5" />
+   
+  <property environment="env" />
+
+  <target name="install-jboss">
+    <echo>Installing JBOSS AS 5.1.0.GA</echo>
+    <unzip src="${JBAS_ZIP}" dest="${basedir}/target"/>
+
+    <!-- Copy PicketLink jars and webapps to JBoss AS -->
+    <mkdir dir="${JBAS_DEPLOY}/picketlink" />
+    <copy file="${localRepository}/org/picketlink/picketlink-bindings/${version}/picketlink-bindings-${version}.jar" todir="${JBAS_DEPLOY}/picketlink"/>
+    <copy file="${localRepository}/org/picketlink/picketlink-bindings-jboss/${version}/picketlink-bindings-jboss-${version}.jar" todir="${JBAS_DEPLOY}/picketlink"/>
+    <copy file="${localRepository}/org/picketlink/picketlink-fed/${version}/picketlink-fed-${version}.jar" todir="${JBAS_DEPLOY}/picketlink"/>
+    <copy file="${localRepository}/org/openid4java/openid4java-nodeps/${OPENID4JAVA_VERSION}/openid4java-nodeps-${OPENID4JAVA_VERSION}.jar" todir="${JBAS_DEPLOY}/picketlink"/>
+    <unzip src="${localRepository}/org/picketlink/picketlink-fed-webapps-assembly/${version}/picketlink-fed-webapps-assembly-${version}.zip"
+           dest="${JBAS_DEPLOY}"/>
+    <chmod file="${basedir}/target/jboss-5.1.0.GA/bin/run.sh" perm="700"/>
+  </target>
+
+  <target name="start-jboss">
+    <echo>Starting Local 8080</echo>
+    <exec executable="${basedir}/target/jboss-5.1.0.GA/bin/run.sh" 
+          osfamily="unix" spawn="true" />
+    <waitfor maxwait="1" maxwaitunit="minute"
+             checkevery="100" checkeveryunit="millisecond">
+      <http url="http://localhost:8080" />
+    </waitfor>
+    <echo>Local 8080 Started</echo> 
+  </target>
+
+  <target name="stop-jboss">
+    <echo>Stopping Local 8080</echo>
+    <echo>Going to Kill the JBoss Process</echo>
+    <exec executable="${basedir}/../common-dist/scripts/stopjboss.sh"  osfamily="unix"/>
+  </target>
+</project>


Property changes on: integration-tests/trunk/picketlink-pdp-tests/ant-build.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: integration-tests/trunk/picketlink-pdp-tests/pom.xml
===================================================================
--- integration-tests/trunk/picketlink-pdp-tests/pom.xml	                        (rev 0)
+++ integration-tests/trunk/picketlink-pdp-tests/pom.xml	2011-01-27 02:22:27 UTC (rev 658)
@@ -0,0 +1,159 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <parent>
+      <groupId>org.picketlink</groupId>
+      <artifactId>picketlink-integration-tests-parent</artifactId>
+      <version>2.0.0-SNAPSHOT</version>
+      <relativePath>../parent</relativePath>
+   </parent>
+   <modelVersion>4.0.0</modelVersion>
+   <artifactId>picketlink-integration-pdp-tests</artifactId>
+   <packaging>jar</packaging>
+   <name>PicketLink Integration Tests for PDP</name>
+   <url>http://labs.jboss.org/portal/picketlink/</url>
+   <description>PicketLink Federation Tests to be run in a continous integration environment such as Hudson</description>
+   <licenses>
+      <license>
+         <name>lgpl</name>
+         <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+      </license>
+   </licenses>
+   <organization>
+      <name>JBoss Inc.</name>
+      <url>http://www.jboss.org</url>
+   </organization>
+   <build>
+     <plugins>
+       <plugin>
+         <artifactId>maven-surefire-plugin</artifactId>
+         <version>2.4.3</version>
+         <configuration>
+           <phase>test</phase>
+           <includes>
+             <include>**/**TestCase.java</include>
+           </includes>
+           <forkMode>pertest</forkMode>
+           <trimStackTrace>false</trimStackTrace>
+           <reportsDirectory>${project.build.directory}/surefire-reports-native</reportsDirectory>
+         </configuration>
+        </plugin>
+        <plugin>
+          <artifactId>maven-antrun-plugin</artifactId>
+          <executions>
+            <execution>
+              <id>phase-1</id>
+              <phase>compile</phase>
+              <configuration>
+                <tasks>
+                 <property name="version" value="${project.version}"/>
+                 <property name="depclasspath" refid="maven.dependency.classpath"/>
+                 <property name="localRepository" value="${user.home}/.m2/repository"/>
+                 <ant antfile="${basedir}/ant-build.xml" target="install-jboss" />
+                 <ant antfile="${basedir}/ant-build.xml" target="start-jboss" />
+                </tasks>
+              </configuration>
+              <goals>
+                <goal>run</goal>
+              </goals>
+            </execution>
+            <execution>
+              <id>phase-2</id>
+              <phase>test</phase>
+              <configuration>
+                <tasks>
+                 <ant antfile="${basedir}/ant-build.xml" target="stop-jboss" />
+                </tasks>
+              </configuration>
+              <goals>
+                <goal>run</goal>
+              </goals>
+            </execution>
+          </executions>
+       </plugin>
+     </plugins>
+  </build>
+
+   <dependencies>
+      <dependency>
+         <groupId>org.jboss.security</groupId>
+         <artifactId>jbossxacml</artifactId>
+         <version>2.0.4</version>
+         <scope>test</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.picketlink</groupId>
+         <artifactId>picketlink-fed</artifactId>
+         <version>${version}</version>
+         <scope>test</scope>
+      </dependency>
+      <dependency>
+         <groupId>junit</groupId>
+         <artifactId>junit</artifactId>
+         <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>httpunit</groupId>
+        <artifactId>httpunit</artifactId>
+        <version>1.7</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>rhino</groupId>
+        <artifactId>js</artifactId>
+        <version>1.6R7</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>apache-log4j</groupId>
+        <artifactId>log4j</artifactId>
+        <version>1.2.14</version>
+      </dependency>
+      <dependency>
+        <groupId>nekohtml</groupId>
+        <artifactId>nekohtml</artifactId>
+        <version>1.9.12</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>apache-xerces</groupId>
+        <artifactId>xercesImpl</artifactId>
+        <version>2.9.1</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>ant-contrib</groupId>
+        <artifactId>ant-contrib</artifactId>
+        <version>1.0b2</version>
+      </dependency>
+
+   </dependencies>
+   
+   <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <doclet>org.jboss.apiviz.APIviz</doclet>
+          <docletArtifact>
+            <groupId>org.jboss.apiviz</groupId>
+            <artifactId>apiviz</artifactId>
+            <version>1.2.5.GA</version>
+          </docletArtifact>
+          <additionalparam>
+            -charset UTF-8
+            -docencoding UTF-8
+            -version
+            -author
+            -breakiterator
+            -windowtitle "${project.name} ${project.version} API Reference"
+            -doctitle "${project.name} ${project.version} API Reference"
+            -bottom "Copyright © ${project.inceptionYear}-Present ${project.organization.name}. All Rights Reserved."
+            -link http://java.sun.com/javase/6/docs/api/
+            -sourceclasspath ${project.build.outputDirectory}
+          </additionalparam>
+          <encoding>UTF-8</encoding>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>


Property changes on: integration-tests/trunk/picketlink-pdp-tests/pom.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: integration-tests/trunk/picketlink-pdp-tests/src/test/java/org/picketlink/test/integration/pdp/SOAPSAMLXACMLUnitTestCase.java
===================================================================
--- integration-tests/trunk/picketlink-pdp-tests/src/test/java/org/picketlink/test/integration/pdp/SOAPSAMLXACMLUnitTestCase.java	                        (rev 0)
+++ integration-tests/trunk/picketlink-pdp-tests/src/test/java/org/picketlink/test/integration/pdp/SOAPSAMLXACMLUnitTestCase.java	2011-01-27 02:22:27 UTC (rev 658)
@@ -0,0 +1,200 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.test.integration.pdp;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.security.xacml.core.model.context.ActionType;
+import org.jboss.security.xacml.core.model.context.AttributeType;
+import org.jboss.security.xacml.core.model.context.AttributeValueType;
+import org.jboss.security.xacml.core.model.context.EnvironmentType;
+import org.jboss.security.xacml.core.model.context.RequestType;
+import org.jboss.security.xacml.core.model.context.ResourceType;
+import org.jboss.security.xacml.core.model.context.SubjectType;
+import org.jboss.security.xacml.factories.RequestAttributeFactory;
+import org.junit.Test;
+import org.picketlink.identity.federation.api.soap.SOAPSAMLXACML;
+import org.picketlink.identity.federation.api.soap.SOAPSAMLXACML.Result;
+
+/**
+ * Unit test the SOAP SAML XACML Unit Test
+ * @author Anil.Saldhana at redhat.com
+ * @since Jul 31, 2009
+ */
+public class SOAPSAMLXACMLUnitTestCase
+{
+   //Change it to true when you have an end point running locally
+   private boolean sendRequest = true;
+   
+   private String endpoint = "http://localhost:8080/pdp/SOAPSAMLXACMLPDP";
+   
+   private String issuer = "testIssuer";
+
+   @Test
+   public void testXACML() throws Exception
+   {
+      if(sendRequest)
+      {
+         //Create an XACML Request
+         RequestType xacmlRequest = getXACMLRequest();
+         SOAPSAMLXACML soapSAMLXACML = new SOAPSAMLXACML();
+         
+         Result result = soapSAMLXACML.send(endpoint, issuer, xacmlRequest);
+         assertTrue("No fault", result.isFault() == false);
+         assertTrue("Decision available", result.isResponseAvailable());
+         assertTrue("Deny", result.isDeny());
+      }
+   }
+   
+   
+   private RequestType getXACMLRequest()
+   {
+      RequestType requestType = new RequestType();
+      requestType.getSubject().add(createSubject());
+      requestType.getResource().add(createResource());
+      requestType.setAction(createAction());
+      requestType.setEnvironment(createEnvironment());
+      return requestType;
+   }
+   
+   private SubjectType createSubject()
+   {
+      //Create a subject type
+      SubjectType subject = new SubjectType();
+      subject.setSubjectCategory("urn:oasis:names:tc:xacml:1.0:subject-category:access-subject");
+      
+      subject.getAttribute().addAll(getSubjectAttributes()); 
+
+      return subject;
+   }
+
+   public ResourceType createResource()
+   {
+      ResourceType resourceType = new ResourceType();
+
+      AttributeType attResourceID = RequestAttributeFactory.createStringAttributeType(
+            "urn:va:xacml:2.0:interop:rsa8:resource:hl7:type", issuer, 
+            "urn:va:xacml:2.0:interop:rsa8:resource:hl7:medical-record");
+        
+      //Create a multi-valued attribute - hl7 permissions
+      AttributeType  multi = new AttributeType();
+      multi.setAttributeId("urn:va:xacml:2.0:interop:rsa8:subject:hl7:permission");
+      multi.setDataType("http://www.w3.org/2001/XMLSchema#string");
+      
+      if (issuer != null)
+         multi.setIssuer(issuer); 
+      
+      multi.getAttributeValue().add(createAttributeValueType("urn:va:xacml:2.0:interop:rsa8:hl7:prd-010"));
+      multi.getAttributeValue().add(createAttributeValueType("urn:va:xacml:2.0:interop:rsa8:hl7:prd-012"));
+      multi.getAttributeValue().add(createAttributeValueType("urn:va:xacml:2.0:interop:rsa8:hl7:prd-005"));
+      multi.getAttributeValue().add(createAttributeValueType("urn:va:xacml:2.0:interop:rsa8:hl7:prd-003"));
+        
+      
+      AttributeType attConfidentialityCode = RequestAttributeFactory.createStringAttributeType(
+            "urn:va:xacml:2.0:interop:rsa8:resource:hl7:confidentiality-code", issuer, 
+            "MA");
+      
+      AttributeType attDissentedSubjectId = RequestAttributeFactory.createStringAttributeType(
+            "urn:va:xacml:2.0:interop:rsa8:resource:hl7:radiology:dissented-subject-id", issuer, 
+            "Doctor, Bob I");
+      
+      //Add the attributes into the resource
+      resourceType.getAttribute().add(attResourceID);
+      resourceType.getAttribute().add(multi);
+      resourceType.getAttribute().add(attConfidentialityCode);
+      resourceType.getAttribute().add(attDissentedSubjectId); 
+      return resourceType;
+   }
+
+   private ActionType createAction()
+   {
+      ActionType actionType = new ActionType();
+      AttributeType attActionID = RequestAttributeFactory.createStringAttributeType(
+            "urn:oasis:names:tc:xacml:1.0:action:action-id", issuer, "read");
+      actionType.getAttribute().add(attActionID);
+      return actionType;
+   }
+   
+   private List<AttributeType> getSubjectAttributes()
+   {
+      List<AttributeType> attrList = new ArrayList<AttributeType>();
+      
+      //create the subject attributes
+      
+      //SubjectID - Bob
+      AttributeType attSubjectID = RequestAttributeFactory.createStringAttributeType(
+            "urn:oasis:names:tc:xacml:1.0:subject:subject-id", issuer, "Doctor, Bob I"); 
+
+      //Role - Physician      
+      AttributeType attRole = RequestAttributeFactory.createStringAttributeType(
+            "urn:va:xacml:2.0:interop:rsa8:subject:role", issuer, "Physician");
+      
+      
+      //Create a multi-valued attribute - hl7 permissions
+      AttributeType  multi = new AttributeType();
+      multi.setAttributeId("urn:va:xacml:2.0:interop:rsa8:subject:hl7:permission");
+      multi.setDataType("http://www.w3.org/2001/XMLSchema#string");
+      
+      if (issuer != null)
+         multi.setIssuer(issuer); 
+      
+      multi.getAttributeValue().add(createAttributeValueType("urn:va:xacml:2.0:interop:rsa8:hl7:prd-010"));
+      multi.getAttributeValue().add(createAttributeValueType("urn:va:xacml:2.0:interop:rsa8:hl7:prd-012"));
+      multi.getAttributeValue().add(createAttributeValueType("urn:va:xacml:2.0:interop:rsa8:hl7:prd-017"));
+      multi.getAttributeValue().add(createAttributeValueType("urn:va:xacml:2.0:interop:rsa8:hl7:prd-005"));
+      multi.getAttributeValue().add(createAttributeValueType("urn:va:xacml:2.0:interop:rsa8:hl7:prd-003"));
+      multi.getAttributeValue().add(createAttributeValueType("urn:va:xacml:2.0:interop:rsa8:hl7:prd-009"));
+      multi.getAttributeValue().add(createAttributeValueType("urn:va:xacml:2.0:interop:rsa8:hl7:prd-006"));
+      
+      //Locality
+      AttributeType attLocality = RequestAttributeFactory.createStringAttributeType(
+            "urn:oasis:names:tc:xacml:1.0:subject:locality", issuer, "Facility A"); 
+            
+      attrList.add(attSubjectID);
+      attrList.add(attRole);
+      attrList.add(multi); 
+      attrList.add(attLocality);
+      
+      return attrList;
+   }
+   
+   private EnvironmentType createEnvironment()
+   {
+      EnvironmentType env = new EnvironmentType();
+      
+      AttributeType attFacility = RequestAttributeFactory.createStringAttributeType(
+            "urn:va:xacml:2.0:interop:rsa8:environment:locality", issuer, "Facility A"); 
+      
+      env.getAttribute().add(attFacility);
+      return env;
+   }
+   
+   private AttributeValueType createAttributeValueType(String value)
+   {
+      AttributeValueType avt = new AttributeValueType();
+      avt.getContent().add(value);
+      return avt;
+   }
+}
\ No newline at end of file

Added: integration-tests/trunk/picketlink-pdp-tests/src/test/resources/log4j.xml
===================================================================
--- integration-tests/trunk/picketlink-pdp-tests/src/test/resources/log4j.xml	                        (rev 0)
+++ integration-tests/trunk/picketlink-pdp-tests/src/test/resources/log4j.xml	2011-01-27 02:22:27 UTC (rev 658)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Log4j Configuration                                                  -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 34717 2005-08-08 18:15:31Z adrian $ -->
+
+<!--
+   | For more configuration infromation and examples see the Jakarta Log4j
+   | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+  <!-- ================================= -->
+  <!-- Preserve messages in a local file -->
+  <!-- ================================= -->
+
+  <!-- A time/date based rolling appender -->
+  <appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
+    <param name="File" value="${basedir}/target/test.log"/>
+    <param name="Append" value="true"/>
+
+    <!-- Rollover at midnight each day -->
+    <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+    <!-- Rollover at the top of each hour
+    <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
+    -->
+
+    <layout class="org.apache.log4j.PatternLayout">
+      <!-- The default pattern: Date Priority [Category] Message\n -->
+      <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+
+      <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+      <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+       -->
+    </layout>	    
+  </appender>
+
+  <!-- ============================== -->
+  <!-- Append messages to the console -->
+  <!-- ============================== -->
+
+  <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+    <param name="Threshold" value="TRACE"/>
+    <param name="Target" value="System.out"/>
+
+    <layout class="org.apache.log4j.PatternLayout">
+      <!-- The default pattern: Date Priority [Category] Message\n -->
+      <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+    </layout>
+  </appender>
+  <!-- ================ -->
+  <!-- Limit categories -->
+  <!-- ================ -->
+
+  <!-- Limit JBoss categories to INFO 
+  <category name="org.jboss">
+    <priority value="INFO" class="org.jboss.logging.XLevel"/>
+  </category>
+  -->
+
+  <category name="org.jboss">
+    <priority value="TRACE"/>
+  </category>
+  <category name="org.picketlink">
+    <priority value="TRACE"/>
+  </category>
+
+  <!-- ======================= -->
+  <!-- Setup the Root category -->
+  <!-- ======================= -->
+
+  <root>
+    <appender-ref ref="CONSOLE"/>
+    <appender-ref ref="FILE"/>
+  </root>
+  
+</log4j:configuration>



More information about the picketlink-commits mailing list