[jboss-cvs] Picketlink SVN: r1004 - in federation/trunk: picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/soap and 11 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jun 16 16:27:48 EDT 2011


Author: anil.saldhana at jboss.com
Date: 2011-06-16 16:27:47 -0400 (Thu, 16 Jun 2011)
New Revision: 1004

Added:
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/SOAPUtil.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/SimpleAnyType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/SimpleCollectionUsage.java
Removed:
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ObjectFactory.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/ObjectFactory.java
Modified:
   federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/SOAPSAMLXACMLServletUnitTestCase.java
   federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/soap/SOAPSAMLXACML.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wsse/WSSecurityParser.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTCancelTargetParser.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRenewTargetParser.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenParser.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenResponseParser.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTValidateTargetParser.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTrustOnBehalfOfParser.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/IDFedLSInputResolver.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/PicketLinkSTS.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClient.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/StandardRequestHandler.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/WSTrustConstants.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/WSTrustUtil.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/wrappers/RequestSecurityToken.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/wrappers/RequestSecurityTokenCollection.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/wrappers/RequestSecurityTokenResponse.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/wrappers/RequestSecurityTokenResponseCollection.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/writers/WSTrustRSTWriter.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/writers/WSTrustRequestWriter.java
   federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/writers/WSTrustResponseWriter.java
   federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTResponseAssertionHOKCertificateTestCase.java
   federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustCancelTargetSamlTestCase.java
   federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustIssuePublicCertificateTestCase.java
   federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustIssuePublicKeyTestCase.java
   federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustOnBehalfOfTestCase.java
   federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustRenewTargetParsingTestCase.java
   federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustValidateSamlTestCase.java
   federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/PicketLinkSTSUnitTestCase.java
   federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/SAML20TokenProviderUnitTestCase.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AnyAddressingType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/BaseAddressingType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/AllowPostdatingType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/AuthenticatorType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/BinaryExchangeType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/BinarySecretType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/CancelTargetType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ClaimsType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/DelegateToType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/EncryptionType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/EntropyType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/KeyExchangeTokenType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/LifetimeType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/OnBehalfOfType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ParticipantType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ParticipantsType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ProofEncryptionType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RenewTargetType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RenewingType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestKETType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestSecurityTokenCollectionType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestSecurityTokenResponseCollectionType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestSecurityTokenResponseType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestSecurityTokenType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestedProofTokenType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestedReferenceType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestedSecurityTokenType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestedTokenCancelledType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/SignChallengeType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/StatusType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/UseKeyType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ValidateTargetType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/package-info.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/AttributedString.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/BinarySecurityTokenType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/EmbeddedType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/EncodedString.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/KeyIdentifierType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/PasswordString.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/ReferenceType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/SecurityHeaderType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/SecurityTokenReferenceType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/TransformationParametersType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/UsernameTokenType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/package-info.java
Log:
remove jaxb

Modified: federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/SOAPSAMLXACMLServletUnitTestCase.java
===================================================================
--- federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/SOAPSAMLXACMLServletUnitTestCase.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/SOAPSAMLXACMLServletUnitTestCase.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -53,86 +53,86 @@
  * Unit Test the SOAP SAML XACML Servlet
  * @author Anil.Saldhana at redhat.com
  * @since Jan 28, 2009
- */ 
+ */
 public class SOAPSAMLXACMLServletUnitTestCase
-{ 
+{
    @Test
    public void testPermit() throws Exception
-   { 
-      validate("xacml/requests/XacmlRequest-01-01.xml", DecisionType.PERMIT.value(), true ); 
+   {
+      validate("xacml/requests/XacmlRequest-01-01.xml", DecisionType.PERMIT.value(), true);
 
-      validate("xacml/requests/XacmlRequest-format2-01-01.xml", DecisionType.PERMIT.value(), true ); 
+      validate("xacml/requests/XacmlRequest-format2-01-01.xml", DecisionType.PERMIT.value(), true);
    }
-   
+
    @Test
    public void testDeny() throws Exception
-   {  
-      validate("xacml/requests/XacmlRequest-01-02.xml", DecisionType.DENY.value(), true );
+   {
+      validate("xacml/requests/XacmlRequest-01-02.xml", DecisionType.DENY.value(), true);
    }
-    
+
    @Test
    public void testIncorrectInput() throws Exception
    {
       ByteArrayOutputStream baos = new ByteArrayOutputStream();
-      
+
       String garbage = "<fdfdsfdfk/>";
       ByteArrayInputStream bis = new ByteArrayInputStream(garbage.getBytes());
-      
+
       SOAPSAMLXACMLServlet servlet = new SOAPSAMLXACMLServlet();
       servlet.init(new TestServletConfig(getServletContext()));
-      ServletRequest sreq = new TestServletRequest( getSOAPStream( bis ));
+      ServletRequest sreq = new TestServletRequest(getSOAPStream(bis));
       ServletResponse sresp = new TestServletResponse(baos);
-      servlet.service(sreq, sresp); 
-       
+      servlet.service(sreq, sresp);
+
       sresp.flushBuffer(); //Flush the servlet response ServletOutputStream to our baos
-      
+
       bis = new ByteArrayInputStream(baos.toByteArray());
-      
+
       SOAPMessage soapMessage = SOAPSAMLXACMLUtil.getSOAPMessage(bis);
       Node xacmlNode = soapMessage.getSOAPBody().getChildNodes().item(0);
-      assertTrue( xacmlNode instanceof Element );
+      assertTrue(xacmlNode instanceof Element);
       Element xacmlElement = (Element) xacmlNode;
-      assertTrue( xacmlElement.getLocalName().equals( "Fault" ) ); 
+      assertTrue(xacmlElement.getLocalName().equals("Fault"));
       /*Unmarshaller un = JAXBUtil.getUnmarshaller(SOAPSAMLXACMLUtil.getPackage());
       JAXBElement<Envelope> jax = (JAXBElement<Envelope>) un.unmarshal(bis);
       Envelope envelope = jax.getValue();
       assertNotNull("Envelope is not null", envelope); 
       JAXBElement<?> fault = (JAXBElement<?>) envelope.getBody().getAny().get(0);
-      assertTrue(fault.getValue() instanceof Fault);*/ 
+      assertTrue(fault.getValue() instanceof Fault);*/
    }
-   
+
    @Test
    public void testInteropSOAPRequest() throws Exception
    {
-      validate("xacml/requests/interop-request.xml", DecisionType.PERMIT.value(), false ); 
+      validate("xacml/requests/interop-request.xml", DecisionType.PERMIT.value(), false);
    }
-    
-   private void validate(String requestFile, String value, boolean needSOAPWrapping ) throws Exception
-   {  
+
+   private void validate(String requestFile, String value, boolean needSOAPWrapping) throws Exception
+   {
       InputStream is = getInputStream(requestFile);
-      if(is == null)
+      if (is == null)
          throw new IllegalArgumentException("Input Stream to request file is null");
-      
+
       ByteArrayOutputStream baos = new ByteArrayOutputStream();
-      
+
       SOAPSAMLXACMLServlet servlet = new SOAPSAMLXACMLServlet();
       servlet.init(new TestServletConfig(getServletContext()));
-      
-      if( needSOAPWrapping )
-         is = getSOAPStream( is );
-      
-      ServletRequest sreq = new TestServletRequest( is );
+
+      if (needSOAPWrapping)
+         is = getSOAPStream(is);
+
+      ServletRequest sreq = new TestServletRequest(is);
       ServletResponse sresp = new TestServletResponse(baos);
-      servlet.service(sreq, sresp); 
-       
+      servlet.service(sreq, sresp);
+
       sresp.flushBuffer(); //Flush the servlet response ServletOutputStream to our baos
-       
+
       ByteArrayInputStream bis = new ByteArrayInputStream(baos.toByteArray());
 
-      SOAPMessage soapMessage = SOAPSAMLXACMLUtil.getSOAPMessage(bis); 
-      
-      Node xacmlNode = soapMessage.getSOAPBody().getChildNodes().item(0); 
-      XACMLAuthzDecisionStatementType xacmlStatement =  SOAPSAMLXACMLUtil.getDecisionStatement( xacmlNode );
+      SOAPMessage soapMessage = SOAPSAMLXACMLUtil.getSOAPMessage(bis);
+
+      Node xacmlNode = soapMessage.getSOAPBody().getChildNodes().item(0);
+      XACMLAuthzDecisionStatementType xacmlStatement = SOAPSAMLXACMLUtil.getDecisionStatement(xacmlNode);
       /*Unmarshaller un = JAXBUtil.getUnmarshaller(SOAPSAMLXACMLUtil.getPackage());
       JAXBElement<Envelope> jax = (JAXBElement<Envelope>) un.unmarshal(bis);
       Envelope envelope = jax.getValue();
@@ -144,8 +144,8 @@
       assertNotNull("ResponseType is not null", responseType); 
       AssertionType assertion = (AssertionType) responseType.getAssertionOrEncryptedAssertion().get(0);
       XACMLAuthzDecisionStatementType xacmlStatement = (XACMLAuthzDecisionStatementType) assertion.getStatementOrAuthnStatementOrAuthzDecisionStatement().get(0);
-     */ 
-      
+      */
+
       assertNotNull("XACML Authorization Statement is not null", xacmlStatement);
       org.jboss.security.xacml.core.model.context.ResponseType xacmlResponse = xacmlStatement.getResponse();
       ResultType resultType = xacmlResponse.getResult().get(0);
@@ -153,35 +153,34 @@
       assertNotNull("Decision is not null", decision);
       assertEquals(value, decision.value());
    }
-   
+
    private ServletContext getServletContext()
    {
-      HashMap<String,String> map = new HashMap<String, String>();
+      HashMap<String, String> map = new HashMap<String, String>();
       map.put("policyConfigFileName", "xacml/policies/config/rsaConfPolicyConfig.xml");
-      return new TestServletContext(map); 
+      return new TestServletContext(map);
    }
-   
+
    private InputStream getInputStream(String requestFileLoc)
    {
       ClassLoader tcl = Thread.currentThread().getContextClassLoader();
-      return tcl.getResourceAsStream(requestFileLoc); 
-   } 
-   
-   private InputStream getSOAPStream( InputStream dataStream ) throws Exception
+      return tcl.getResourceAsStream(requestFileLoc);
+   }
+
+   private InputStream getSOAPStream(InputStream dataStream) throws Exception
    {
       MessageFactory messageFactory = MessageFactory.newInstance();
       SOAPMessage message = messageFactory.createMessage();
-      SOAPPart soapPart =     message.getSOAPPart();
+      SOAPPart soapPart = message.getSOAPPart();
       SOAPEnvelope envelope = soapPart.getEnvelope();
-      SOAPBody body =         envelope.getBody(); 
-      
-      body.addDocument( DocumentUtil.getDocument(dataStream)); 
+      SOAPBody body = envelope.getBody();
+
+      body.addDocument(DocumentUtil.getDocument(dataStream));
       message.saveChanges();
-      
+
       ByteArrayOutputStream baos = new ByteArrayOutputStream();
       message.writeTo(baos);
-      
-      System.out.println( new String( baos.toByteArray() ) );
-      return new ByteArrayInputStream( baos.toByteArray() );
+
+      return new ByteArrayInputStream(baos.toByteArray());
    }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/soap/SOAPSAMLXACML.java
===================================================================
--- federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/soap/SOAPSAMLXACML.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/soap/SOAPSAMLXACML.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -26,7 +26,6 @@
 import java.io.IOException;
 import java.net.URL;
 
-import javax.xml.soap.MessageFactory;
 import javax.xml.soap.SOAPConnection;
 import javax.xml.soap.SOAPConnectionFactory;
 import javax.xml.soap.SOAPException;
@@ -48,6 +47,7 @@
 import org.picketlink.identity.federation.core.saml.v2.util.DocumentUtil;
 import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
 import org.picketlink.identity.federation.core.saml.v2.writers.SAMLRequestWriter;
+import org.picketlink.identity.federation.core.util.SOAPUtil;
 import org.picketlink.identity.federation.core.util.StaxUtil;
 import org.picketlink.identity.federation.newmodel.saml.v2.assertion.AssertionType;
 import org.picketlink.identity.federation.newmodel.saml.v2.assertion.NameIDType;
@@ -67,9 +67,9 @@
  * @since Jul 30, 2009
  */
 public class SOAPSAMLXACML
-{ 
-   protected Logger log = Logger.getLogger( SOAPSAMLXACML.class );
-   
+{
+   protected Logger log = Logger.getLogger(SOAPSAMLXACML.class);
+
    /**
     * Given an xacml request
     * @param endpoint
@@ -80,42 +80,40 @@
     * @throws SOAPException 
     * @throws ParsingException 
     */
-   public Result send(String endpoint, String issuer, RequestType xacmlRequest) throws ProcessingException, SOAPException, ParsingException
-   { 
+   public Result send(String endpoint, String issuer, RequestType xacmlRequest) throws ProcessingException,
+         SOAPException, ParsingException
+   {
       try
       {
-         String id = IDGenerator.create( "ID_" );
-         
-         XACMLAuthzDecisionQueryType queryType = new XACMLAuthzDecisionQueryType( id, JBossSAMLConstants.VERSION_2_0.get(),
-               XMLTimeUtil.getIssueInstant() );
-         
+         String id = IDGenerator.create("ID_");
+
+         XACMLAuthzDecisionQueryType queryType = new XACMLAuthzDecisionQueryType(id,
+               JBossSAMLConstants.VERSION_2_0.get(), XMLTimeUtil.getIssueInstant());
+
          queryType.setRequest(xacmlRequest);
-         
+
          //Create Issuer
          NameIDType nameIDType = new NameIDType();
          nameIDType.setValue(issuer);
          queryType.setIssuer(nameIDType);
-         
-         MessageFactory messageFactory = MessageFactory.newInstance();
-         
-         SOAPMessage soapMessage = messageFactory.createMessage();
-         
+
+         SOAPMessage soapMessage = SOAPUtil.create();
+
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          XMLStreamWriter xmlStreamWriter = StaxUtil.getXMLStreamWriter(baos);
 
-         SAMLRequestWriter samlRequestWriter = new SAMLRequestWriter( xmlStreamWriter );
-         samlRequestWriter.write( queryType );
-       
-         if( log.isDebugEnabled() )
+         SAMLRequestWriter samlRequestWriter = new SAMLRequestWriter(xmlStreamWriter);
+         samlRequestWriter.write(queryType);
+
+         if (log.isDebugEnabled())
          {
-            log.debug( "Sending::" + new String( baos.toByteArray() ) );
+            log.debug("Sending::" + new String(baos.toByteArray()));
          }
-       
-         Document reqDocument = DocumentUtil.getDocument( new ByteArrayInputStream( baos.toByteArray() )); 
-       
+
+         Document reqDocument = DocumentUtil.getDocument(new ByteArrayInputStream(baos.toByteArray()));
+
          soapMessage.getSOAPBody().addDocument(reqDocument);
-         
-         
+
          /*Envelope envelope = createEnvelope(jaxbQueryType);
          
          JAXBElement<?> soapRequest = SOAPFactory.getObjectFactory().createEnvelope(envelope);
@@ -123,44 +121,43 @@
          Marshaller marshaller = SOAPSAMLXACMLUtil.getMarshaller();
          Unmarshaller unmarshaller = SOAPSAMLXACMLUtil.getUnmarshaller();
          */
-         
+
          SOAPConnectionFactory connectFactory = SOAPConnectionFactory.newInstance();
          SOAPConnection connection = connectFactory.createConnection();
          //Send it across the wire
          URL url = new URL(endpoint);
-         
-         SOAPMessage response = connection.call(soapMessage, url); 
-         
+
+         SOAPMessage response = connection.call(soapMessage, url);
+
          NodeList nl = response.getSOAPBody().getChildNodes();
          Node node = null;
-         
+
          int length = nl != null ? nl.getLength() : 0;
-         for( int i = 0; i < length; i++ )
+         for (int i = 0; i < length; i++)
          {
-            Node n = nl.item(i); 
+            Node n = nl.item(i);
             String localName = n.getLocalName();
-            if( localName.contains( JBossSAMLConstants.RESPONSE.get() ))
+            if (localName.contains(JBossSAMLConstants.RESPONSE.get()))
             {
                node = n;
                break;
             }
          }
-         if( node == null )
-            throw new RuntimeException( "Did not find Response node" );
-         
+         if (node == null)
+            throw new RuntimeException("Did not find Response node");
 
-         XMLEventReader xmlEventReader = StaxParserUtil.getXMLEventReader( DocumentUtil.getNodeAsStream( node ));
+         XMLEventReader xmlEventReader = StaxParserUtil.getXMLEventReader(DocumentUtil.getNodeAsStream(node));
          SAMLResponseParser samlResponseParser = new SAMLResponseParser();
          ResponseType responseType = (ResponseType) samlResponseParser.parse(xmlEventReader);
-         
+
          //ResponseType responseType = (ResponseType) response;
-         AssertionType at = (AssertionType) responseType.getAssertions().get(0).getAssertion();
+         AssertionType at = responseType.getAssertions().get(0).getAssertion();
          XACMLAuthzDecisionStatementType xst = (XACMLAuthzDecisionStatementType) at.getStatements().iterator().next();
          ResultType rt = xst.getResponse().getResult().get(0);
-         DecisionType dt = rt.getDecision(); 
-         
-         return new Result(dt,null);
-      } 
+         DecisionType dt = rt.getDecision();
+
+         return new Result(dt, null);
+      }
       catch (IOException e)
       {
          throw new ProcessingException(e);
@@ -169,44 +166,45 @@
       {
          throw new ProcessingException(e);
       }
-   } 
-   
+   }
+
    public static class Result
    {
-      private Element fault = null; 
-      private DecisionType decisionType;
-      
+      private Element fault = null;
+
+      private final DecisionType decisionType;
+
       Result(DecisionType decision, Element fault)
       {
          this.decisionType = decision;
          this.fault = fault;
       }
-      
+
       public boolean isResponseAvailable()
       {
          return decisionType != null;
       }
-      
+
       public boolean isFault()
       {
          return fault != null;
       }
-      
+
       public DecisionType getDecision()
       {
          return decisionType;
       }
-      
+
       public Element getFault()
       {
          return fault;
       }
-      
+
       public boolean isPermit()
       {
          return decisionType == DecisionType.PERMIT;
       }
-      
+
       public boolean isDeny()
       {
          return decisionType == DecisionType.DENY;

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wsse/WSSecurityParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wsse/WSSecurityParser.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wsse/WSSecurityParser.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -48,128 +48,130 @@
  * @since Oct 14, 2010
  */
 public class WSSecurityParser extends AbstractParser
-{   
+{
    /**
     * @see {@link ParserNamespaceSupport#parse(XMLEventReader)}
     */
    public Object parse(XMLEventReader xmlEventReader) throws ParsingException
-   { 
-      while( xmlEventReader.hasNext() )
+   {
+      while (xmlEventReader.hasNext())
       {
-         XMLEvent xmlEvent = StaxParserUtil.peek( xmlEventReader ); 
+         XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
 
-         if( xmlEvent instanceof StartElement )
+         if (xmlEvent instanceof StartElement)
          {
             StartElement startElement = (StartElement) xmlEvent;
 
-            String elementName = StaxParserUtil.getStartElementName( startElement );
-            if( elementName.equalsIgnoreCase( WSTrustConstants.WSSE.USERNAME_TOKEN ))
-            { 
+            String elementName = StaxParserUtil.getStartElementName(startElement);
+            if (elementName.equalsIgnoreCase(WSTrustConstants.WSSE.USERNAME_TOKEN))
+            {
                startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
-               
+
                UsernameTokenType userNameToken = new UsernameTokenType();
-               
+
                //Get the Id attribute
-               QName idQName = new QName( WSTrustConstants.WSU_NS, "Id" );
-               Attribute idAttribute = startElement.getAttributeByName( idQName );
-               
-               if( idAttribute == null )
-                  throw new RuntimeException( "missing wsu:Id attribute" );
-               
-               userNameToken.setId( StaxParserUtil.getAttributeValue( idAttribute ));
-               
+               QName idQName = new QName(WSTrustConstants.WSU_NS, "Id");
+               Attribute idAttribute = startElement.getAttributeByName(idQName);
+
+               if (idAttribute == null)
+                  throw new RuntimeException("missing wsu:Id attribute");
+
+               userNameToken.setId(StaxParserUtil.getAttributeValue(idAttribute));
+
                startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
-               
-               if( !StaxParserUtil.hasTextAhead( xmlEventReader ))
-                  throw new ParsingException( "userName is expected ahead" );
-               
+
+               if (!StaxParserUtil.hasTextAhead(xmlEventReader))
+                  throw new ParsingException("userName is expected ahead");
+
                String userName = StaxParserUtil.getElementText(xmlEventReader);
-               
+
                AttributedString attributedString = new AttributedString();
                attributedString.setValue(userName);
-               
-               userNameToken.setUsername( attributedString ); 
-               
+
+               userNameToken.setUsername(attributedString);
+
                //Get the end element
                EndElement onBehalfOfEndElement = StaxParserUtil.getNextEndElement(xmlEventReader);
-               StaxParserUtil.validate( onBehalfOfEndElement, WSTrustConstants.WSSE.USERNAME_TOKEN ) ;
-               
+               StaxParserUtil.validate(onBehalfOfEndElement, WSTrustConstants.WSSE.USERNAME_TOKEN);
+
                return userNameToken;
-            }  
-            else if( elementName.equals( WSTrustConstants.WSSE.SECURITY_TOKEN_REFERENCE ))
-            { 
-               return parseSecurityTokenReference(xmlEventReader); 
             }
+            else if (elementName.equals(WSTrustConstants.WSSE.SECURITY_TOKEN_REFERENCE))
+            {
+               return parseSecurityTokenReference(xmlEventReader);
+            }
          }
          else
          {
-            StaxParserUtil.getNextEvent(xmlEventReader); 
+            StaxParserUtil.getNextEvent(xmlEventReader);
          }
       }
-      throw new RuntimeException( "WSSecurity Parsing has failed" );
+      throw new RuntimeException("WSSecurity Parsing has failed");
    }
-   
+
    /**
     * @see {@link ParserNamespaceSupport#supports(QName)}
     */
    public boolean supports(QName qname)
    {
-      String nsURI = qname.getNamespaceURI(); 
-      
-      return WSTrustConstants.WSSE_NS.equals( nsURI );
+      String nsURI = qname.getNamespaceURI();
+
+      return WSTrustConstants.WSSE_NS.equals(nsURI);
    }
-   
-   private SecurityTokenReferenceType parseSecurityTokenReference( XMLEventReader xmlEventReader ) throws ParsingException
+
+   private SecurityTokenReferenceType parseSecurityTokenReference(XMLEventReader xmlEventReader)
+         throws ParsingException
    {
       StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
-      StaxParserUtil.validate(startElement, WSTrustConstants.WSSE.SECURITY_TOKEN_REFERENCE );
-      
+      StaxParserUtil.validate(startElement, WSTrustConstants.WSSE.SECURITY_TOKEN_REFERENCE);
+
       SecurityTokenReferenceType securityTokenRef = new SecurityTokenReferenceType();
-      
+
       //Get the Token Type attribute
-      QName tokenType = new QName( WSTrustConstants.WSSE11_NS, WSTrustConstants.TOKEN_TYPE );
-      Attribute tokenTypeAttr = startElement.getAttributeByName( tokenType );
-      if(tokenTypeAttr != null )
-      { 
-         tokenType = new QName( WSTrustConstants.WSSE11_NS, WSTrustConstants.TOKEN_TYPE, tokenTypeAttr.getName().getPrefix() );
-         securityTokenRef.getOtherAttributes().put( tokenType, StaxParserUtil.getAttributeValue( tokenTypeAttr )); 
+      QName tokenType = new QName(WSTrustConstants.WSSE11_NS, WSTrustConstants.TOKEN_TYPE);
+      Attribute tokenTypeAttr = startElement.getAttributeByName(tokenType);
+      if (tokenTypeAttr != null)
+      {
+         tokenType = new QName(WSTrustConstants.WSSE11_NS, WSTrustConstants.TOKEN_TYPE, tokenTypeAttr.getName()
+               .getPrefix());
+         securityTokenRef.addOtherAttribute(tokenType, StaxParserUtil.getAttributeValue(tokenTypeAttr));
       }
-      
-      XMLEvent xmlEvent = null; 
+
+      XMLEvent xmlEvent = null;
       EndElement endElement = null;
       String tag = null;
-      
-      while( xmlEventReader.hasNext() )
+
+      while (xmlEventReader.hasNext())
       {
          xmlEvent = StaxParserUtil.peek(xmlEventReader);
-         if( xmlEvent instanceof EndElement )
+         if (xmlEvent instanceof EndElement)
          {
             endElement = (EndElement) xmlEvent;
             tag = StaxParserUtil.getEndElementName(endElement);
-            if( tag.equals( WSTrustConstants.WSSE.SECURITY_TOKEN_REFERENCE ))
+            if (tag.equals(WSTrustConstants.WSSE.SECURITY_TOKEN_REFERENCE))
             {
                endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
                break;
             }
             else
-               throw new RuntimeException( "unknown end element:" + tag );
+               throw new RuntimeException("unknown end element:" + tag);
          }
 
          startElement = (StartElement) xmlEvent;
          tag = StaxParserUtil.getStartElementName(startElement);
-         if( tag.equals( WSTrustConstants.WSSE.KEY_IDENTIFIER ))
-         { 
+         if (tag.equals(WSTrustConstants.WSSE.KEY_IDENTIFIER))
+         {
             startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
             KeyIdentifierType keyIdentifierType = new KeyIdentifierType();
 
-            Attribute valueTypeAttr = startElement.getAttributeByName( new QName( WSTrustConstants.VALUE_TYPE ));
-            if( valueTypeAttr != null )
-               keyIdentifierType.setValueType( StaxParserUtil.getAttributeValue( valueTypeAttr )); 
-            keyIdentifierType.setValue( StaxParserUtil.getElementText(xmlEventReader));
-            securityTokenRef.getAny().add( keyIdentifierType );
+            Attribute valueTypeAttr = startElement.getAttributeByName(new QName(WSTrustConstants.VALUE_TYPE));
+            if (valueTypeAttr != null)
+               keyIdentifierType.setValueType(StaxParserUtil.getAttributeValue(valueTypeAttr));
+            keyIdentifierType.setValue(StaxParserUtil.getElementText(xmlEventReader));
+            securityTokenRef.addAny(keyIdentifierType);
          }
-      } 
-      
+      }
+
       return securityTokenRef;
    }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTCancelTargetParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTCancelTargetParser.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTCancelTargetParser.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -45,30 +45,30 @@
     * @see {@link ParserNamespaceSupport#parse(XMLEventReader)}
     */
    public Object parse(XMLEventReader xmlEventReader) throws ParsingException
-   {  
+   {
       CancelTargetType cancelTarget = new CancelTargetType();
-      StartElement startElement =  StaxParserUtil.peekNextStartElement( xmlEventReader );
+      StartElement startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
       // null start element indicates that the token to be canceled hasn't been specified.
       if (startElement == null)
       {
          throw new ParsingException("Unable to parse cancel token request: security token is null");
       }
-      String tag = StaxParserUtil.getStartElementName( startElement );
-      
-      if( tag.equals( JBossSAMLConstants.ASSERTION.get() ) )
+      String tag = StaxParserUtil.getStartElementName(startElement);
+
+      if (tag.equals(JBossSAMLConstants.ASSERTION.get()))
       {
          SAMLParser assertionParser = new SAMLParser();
-         AssertionType assertion = (AssertionType) assertionParser.parse( xmlEventReader );
-         cancelTarget.setAny( assertion );
+         AssertionType assertion = (AssertionType) assertionParser.parse(xmlEventReader);
+         cancelTarget.add(assertion);
       }
       else
       {
          // this is an unknown type - parse using the transformer.
          try
-         { 
-            cancelTarget.setAny( StaxParserUtil.getDOMElement(xmlEventReader) );
+         {
+            cancelTarget.add(StaxParserUtil.getDOMElement(xmlEventReader));
          }
-         catch(Exception e)
+         catch (Exception e)
          {
             throw new ParsingException("Error parsing security token: " + e.getMessage(), e);
          }
@@ -80,11 +80,10 @@
     * @see {@link ParserNamespaceSupport#supports(QName)}
     */
    public boolean supports(QName qname)
-   { 
+   {
       String nsURI = qname.getNamespaceURI();
       String localPart = qname.getLocalPart();
-      
-      return WSTrustConstants.BASE_NAMESPACE.equals( nsURI )
-             && WSTrustConstants.CANCEL_TARGET.equals( localPart );
-   } 
+
+      return WSTrustConstants.BASE_NAMESPACE.equals(nsURI) && WSTrustConstants.CANCEL_TARGET.equals(localPart);
+   }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRenewTargetParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRenewTargetParser.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRenewTargetParser.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -57,16 +57,16 @@
       {
          SAMLParser assertionParser = new SAMLParser();
          AssertionType assertion = (AssertionType) assertionParser.parse(xmlEventReader);
-         renewTargetType.setAny(assertion);
+         renewTargetType.add(assertion);
       }
       else
       {
          // this is an unknown type - parse using the transformer.
          try
-         { 
-            renewTargetType.setAny( StaxParserUtil.getDOMElement(xmlEventReader) );
+         {
+            renewTargetType.add(StaxParserUtil.getDOMElement(xmlEventReader));
          }
-         catch(Exception e)
+         catch (Exception e)
          {
             throw new ParsingException("Error parsing security token: " + e.getMessage(), e);
          }

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenParser.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenParser.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -246,7 +246,7 @@
                      throw new ParsingException("binary secret value is expected ahead");
 
                   binarySecret.setValue(StaxParserUtil.getElementText(xmlEventReader).getBytes());
-                  entropy.getAny().add(binarySecret);
+                  entropy.addAny(binarySecret);
                }
                requestToken.setEntropy(entropy);
                EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
@@ -284,14 +284,14 @@
                   Element domElement = StaxParserUtil.getDOMElement(xmlEventReader);
                   //Element domElement = getX509CertificateAsDomElement( subEvent, xmlEventReader );
 
-                  useKeyType.setAny(domElement);
+                  useKeyType.add(domElement);
                   requestToken.setUseKey(useKeyType);
                }
                else if (StaxParserUtil.matches(subEvent, KEYVALUE))
                {
                   //Element domElement = getKeyValueAsDomElement( subEvent, xmlEventReader );
                   Element domElement = StaxParserUtil.getDOMElement(xmlEventReader);//
-                  useKeyType.setAny(domElement);
+                  useKeyType.add(domElement);
                   requestToken.setUseKey(useKeyType);
 
                   EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenResponseParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenResponseParser.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenResponseParser.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -217,7 +217,7 @@
                      throw new ParsingException("binary secret value is expected ahead");
 
                   binarySecret.setValue(StaxParserUtil.getElementText(xmlEventReader).getBytes());
-                  entropy.getAny().add(binarySecret);
+                  entropy.addAny(binarySecret);
                }
                responseToken.setEntropy(entropy);
                EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
@@ -236,13 +236,13 @@
                   Element domElement = StaxParserUtil.getDOMElement(xmlEventReader);
                   // Element domElement = getX509CertificateAsDomElement( subEvent, xmlEventReader );
 
-                  useKeyType.setAny(domElement);
+                  useKeyType.add(domElement);
                   responseToken.setUseKey(useKeyType);
                }
                else if (StaxParserUtil.matches(subEvent, KEYVALUE))
                {
                   Element domElement = StaxParserUtil.getDOMElement(xmlEventReader);
-                  useKeyType.setAny(domElement);
+                  useKeyType.add(domElement);
                   responseToken.setUseKey(useKeyType);
                }
                else
@@ -268,7 +268,7 @@
                      throw new ParsingException("binary secret value is expected ahead");
 
                   binarySecret.setValue(StaxParserUtil.getElementText(xmlEventReader).getBytes());
-                  requestedProofToken.setAny(binarySecret);
+                  requestedProofToken.add(binarySecret);
                }
                else if (StaxParserUtil.matches(subEvent, WSTrustConstants.COMPUTED_KEY))
                {
@@ -276,7 +276,7 @@
                   if (!StaxParserUtil.hasTextAhead(xmlEventReader))
                      throw new ParsingException("computed key algorithm is expected ahead");
                   computedKey.setAlgorithm(StaxParserUtil.getElementText(xmlEventReader));
-                  requestedProofToken.setAny(computedKey);
+                  requestedProofToken.add(computedKey);
                }
                responseToken.setRequestedProofToken(requestedProofToken);
                EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
@@ -402,7 +402,7 @@
                throw new RuntimeException("unknown end element:" + endElementTag);
          }
          Element tokenElement = StaxParserUtil.getDOMElement(xmlEventReader);
-         requestedSecurityTokenType.setAny(tokenElement);
+         requestedSecurityTokenType.add(tokenElement);
       }
 
       return requestedSecurityTokenType;

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTValidateTargetParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTValidateTargetParser.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTValidateTargetParser.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -45,30 +45,30 @@
     * @see {@link ParserNamespaceSupport#parse(XMLEventReader)}
     */
    public Object parse(XMLEventReader xmlEventReader) throws ParsingException
-   {  
+   {
       ValidateTargetType validateTargetType = new ValidateTargetType();
-      StartElement startElement =  StaxParserUtil.peekNextStartElement( xmlEventReader ); 
+      StartElement startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
       // null start element indicates that the token to be validated hasn't been specified.
       if (startElement == null)
       {
          throw new ParsingException("Unable to parse validate token request: security token is null");
       }
-      String tag = StaxParserUtil.getStartElementName( startElement );
-      
-      if( tag.equals( JBossSAMLConstants.ASSERTION.get() ) )
+      String tag = StaxParserUtil.getStartElementName(startElement);
+
+      if (tag.equals(JBossSAMLConstants.ASSERTION.get()))
       {
          SAMLParser assertionParser = new SAMLParser();
-         AssertionType assertion = (AssertionType) assertionParser.parse( xmlEventReader );
-         validateTargetType.setAny( assertion );
+         AssertionType assertion = (AssertionType) assertionParser.parse(xmlEventReader);
+         validateTargetType.add(assertion);
       }
       else
       {
          // this is an unknown type - parse using the transformer.
          try
-         { 
-            validateTargetType.setAny( StaxParserUtil.getDOMElement(xmlEventReader) );
+         {
+            validateTargetType.add(StaxParserUtil.getDOMElement(xmlEventReader));
          }
-         catch(Exception e)
+         catch (Exception e)
          {
             throw new ParsingException("Error parsing security token: " + e.getMessage(), e);
          }
@@ -81,11 +81,10 @@
     * @see {@link ParserNamespaceSupport#supports(QName)}
     */
    public boolean supports(QName qname)
-   { 
+   {
       String nsURI = qname.getNamespaceURI();
       String localPart = qname.getLocalPart();
-      
-      return WSTrustConstants.BASE_NAMESPACE.equals( nsURI )
-             && WSTrustConstants.VALIDATE_TARGET.equals( localPart );
-   } 
+
+      return WSTrustConstants.BASE_NAMESPACE.equals(nsURI) && WSTrustConstants.VALIDATE_TARGET.equals(localPart);
+   }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTrustOnBehalfOfParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTrustOnBehalfOfParser.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTrustOnBehalfOfParser.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -54,7 +54,7 @@
          WSSecurityParser wsseParser = new WSSecurityParser();
 
          UsernameTokenType userNameToken = (UsernameTokenType) wsseParser.parse(xmlEventReader);
-         onBehalfType.setAny(userNameToken);
+         onBehalfType.add(userNameToken);
       }
       else
          throw new RuntimeException("Unknown tag:" + tag);

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/IDFedLSInputResolver.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/IDFedLSInputResolver.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/IDFedLSInputResolver.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -36,61 +36,53 @@
  */
 public class IDFedLSInputResolver implements LSResourceResolver
 {
-   private static Map<String, LSInput> lsmap = new HashMap<String,LSInput>(); 
-   
-   private static Map<String, String> schemaLocationMap = new HashMap<String,String>();
-   
+   private static Map<String, LSInput> lsmap = new HashMap<String, LSInput>();
+
+   private static Map<String, String> schemaLocationMap = new HashMap<String, String>();
+
    static
    {
       //SAML
       schemaLocationMap.put("saml-schema-assertion-2.0.xsd", "schema/saml/v2/saml-schema-assertion-2.0.xsd");
-      
+
       //WS-T
-      schemaLocationMap.put("http://docs.oasis-open.org/ws-sx/ws-trust/200512", 
-            "schema/wstrust/v1_3/ws-trust-1.3.xsd");
-      schemaLocationMap.put("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", 
+      schemaLocationMap.put("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "schema/wstrust/v1_3/ws-trust-1.3.xsd");
+      schemaLocationMap.put("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd",
             "schema/wstrust/v1_3/oasis-200401-wss-wssecurity-secext-1.0.xsd");
-      schemaLocationMap.put("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd", 
+      schemaLocationMap.put("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd",
             "schema/wstrust/v1_3/oasis-200401-wss-wssecurity-utility-1.0.xsd");
-      schemaLocationMap.put("http://schemas.xmlsoap.org/ws/2004/09/policy", 
-            "schema/wstrust/v1_3/ws-policy.xsd");
-      schemaLocationMap.put("http://www.w3.org/2005/08/addressing", 
-            "schema/wstrust/v1_3/ws-addr.xsd");
-      
+      schemaLocationMap.put("http://schemas.xmlsoap.org/ws/2004/09/policy", "schema/wstrust/v1_3/ws-policy.xsd");
+      schemaLocationMap.put("http://www.w3.org/2005/08/addressing", "schema/wstrust/v1_3/ws-addr.xsd");
+
       //XML DSIG
-      schemaLocationMap.put("http://www.w3.org/2000/09/xmldsig#", 
+      schemaLocationMap.put("http://www.w3.org/2000/09/xmldsig#", "schema/w3c/xmldsig/xmldsig-core-schema.xsd");
+      schemaLocationMap.put("http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd",
             "schema/w3c/xmldsig/xmldsig-core-schema.xsd");
-      schemaLocationMap.put("http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd", 
-             "schema/w3c/xmldsig/xmldsig-core-schema.xsd");
-      
+
       //XML Enc
-      schemaLocationMap.put("http://www.w3.org/2001/04/xmlenc#",
-             "schema/w3c/xmlenc/xenc-schema.xsd");
+      schemaLocationMap.put("http://www.w3.org/2001/04/xmlenc#", "schema/w3c/xmlenc/xenc-schema.xsd");
       schemaLocationMap.put("http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/xenc-schema.xsd",
-             "schema/w3c/xmlenc/xenc-schema.xsd"); 
-      
+            "schema/w3c/xmlenc/xenc-schema.xsd");
+
       //XML Schema/DTD
-      schemaLocationMap.put("datatypes.dtd",
-             "schema/w3c/xmlschema/datatypes.dtd");
-      schemaLocationMap.put("http://www.w3.org/2001/XMLSchema.dtd",
-             "schema/w3c/xmlschema/XMLSchema.dtd");
+      schemaLocationMap.put("datatypes.dtd", "schema/w3c/xmlschema/datatypes.dtd");
+      schemaLocationMap.put("http://www.w3.org/2001/XMLSchema.dtd", "schema/w3c/xmlschema/XMLSchema.dtd");
    }
-   
-   public LSInput resolveResource(String type, 
-         String namespaceURI, final String publicId, 
-         final String systemId, final String baseURI)
-   {   
+
+   public LSInput resolveResource(String type, String namespaceURI, final String publicId, final String systemId,
+         final String baseURI)
+   {
       LSInput lsi = lsmap.get(systemId);
-      if(lsi == null)
+      if (lsi == null)
       {
-         ClassLoader tcl = SecurityActions.getContextClassLoader(); 
+         ClassLoader tcl = SecurityActions.getContextClassLoader();
          String loc = schemaLocationMap.get(systemId);
-         if(loc == null)
+         if (loc == null)
             return null;
-         
-         final InputStream is = tcl.getResourceAsStream(loc); 
-         if(is == null)
-            System.out.println("inputstream is null for "+ loc);
+
+         final InputStream is = tcl.getResourceAsStream(loc);
+         if (is == null)
+            throw new RuntimeException("inputstream is null for " + loc);
          lsi = new LSInput()
          {
             public String getBaseURI()
@@ -104,17 +96,17 @@
             }
 
             public boolean getCertifiedText()
-            { 
+            {
                return false;
             }
 
             public Reader getCharacterStream()
-            { 
+            {
                return null;
             }
 
             public String getEncoding()
-            { 
+            {
                return null;
             }
 
@@ -124,7 +116,7 @@
             }
 
             public String getStringData()
-            { 
+            {
                return null;
             }
 
@@ -164,9 +156,9 @@
             public void setSystemId(String systemId)
             {
             }
-        };
+         };
 
-        lsmap.put(systemId, lsi);
+         lsmap.put(systemId, lsi);
       }
       return lsi;
    }

Added: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/SOAPUtil.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/SOAPUtil.java	                        (rev 0)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/SOAPUtil.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -0,0 +1,43 @@
+/*
+ * 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.identity.federation.core.util;
+
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+
+/**
+ * Utility class dealing with SAAJ
+ * @author Anil.Saldhana at redhat.com
+ * @since Jun 16, 2011
+ */
+public class SOAPUtil
+{
+   public static SOAPMessage create() throws SOAPException
+   {
+      MessageFactory messageFactory = MessageFactory.newInstance();
+
+      SOAPMessage soapMessage = messageFactory.createMessage();
+      return soapMessage;
+   }
+
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/PicketLinkSTS.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/PicketLinkSTS.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/PicketLinkSTS.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -19,11 +19,15 @@
 
 import java.io.File;
 import java.io.InputStream;
+import java.net.URI;
 import java.net.URL;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
 import javax.annotation.Resource;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPHeader;
+import javax.xml.soap.SOAPMessage;
 import javax.xml.transform.Source;
 import javax.xml.transform.dom.DOMResult;
 import javax.xml.transform.dom.DOMSource;
@@ -40,6 +44,8 @@
 import org.picketlink.identity.federation.core.parsers.sts.STSConfigParser;
 import org.picketlink.identity.federation.core.parsers.wst.WSTrustParser;
 import org.picketlink.identity.federation.core.saml.v2.util.DocumentUtil;
+import org.picketlink.identity.federation.core.util.SOAPUtil;
+import org.picketlink.identity.federation.core.wstrust.WSTrustConstants.WSSE;
 import org.picketlink.identity.federation.core.wstrust.wrappers.BaseRequestSecurityToken;
 import org.picketlink.identity.federation.core.wstrust.wrappers.RequestSecurityToken;
 import org.picketlink.identity.federation.core.wstrust.wrappers.RequestSecurityTokenCollection;
@@ -47,6 +53,9 @@
 import org.picketlink.identity.federation.core.wstrust.wrappers.RequestSecurityTokenResponseCollection;
 import org.picketlink.identity.federation.core.wstrust.writers.WSTrustResponseWriter;
 import org.w3c.dom.Document;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
 
 /**
  * <p>
@@ -56,8 +65,8 @@
  * @author <a href="mailto:sguilhen at redhat.com">Stefan Guilhen</a>
  */
 @WebServiceProvider(serviceName = "PicketLinkSTS", portName = "PicketLinkSTSPort", targetNamespace = "urn:picketlink:identity-federation:sts", wsdlLocation = "WEB-INF/wsdl/PicketLinkSTS.wsdl")
- at ServiceMode(value = Service.Mode.PAYLOAD)
-public class PicketLinkSTS implements Provider<Source>// SecurityTokenService
+ at ServiceMode(value = Service.Mode.MESSAGE)
+public class PicketLinkSTS implements Provider<SOAPMessage>// SecurityTokenService
 {
    private static Logger logger = Logger.getLogger(PicketLinkSTS.class);
 
@@ -78,6 +87,108 @@
 
    protected STSConfiguration config;
 
+   //If the SOAP Message contained a wsse:binaryToken, all the providers can have access to it
+   public static ThreadLocal<BinaryToken> binaryToken = new InheritableThreadLocal<BinaryToken>();
+
+   public static class BinaryToken
+   {
+      public Node token;
+   }
+
+   public SOAPMessage invoke(SOAPMessage request)
+   {
+      String valueType = null;
+      //Check headers
+      try
+      {
+         SOAPHeader soapHeader = request.getSOAPHeader();
+         Node binaryToken = getBinaryToken(soapHeader);
+         if (binaryToken != null)
+         {
+            NamedNodeMap namedNodeMap = binaryToken.getAttributes();
+            int length = namedNodeMap != null ? namedNodeMap.getLength() : 0;
+            for (int i = 0; i < length; i++)
+            {
+               Node nodeValueType = namedNodeMap.getNamedItem(WSSE.VALUE_TYPE);
+               if (nodeValueType != null)
+               {
+                  valueType = nodeValueType.getNodeValue();
+                  break;
+               }
+            }
+         }
+      }
+      catch (SOAPException e)
+      {
+         throw new WebServiceException(e);
+      }
+      Document document;
+      BaseRequestSecurityToken baseRequest;
+      try
+      {
+         Node payLoad = request.getSOAPBody().getFirstChild();
+         document = DocumentUtil.createDocument();
+         payLoad = document.importNode(payLoad, true);
+         document.appendChild(payLoad);
+
+         WSTrustParser parser = new WSTrustParser();
+
+         baseRequest = (BaseRequestSecurityToken) parser.parse(DocumentUtil.getNodeAsStream(document));
+      }
+      catch (Exception e)
+      {
+         throw new WebServiceException(e);
+      }
+
+      if (baseRequest instanceof RequestSecurityToken)
+      {
+         RequestSecurityToken req = (RequestSecurityToken) baseRequest;
+         req.setRSTDocument(document);
+         if (valueType != null)
+         {
+            req.setBinaryValueType(URI.create(valueType));
+         }
+         Source theResponse = this.handleTokenRequest(req);
+         return convert(theResponse);
+      }
+      else if (baseRequest instanceof RequestSecurityTokenCollection)
+      {
+         return convert(this.handleTokenRequestCollection((RequestSecurityTokenCollection) baseRequest));
+      }
+      else
+         throw new WebServiceException("Invalid security token request");
+   }
+
+   private SOAPMessage convert(Source theResponse)
+   {
+      try
+      {
+         SOAPMessage response = SOAPUtil.create();
+         Document theResponseDoc = (Document) DocumentUtil.getNodeFromSource(theResponse);
+         response.getSOAPBody().addDocument(theResponseDoc);
+         return response;
+      }
+      catch (Exception e)
+      {
+         throw new WebServiceException(e);
+      }
+   }
+
+   private Node getBinaryToken(SOAPHeader soapHeader)
+   {
+      NodeList children = soapHeader.getChildNodes();
+      int length = children != null ? children.getLength() : 0;
+      for (int i = 0; i < length; i++)
+      {
+         Node child = children.item(i);
+         if (child.getNodeName().contains(WSSE.BINARY_SECURITY_TOKEN))
+         {
+            return child;
+         }
+      }
+      return null;
+   }
+
    /*
     * (non-Javadoc)
     * 
@@ -250,4 +361,5 @@
          throw new ConfigurationException("Error parsing the configuration file:[" + configurationFileURL + "]", e);
       }
    }
+
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClient.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClient.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClient.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -337,7 +337,7 @@
       request.setTokenType(URI.create(WSTrustConstants.STATUS_TYPE));
       request.setRequestType(URI.create(WSTrustConstants.RENEW_REQUEST));
       RenewTargetType renewTarget = new RenewTargetType();
-      renewTarget.setAny(token);
+      renewTarget.add(token);
       request.setRenewTarget(renewTarget);
 
       // send the token request to JBoss STS and get the response.
@@ -397,7 +397,7 @@
       request.setTokenType(URI.create(WSTrustConstants.STATUS_TYPE));
       request.setRequestType(URI.create(WSTrustConstants.VALIDATE_REQUEST));
       ValidateTargetType validateTarget = new ValidateTargetType();
-      validateTarget.setAny(token);
+      validateTarget.add(token);
       request.setValidateTarget(validateTarget);
 
       DOMSource requestSource = this.createSourceFromRequest(request);
@@ -441,7 +441,7 @@
       RequestSecurityToken request = new RequestSecurityToken();
       request.setRequestType(URI.create(WSTrustConstants.CANCEL_REQUEST));
       CancelTargetType cancelTarget = new CancelTargetType();
-      cancelTarget.setAny(securityToken);
+      cancelTarget.add(securityToken);
       request.setCancelTarget(cancelTarget);
       request.setContext("context");
 

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/StandardRequestHandler.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/StandardRequestHandler.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/StandardRequestHandler.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -22,6 +22,7 @@
 import java.security.Principal;
 import java.security.PublicKey;
 import java.security.cert.Certificate;
+import java.util.List;
 
 import javax.crypto.SecretKey;
 import javax.crypto.spec.SecretKeySpec;
@@ -67,7 +68,7 @@
 {
    private static Logger log = Logger.getLogger(StandardRequestHandler.class);
 
-   private boolean trace = log.isTraceEnabled();
+   private final boolean trace = log.isTraceEnabled();
 
    private static long KEY_SIZE = 128;
 
@@ -102,17 +103,17 @@
       if (appliesTo != null)
       {
          String serviceName = WSTrustUtil.parseAppliesTo(appliesTo);
-         
+
          if (serviceName != null)
          {
-           String tokenTypeFromServiceName = configuration.getTokenTypeForService(serviceName);
-           
-           if( request.getTokenType() == null && tokenTypeFromServiceName != null )
-              request.setTokenType(URI.create( tokenTypeFromServiceName ));
+            String tokenTypeFromServiceName = configuration.getTokenTypeForService(serviceName);
 
-           providerPublicKey = this.configuration.getServiceProviderPublicKey(serviceName);
-           
-           // provider = this.configuration.getProviderForService(serviceName);
+            if (request.getTokenType() == null && tokenTypeFromServiceName != null)
+               request.setTokenType(URI.create(tokenTypeFromServiceName));
+
+            providerPublicKey = this.configuration.getServiceProviderPublicKey(serviceName);
+
+            // provider = this.configuration.getProviderForService(serviceName);
             /*if (provider != null)
             {
                request.setTokenType(URI.create(this.configuration.getTokenTypeForService(serviceName)));
@@ -130,118 +131,119 @@
 
       if (provider != null)
       {*/
-         // create the request context and delegate token generation to the provider.
-         WSTrustRequestContext requestContext = new WSTrustRequestContext(request, callerPrincipal);
-         requestContext.setTokenIssuer(this.configuration.getSTSName());
-         if (request.getLifetime() == null && this.configuration.getIssuedTokenTimeout() != 0)
-         {
-            // if no lifetime has been specified, use the configured timeout value.
-            if (log.isDebugEnabled())
-               log.debug("Lifetime has not been specified. Using the default timeout value.");
-            request.setLifetime(WSTrustUtil.createDefaultLifetime(this.configuration.getIssuedTokenTimeout()));
-         }
-         requestContext.setServiceProviderPublicKey(providerPublicKey);
+      // create the request context and delegate token generation to the provider.
+      WSTrustRequestContext requestContext = new WSTrustRequestContext(request, callerPrincipal);
+      requestContext.setTokenIssuer(this.configuration.getSTSName());
+      if (request.getLifetime() == null && this.configuration.getIssuedTokenTimeout() != 0)
+      {
+         // if no lifetime has been specified, use the configured timeout value.
+         if (log.isDebugEnabled())
+            log.debug("Lifetime has not been specified. Using the default timeout value.");
+         request.setLifetime(WSTrustUtil.createDefaultLifetime(this.configuration.getIssuedTokenTimeout()));
+      }
+      requestContext.setServiceProviderPublicKey(providerPublicKey);
 
-         // process the claims if needed.
-         if (request.getClaims() != null)
-         {
-            ClaimsType claims = request.getClaims();
-            ClaimsProcessor processor = this.configuration.getClaimsProcessor(claims.getDialect());
-            // if there is a processor, process the claims and set the resulting attributes in the context.
-            if (processor != null)
-               requestContext.setClaimedAttributes(processor.processClaims(claims, callerPrincipal));
-            else if (log.isDebugEnabled())
-               log.debug("Claims have been specified in the request but no processor was found for dialect "
-                     + claims.getDialect());
-         }
+      // process the claims if needed.
+      if (request.getClaims() != null)
+      {
+         ClaimsType claims = request.getClaims();
+         ClaimsProcessor processor = this.configuration.getClaimsProcessor(claims.getDialect());
+         // if there is a processor, process the claims and set the resulting attributes in the context.
+         if (processor != null)
+            requestContext.setClaimedAttributes(processor.processClaims(claims, callerPrincipal));
+         else if (log.isDebugEnabled())
+            log.debug("Claims have been specified in the request but no processor was found for dialect "
+                  + claims.getDialect());
+      }
 
-         // get the OnBehalfOf principal, if one has been specified.
-         if (request.getOnBehalfOf() != null)
-         {
-            Principal onBehalfOfPrincipal = WSTrustUtil.getOnBehalfOfPrincipal(request.getOnBehalfOf());
-            requestContext.setOnBehalfOfPrincipal(onBehalfOfPrincipal);
-         }
+      // get the OnBehalfOf principal, if one has been specified.
+      if (request.getOnBehalfOf() != null)
+      {
+         Principal onBehalfOfPrincipal = WSTrustUtil.getOnBehalfOfPrincipal(request.getOnBehalfOf());
+         requestContext.setOnBehalfOfPrincipal(onBehalfOfPrincipal);
+      }
 
-         // get the key type and size from the request, setting default values if not specified.
-         URI keyType = request.getKeyType();
-         if (keyType == null)
-         {
-            if (log.isDebugEnabled())
-               log.debug("No key type could be found in the request. Using the default BEARER type.");
-            keyType = URI.create(WSTrustConstants.KEY_TYPE_BEARER);
-            request.setKeyType(keyType);
-         }
-         long keySize = request.getKeySize();
-         if (keySize == 0)
-         {
-            if (log.isDebugEnabled())
-               log.debug("No key size could be found in the request. Using the default size. (" + KEY_SIZE + ")");
-            keySize = KEY_SIZE;
-            request.setKeySize(keySize);
-         }
+      // get the key type and size from the request, setting default values if not specified.
+      URI keyType = request.getKeyType();
+      if (keyType == null)
+      {
+         if (log.isDebugEnabled())
+            log.debug("No key type could be found in the request. Using the default BEARER type.");
+         keyType = URI.create(WSTrustConstants.KEY_TYPE_BEARER);
+         request.setKeyType(keyType);
+      }
+      long keySize = request.getKeySize();
+      if (keySize == 0)
+      {
+         if (log.isDebugEnabled())
+            log.debug("No key size could be found in the request. Using the default size. (" + KEY_SIZE + ")");
+         keySize = KEY_SIZE;
+         request.setKeySize(keySize);
+      }
 
-         // get the key wrap algorithm.
-         URI keyWrapAlgo = request.getKeyWrapAlgorithm();
+      // get the key wrap algorithm.
+      URI keyWrapAlgo = request.getKeyWrapAlgorithm();
 
-         // create proof-of-possession token and server entropy (if needed).
-         RequestedProofTokenType requestedProofToken = null;
-         EntropyType serverEntropy = null;
+      // create proof-of-possession token and server entropy (if needed).
+      RequestedProofTokenType requestedProofToken = null;
+      EntropyType serverEntropy = null;
 
-         if (WSTrustConstants.KEY_TYPE_SYMMETRIC.equalsIgnoreCase(keyType.toString()))
+      if (WSTrustConstants.KEY_TYPE_SYMMETRIC.equalsIgnoreCase(keyType.toString()))
+      {
+         // symmetric key case: if client entropy is found, compute a key. If not, generate a new key.
+         requestedProofToken = new RequestedProofTokenType();
+
+         byte[] serverSecret = WSTrustUtil.createRandomSecret((int) keySize / 8);
+         BinarySecretType serverBinarySecret = new BinarySecretType();
+         serverBinarySecret.setType(WSTrustConstants.BS_TYPE_NONCE);
+         serverBinarySecret.setValue(Base64.encodeBytes(serverSecret).getBytes());
+
+         byte[] clientSecret = null;
+         EntropyType clientEntropy = request.getEntropy();
+         if (clientEntropy != null)
          {
-            // symmetric key case: if client entropy is found, compute a key. If not, generate a new key.
-            requestedProofToken = new RequestedProofTokenType();
-            
-            byte[] serverSecret = WSTrustUtil.createRandomSecret((int) keySize / 8);
-            BinarySecretType serverBinarySecret = new BinarySecretType();
-            serverBinarySecret.setType(WSTrustConstants.BS_TYPE_NONCE);
-            serverBinarySecret.setValue(Base64.encodeBytes(serverSecret).getBytes());
+            clientSecret = Base64.decode(new String(WSTrustUtil.getBinarySecret(clientEntropy)));
+            serverEntropy = new EntropyType();
+            serverEntropy.addAny(serverBinarySecret);
+         }
 
-            byte[] clientSecret = null;
-            EntropyType clientEntropy = request.getEntropy();
-            if (clientEntropy != null)
+         if (clientSecret != null && clientSecret.length != 0)
+         {
+            // client secret has been specified - combine it with the sts secret.
+            requestedProofToken.add(new ComputedKeyType(WSTrustConstants.CK_PSHA1));
+            byte[] combinedSecret = null;
+            try
             {
-               clientSecret = Base64.decode(new String(WSTrustUtil.getBinarySecret(clientEntropy)));
-               serverEntropy = new EntropyType();
-               serverEntropy.getAny().add(serverBinarySecret);
+               combinedSecret = Base64.encodeBytes(WSTrustUtil.P_SHA1(clientSecret, serverSecret, (int) keySize / 8))
+                     .getBytes();
             }
-
-            if (clientSecret != null && clientSecret.length != 0)
+            catch (Exception e)
             {
-               // client secret has been specified - combine it with the sts secret.
-               requestedProofToken.setAny(new ComputedKeyType(WSTrustConstants.CK_PSHA1));
-               byte[] combinedSecret = null;
-               try
-               {
-                  combinedSecret = Base64
-                        .encodeBytes(WSTrustUtil.P_SHA1(clientSecret, serverSecret, (int) keySize / 8)).getBytes();
-               }
-               catch (Exception e)
-               {
-                  throw new WSTrustException("Error generating combined secret key", e);
-               }
-               requestContext.setProofTokenInfo(WSTrustUtil.createKeyInfo(combinedSecret, providerPublicKey,
-                     keyWrapAlgo));
+               throw new WSTrustException("Error generating combined secret key", e);
             }
-            else
-            {
-               // client secret has not been specified - use the sts secret only.
-               requestedProofToken.setAny(serverBinarySecret);
-               requestContext.setProofTokenInfo(WSTrustUtil.createKeyInfo(serverBinarySecret.getValue(),
-                     providerPublicKey, keyWrapAlgo));
-            }
+            requestContext.setProofTokenInfo(WSTrustUtil.createKeyInfo(combinedSecret, providerPublicKey, keyWrapAlgo));
          }
-         else if (WSTrustConstants.KEY_TYPE_PUBLIC.equalsIgnoreCase(keyType.toString()))
+         else
          {
-            // try to locate the client cert in the keystore using the caller principal as the alias.
-            Certificate certificate = this.configuration.getCertificate(callerPrincipal.getName());
-            if (certificate != null)
-               requestContext.setProofTokenInfo(WSTrustUtil.createKeyInfo(certificate));
-            // if no certificate was found in the keystore, check the UseKey contents.
-            else if (request.getUseKey() != null)
+            // client secret has not been specified - use the sts secret only.
+            requestedProofToken.add(serverBinarySecret);
+            requestContext.setProofTokenInfo(WSTrustUtil.createKeyInfo(serverBinarySecret.getValue(),
+                  providerPublicKey, keyWrapAlgo));
+         }
+      }
+      else if (WSTrustConstants.KEY_TYPE_PUBLIC.equalsIgnoreCase(keyType.toString()))
+      {
+         // try to locate the client cert in the keystore using the caller principal as the alias.
+         Certificate certificate = this.configuration.getCertificate(callerPrincipal.getName());
+         if (certificate != null)
+            requestContext.setProofTokenInfo(WSTrustUtil.createKeyInfo(certificate));
+         // if no certificate was found in the keystore, check the UseKey contents.
+         else if (request.getUseKey() != null)
+         {
+            UseKeyType useKeyType = request.getUseKey();
+            List<Object> theList = useKeyType.getAny();
+            for (Object value : theList)
             {
-               UseKeyType useKeyType = request.getUseKey();
-               Object value = useKeyType.getAny();
                if (value instanceof Element)
                {
                   String elementName = ((Element) value).getLocalName();
@@ -249,69 +251,85 @@
                   if (elementName.equals("X509Certificate"))
                   {
                      X509DataType data = new X509DataType();
-                     data.add( value );
+                     data.add(value);
                      value = data;
                   }
                   KeyInfoType keyInfo = new KeyInfoType();
-                  keyInfo.addContent( value );
+                  keyInfo.addContent(value);
                   requestContext.setProofTokenInfo(keyInfo);
                }
             }
-            else
-               throw new WSTrustException("Unable to locate client public key");
+            /*Object value = useKeyType.getAny();
+            if (value instanceof Element)
+            {
+               String elementName = ((Element) value).getLocalName();
+               // if the specified key is a X509 certificate we must insert it into a X509Data element.
+               if (elementName.equals("X509Certificate"))
+               {
+                  X509DataType data = new X509DataType();
+                  data.add(value);
+                  value = data;
+               }
+               KeyInfoType keyInfo = new KeyInfoType();
+               keyInfo.addContent(value);
+               requestContext.setProofTokenInfo(keyInfo);
+            }*/
          }
+         else
+            throw new WSTrustException("Unable to locate client public key");
+      }
 
-         // issue the security token using the constructed context.
-         try
-         {
-            if( request.getTokenType() != null )
-               requestContext.setTokenType( request.getTokenType().toString() );
-            PicketLinkCoreSTS sts = PicketLinkCoreSTS.instance();
-            sts.initialize(configuration);
-            sts.issueToken(requestContext);
-            //provider.issueToken(requestContext);
-         }
-         catch (ProcessingException e)
-         {
-            throw new WSTrustException(e.getMessage(), e);
-         }
+      // issue the security token using the constructed context.
+      try
+      {
+         if (request.getTokenType() != null)
+            requestContext.setTokenType(request.getTokenType().toString());
+         PicketLinkCoreSTS sts = PicketLinkCoreSTS.instance();
+         sts.initialize(configuration);
+         sts.issueToken(requestContext);
+         //provider.issueToken(requestContext);
+      }
+      catch (ProcessingException e)
+      {
+         throw new WSTrustException(e.getMessage(), e);
+      }
 
-         if (requestContext.getSecurityToken() == null)
-            //throw new WSTrustException("Token issued by provider " + provider.getClass().getName() + " is null");
-            throw new WSTrustException("Token issued by STS is null");
+      if (requestContext.getSecurityToken() == null)
+         //throw new WSTrustException("Token issued by provider " + provider.getClass().getName() + " is null");
+         throw new WSTrustException("Token issued by STS is null");
 
-         // construct the ws-trust security token response.
-         RequestedSecurityTokenType requestedSecurityToken = new RequestedSecurityTokenType();
+      // construct the ws-trust security token response.
+      RequestedSecurityTokenType requestedSecurityToken = new RequestedSecurityTokenType();
 
-         SecurityToken contextSecurityToken = requestContext.getSecurityToken();
-         if( contextSecurityToken == null )
-            throw new WSTrustException( "Security Token from context is null" );
-         
-         requestedSecurityToken.setAny( contextSecurityToken.getTokenValue());
+      SecurityToken contextSecurityToken = requestContext.getSecurityToken();
+      if (contextSecurityToken == null)
+         throw new WSTrustException("Security Token from context is null");
 
-         RequestSecurityTokenResponse response = new RequestSecurityTokenResponse();
-         if (request.getContext() != null)
-            response.setContext(request.getContext());
+      requestedSecurityToken.add(contextSecurityToken.getTokenValue());
 
-         response.setTokenType(request.getTokenType());
-         response.setLifetime(request.getLifetime());
-         response.setAppliesTo(appliesTo);
-         response.setKeySize(keySize);
-         response.setKeyType(keyType);
-         response.setRequestedSecurityToken(requestedSecurityToken);
+      RequestSecurityTokenResponse response = new RequestSecurityTokenResponse();
+      if (request.getContext() != null)
+         response.setContext(request.getContext());
 
-         if (requestedProofToken != null)
-            response.setRequestedProofToken(requestedProofToken);
-         if (serverEntropy != null)
-            response.setEntropy(serverEntropy);
+      response.setTokenType(request.getTokenType());
+      response.setLifetime(request.getLifetime());
+      response.setAppliesTo(appliesTo);
+      response.setKeySize(keySize);
+      response.setKeyType(keyType);
+      response.setRequestedSecurityToken(requestedSecurityToken);
 
-         // set the attached and unattached references.
-         if (requestContext.getAttachedReference() != null)
-            response.setRequestedAttachedReference(requestContext.getAttachedReference());
-         if (requestContext.getUnattachedReference() != null)
-            response.setRequestedUnattachedReference(requestContext.getUnattachedReference());
+      if (requestedProofToken != null)
+         response.setRequestedProofToken(requestedProofToken);
+      if (serverEntropy != null)
+         response.setEntropy(serverEntropy);
 
-         return response;
+      // set the attached and unattached references.
+      if (requestContext.getAttachedReference() != null)
+         response.setRequestedAttachedReference(requestContext.getAttachedReference());
+      if (requestContext.getUnattachedReference() != null)
+         response.setRequestedUnattachedReference(requestContext.getUnattachedReference());
+
+      return response;
       /*}
       else
          throw new WSTrustException("Unable to find a token provider for the token request");*/
@@ -384,12 +402,12 @@
          context.setOnBehalfOfPrincipal(onBehalfOfPrincipal);
       }
       try
-      { 
-         if( securityToken != null )
+      {
+         if (securityToken != null)
          {
-            String ns = securityToken.getNamespaceURI(); 
+            String ns = securityToken.getNamespaceURI();
 
-            context.setQName( new QName( ns, securityToken.getLocalName() ));  
+            context.setQName(new QName(ns, securityToken.getLocalName()));
          }
          PicketLinkCoreSTS sts = PicketLinkCoreSTS.instance();
          sts.initialize(configuration);
@@ -404,9 +422,9 @@
       // create the WS-Trust response with the renewed token.
       RequestedSecurityTokenType requestedSecurityToken = new RequestedSecurityTokenType();
       SecurityToken contextSecurityToken = context.getSecurityToken();
-      if( contextSecurityToken == null )
-         throw new WSTrustException( "Security Token from context is null" );
-      requestedSecurityToken.setAny(contextSecurityToken.getTokenValue());
+      if (contextSecurityToken == null)
+         throw new WSTrustException("Security Token from context is null");
+      requestedSecurityToken.add(contextSecurityToken.getTokenValue());
 
       RequestSecurityTokenResponse response = new RequestSecurityTokenResponse();
       if (request.getContext() != null)
@@ -503,12 +521,12 @@
          if (trace)
             log.trace("Delegating token validation to token provider");
          try
-         { 
-            if( securityToken != null )
-               context.setQName( new QName( securityToken.getNamespaceURI(), securityToken.getLocalName() ));
+         {
+            if (securityToken != null)
+               context.setQName(new QName(securityToken.getNamespaceURI(), securityToken.getLocalName()));
             PicketLinkCoreSTS sts = PicketLinkCoreSTS.instance();
             sts.initialize(configuration);
-            sts.validateToken( context );
+            sts.validateToken(context);
             //provider.validateToken(context);
          }
          catch (ProcessingException e)
@@ -560,12 +578,12 @@
          context.setOnBehalfOfPrincipal(onBehalfOfPrincipal);
       }
       try
-      { 
-         if( securityToken != null )
-            context.setQName( new QName( securityToken.getNamespaceURI(), securityToken.getLocalName() ));
+      {
+         if (securityToken != null)
+            context.setQName(new QName(securityToken.getNamespaceURI(), securityToken.getLocalName()));
          PicketLinkCoreSTS sts = PicketLinkCoreSTS.instance();
          sts.initialize(configuration);
-         sts.cancelToken( context );
+         sts.cancelToken(context);
          //provider.cancelToken(context);
       }
       catch (ProcessingException e)

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/WSTrustConstants.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/WSTrustConstants.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/WSTrustConstants.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -205,8 +205,13 @@
 
       String PREFIX_11 = "wsse11";
 
+      //http://www.ws-i.org/Profiles/KerberosTokenProfile-1.0.html#Kerberos_Security_Token_URI
+      String KERBEROS = "http://docs.oasis-open.org/wss/2005/xx/oasis-2005xx-wss-kerberos-token-profile-1.1#GSS_Kerberosv5_AP_REQ";
+
       String SECURITY_TOKEN_REFERENCE = "SecurityTokenReference";
 
+      String BINARY_SECURITY_TOKEN = "BinarySecurityToken";
+
       String USERNAME_TOKEN = "UsernameToken";
 
       String VALUE_TYPE = "ValueType";

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/WSTrustUtil.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/WSTrustUtil.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/WSTrustUtil.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -32,6 +32,7 @@
 import java.security.interfaces.DSAPublicKey;
 import java.security.interfaces.RSAPublicKey;
 import java.util.GregorianCalendar;
+import java.util.List;
 import java.util.Map;
 
 import javax.crypto.Mac;
@@ -112,8 +113,8 @@
          Map<QName, String> attributes)
    {
       SecurityTokenReferenceType securityTokenReference = new SecurityTokenReferenceType();
-      securityTokenReference.getAny().add(keyIdentifier);
-      securityTokenReference.getOtherAttributes().putAll(attributes);
+      securityTokenReference.addAny(keyIdentifier);
+      securityTokenReference.addOtherAttributes(attributes);
       RequestedReferenceType reference = new RequestedReferenceType();
       reference.setSecurityTokenReference(securityTokenReference);
 
@@ -215,7 +216,19 @@
    {
       // if OnBehalfOfType contains a username token, return this username in the form of a principal.
       UsernameTokenType usernameToken = null;
-      Object content = onBehalfOf.getAny();
+      List<Object> theList = onBehalfOf.getAny();
+      for (Object content : theList)
+      {
+         if (content instanceof UsernameTokenType)
+            usernameToken = (UsernameTokenType) content;
+         else if (content instanceof JAXBElement)
+         {
+            JAXBElement<?> element = (JAXBElement<?>) content;
+            if (element.getName().getLocalPart().equalsIgnoreCase("UsernameToken"))
+               usernameToken = (UsernameTokenType) element.getValue();
+         }
+      }
+      /*Object content = onBehalfOf.getAny();
       if (content instanceof UsernameTokenType)
          usernameToken = (UsernameTokenType) content;
       else if (content instanceof JAXBElement)
@@ -223,7 +236,7 @@
          JAXBElement<?> element = (JAXBElement<?>) content;
          if (element.getName().getLocalPart().equalsIgnoreCase("UsernameToken"))
             usernameToken = (UsernameTokenType) element.getValue();
-      }
+      }*/
       if (usernameToken != null && usernameToken.getUsername() != null)
       {
          final String username = usernameToken.getUsername().getValue();
@@ -260,7 +273,7 @@
       usernameToken.setUsername(attrString);
       // create the OnBehalfOfType and set the UsernameTokenType.
       OnBehalfOfType onBehalfOf = new OnBehalfOfType();
-      onBehalfOf.setAny(usernameToken);
+      onBehalfOf.add(usernameToken);
       return onBehalfOf;
    }
 

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/wrappers/RequestSecurityToken.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/wrappers/RequestSecurityToken.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/wrappers/RequestSecurityToken.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -41,7 +41,6 @@
 import org.picketlink.identity.federation.ws.trust.EncryptionType;
 import org.picketlink.identity.federation.ws.trust.EntropyType;
 import org.picketlink.identity.federation.ws.trust.LifetimeType;
-import org.picketlink.identity.federation.ws.trust.ObjectFactory;
 import org.picketlink.identity.federation.ws.trust.OnBehalfOfType;
 import org.picketlink.identity.federation.ws.trust.ProofEncryptionType;
 import org.picketlink.identity.federation.ws.trust.RenewTargetType;
@@ -163,10 +162,20 @@
 
    private final List<Object> extensionElements = new ArrayList<Object>();
 
-   private final ObjectFactory factory = new ObjectFactory();
-
    private Document rstDocument;
 
+   private URI binaryValueType;
+
+   public URI getBinaryValueType()
+   {
+      return binaryValueType;
+   }
+
+   public void setBinaryValueType(URI binaryValueType)
+   {
+      this.binaryValueType = binaryValueType;
+   }
+
    /**
     * <p>
     * Creates an instance of {@code RequestSecurityToken}.
@@ -183,7 +192,7 @@
     * </p>
     * 
     * @param delegate the JAXB {@code RequestSecurityTokenType} that represents a WS-Trust token request.
-    */ 
+    */
    public RequestSecurityToken(RequestSecurityTokenType delegate)
    {
       this.delegate = delegate;
@@ -303,7 +312,7 @@
    public void setTokenType(URI tokenType)
    {
       this.tokenType = tokenType;
-      this.delegate.getAny().add(this.factory.createTokenType(tokenType.toString()));
+      this.delegate.addAny(tokenType.toString());
 
    }
 
@@ -329,7 +338,7 @@
    public void setRequestType(URI requestType)
    {
       this.requestType = requestType;
-      this.delegate.getAny().add(this.factory.createRequestType(requestType.toString()));
+      this.delegate.addAny(requestType.toString());
    }
 
    /**
@@ -358,7 +367,7 @@
    public void setAppliesTo(AppliesTo appliesTo)
    {
       this.appliesTo = appliesTo;
-      this.delegate.getAny().add(appliesTo);
+      this.delegate.addAny(appliesTo);
    }
 
    /**
@@ -383,7 +392,7 @@
    public void setClaims(ClaimsType claims)
    {
       this.claims = claims;
-      this.delegate.getAny().add(this.factory.createClaims(claims));
+      this.delegate.addAny(claims);
    }
 
    /**
@@ -408,7 +417,7 @@
    public void setEntropy(EntropyType entropy)
    {
       this.entropy = entropy;
-      this.delegate.getAny().add(this.factory.createEntropy(entropy));
+      this.delegate.addAny(entropy);
    }
 
    /**
@@ -433,7 +442,7 @@
    public void setLifetime(Lifetime lifetime)
    {
       this.lifetime = lifetime;
-      this.delegate.getAny().add(this.factory.createLifetime(lifetime.getDelegate()));
+      this.delegate.addAny(lifetime.getDelegate());
    }
 
    /**
@@ -460,7 +469,7 @@
    public void setAllowPostDating(AllowPostdatingType allowPostDating)
    {
       this.allowPostDating = allowPostDating;
-      this.delegate.getAny().add(this.factory.createAllowPostdating(allowPostDating));
+      this.delegate.addAny(allowPostDating);
    }
 
    /**
@@ -485,7 +494,7 @@
    public void setRenewing(RenewingType renewing)
    {
       this.renewing = renewing;
-      this.delegate.getAny().add(this.factory.createRenewing(renewing));
+      this.delegate.addAny(renewing);
    }
 
    /**
@@ -511,7 +520,7 @@
    public void setOnBehalfOf(OnBehalfOfType onBehalfOf)
    {
       this.onBehalfOf = onBehalfOf;
-      this.delegate.getAny().add(this.factory.createOnBehalfOf(onBehalfOf));
+      this.delegate.addAny(onBehalfOf);
    }
 
    /**
@@ -538,7 +547,7 @@
    public void setIssuer(EndpointReferenceType issuer)
    {
       this.issuer = issuer;
-      this.delegate.getAny().add(this.factory.createIssuer(issuer));
+      this.delegate.addAny(issuer);
    }
 
    /**
@@ -563,7 +572,7 @@
    public void setAuthenticationType(URI authenticationType)
    {
       this.authenticationType = authenticationType;
-      this.delegate.getAny().add(this.factory.createAuthenticationType(authenticationType.toString()));
+      this.delegate.addAny(authenticationType.toString());
    }
 
    /**
@@ -588,7 +597,7 @@
    public void setKeyType(URI keyType)
    {
       this.keyType = keyType;
-      this.delegate.getAny().add(this.factory.createKeyType(keyType.toString()));
+      this.delegate.addAny(keyType.toString());
    }
 
    /**
@@ -613,7 +622,7 @@
    public void setKeySize(long keySize)
    {
       this.keySize = keySize;
-      this.delegate.getAny().add(this.factory.createKeySize(keySize));
+      this.delegate.addAny(keySize);
    }
 
    /**
@@ -638,7 +647,7 @@
    public void setSignatureAlgorithm(URI signatureAlgorithm)
    {
       this.signatureAlgorithm = signatureAlgorithm;
-      this.delegate.getAny().add(this.factory.createSignatureAlgorithm(signatureAlgorithm.toString()));
+      this.delegate.addAny(signatureAlgorithm.toString());
    }
 
    /**
@@ -665,7 +674,7 @@
    public void setEncryption(EncryptionType encryption)
    {
       this.encryption = encryption;
-      this.delegate.getAny().add(this.factory.createEncryption(encryption));
+      this.delegate.addAny(encryption);
    }
 
    /**
@@ -690,7 +699,7 @@
    public void setEncryptionAlgorithm(URI encryptionAlgorithm)
    {
       this.encryptionAlgorithm = encryptionAlgorithm;
-      this.delegate.getAny().add(this.factory.createEncryptionAlgorithm(encryptionAlgorithm.toString()));
+      this.delegate.addAny(encryptionAlgorithm.toString());
    }
 
    /**
@@ -715,7 +724,7 @@
    public void setCanonicalizationAlgorithm(URI canonicalizationAlgorithm)
    {
       this.canonicalizationAlgorithm = canonicalizationAlgorithm;
-      this.delegate.getAny().add(this.factory.createCanonicalizationAlgorithm(canonicalizationAlgorithm.toString()));
+      this.delegate.addAny(canonicalizationAlgorithm.toString());
    }
 
    /**
@@ -766,7 +775,7 @@
    public void setProofEncryption(ProofEncryptionType proofEncryption)
    {
       this.proofEncryption = proofEncryption;
-      this.delegate.getAny().add(this.factory.createProofEncryption(proofEncryption));
+      this.delegate.addAny(proofEncryption);
    }
 
    /**
@@ -791,7 +800,7 @@
    public void setUseKey(UseKeyType useKey)
    {
       this.useKey = useKey;
-      this.delegate.getAny().add(this.factory.createUseKey(useKey));
+      this.delegate.addAny(useKey);
    }
 
    /**
@@ -816,7 +825,7 @@
    public void setSignWith(URI signWith)
    {
       this.signWith = signWith;
-      this.delegate.getAny().add(this.factory.createSignatureAlgorithm(signWith.toString()));
+      this.delegate.addAny(signWith.toString());
    }
 
    /**
@@ -841,7 +850,7 @@
    public void setEncryptWith(URI encryptWith)
    {
       this.encryptWith = encryptWith;
-      this.delegate.getAny().add(this.factory.createEncryptWith(encryptWith.toString()));
+      this.delegate.addAny(encryptWith.toString());
    }
 
    /**
@@ -866,7 +875,7 @@
    public void setDelegateTo(DelegateToType delegateTo)
    {
       this.delegateTo = delegateTo;
-      this.delegate.getAny().add(this.factory.createDelegateTo(delegateTo));
+      this.delegate.addAny(delegateTo);
    }
 
    /**
@@ -895,7 +904,7 @@
    public void setForwardable(boolean forwardable)
    {
       this.forwardable = forwardable;
-      this.delegate.getAny().add(this.factory.createForwardable(forwardable));
+      this.delegate.addAny(forwardable);
    }
 
    /**
@@ -922,7 +931,7 @@
    public void setDelegatable(boolean delegatable)
    {
       this.delegatable = delegatable;
-      this.delegate.getAny().add(this.factory.createDelegatable(delegatable));
+      this.delegate.addAny(delegatable);
    }
 
    /**
@@ -949,7 +958,7 @@
    public void setPolicy(Policy policy)
    {
       this.policy = policy;
-      this.delegate.getAny().add(policy);
+      this.delegate.addAny(policy);
    }
 
    /**
@@ -974,7 +983,7 @@
    public void setPolicyReference(PolicyReference policyReference)
    {
       this.policyReference = policyReference;
-      this.delegate.getAny().add(policyReference);
+      this.delegate.addAny(policyReference);
    }
 
    /**
@@ -1036,7 +1045,7 @@
    public void setCancelTarget(CancelTargetType cancelTarget)
    {
       this.cancelTarget = cancelTarget;
-      this.delegate.getAny().add(this.factory.createCancelTarget(cancelTarget));
+      this.delegate.addAny(cancelTarget);
    }
 
    /**
@@ -1062,7 +1071,7 @@
    public void setRenewTarget(RenewTargetType renewTarget)
    {
       this.renewTarget = renewTarget;
-      this.delegate.getAny().add(this.factory.createRenewTarget(renewTarget));
+      this.delegate.addAny(renewTarget);
    }
 
    /**
@@ -1155,7 +1164,7 @@
    public void setValidateTarget(ValidateTargetType validateTarget)
    {
       this.validateTarget = validateTarget;
-      this.delegate.getAny().add(this.factory.createValidateTarget(validateTarget));
+      this.delegate.addAny(validateTarget);
    }
 
    /**
@@ -1223,6 +1232,6 @@
             + ", delegateTo=" + delegateTo + ", forwardable=" + forwardable + ", delegatable=" + delegatable
             + ", policy=" + policy + ", policyReference=" + policyReference + ", validateTarget=" + validateTarget
             + ", renewTarget=" + renewTarget + ", cancelTarget=" + cancelTarget + ", extensionElements="
-            + extensionElements + ", factory=" + factory + ", rstDocument=" + rstDocument + "]";
-   } 
+            + extensionElements + ", rstDocument=" + rstDocument + "]";
+   }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/wrappers/RequestSecurityTokenCollection.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/wrappers/RequestSecurityTokenCollection.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/wrappers/RequestSecurityTokenCollection.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -91,10 +91,10 @@
     */
    public void addRequestSecurityToken(RequestSecurityToken request)
    {
-      this.delegate.getRequestSecurityToken().add(request.getDelegate());
+      this.delegate.add(request.getDelegate());
       this.requestSecurityTokens.add(request);
    }
- 
+
    /**
     * <p>
     * Removes the specified {@code RequestSecurityToken} object from the collection of token requests.
@@ -104,10 +104,10 @@
     */
    public void removeRequestSecurityToken(RequestSecurityToken request)
    {
-      this.delegate.getRequestSecurityToken().remove(request.getDelegate());
+      this.delegate.remove(request.getDelegate());
       this.requestSecurityTokens.remove(request);
    }
-   
+
    /**
     * <p>
     * Obtains a reference to the {@code RequestSecurityTokenCollectionType} delegate.

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/wrappers/RequestSecurityTokenResponse.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/wrappers/RequestSecurityTokenResponse.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/wrappers/RequestSecurityTokenResponse.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -41,7 +41,6 @@
 import org.picketlink.identity.federation.ws.trust.EncryptionType;
 import org.picketlink.identity.federation.ws.trust.EntropyType;
 import org.picketlink.identity.federation.ws.trust.LifetimeType;
-import org.picketlink.identity.federation.ws.trust.ObjectFactory;
 import org.picketlink.identity.federation.ws.trust.OnBehalfOfType;
 import org.picketlink.identity.federation.ws.trust.ProofEncryptionType;
 import org.picketlink.identity.federation.ws.trust.RenewingType;
@@ -178,8 +177,6 @@
 
    private final List<Object> extensionElements = new ArrayList<Object>();
 
-   private final ObjectFactory factory = new ObjectFactory();
-
    /**
     * <p>
     * Creates an instance of {@code RequestSecurityTokenResponse}.
@@ -196,7 +193,7 @@
     * </p>
     * 
     * @param delegate the JAXB {@code RequestSecurityTokenResponseType} that represents a WS-Trust response.
-    */ 
+    */
    public RequestSecurityTokenResponse(RequestSecurityTokenResponseType delegate)
    {
       this.delegate = delegate;
@@ -316,7 +313,7 @@
    public void setTokenType(URI tokenType)
    {
       this.tokenType = tokenType;
-      this.delegate.getAny().add(this.factory.createTokenType(tokenType.toString()));
+      this.delegate.addAny(tokenType.toString());
 
    }
 
@@ -342,7 +339,7 @@
    public void setRequestType(URI requestType)
    {
       this.requestType = requestType;
-      this.delegate.getAny().add(this.factory.createRequestType(requestType.toString()));
+      this.delegate.addAny(requestType.toString());
    }
 
    /**
@@ -367,7 +364,7 @@
    public void setRequestedSecurityToken(RequestedSecurityTokenType requestedSecurityToken)
    {
       this.requestedSecurityToken = requestedSecurityToken;
-      this.delegate.getAny().add(this.factory.createRequestedSecurityToken(requestedSecurityToken));
+      this.delegate.addAny(requestedSecurityToken);
    }
 
    /**
@@ -392,7 +389,7 @@
    public void setAppliesTo(AppliesTo appliesTo)
    {
       this.appliesTo = appliesTo;
-      this.delegate.getAny().add(appliesTo);
+      this.delegate.addAny(appliesTo);
    }
 
    /**
@@ -419,7 +416,7 @@
    public void setRequestedAttachedReference(RequestedReferenceType requestedAttachedReference)
    {
       this.requestedAttachedReference = requestedAttachedReference;
-      this.delegate.getAny().add(this.factory.createRequestedAttachedReference(requestedAttachedReference));
+      this.delegate.addAny(requestedAttachedReference);
    }
 
    /**
@@ -446,7 +443,7 @@
    public void setRequestedUnattachedReference(RequestedReferenceType requestedUnattachedReference)
    {
       this.requestedUnattachedReference = requestedUnattachedReference;
-      this.delegate.getAny().add(this.factory.createRequestedUnattachedReference(requestedUnattachedReference));
+      this.delegate.addAny(requestedUnattachedReference);
    }
 
    /**
@@ -471,7 +468,7 @@
    public void setRequestedProofToken(RequestedProofTokenType requestedProofToken)
    {
       this.requestedProofToken = requestedProofToken;
-      this.delegate.getAny().add(this.factory.createRequestedProofToken(requestedProofToken));
+      this.delegate.addAny(requestedProofToken);
    }
 
    /**
@@ -500,7 +497,7 @@
    public void setRequestedTokenCancelled(RequestedTokenCancelledType requestedTokenCancelled)
    {
       this.requestedTokenCancelled = requestedTokenCancelled;
-      this.delegate.getAny().add(this.factory.createRequestedTokenCancelled(requestedTokenCancelled));
+      this.delegate.addAny(requestedTokenCancelled);
    }
 
    /**
@@ -525,7 +522,7 @@
    public void setEntropy(EntropyType entropy)
    {
       this.entropy = entropy;
-      this.delegate.getAny().add(this.factory.createEntropy(entropy));
+      this.delegate.addAny(entropy);
    }
 
    /**
@@ -550,7 +547,7 @@
    public void setLifetime(Lifetime lifetime)
    {
       this.lifetime = lifetime;
-      this.delegate.getAny().add(this.factory.createLifetime(lifetime.getDelegate()));
+      this.delegate.addAny(lifetime.getDelegate());
    }
 
    /**
@@ -575,7 +572,7 @@
    public void setStatus(StatusType status)
    {
       this.status = status;
-      this.delegate.getAny().add(this.factory.createStatus(status));
+      this.delegate.addAny(status);
    }
 
    /**
@@ -600,7 +597,7 @@
    public void setAllowPostDating(AllowPostdatingType allowPostDating)
    {
       this.allowPostDating = allowPostDating;
-      this.delegate.getAny().add(this.factory.createAllowPostdating(allowPostDating));
+      this.delegate.addAny(allowPostDating);
    }
 
    /**
@@ -625,7 +622,7 @@
    public void setRenewing(RenewingType renewing)
    {
       this.renewing = renewing;
-      this.delegate.getAny().add(this.factory.createRenewing(renewing));
+      this.delegate.addAny(renewing);
    }
 
    /**
@@ -651,7 +648,7 @@
    public void setOnBehalfOf(OnBehalfOfType onBehalfOf)
    {
       this.onBehalfOf = onBehalfOf;
-      this.delegate.getAny().add(this.factory.createOnBehalfOf(onBehalfOf));
+      this.delegate.addAny(onBehalfOf);
    }
 
    /**
@@ -678,7 +675,7 @@
    public void setIssuer(EndpointReferenceType issuer)
    {
       this.issuer = issuer;
-      this.delegate.getAny().add(this.factory.createIssuer(issuer));
+      this.delegate.addAny(issuer);
    }
 
    /**
@@ -703,7 +700,7 @@
    public void setAuthenticationType(URI authenticationType)
    {
       this.authenticationType = authenticationType;
-      this.delegate.getAny().add(this.factory.createAuthenticationType(authenticationType.toString()));
+      this.delegate.addAny(authenticationType.toString());
    }
 
    /**
@@ -728,7 +725,7 @@
    public void setAuthenticator(AuthenticatorType authenticator)
    {
       this.authenticator = authenticator;
-      this.delegate.getAny().add(this.factory.createAuthenticator(authenticator));
+      this.delegate.addAny(authenticator);
    }
 
    /**
@@ -753,7 +750,7 @@
    public void setKeyType(URI keyType)
    {
       this.keyType = keyType;
-      this.delegate.getAny().add(this.factory.createKeyType(keyType.toString()));
+      this.delegate.addAny(keyType.toString());
    }
 
    /**
@@ -778,7 +775,7 @@
    public void setKeySize(long keySize)
    {
       this.keySize = keySize;
-      this.delegate.getAny().add(this.factory.createKeySize(keySize));
+      this.delegate.addAny(keySize);
    }
 
    /**
@@ -803,7 +800,7 @@
    public void setSignatureAlgorithm(URI signatureAlgorithm)
    {
       this.signatureAlgorithm = signatureAlgorithm;
-      this.delegate.getAny().add(this.factory.createSignatureAlgorithm(signatureAlgorithm.toString()));
+      this.delegate.addAny(signatureAlgorithm.toString());
    }
 
    /**
@@ -830,7 +827,7 @@
    public void setEncryption(EncryptionType encryption)
    {
       this.encryption = encryption;
-      this.delegate.getAny().add(this.factory.createEncryption(encryption));
+      this.delegate.addAny(encryption);
    }
 
    /**
@@ -855,7 +852,7 @@
    public void setEncryptionAlgorithm(URI encryptionAlgorithm)
    {
       this.encryptionAlgorithm = encryptionAlgorithm;
-      this.delegate.getAny().add(this.factory.createEncryptionAlgorithm(encryptionAlgorithm.toString()));
+      this.delegate.addAny(encryptionAlgorithm.toString());
    }
 
    /**
@@ -880,7 +877,7 @@
    public void setCanonicalizationAlgorithm(URI canonicalizationAlgorithm)
    {
       this.canonicalizationAlgorithm = canonicalizationAlgorithm;
-      this.delegate.getAny().add(this.factory.createCanonicalizationAlgorithm(canonicalizationAlgorithm.toString()));
+      this.delegate.addAny(canonicalizationAlgorithm.toString());
    }
 
    /**
@@ -907,7 +904,7 @@
    public void setProofEncryption(ProofEncryptionType proofEncryption)
    {
       this.proofEncryption = proofEncryption;
-      this.delegate.getAny().add(this.factory.createProofEncryption(proofEncryption));
+      this.delegate.addAny(proofEncryption);
    }
 
    /**
@@ -932,7 +929,7 @@
    public void setUseKey(UseKeyType useKey)
    {
       this.useKey = useKey;
-      this.delegate.getAny().add(this.factory.createUseKey(useKey));
+      this.delegate.addAny(useKey);
    }
 
    /**
@@ -957,7 +954,7 @@
    public void setSignWith(URI signWith)
    {
       this.signWith = signWith;
-      this.delegate.getAny().add(this.factory.createSignatureAlgorithm(signWith.toString()));
+      this.delegate.addAny(signWith.toString());
    }
 
    /**
@@ -982,7 +979,7 @@
    public void setEncryptWith(URI encryptWith)
    {
       this.encryptWith = encryptWith;
-      this.delegate.getAny().add(this.factory.createEncryptWith(encryptWith.toString()));
+      this.delegate.addAny(encryptWith.toString());
    }
 
    /**
@@ -1007,7 +1004,7 @@
    public void setDelegateTo(DelegateToType delegateTo)
    {
       this.delegateTo = delegateTo;
-      this.delegate.getAny().add(this.factory.createDelegateTo(delegateTo));
+      this.delegate.addAny(delegateTo);
    }
 
    /**
@@ -1036,7 +1033,7 @@
    public void setForwardable(boolean forwardable)
    {
       this.forwardable = forwardable;
-      this.delegate.getAny().add(this.factory.createForwardable(forwardable));
+      this.delegate.addAny(forwardable);
    }
 
    /**
@@ -1063,7 +1060,7 @@
    public void setDelegatable(boolean delegatable)
    {
       this.delegatable = delegatable;
-      this.delegate.getAny().add(this.factory.createDelegatable(delegatable));
+      this.delegate.addAny(delegatable);
    }
 
    /**
@@ -1090,7 +1087,7 @@
    public void setPolicy(Policy policy)
    {
       this.policy = policy;
-      this.delegate.getAny().add(policy);
+      this.delegate.addAny(policy);
    }
 
    /**
@@ -1115,7 +1112,7 @@
    public void setPolicyReference(PolicyReference policyReference)
    {
       this.policyReference = policyReference;
-      this.delegate.getAny().add(policyReference);
+      this.delegate.addAny(policyReference);
    }
 
    /**
@@ -1190,4 +1187,4 @@
    {
       return this.delegate;
    }
-}
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/wrappers/RequestSecurityTokenResponseCollection.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/wrappers/RequestSecurityTokenResponseCollection.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/wrappers/RequestSecurityTokenResponseCollection.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -92,7 +92,7 @@
     */
    public void addRequestSecurityTokenResponse(RequestSecurityTokenResponse response)
    {
-      this.delegate.getRequestSecurityTokenResponse().add(response.getDelegate());
+      this.delegate.add(response.getDelegate());
       this.requestSecurityTokenResponses.add(response);
    }
 
@@ -105,7 +105,7 @@
     */
    public void removeRequestSecurityTokenResponse(RequestSecurityTokenResponse response)
    {
-      this.delegate.getRequestSecurityTokenResponse().remove(response.getDelegate());
+      this.delegate.remove(response.getDelegate());
       this.requestSecurityTokenResponses.remove(response);
    }
 

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/writers/WSTrustRSTWriter.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/writers/WSTrustRSTWriter.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/writers/WSTrustRSTWriter.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -39,7 +39,7 @@
 import org.picketlink.identity.federation.core.util.StaxUtil;
 import org.picketlink.identity.federation.core.wstrust.WSTrustConstants;
 import org.picketlink.identity.federation.core.wstrust.wrappers.RequestSecurityToken;
-import org.picketlink.identity.federation.core.wstrust.wrappers.RequestSecurityTokenCollection;  
+import org.picketlink.identity.federation.core.wstrust.wrappers.RequestSecurityTokenCollection;
 import org.picketlink.identity.federation.newmodel.saml.v2.assertion.AssertionType;
 import org.picketlink.identity.federation.ws.policy.AppliesTo;
 import org.picketlink.identity.federation.ws.trust.BinarySecretType;
@@ -61,8 +61,8 @@
  */
 public class WSTrustRSTWriter
 {
-   private XMLStreamWriter writer;
-   
+   private final XMLStreamWriter writer;
+
    /**
     * <p>
     * Creates a {@code WSTrustRSTWriter} that writes {@code RequestSecurityToken} instances to the specified
@@ -103,63 +103,63 @@
    {
       this.writer = writer;
    }
-   
+
    /**
     * Write the {@code RequestSecurityTokenCollection} into the {@code OutputStream}
     * @param requestTokenCollection
     * @param out
     * @throws ProcessingException
     */
-   public void write( RequestSecurityTokenCollection requestTokenCollection) throws ProcessingException
+   public void write(RequestSecurityTokenCollection requestTokenCollection) throws ProcessingException
    {
-      StaxUtil.writeStartElement( writer, PREFIX, RST_COLLECTION, BASE_NAMESPACE);   
-      StaxUtil.writeNameSpace( writer, PREFIX, BASE_NAMESPACE );
-      
+      StaxUtil.writeStartElement(writer, PREFIX, RST_COLLECTION, BASE_NAMESPACE);
+      StaxUtil.writeNameSpace(writer, PREFIX, BASE_NAMESPACE);
+
       List<RequestSecurityToken> tokenList = requestTokenCollection.getRequestSecurityTokens();
-      if( tokenList == null )
-         throw new ProcessingException( "RST list is null" );
-      
-      for( RequestSecurityToken token: tokenList )
+      if (tokenList == null)
+         throw new ProcessingException("RST list is null");
+
+      for (RequestSecurityToken token : tokenList)
       {
          write(token);
       }
 
-      StaxUtil.writeEndElement( writer ); 
-      StaxUtil.flush( writer );
+      StaxUtil.writeEndElement(writer);
+      StaxUtil.flush(writer);
    }
-   
+
    /**
     * Write the {@code RequestSecurityToken} into the {@code OutputStream}
     * @param requestToken
     * @param out
     * @throws ProcessingException
     */
-   public void write( RequestSecurityToken requestToken ) throws ProcessingException
+   public void write(RequestSecurityToken requestToken) throws ProcessingException
    {
-      StaxUtil.writeStartElement( writer, PREFIX, RST, BASE_NAMESPACE);   
-      StaxUtil.writeNameSpace( writer, PREFIX, BASE_NAMESPACE );
+      StaxUtil.writeStartElement(writer, PREFIX, RST, BASE_NAMESPACE);
+      StaxUtil.writeNameSpace(writer, PREFIX, BASE_NAMESPACE);
       String context = requestToken.getContext();
-      StaxUtil.writeAttribute( writer,  RST_CONTEXT, context );
-      
+      StaxUtil.writeAttribute(writer, RST_CONTEXT, context);
+
       URI requestType = requestToken.getRequestType();
-      if( requestType != null )
+      if (requestType != null)
       {
-         writeRequestType( writer, requestType );
+         writeRequestType(writer, requestType);
       }
-      
+
       URI tokenType = requestToken.getTokenType();
-      if( tokenType != null )
+      if (tokenType != null)
       {
-         writeTokenType( writer, tokenType );
+         writeTokenType(writer, tokenType);
       }
       //Deal with AppliesTo
       AppliesTo appliesTo = requestToken.getAppliesTo();
-      if( appliesTo != null )
+      if (appliesTo != null)
       {
          WSPolicyWriter wsPolicyWriter = new WSPolicyWriter(this.writer);
-         wsPolicyWriter.write( appliesTo ); 
+         wsPolicyWriter.write(appliesTo);
       }
-      
+
       long keySize = requestToken.getKeySize();
       if (keySize != 0)
       {
@@ -167,52 +167,52 @@
          StaxUtil.writeCharacters(writer, Long.toString(keySize));
          StaxUtil.writeEndElement(writer);
       }
-      
+
       URI keyType = requestToken.getKeyType();
-      if( keyType != null )
+      if (keyType != null)
       {
-         StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.KEY_TYPE, BASE_NAMESPACE);   
-         StaxUtil.writeCharacters(writer,  keyType.toString() ); 
-         StaxUtil.writeEndElement( writer ); 
+         StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.KEY_TYPE, BASE_NAMESPACE);
+         StaxUtil.writeCharacters(writer, keyType.toString());
+         StaxUtil.writeEndElement(writer);
       }
       EntropyType entropy = requestToken.getEntropy();
-      if( entropy != null )
+      if (entropy != null)
       {
-         writeEntropyType(entropy); 
+         writeEntropyType(entropy);
       }
-      
+
       UseKeyType useKeyType = requestToken.getUseKey();
-      if( useKeyType != null )
+      if (useKeyType != null)
       {
          writeUseKeyType(useKeyType);
       }
-      
+
       OnBehalfOfType onBehalfOf = requestToken.getOnBehalfOf();
-      if( onBehalfOf != null )
-      { 
-         writeOnBehalfOfType(onBehalfOf); 
+      if (onBehalfOf != null)
+      {
+         writeOnBehalfOfType(onBehalfOf);
       }
-      
+
       ValidateTargetType validateTarget = requestToken.getValidateTarget();
-      if( validateTarget != null )
+      if (validateTarget != null)
       {
-         writeValidateTargetType(validateTarget); 
+         writeValidateTargetType(validateTarget);
       }
-      
+
       CancelTargetType cancelTarget = requestToken.getCancelTarget();
-      if( cancelTarget != null )
+      if (cancelTarget != null)
       {
          writeCancelTargetType(cancelTarget);
       }
-      
+
       RenewTargetType renewTarget = requestToken.getRenewTarget();
       if (renewTarget != null)
       {
          writeRenewTargetType(renewTarget);
       }
-      
-      StaxUtil.writeEndElement( writer ); 
-      StaxUtil.flush( writer );
+
+      StaxUtil.writeEndElement(writer);
+      StaxUtil.flush(writer);
    }
 
    /**
@@ -222,21 +222,21 @@
     */
    private void writeEntropyType(EntropyType entropy) throws ProcessingException
    {
-      StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.ENTROPY, BASE_NAMESPACE);   
-      
+      StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.ENTROPY, BASE_NAMESPACE);
+
       List<Object> entropyList = entropy.getAny();
-      if( entropyList != null )
+      if (entropyList != null)
       {
-         for( Object entropyObj: entropyList )
+         for (Object entropyObj : entropyList)
          {
-            if( entropyObj instanceof BinarySecretType )
+            if (entropyObj instanceof BinarySecretType)
             {
                BinarySecretType binarySecret = (BinarySecretType) entropyObj;
-               writeBinarySecretType( writer, binarySecret );
+               writeBinarySecretType(writer, binarySecret);
             }
          }
       }
-      StaxUtil.writeEndElement( writer );
+      StaxUtil.writeEndElement(writer);
    }
 
    /**
@@ -246,9 +246,33 @@
     */
    private void writeUseKeyType(UseKeyType useKeyType) throws ProcessingException
    {
-      StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.USE_KEY, BASE_NAMESPACE);   
+      StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.USE_KEY, BASE_NAMESPACE);
 
-      Object useKeyTypeValue = useKeyType.getAny();
+      List<Object> theList = useKeyType.getAny();
+      for (Object useKeyTypeValue : theList)
+      {
+         if (useKeyTypeValue instanceof Element)
+         {
+            Element domElement = (Element) useKeyTypeValue;
+            StaxUtil.writeDOMElement(writer, domElement);
+         }
+         else if (useKeyTypeValue instanceof byte[])
+         {
+            byte[] certificate = (byte[]) useKeyTypeValue;
+            StaxUtil.writeStartElement(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX, WSTrustConstants.XMLDSig.X509CERT,
+                  WSTrustConstants.DSIG_NS);
+            StaxUtil.writeNameSpace(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX, WSTrustConstants.DSIG_NS);
+            StaxUtil.writeCharacters(writer, new String(certificate));
+            StaxUtil.writeEndElement(writer);
+         }
+         else if (useKeyTypeValue instanceof KeyValueType)
+         {
+            writeKeyValueType((KeyValueType) useKeyTypeValue);
+         }
+         else
+            throw new RuntimeException(" Unknown use key type:" + useKeyTypeValue.getClass().getName());
+      }
+      /*Object useKeyTypeValue = useKeyType.getAny();
       if( useKeyTypeValue instanceof Element )
       {
          Element domElement = (Element) useKeyTypeValue;
@@ -268,18 +292,19 @@
          writeKeyValueType((KeyValueType) useKeyTypeValue);
       }
       else
-         throw new RuntimeException( " Unknown use key type:" + useKeyTypeValue.getClass().getName() );
-      
+         throw new RuntimeException( " Unknown use key type:" + useKeyTypeValue.getClass().getName() );*/
+
       StaxUtil.writeEndElement(writer);
    }
 
    private void writeKeyValueType(KeyValueType type) throws ProcessingException
    {
-      StaxUtil.writeStartElement(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX , WSTrustConstants.XMLDSig.KEYVALUE, WSTrustConstants.DSIG_NS);
-      StaxUtil.writeNameSpace(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX , WSTrustConstants.DSIG_NS);
+      StaxUtil.writeStartElement(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX, WSTrustConstants.XMLDSig.KEYVALUE,
+            WSTrustConstants.DSIG_NS);
+      StaxUtil.writeNameSpace(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX, WSTrustConstants.DSIG_NS);
       if (type.getContent().size() == 0)
          throw new ProcessingException("KeyValueType must contain at least one value");
-      
+
       for (Object obj : type.getContent())
       {
          if (obj instanceof RSAKeyValueType)
@@ -290,24 +315,25 @@
       }
       StaxUtil.writeEndElement(writer);
    }
-   
+
    private void writeRSAKeyValueType(RSAKeyValueType type) throws ProcessingException
    {
-      StaxUtil.writeStartElement(writer, "dsig", WSTrustConstants.XMLDSig.RSA_KEYVALUE , WSTrustConstants.DSIG_NS);
+      StaxUtil.writeStartElement(writer, "dsig", WSTrustConstants.XMLDSig.RSA_KEYVALUE, WSTrustConstants.DSIG_NS);
       // write the rsa key modulus.
       byte[] modulus = type.getModulus();
-      StaxUtil.writeStartElement(writer, "dsig", WSTrustConstants.XMLDSig.MODULUS , WSTrustConstants.DSIG_NS);
+      StaxUtil.writeStartElement(writer, "dsig", WSTrustConstants.XMLDSig.MODULUS, WSTrustConstants.DSIG_NS);
       StaxUtil.writeCharacters(writer, new String(modulus));
       StaxUtil.writeEndElement(writer);
-      
+
       // write the rsa key exponent.
       byte[] exponent = type.getExponent();
-      StaxUtil.writeStartElement(writer, "dsig", WSTrustConstants.XMLDSig.EXPONENT , WSTrustConstants.DSIG_NS);
+      StaxUtil.writeStartElement(writer, "dsig", WSTrustConstants.XMLDSig.EXPONENT, WSTrustConstants.DSIG_NS);
       StaxUtil.writeCharacters(writer, new String(exponent));
       StaxUtil.writeEndElement(writer);
-      
+
       StaxUtil.writeEndElement(writer);
    }
+
    /**
     * Write an {@code OnBehalfOfType} to stream
     * @param onBehalfOf
@@ -316,13 +342,13 @@
     */
    private void writeOnBehalfOfType(OnBehalfOfType onBehalfOf) throws ProcessingException
    {
-      StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.ON_BEHALF_OF, BASE_NAMESPACE); 
-      StaxUtil.writeCharacters(writer, "" ); 
-      
-      UsernameTokenType usernameToken = (UsernameTokenType) onBehalfOf.getAny(); 
+      StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.ON_BEHALF_OF, BASE_NAMESPACE);
+      StaxUtil.writeCharacters(writer, "");
+
+      UsernameTokenType usernameToken = (UsernameTokenType) onBehalfOf.getAny();
       WSSecurityWriter wsseWriter = new WSSecurityWriter(this.writer);
-      wsseWriter.write( usernameToken );
-      StaxUtil.writeEndElement( writer );
+      wsseWriter.write(usernameToken);
+      StaxUtil.writeEndElement(writer);
    }
 
    /**
@@ -333,9 +359,31 @@
     */
    private void writeValidateTargetType(ValidateTargetType validateTarget) throws ProcessingException
    {
-      StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.VALIDATE_TARGET, BASE_NAMESPACE); 
-      
-      Object validateTargetObj = validateTarget.getAny();
+      StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.VALIDATE_TARGET, BASE_NAMESPACE);
+
+      List<Object> theList = validateTarget.getAny();
+      if (theList.size() > 1)
+         throw new RuntimeException("Size of ValidateTarget > 1");
+      for (Object validateTargetObj : theList)
+      {
+         if (validateTargetObj != null)
+         {
+            if (validateTargetObj instanceof AssertionType)
+            {
+               AssertionType assertion = (AssertionType) validateTargetObj;
+               SAMLAssertionWriter samlAssertionWriter = new SAMLAssertionWriter(this.writer);
+               samlAssertionWriter.write(assertion);
+            }
+            else if (validateTargetObj instanceof Element)
+            {
+               StaxUtil.writeDOMElement(writer, (Element) validateTargetObj);
+            }
+            else
+               throw new ProcessingException("Unknown validate target type=" + validateTargetObj.getClass().getName());
+         }
+      }
+
+      /*Object validateTargetObj = validateTarget.getAny();
       if (validateTargetObj != null)
       {
          if (validateTargetObj instanceof AssertionType)
@@ -350,15 +398,34 @@
          }
          else
             throw new ProcessingException("Unknown validate target type=" + validateTargetObj.getClass().getName());
-      }
-      StaxUtil.writeEndElement( writer );
+      }*/
+      StaxUtil.writeEndElement(writer);
    }
 
    private void writeRenewTargetType(RenewTargetType renewTarget) throws ProcessingException
    {
-      StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.RENEW_TARGET, BASE_NAMESPACE); 
-      
-      Object renewTargetObj = renewTarget.getAny();
+      StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.RENEW_TARGET, BASE_NAMESPACE);
+
+      List<Object> theList = renewTarget.getAny();
+      for (Object renewTargetObj : theList)
+      {
+         if (renewTargetObj != null)
+         {
+            if (renewTargetObj instanceof AssertionType)
+            {
+               AssertionType assertion = (AssertionType) renewTargetObj;
+               SAMLAssertionWriter samlAssertionWriter = new SAMLAssertionWriter(this.writer);
+               samlAssertionWriter.write(assertion);
+            }
+            else if (renewTargetObj instanceof Element)
+            {
+               StaxUtil.writeDOMElement(writer, (Element) renewTargetObj);
+            }
+            else
+               throw new ProcessingException("Unknown renew target type=" + renewTargetObj.getClass().getName());
+         }
+      }
+      /*Object renewTargetObj = renewTarget.getAny();
       if (renewTargetObj != null)
       {
          if (renewTargetObj instanceof AssertionType)
@@ -373,8 +440,8 @@
          }
          else
             throw new ProcessingException("Unknown renew target type=" + renewTargetObj.getClass().getName());
-      }
-      StaxUtil.writeEndElement( writer );
+      }*/
+      StaxUtil.writeEndElement(writer);
    }
 
    /**
@@ -385,9 +452,28 @@
     */
    private void writeCancelTargetType(CancelTargetType cancelTarget) throws ProcessingException
    {
-      StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.CANCEL_TARGET, BASE_NAMESPACE); 
-      
-      Object cancelTargetObj = cancelTarget.getAny();
+      StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.CANCEL_TARGET, BASE_NAMESPACE);
+
+      List<Object> theList = cancelTarget.getAny();
+      for (Object cancelTargetObj : theList)
+      {
+         if (cancelTargetObj != null)
+         {
+            if (cancelTargetObj instanceof AssertionType)
+            {
+               AssertionType assertion = (AssertionType) cancelTargetObj;
+               SAMLAssertionWriter samlAssertionWriter = new SAMLAssertionWriter(this.writer);
+               samlAssertionWriter.write(assertion);
+            }
+            else if (cancelTargetObj instanceof Element)
+            {
+               StaxUtil.writeDOMElement(writer, (Element) cancelTargetObj);
+            }
+            else
+               throw new ProcessingException("Unknown cancel target type=" + cancelTargetObj.getClass().getName());
+         }
+      }
+      /*Object cancelTargetObj = cancelTarget.getAny();
       if (cancelTargetObj != null)
       {
          if (cancelTargetObj instanceof AssertionType)
@@ -402,48 +488,48 @@
          }
          else
             throw new ProcessingException("Unknown cancel target type=" + cancelTargetObj.getClass().getName());
-      }  
-      StaxUtil.writeEndElement( writer );
+      }*/
+      StaxUtil.writeEndElement(writer);
    }
-   
+
    /**
     * Write a {@code BinarySecretType} to stream
     * @param writer
     * @param binarySecret
     * @throws ProcessingException
     */
-   private void writeBinarySecretType( XMLStreamWriter writer, BinarySecretType binarySecret ) throws ProcessingException
+   private void writeBinarySecretType(XMLStreamWriter writer, BinarySecretType binarySecret) throws ProcessingException
    {
-      StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.BINARY_SECRET, BASE_NAMESPACE );
-      String type = binarySecret.getType(); 
-      StaxUtil.writeAttribute(writer, WSTrustConstants.TYPE, type );
-      StaxUtil.writeCharacters(writer,  new String( binarySecret.getValue() ) );
-      StaxUtil.writeEndElement(writer); 
+      StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.BINARY_SECRET, BASE_NAMESPACE);
+      String type = binarySecret.getType();
+      StaxUtil.writeAttribute(writer, WSTrustConstants.TYPE, type);
+      StaxUtil.writeCharacters(writer, new String(binarySecret.getValue()));
+      StaxUtil.writeEndElement(writer);
    }
-    
+
    /**
     * Write a Request Type
     * @param writer
     * @param uri
     * @throws ProcessingException
     */
-   private void writeRequestType( XMLStreamWriter writer , URI uri ) throws ProcessingException
+   private void writeRequestType(XMLStreamWriter writer, URI uri) throws ProcessingException
    {
-      StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.REQUEST_TYPE, BASE_NAMESPACE );
-      StaxUtil.writeCharacters(writer, uri.toASCIIString() );
+      StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.REQUEST_TYPE, BASE_NAMESPACE);
+      StaxUtil.writeCharacters(writer, uri.toASCIIString());
       StaxUtil.writeEndElement(writer);
    }
-   
+
    /**
     * Write Token Type
     * @param writer
     * @param uri
     * @throws ProcessingException
     */
-   private void writeTokenType( XMLStreamWriter writer , URI uri ) throws ProcessingException
+   private void writeTokenType(XMLStreamWriter writer, URI uri) throws ProcessingException
    {
-      StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.TOKEN_TYPE, BASE_NAMESPACE );
-      StaxUtil.writeCharacters(writer, uri.toASCIIString() );
+      StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.TOKEN_TYPE, BASE_NAMESPACE);
+      StaxUtil.writeCharacters(writer, uri.toASCIIString());
       StaxUtil.writeEndElement(writer);
    }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/writers/WSTrustRequestWriter.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/writers/WSTrustRequestWriter.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/writers/WSTrustRequestWriter.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -274,7 +274,32 @@
    {
       StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.USE_KEY, BASE_NAMESPACE);
 
-      Object useKeyTypeValue = useKeyType.getAny();
+      List<Object> theList = useKeyType.getAny();
+      for (Object useKeyTypeValue : theList)
+      {
+         if (useKeyTypeValue instanceof Element)
+         {
+            Element domElement = (Element) useKeyTypeValue;
+            StaxUtil.writeDOMElement(writer, domElement);
+         }
+         else if (useKeyTypeValue instanceof byte[])
+         {
+            byte[] certificate = (byte[]) useKeyTypeValue;
+            StaxUtil.writeStartElement(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX, WSTrustConstants.XMLDSig.X509CERT,
+                  WSTrustConstants.DSIG_NS);
+            StaxUtil.writeNameSpace(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX, WSTrustConstants.DSIG_NS);
+            StaxUtil.writeCharacters(writer, new String(certificate));
+            StaxUtil.writeEndElement(writer);
+         }
+         else if (useKeyTypeValue instanceof KeyValueType)
+         {
+            writeKeyValueType((KeyValueType) useKeyTypeValue);
+         }
+         else
+            throw new RuntimeException(" Unknown use key type:" + useKeyTypeValue.getClass().getName());
+
+      }
+      /*Object useKeyTypeValue = useKeyType.getAny();
       if (useKeyTypeValue instanceof Element)
       {
          Element domElement = (Element) useKeyTypeValue;
@@ -294,7 +319,7 @@
          writeKeyValueType((KeyValueType) useKeyTypeValue);
       }
       else
-         throw new RuntimeException(" Unknown use key type:" + useKeyTypeValue.getClass().getName());
+         throw new RuntimeException(" Unknown use key type:" + useKeyTypeValue.getClass().getName());*/
 
       StaxUtil.writeEndElement(writer);
    }
@@ -345,7 +370,7 @@
    private void writeOnBehalfOfType(OnBehalfOfType onBehalfOf) throws ProcessingException
    {
       StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.ON_BEHALF_OF, BASE_NAMESPACE);
-      UsernameTokenType usernameToken = (UsernameTokenType) onBehalfOf.getAny();
+      UsernameTokenType usernameToken = (UsernameTokenType) onBehalfOf.getAny().get(0);
       WSSecurityWriter wsseWriter = new WSSecurityWriter(this.writer);
       wsseWriter.write(usernameToken);
       StaxUtil.writeEndElement(writer);
@@ -361,7 +386,23 @@
    {
       StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.VALIDATE_TARGET, BASE_NAMESPACE);
 
-      Object validateTargetObj = validateTarget.getAny();
+      List<Object> list = validateTarget.getAny();
+      for (Object validateTargetObj : list)
+      {
+         if (validateTargetObj instanceof AssertionType)
+         {
+            AssertionType assertion = (AssertionType) validateTargetObj;
+            SAMLAssertionWriter samlAssertionWriter = new SAMLAssertionWriter(this.writer);
+            samlAssertionWriter.write(assertion);
+         }
+         else if (validateTargetObj instanceof Element)
+         {
+            StaxUtil.writeDOMElement(writer, (Element) validateTargetObj);
+         }
+         else
+            throw new ProcessingException("Unknown validate target type=" + validateTargetObj.getClass().getName());
+      }
+      /*Object validateTargetObj = validateTarget.getAny();
       if (validateTargetObj != null)
       {
          if (validateTargetObj instanceof AssertionType)
@@ -376,7 +417,7 @@
          }
          else
             throw new ProcessingException("Unknown validate target type=" + validateTargetObj.getClass().getName());
-      }
+      }*/
       StaxUtil.writeEndElement(writer);
    }
 
@@ -384,7 +425,23 @@
    {
       StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.RENEW_TARGET, BASE_NAMESPACE);
 
-      Object renewTargetObj = renewTarget.getAny();
+      List<Object> list = renewTarget.getAny();
+      for (Object renewTargetObj : list)
+      {
+         if (renewTargetObj instanceof AssertionType)
+         {
+            AssertionType assertion = (AssertionType) renewTargetObj;
+            SAMLAssertionWriter samlAssertionWriter = new SAMLAssertionWriter(this.writer);
+            samlAssertionWriter.write(assertion);
+         }
+         else if (renewTargetObj instanceof Element)
+         {
+            StaxUtil.writeDOMElement(writer, (Element) renewTargetObj);
+         }
+         else
+            throw new ProcessingException("Unknown renew target type=" + renewTargetObj.getClass().getName());
+      }
+      /*Object renewTargetObj = renewTarget.getAny();
       if (renewTargetObj != null)
       {
          if (renewTargetObj instanceof AssertionType)
@@ -399,7 +456,7 @@
          }
          else
             throw new ProcessingException("Unknown renew target type=" + renewTargetObj.getClass().getName());
-      }
+      }*/
       StaxUtil.writeEndElement(writer);
    }
 
@@ -413,7 +470,25 @@
    {
       StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.CANCEL_TARGET, BASE_NAMESPACE);
 
-      Object cancelTargetObj = cancelTarget.getAny();
+      List<Object> list = cancelTarget.getAny();
+
+      for (Object cancelTargetObj : list)
+      {
+         if (cancelTargetObj instanceof AssertionType)
+         {
+            AssertionType assertion = (AssertionType) cancelTargetObj;
+            SAMLAssertionWriter samlAssertionWriter = new SAMLAssertionWriter(this.writer);
+            samlAssertionWriter.write(assertion);
+         }
+         else if (cancelTargetObj instanceof Element)
+         {
+            StaxUtil.writeDOMElement(writer, (Element) cancelTargetObj);
+         }
+         else
+            throw new ProcessingException("Unknown cancel target type=" + cancelTargetObj.getClass().getName());
+      }
+
+      /*Object cancelTargetObj = cancelTarget.getAny();
       if (cancelTargetObj != null)
       {
          if (cancelTargetObj instanceof AssertionType)
@@ -428,7 +503,7 @@
          }
          else
             throw new ProcessingException("Unknown cancel target type=" + cancelTargetObj.getClass().getName());
-      }
+      }*/
       StaxUtil.writeEndElement(writer);
    }
 

Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/writers/WSTrustResponseWriter.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/writers/WSTrustResponseWriter.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/writers/WSTrustResponseWriter.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -29,7 +29,7 @@
 import org.picketlink.identity.federation.core.wstrust.WSTrustConstants;
 import org.picketlink.identity.federation.core.wstrust.wrappers.Lifetime;
 import org.picketlink.identity.federation.core.wstrust.wrappers.RequestSecurityTokenResponse;
-import org.picketlink.identity.federation.core.wstrust.wrappers.RequestSecurityTokenResponseCollection; 
+import org.picketlink.identity.federation.core.wstrust.wrappers.RequestSecurityTokenResponseCollection;
 import org.picketlink.identity.federation.newmodel.saml.v2.assertion.AssertionType;
 import org.picketlink.identity.federation.ws.trust.BinarySecretType;
 import org.picketlink.identity.federation.ws.trust.ComputedKeyType;
@@ -48,7 +48,7 @@
  */
 public class WSTrustResponseWriter
 {
-   private XMLStreamWriter writer;
+   private final XMLStreamWriter writer;
 
    /**
     * <p>
@@ -184,7 +184,23 @@
       {
          StaxUtil.writeStartElement(this.writer, WSTrustConstants.PREFIX, WSTrustConstants.REQUESTED_TOKEN,
                WSTrustConstants.BASE_NAMESPACE);
-         Object securityToken = response.getRequestedSecurityToken().getAny();
+         List<Object> theList = response.getRequestedSecurityToken().getAny();
+         for (Object securityToken : theList)
+         {
+            if (securityToken instanceof AssertionType)
+            {
+               AssertionType assertion = (AssertionType) securityToken;
+               SAMLAssertionWriter samlAssertionWriter = new SAMLAssertionWriter(this.writer);
+               samlAssertionWriter.write(assertion);
+            }
+            else if (securityToken instanceof Element)
+            {
+               StaxUtil.writeDOMElement(this.writer, (Element) securityToken);
+            }
+            else
+               throw new ProcessingException("Unknown security token type=" + securityToken.getClass().getName());
+         }
+         /*Object securityToken = response.getRequestedSecurityToken().getAny();
          if (securityToken != null)
          {
             if (securityToken instanceof AssertionType)
@@ -199,7 +215,7 @@
             }
             else
                throw new ProcessingException("Unknown security token type=" + securityToken.getClass().getName());
-         }
+         }*/
          StaxUtil.writeEndElement(this.writer);
       }
 
@@ -217,29 +233,32 @@
       if (response.getRequestedProofToken() != null)
       {
          RequestedProofTokenType requestedProof = response.getRequestedProofToken();
-         Object content = requestedProof.getAny();
-         if (content == null)
-            throw new ProcessingException("RequestedProofToken context cannot be empty");
 
          StaxUtil.writeStartElement(this.writer, WSTrustConstants.PREFIX, WSTrustConstants.REQUESTED_PROOF_TOKEN,
                WSTrustConstants.BASE_NAMESPACE);
-         if (content instanceof BinarySecretType)
+         List<Object> theList = requestedProof.getAny();
+         for (Object content : theList)
          {
-            BinarySecretType binarySecret = (BinarySecretType) content;
-            StaxUtil.writeStartElement(this.writer, WSTrustConstants.PREFIX, WSTrustConstants.BINARY_SECRET,
-                  WSTrustConstants.BASE_NAMESPACE);
-            StaxUtil.writeAttribute(this.writer, WSTrustConstants.TYPE, binarySecret.getType());
-            StaxUtil.writeCharacters(this.writer, new String(binarySecret.getValue()));
-            StaxUtil.writeEndElement(this.writer);
+            if (content instanceof BinarySecretType)
+            {
+               BinarySecretType binarySecret = (BinarySecretType) content;
+               StaxUtil.writeStartElement(this.writer, WSTrustConstants.PREFIX, WSTrustConstants.BINARY_SECRET,
+                     WSTrustConstants.BASE_NAMESPACE);
+               StaxUtil.writeAttribute(this.writer, WSTrustConstants.TYPE, binarySecret.getType());
+               StaxUtil.writeCharacters(this.writer, new String(binarySecret.getValue()));
+               StaxUtil.writeEndElement(this.writer);
+            }
+            else if (content instanceof ComputedKeyType)
+            {
+               ComputedKeyType computedKey = (ComputedKeyType) content;
+               StaxUtil.writeStartElement(this.writer, WSTrustConstants.PREFIX, WSTrustConstants.COMPUTED_KEY,
+                     WSTrustConstants.BASE_NAMESPACE);
+               StaxUtil.writeCharacters(this.writer, computedKey.getAlgorithm());
+               StaxUtil.writeEndElement(this.writer);
+            }
+
          }
-         else if (content instanceof ComputedKeyType)
-         {
-            ComputedKeyType computedKey = (ComputedKeyType) content;
-            StaxUtil.writeStartElement(this.writer, WSTrustConstants.PREFIX, WSTrustConstants.COMPUTED_KEY,
-                  WSTrustConstants.BASE_NAMESPACE);
-            StaxUtil.writeCharacters(this.writer, computedKey.getAlgorithm());
-            StaxUtil.writeEndElement(this.writer);
-         }
+
          StaxUtil.writeEndElement(this.writer);
       }
 

Modified: federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTResponseAssertionHOKCertificateTestCase.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTResponseAssertionHOKCertificateTestCase.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTResponseAssertionHOKCertificateTestCase.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -51,40 +51,41 @@
    public void testWST_RSTR_Assertion() throws Exception
    {
       ClassLoader tcl = Thread.currentThread().getContextClassLoader();
-      InputStream configStream = tcl.getResourceAsStream( "parser/wst/wst-response-assertion-hok-certificate.xml" );
-      
+      InputStream configStream = tcl.getResourceAsStream("parser/wst/wst-response-assertion-hok-certificate.xml");
+
       WSTrustParser parser = new WSTrustParser();
       RequestSecurityTokenResponseCollection coll = (RequestSecurityTokenResponseCollection) parser.parse(configStream);
-      assertEquals(1, coll.getRequestSecurityTokenResponses().size() );
-      
+      assertEquals(1, coll.getRequestSecurityTokenResponses().size());
+
       RequestSecurityTokenResponse rstr = coll.getRequestSecurityTokenResponses().get(0);
-      
-      assertEquals( "testcontext", rstr.getContext() );
-      assertEquals( WSTrustConstants.SAML2_TOKEN_TYPE, rstr.getTokenType().toASCIIString() );
-      
-      assertEquals( XMLTimeUtil.parse( "2010-11-11T16:34:19.602Z" ), rstr.getLifetime().getCreated() );
-      assertEquals( XMLTimeUtil.parse( "2010-11-11T18:34:19.602Z" ), rstr.getLifetime().getExpires() );
-      
+
+      assertEquals("testcontext", rstr.getContext());
+      assertEquals(WSTrustConstants.SAML2_TOKEN_TYPE, rstr.getTokenType().toASCIIString());
+
+      assertEquals(XMLTimeUtil.parse("2010-11-11T16:34:19.602Z"), rstr.getLifetime().getCreated());
+      assertEquals(XMLTimeUtil.parse("2010-11-11T18:34:19.602Z"), rstr.getLifetime().getExpires());
+
       EndpointReferenceType endpoint = (EndpointReferenceType) rstr.getAppliesTo().getAny().get(0);
-      assertEquals( "http://services.testcorp.org/provider2", endpoint.getAddress().getValue()  );
-      
-      assertEquals( 128, rstr.getKeySize() );
-      assertEquals( WSTrustConstants.KEY_TYPE_PUBLIC, rstr.getKeyType().toASCIIString() );
-      
-      Element assertionElement = (Element) rstr.getRequestedSecurityToken().getAny();
-      String id = assertionElement.getAttribute("ID" );
+      assertEquals("http://services.testcorp.org/provider2", endpoint.getAddress().getValue());
 
-      assertEquals( "ID_5a15fc70-daa1-4808-b70e-9cbf6b8e4d4f", id ); 
-      
+      assertEquals(128, rstr.getKeySize());
+      assertEquals(WSTrustConstants.KEY_TYPE_PUBLIC, rstr.getKeyType().toASCIIString());
+
+      Element assertionElement = (Element) rstr.getRequestedSecurityToken().getAny().get(0);
+      String id = assertionElement.getAttribute("ID");
+
+      assertEquals("ID_5a15fc70-daa1-4808-b70e-9cbf6b8e4d4f", id);
+
       RequestedReferenceType ref = rstr.getRequestedAttachedReference();
-      SecurityTokenReferenceType secRef =  ref.getSecurityTokenReference();
-      assertNotNull( secRef );
+      SecurityTokenReferenceType secRef = ref.getSecurityTokenReference();
+      assertNotNull(secRef);
       Map<QName, String> map = secRef.getOtherAttributes();
-      QName wsseTokenType =  new QName( WSTrustConstants.WSSE11_NS, WSTrustConstants.TOKEN_TYPE, WSTrustConstants.WSSE.PREFIX_11 );
-      assertEquals( WSTrustConstants.SAML2_TOKEN_TYPE, map.get(wsseTokenType) );
-      
+      QName wsseTokenType = new QName(WSTrustConstants.WSSE11_NS, WSTrustConstants.TOKEN_TYPE,
+            WSTrustConstants.WSSE.PREFIX_11);
+      assertEquals(WSTrustConstants.SAML2_TOKEN_TYPE, map.get(wsseTokenType));
+
       KeyIdentifierType keyId = (KeyIdentifierType) secRef.getAny().get(0);
-      assertEquals( "#ID_5a15fc70-daa1-4808-b70e-9cbf6b8e4d4f", keyId.getValue() );
-      assertEquals( WSTrustConstants.WSSE.KEY_IDENTIFIER_VALUETYPE_SAML, keyId.getValueType() );
+      assertEquals("#ID_5a15fc70-daa1-4808-b70e-9cbf6b8e4d4f", keyId.getValue());
+      assertEquals(WSTrustConstants.WSSE.KEY_IDENTIFIER_VALUETYPE_SAML, keyId.getValueType());
    }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustCancelTargetSamlTestCase.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustCancelTargetSamlTestCase.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustCancelTargetSamlTestCase.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -51,54 +51,54 @@
  */
 public class WSTrustCancelTargetSamlTestCase
 {
-   @Test 
+   @Test
    public void testWST_CancelTargetSaml() throws Exception
    {
       ClassLoader tcl = Thread.currentThread().getContextClassLoader();
-      InputStream configStream = tcl.getResourceAsStream( "parser/wst/wst-cancel-saml.xml" );
-      
+      InputStream configStream = tcl.getResourceAsStream("parser/wst/wst-cancel-saml.xml");
+
       WSTrustParser parser = new WSTrustParser();
-      RequestSecurityToken requestToken = (RequestSecurityToken) parser.parse( configStream );
-      assertEquals( "cancelcontext", requestToken.getContext() );
-      assertEquals( WSTrustConstants.CANCEL_REQUEST, requestToken.getRequestType().toASCIIString() );
+      RequestSecurityToken requestToken = (RequestSecurityToken) parser.parse(configStream);
+      assertEquals("cancelcontext", requestToken.getContext());
+      assertEquals(WSTrustConstants.CANCEL_REQUEST, requestToken.getRequestType().toASCIIString());
 
       CancelTargetType cancelTarget = requestToken.getCancelTarget();
-      
-      AssertionType assertion = (AssertionType) cancelTarget.getAny();
-      validateAssertion( assertion ); 
-      
+
+      AssertionType assertion = (AssertionType) cancelTarget.getAny().get(0);
+      validateAssertion(assertion);
+
       //Now for the writing part
       ByteArrayOutputStream baos = new ByteArrayOutputStream();
       WSTrustRequestWriter rstWriter = new WSTrustRequestWriter(baos);
 
-      rstWriter.write(requestToken ); 
+      rstWriter.write(requestToken);
 
-      System.out.println( new String( baos.toByteArray() ));
-      DocumentUtil.getDocument( new ByteArrayInputStream( baos.toByteArray() )); 
+      System.out.println(new String(baos.toByteArray()));
+      DocumentUtil.getDocument(new ByteArrayInputStream(baos.toByteArray()));
    }
-   
-   private void validateAssertion( AssertionType assertion ) throws Exception
+
+   private void validateAssertion(AssertionType assertion) throws Exception
    {
-      DatatypeFactory dtf = DatatypeFactory.newInstance(); 
-      
-      assertNotNull( assertion );
-      
-      assertEquals( "ID_cb1eadf5-50a6-4fdf-96bc-412514f52882", assertion.getID() );
-      assertEquals( dtf.newXMLGregorianCalendar( "2010-09-30T19:13:37.603Z" ), assertion.getIssueInstant() );
+      DatatypeFactory dtf = DatatypeFactory.newInstance();
+
+      assertNotNull(assertion);
+
+      assertEquals("ID_cb1eadf5-50a6-4fdf-96bc-412514f52882", assertion.getID());
+      assertEquals(dtf.newXMLGregorianCalendar("2010-09-30T19:13:37.603Z"), assertion.getIssueInstant());
       //Issuer
-      assertEquals( "Test STS", assertion.getIssuer().getValue() );
-      
+      assertEquals("Test STS", assertion.getIssuer().getValue());
+
       //Subject
       SubjectType subject = assertion.getSubject();
-      
+
       NameIDType subjectNameID = (NameIDType) subject.getSubType().getBaseID();
-      
-      assertEquals( "jduke", subjectNameID.getValue() );
-      assertEquals( "urn:picketlink:identity-federation", subjectNameID.getNameQualifier() ); 
-      
+
+      assertEquals("jduke", subjectNameID.getValue());
+      assertEquals("urn:picketlink:identity-federation", subjectNameID.getNameQualifier());
+
       SubjectConfirmationType subjectConfirmationType = subject.getConfirmation().get(0);
-      assertEquals( JBossSAMLURIConstants.BEARER.get(), subjectConfirmationType.getMethod() );
-      
+      assertEquals(JBossSAMLURIConstants.BEARER.get(), subjectConfirmationType.getMethod());
+
       /*List<JAXBElement<?>> content = subject.getContent(); 
       
       int size = content.size();
@@ -122,10 +122,10 @@
             assertEquals( JBossSAMLURIConstants.BEARER.get(), subjectConfirmationType.getMethod() );
          }
       } */
-      
+
       //Conditions
-      ConditionsType conditions =  assertion.getConditions();
-      assertEquals( dtf.newXMLGregorianCalendar( "2010-09-30T19:13:37.603Z" ) , conditions.getNotBefore() );
-      assertEquals( dtf.newXMLGregorianCalendar( "2010-09-30T21:13:37.603Z" ) , conditions.getNotOnOrAfter() ); 
+      ConditionsType conditions = assertion.getConditions();
+      assertEquals(dtf.newXMLGregorianCalendar("2010-09-30T19:13:37.603Z"), conditions.getNotBefore());
+      assertEquals(dtf.newXMLGregorianCalendar("2010-09-30T21:13:37.603Z"), conditions.getNotOnOrAfter());
    }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustIssuePublicCertificateTestCase.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustIssuePublicCertificateTestCase.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustIssuePublicCertificateTestCase.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -50,33 +50,33 @@
    public void testPublicCert() throws Exception
    {
       ClassLoader tcl = Thread.currentThread().getContextClassLoader();
-      InputStream configStream = tcl.getResourceAsStream( "parser/wst/wst-issue-public-certificate.xml" );
-      
+      InputStream configStream = tcl.getResourceAsStream("parser/wst/wst-issue-public-certificate.xml");
+
       WSTrustParser parser = new WSTrustParser();
-      RequestSecurityToken requestToken = ( RequestSecurityToken ) parser.parse( configStream );   
-       
-      assertEquals( "testcontext", requestToken.getContext() );
-      assertEquals( WSTrustConstants.ISSUE_REQUEST , requestToken.getRequestType().toASCIIString() ); 
-      
+      RequestSecurityToken requestToken = (RequestSecurityToken) parser.parse(configStream);
+
+      assertEquals("testcontext", requestToken.getContext());
+      assertEquals(WSTrustConstants.ISSUE_REQUEST, requestToken.getRequestType().toASCIIString());
+
       AppliesTo appliesTo = requestToken.getAppliesTo();
       EndpointReferenceType endpoint = (EndpointReferenceType) appliesTo.getAny().get(0);
-      assertEquals( "http://services.testcorp.org/provider2", endpoint.getAddress().getValue() );
-      
-      
-      assertEquals( "http://docs.oasis-open.org/ws-sx/ws-trust/200512/PublicKey", requestToken.getKeyType().toASCIIString() );
-      
+      assertEquals("http://services.testcorp.org/provider2", endpoint.getAddress().getValue());
+
+      assertEquals("http://docs.oasis-open.org/ws-sx/ws-trust/200512/PublicKey", requestToken.getKeyType()
+            .toASCIIString());
+
       UseKeyType useKeyType = requestToken.getUseKey();
-      Element certEl = (Element) useKeyType.getAny(); 
-      
-      assertEquals( "ds:" + WSTRequestSecurityTokenParser.X509CERTIFICATE, certEl.getTagName() );
-      
+      Element certEl = (Element) useKeyType.getAny().get(0);
+
+      assertEquals("ds:" + WSTRequestSecurityTokenParser.X509CERTIFICATE, certEl.getTagName());
+
       //Now for the writing part
       ByteArrayOutputStream baos = new ByteArrayOutputStream();
       WSTrustRequestWriter rstWriter = new WSTrustRequestWriter(baos);
 
-      rstWriter.write(requestToken ); 
+      rstWriter.write(requestToken);
 
-      System.out.println( new String( baos.toByteArray() ));
-      DocumentUtil.getDocument( new ByteArrayInputStream( baos.toByteArray() )); 
+      System.out.println(new String(baos.toByteArray()));
+      DocumentUtil.getDocument(new ByteArrayInputStream(baos.toByteArray()));
    }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustIssuePublicKeyTestCase.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustIssuePublicKeyTestCase.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustIssuePublicKeyTestCase.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -63,7 +63,7 @@
             .toASCIIString());
 
       UseKeyType useKeyType = requestToken.getUseKey();
-      Element certEl = (Element) useKeyType.getAny();
+      Element certEl = (Element) useKeyType.getAny().get(0);
 
       assertEquals("ds:" + WSTRequestSecurityTokenParser.KEYVALUE, certEl.getTagName());
 

Modified: federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustOnBehalfOfTestCase.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustOnBehalfOfTestCase.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustOnBehalfOfTestCase.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -22,10 +22,12 @@
 package org.picketlink.test.identity.federation.core.parser.wst;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
+import java.util.List;
 
 import org.junit.Test;
 import org.picketlink.identity.federation.core.parsers.wst.WSTrustParser;
@@ -47,26 +49,28 @@
    public void testOnBehalfOfParsing() throws Exception
    {
       ClassLoader tcl = Thread.currentThread().getContextClassLoader();
-      InputStream configStream = tcl.getResourceAsStream( "parser/wst/wst-issue-onbehalfof.xml" );
-      
+      InputStream configStream = tcl.getResourceAsStream("parser/wst/wst-issue-onbehalfof.xml");
+
       WSTrustParser parser = new WSTrustParser();
-      RequestSecurityToken requestToken = ( RequestSecurityToken ) parser.parse( configStream );   
-       
-      assertEquals( "testcontext", requestToken.getContext() );
-      assertEquals( WSTrustConstants.ISSUE_REQUEST , requestToken.getRequestType().toASCIIString() ); 
-      
+      RequestSecurityToken requestToken = (RequestSecurityToken) parser.parse(configStream);
+
+      assertEquals("testcontext", requestToken.getContext());
+      assertEquals(WSTrustConstants.ISSUE_REQUEST, requestToken.getRequestType().toASCIIString());
+
       OnBehalfOfType onBehalfOf = requestToken.getOnBehalfOf();
-      UsernameTokenType userNameToken = (UsernameTokenType) onBehalfOf.getAny();
-      assertEquals( "id", userNameToken.getId() );
-      assertEquals( "anotherduke", userNameToken.getUsername().getValue() );
-      
+      List<Object> theList = onBehalfOf.getAny();
+      assertNotNull(theList);
+      UsernameTokenType userNameToken = (UsernameTokenType) theList.get(0);
+      assertEquals("id", userNameToken.getId());
+      assertEquals("anotherduke", userNameToken.getUsername().getValue());
+
       //Now for the writing part
       ByteArrayOutputStream baos = new ByteArrayOutputStream();
       WSTrustRequestWriter rstWriter = new WSTrustRequestWriter(baos);
 
-      rstWriter.write(requestToken); 
+      rstWriter.write(requestToken);
 
-      System.out.println( new String( baos.toByteArray() ));
-      DocumentUtil.getDocument( new ByteArrayInputStream( baos.toByteArray() )); 
-   } 
+      System.out.println(new String(baos.toByteArray()));
+      DocumentUtil.getDocument(new ByteArrayInputStream(baos.toByteArray()));
+   }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustRenewTargetParsingTestCase.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustRenewTargetParsingTestCase.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustRenewTargetParsingTestCase.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -41,23 +41,23 @@
  */
 public class WSTrustRenewTargetParsingTestCase
 {
-   @Test 
+   @Test
    public void testWST_RenewTarget() throws Exception
    {
       ClassLoader tcl = Thread.currentThread().getContextClassLoader();
-      InputStream configStream = tcl.getResourceAsStream( "parser/wst/wst-renew-saml.xml" );
-      
+      InputStream configStream = tcl.getResourceAsStream("parser/wst/wst-renew-saml.xml");
+
       WSTrustParser parser = new WSTrustParser();
-      RequestSecurityToken requestToken = (RequestSecurityToken) parser.parse( configStream );  
-      assertEquals( "renewcontext", requestToken.getContext() );
-      assertEquals( WSTrustConstants.RENEW_REQUEST , requestToken.getRequestType().toASCIIString() );
-      assertEquals( WSTrustConstants.SAML2_TOKEN_TYPE , requestToken.getTokenType().toASCIIString() ); 
-      
+      RequestSecurityToken requestToken = (RequestSecurityToken) parser.parse(configStream);
+      assertEquals("renewcontext", requestToken.getContext());
+      assertEquals(WSTrustConstants.RENEW_REQUEST, requestToken.getRequestType().toASCIIString());
+      assertEquals(WSTrustConstants.SAML2_TOKEN_TYPE, requestToken.getTokenType().toASCIIString());
+
       RenewTargetType renewTarget = requestToken.getRenewTarget();
-      AssertionType assertion = (AssertionType) renewTarget.getAny();
-      assertEquals( "ID_654b6092-c725-40ea-8044-de453b59cb28", assertion.getID() );
-      assertEquals( "Test STS", assertion.getIssuer().getValue() );
+      AssertionType assertion = (AssertionType) renewTarget.getAny().get(0);
+      assertEquals("ID_654b6092-c725-40ea-8044-de453b59cb28", assertion.getID());
+      assertEquals("Test STS", assertion.getIssuer().getValue());
       SubjectType subject = assertion.getSubject();
-      assertEquals( "jduke", ((NameIDType)subject.getSubType().getBaseID()).getValue());
-   } 
+      assertEquals("jduke", ((NameIDType) subject.getSubType().getBaseID()).getValue());
+   }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustValidateSamlTestCase.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustValidateSamlTestCase.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/wst/WSTrustValidateSamlTestCase.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -39,21 +39,20 @@
  */
 public class WSTrustValidateSamlTestCase
 {
-   @Test 
+   @Test
    public void testWST_ValidateSaml() throws Exception
    {
       ClassLoader tcl = Thread.currentThread().getContextClassLoader();
-      InputStream configStream = tcl.getResourceAsStream( "parser/wst/wst-validate-saml.xml" );
-      
+      InputStream configStream = tcl.getResourceAsStream("parser/wst/wst-validate-saml.xml");
+
       WSTrustParser parser = new WSTrustParser();
-      RequestSecurityToken rst1 = (RequestSecurityToken) parser.parse( configStream );  
-      assertEquals( "validatecontext", rst1.getContext() );
-      assertEquals( WSTrustConstants.VALIDATE_REQUEST, rst1.getRequestType().toASCIIString() );
-      assertEquals( WSTrustConstants.RSTR_STATUS_TOKEN_TYPE, rst1.getTokenType().toASCIIString() ); 
-      
+      RequestSecurityToken rst1 = (RequestSecurityToken) parser.parse(configStream);
+      assertEquals("validatecontext", rst1.getContext());
+      assertEquals(WSTrustConstants.VALIDATE_REQUEST, rst1.getRequestType().toASCIIString());
+      assertEquals(WSTrustConstants.RSTR_STATUS_TOKEN_TYPE, rst1.getTokenType().toASCIIString());
+
       ValidateTargetType validateTarget = rst1.getValidateTarget();
-      AssertionType assertion = (AssertionType) validateTarget.getAny();
-      assertEquals( "ID_654b6092-c725-40ea-8044-de453b59cb28", assertion.getID() );
+      AssertionType assertion = (AssertionType) validateTarget.getAny().get(0);
+      assertEquals("ID_654b6092-c725-40ea-8044-de453b59cb28", assertion.getID());
    }
-
 }

Modified: federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/PicketLinkSTSUnitTestCase.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/PicketLinkSTSUnitTestCase.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/PicketLinkSTSUnitTestCase.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -17,6 +17,13 @@
  */
 package org.picketlink.test.identity.federation.core.wstrust;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 import java.math.BigInteger;
@@ -42,8 +49,8 @@
 import javax.xml.ws.WebServiceException;
 import javax.xml.ws.handler.MessageContext;
 
-import junit.framework.TestCase;
-
+import org.junit.Before;
+import org.junit.Test;
 import org.picketlink.identity.federation.core.config.STSType;
 import org.picketlink.identity.federation.core.exceptions.ConfigurationException;
 import org.picketlink.identity.federation.core.exceptions.ParsingException;
@@ -108,7 +115,7 @@
  * 
  * @author <a href="mailto:sguilhen at redhat.com">Stefan Guilhen</a>
  */
-public class PicketLinkSTSUnitTestCase extends TestCase
+public class PicketLinkSTSUnitTestCase
 {
 
    private TestSTS tokenService;
@@ -118,10 +125,9 @@
     * 
     * @see junit.framework.TestCase#setUp()
     */
-   @Override
-   protected void setUp() throws Exception
+   @Before
+   public void setUp() throws Exception
    {
-      super.setUp();
       // for testing purposes we can instantiate the TestSTS as a regular POJO.
       this.tokenService = new TestSTS();
       TestContext context = new TestContext();
@@ -166,6 +172,7 @@
     * @throws Exception
     *            if an error occurs while running the test.
     */
+   @Test
    public void testSTSConfiguration() throws Exception
    {
       // make the STS read the configuration file.
@@ -203,31 +210,32 @@
       assertNull(config.getProviderForService("http://invalid.service/service"));
 
       String family = SecurityTokenProvider.FAMILY_TYPE.WS_TRUST.toString();
-      
+
       // check the token element and namespace -> token provider mapping.
-      provider = config.getProviderForTokenElementNS(family, new QName( "http://www.tokens.org", "SpecialToken" ) );
+      provider = config.getProviderForTokenElementNS(family, new QName("http://www.tokens.org", "SpecialToken"));
       assertNotNull("Unexpected null token provider", provider);
       assertTrue("Unexpected token provider type", provider instanceof SpecialTokenProvider);
-      provider = config.getProviderForTokenElementNS(family, new QName( JBossSAMLURIConstants.ASSERTION_NSURI.get(), JBossSAMLConstants.ASSERTION.get() ));
+      provider = config.getProviderForTokenElementNS(family, new QName(JBossSAMLURIConstants.ASSERTION_NSURI.get(),
+            JBossSAMLConstants.ASSERTION.get()));
       assertNotNull("Unexpected null token provider", provider);
       assertTrue("Unexpected token provider type", provider instanceof SAML20TokenProvider);
-      assertNull(config.getProviderForTokenElementNS( family, new QName( "InvalidNamespace", "SpecialToken" )) );
+      assertNull(config.getProviderForTokenElementNS(family, new QName("InvalidNamespace", "SpecialToken")));
 
       // check the service provider -> token type mapping.
-      assertEquals("Invalid token type for service provider 1", "http://www.tokens.org/SpecialToken", config
-            .getTokenTypeForService("http://services.testcorp.org/provider1"));
-      assertEquals("Invalid token type for service provider 2", SAMLUtil.SAML2_TOKEN_TYPE, config
-            .getTokenTypeForService("http://services.testcorp.org/provider2"));
+      assertEquals("Invalid token type for service provider 1", "http://www.tokens.org/SpecialToken",
+            config.getTokenTypeForService("http://services.testcorp.org/provider1"));
+      assertEquals("Invalid token type for service provider 2", SAMLUtil.SAML2_TOKEN_TYPE,
+            config.getTokenTypeForService("http://services.testcorp.org/provider2"));
       assertNull(config.getTokenTypeForService("http://invalid.service/service"));
 
       // check the keystore configuration.
       assertNotNull("Invalid null STS key pair", config.getSTSKeyPair());
       assertNotNull("Invalid null STS public key", config.getSTSKeyPair().getPublic());
       assertNotNull("Invalid null STS private key", config.getSTSKeyPair().getPrivate());
-      assertNotNull("Invalid null validating key for service provider 1", config
-            .getServiceProviderPublicKey("http://services.testcorp.org/provider1"));
-      assertNotNull("Invalid null validating key for service provider 2", config
-            .getServiceProviderPublicKey("http://services.testcorp.org/provider2"));
+      assertNotNull("Invalid null validating key for service provider 1",
+            config.getServiceProviderPublicKey("http://services.testcorp.org/provider1"));
+      assertNotNull("Invalid null validating key for service provider 2",
+            config.getServiceProviderPublicKey("http://services.testcorp.org/provider2"));
    }
 
    /**
@@ -247,6 +255,7 @@
     * @throws Exception
     *            if an error occurs while running the test.
     */
+   @Test
    public void testInvokeCustom() throws Exception
    {
       // create a simple token request, asking for a "special" test token.
@@ -300,6 +309,7 @@
     * @throws Exception
     *            if an error occurs while running the test.
     */
+   @Test
    public void testInvokeSAML20() throws Exception
    {
       // create a simple token request, asking for a SAMLv2.0 token.
@@ -325,6 +335,7 @@
     * @throws Exception
     *            if an error occurs while running the test.
     */
+   @Test
    public void testInvokeCustomAppliesTo() throws Exception
    {
       // create a simple token request, this time using the applies to get to the token type.
@@ -351,6 +362,7 @@
     * @throws Exception
     *            if an error occurs while running the test.
     */
+   @Test
    public void testInvokeSAML20AppliesTo() throws Exception
    {
       RequestSecurityToken request = this.createRequest("testcontext", WSTrustConstants.ISSUE_REQUEST, null,
@@ -387,6 +399,7 @@
     * @throws Exception
     *            if an error occurs while running the test.
     */
+   @Test
    public void testInvokeSAML20OnBehalfOf() throws Exception
    {
       // create a simple token request, asking for a SAMLv2.0 token.
@@ -416,6 +429,7 @@
     * @throws Exception
     *            if an error occurs while running the test.
     */
+   @Test
    public void testInvokeSAML20WithSTSGeneratedSymmetricKey() throws Exception
    {
       // create a simple token request, asking for a SAMLv2.0 token.
@@ -435,8 +449,7 @@
       AssertionType assertion = this.validateSAMLAssertionResponse(baseResponse, "testcontext", "jduke",
             SAMLUtil.SAML2_HOLDER_OF_KEY_URI);
       // validate the holder of key contents.
-      SubjectConfirmationType subjConfirmation = (SubjectConfirmationType) assertion.getSubject().getConfirmation()
-            .get(0);
+      SubjectConfirmationType subjConfirmation = assertion.getSubject().getConfirmation().get(0);
       this.validateHolderOfKeyContents(subjConfirmation, WSTrustConstants.KEY_TYPE_SYMMETRIC, null, false);
 
       // check if the response contains the STS-generated key.
@@ -444,8 +457,8 @@
       RequestSecurityTokenResponse response = collection.getRequestSecurityTokenResponses().get(0);
       RequestedProofTokenType proofToken = response.getRequestedProofToken();
       assertNotNull("Unexpected null proof token", proofToken);
-      assertTrue(proofToken.getAny() instanceof BinarySecretType);
-      BinarySecretType serverBinarySecret = (BinarySecretType) proofToken.getAny();
+      assertTrue(proofToken.getAny().get(0) instanceof BinarySecretType);
+      BinarySecretType serverBinarySecret = (BinarySecretType) proofToken.getAny().get(0);
       assertNotNull("Unexpected null secret", serverBinarySecret.getValue());
       // default key size is 128 bits (16 bytes).
       byte[] encodedSecret = serverBinarySecret.getValue();
@@ -463,6 +476,7 @@
     * @throws Exception
     *            if an error occurs while running the test.
     */
+   @Test
    public void testInvokeSAML20WithCombinedSymmetricKey() throws Exception
    {
       // create a 64-bit random client secret.
@@ -473,7 +487,7 @@
 
       // set the client secret in the client entropy.
       EntropyType clientEntropy = new EntropyType();
-      clientEntropy.getAny().add(clientBinarySecret);
+      clientEntropy.addAny(clientBinarySecret);
 
       // create a token request specifying the key type, key size, and client entropy.
       RequestSecurityToken request = this.createRequest("testcontext", WSTrustConstants.ISSUE_REQUEST, null,
@@ -492,16 +506,15 @@
       AssertionType assertion = this.validateSAMLAssertionResponse(baseResponse, "testcontext", "jduke",
             SAMLUtil.SAML2_HOLDER_OF_KEY_URI);
       // validate the holder of key contents.
-      SubjectConfirmationType subjConfirmation = (SubjectConfirmationType) assertion.getSubject().getConfirmation()
-            .get(0);
+      SubjectConfirmationType subjConfirmation = assertion.getSubject().getConfirmation().get(0);
       this.validateHolderOfKeyContents(subjConfirmation, WSTrustConstants.KEY_TYPE_SYMMETRIC, null, false);
 
       RequestSecurityTokenResponseCollection collection = (RequestSecurityTokenResponseCollection) baseResponse;
       RequestSecurityTokenResponse response = collection.getRequestSecurityTokenResponses().get(0);
       RequestedProofTokenType proofToken = response.getRequestedProofToken();
       assertNotNull("Unexpected null proof token", proofToken);
-      assertTrue(proofToken.getAny() instanceof ComputedKeyType);
-      ComputedKeyType computedKey = (ComputedKeyType) proofToken.getAny();
+      assertTrue(proofToken.getAny().get(0) instanceof ComputedKeyType);
+      ComputedKeyType computedKey = (ComputedKeyType) proofToken.getAny().get(0);
       assertEquals("Unexpected computed key algorithm", WSTrustConstants.CK_PSHA1, computedKey.getAlgorithm());
 
       // server entropy must have been included in the response to allow reconstruction of the computed key.
@@ -525,6 +538,7 @@
     * @throws Exception
     *            if an error occurs while running the test.
     */
+   @Test
    public void testInvokeSAML20WithCertificate() throws Exception
    {
       // create a simple token request.
@@ -535,7 +549,7 @@
       // include a UseKey section that specifies the certificate in the request.
       Certificate certificate = this.getCertificate("keystore/sts_keystore.jks", "testpass", "service1");
       UseKeyType useKey = new UseKeyType();
-      useKey.setAny(Base64.encodeBytes(certificate.getEncoded()).getBytes());
+      useKey.add(Base64.encodeBytes(certificate.getEncoded()).getBytes());
       request.setUseKey(useKey);
 
       // invoke the token service.
@@ -547,8 +561,7 @@
       AssertionType assertion = this.validateSAMLAssertionResponse(baseResponse, "testcontext", "jduke",
             SAMLUtil.SAML2_HOLDER_OF_KEY_URI);
       // validate the holder of key contents.
-      SubjectConfirmationType subjConfirmation = (SubjectConfirmationType) assertion.getSubject().getConfirmation()
-            .get(0);
+      SubjectConfirmationType subjConfirmation = assertion.getSubject().getConfirmation().get(0);
       this.validateHolderOfKeyContents(subjConfirmation, WSTrustConstants.KEY_TYPE_PUBLIC, certificate, false);
    }
 
@@ -561,6 +574,7 @@
     * @throws Exception
     *            if an error occurs while running the test.
     */
+   @Test
    public void testInvokeSAML20WithPublicKey() throws Exception
    {
       // create a simple token request.
@@ -572,7 +586,7 @@
       Certificate certificate = this.getCertificate("keystore/sts_keystore.jks", "testpass", "service1");
       KeyValueType keyValue = WSTrustUtil.createKeyValue(certificate.getPublicKey());
       UseKeyType useKey = new UseKeyType();
-      useKey.setAny(keyValue);
+      useKey.add(keyValue);
       request.setUseKey(useKey);
 
       // invoke the token service.
@@ -585,8 +599,7 @@
       AssertionType assertion = this.validateSAMLAssertionResponse(baseResponse, "testcontext", "jduke",
             SAMLUtil.SAML2_HOLDER_OF_KEY_URI);
       // validate the holder of key contents.
-      SubjectConfirmationType subjConfirmation = (SubjectConfirmationType) assertion.getSubject().getConfirmation()
-            .get(0);
+      SubjectConfirmationType subjConfirmation = assertion.getSubject().getConfirmation().get(0);
       this.validateHolderOfKeyContents(subjConfirmation, WSTrustConstants.KEY_TYPE_PUBLIC, certificate, true);
    }
 
@@ -599,6 +612,7 @@
     * @throws Exception
     *            if an error occurs while running the test.
     */
+   @Test
    public void testInvokeSAML20Validate() throws Exception
    {
       // create a simple token request.
@@ -617,17 +631,18 @@
       this.validateSAMLAssertionResponse(baseResponse, "testcontext", "jduke", SAMLUtil.SAML2_BEARER_URI);
       RequestSecurityTokenResponseCollection collection = (RequestSecurityTokenResponseCollection) baseResponse;
       Element assertion = (Element) collection.getRequestSecurityTokenResponses().get(0).getRequestedSecurityToken()
-            .getAny();
+            .getAny().get(0);
 
       // now construct a WS-Trust validate request with the generated assertion.
       request = this.createRequest("validatecontext", WSTrustConstants.VALIDATE_REQUEST, WSTrustConstants.STATUS_TYPE,
             null);
       ValidateTargetType validateTarget = new ValidateTargetType();
-      validateTarget.setAny(assertion);
+      validateTarget.add(assertion);
       request.setValidateTarget(validateTarget);
 
       // invoke the token service.
       responseMessage = this.tokenService.invoke(this.createSourceFromRequest(request));
+      System.out.println(DocumentUtil.getNodeAsString(DocumentUtil.getNodeFromSource(responseMessage)));
       baseResponse = (BaseRequestSecurityTokenResponse) parser.parse(DocumentUtil.getSourceAsStream(responseMessage));
 
       // validate the response contents.
@@ -645,8 +660,10 @@
 
       // now let's temper the SAML assertion and try to validate it again.
       assertion.getFirstChild().getFirstChild().setNodeValue("Tempered Issuer");
-      request.getValidateTarget().setAny(assertion);
-      responseMessage = this.tokenService.invoke(this.createSourceFromRequest(request));
+      request.getValidateTarget().add(assertion);
+      Source theRequest = this.createSourceFromRequest(request);
+      System.out.println("ANIL::" + DocumentUtil.asString((Document) DocumentUtil.getNodeFromSource(theRequest)));
+      responseMessage = this.tokenService.invoke(theRequest);
       collection = (RequestSecurityTokenResponseCollection) parser.parse(DocumentUtil
             .getSourceAsStream(responseMessage));
       assertEquals("Unexpected number of responses", 1, collection.getRequestSecurityTokenResponses().size());
@@ -668,6 +685,7 @@
     * @throws Exception
     *            if an error occurs while running the test.
     */
+   @Test
    public void testInvokeSAML20Renew() throws Exception
    {
       // create a simple token request, using applies-to to identify the token type.
@@ -686,12 +704,12 @@
       this.validateSAMLAssertionResponse(baseResponse, "testcontext", "jduke", SAMLUtil.SAML2_BEARER_URI);
       RequestSecurityTokenResponseCollection collection = (RequestSecurityTokenResponseCollection) baseResponse;
       Element assertionElement = (Element) collection.getRequestSecurityTokenResponses().get(0)
-            .getRequestedSecurityToken().getAny();
+            .getRequestedSecurityToken().getAny().get(0);
 
       // now construct a WS-Trust renew request with the generated assertion.
       request = this.createRequest("renewcontext", WSTrustConstants.RENEW_REQUEST, SAMLUtil.SAML2_TOKEN_TYPE, null);
       RenewTargetType renewTarget = new RenewTargetType();
-      renewTarget.setAny(assertionElement);
+      renewTarget.add(assertionElement);
       request.setRenewTarget(renewTarget);
 
       // invoke the token service.
@@ -702,19 +720,21 @@
       this.validateSAMLAssertionResponse(baseResponse, "renewcontext", "jduke", SAMLUtil.SAML2_BEARER_URI);
       collection = (RequestSecurityTokenResponseCollection) baseResponse;
       Element renewedAssertionElement = (Element) collection.getRequestSecurityTokenResponses().get(0)
-            .getRequestedSecurityToken().getAny();
+            .getRequestedSecurityToken().getAny().get(0);
 
       // compare the assertions, checking if the lifetime has been updated.
       AssertionType originalAssertion = SAMLUtil.fromElement(assertionElement);
       AssertionType renewedAssertion = SAMLUtil.fromElement(renewedAssertionElement);
 
       // assertions should have different ids and lifetimes.
-      assertFalse("Renewed assertion should have a unique id", originalAssertion.getID().equals(
-            renewedAssertion.getID()));
-      assertEquals(DatatypeConstants.LESSER, originalAssertion.getConditions().getNotBefore().compare(
-            renewedAssertion.getConditions().getNotBefore()));
-      assertEquals(DatatypeConstants.LESSER, originalAssertion.getConditions().getNotOnOrAfter().compare(
-            renewedAssertion.getConditions().getNotOnOrAfter()));
+      assertFalse("Renewed assertion should have a unique id",
+            originalAssertion.getID().equals(renewedAssertion.getID()));
+      assertEquals(DatatypeConstants.LESSER,
+            originalAssertion.getConditions().getNotBefore().compare(renewedAssertion.getConditions().getNotBefore()));
+      assertEquals(
+            DatatypeConstants.LESSER,
+            originalAssertion.getConditions().getNotOnOrAfter()
+                  .compare(renewedAssertion.getConditions().getNotOnOrAfter()));
    }
 
    /**
@@ -726,6 +746,7 @@
     * @throws Exception
     *            if an error occurs while running the test.
     */
+   @Test
    public void testInvokeSAML20Cancel() throws Exception
    {
       // create a simple token request.
@@ -744,12 +765,12 @@
       this.validateSAMLAssertionResponse(baseResponse, "testcontext", "jduke", SAMLUtil.SAML2_BEARER_URI);
       RequestSecurityTokenResponseCollection collection = (RequestSecurityTokenResponseCollection) baseResponse;
       Element assertion = (Element) collection.getRequestSecurityTokenResponses().get(0).getRequestedSecurityToken()
-            .getAny();
+            .getAny().get(0);
 
       // now construct a WS-Trust cancel request with the generated assertion.
       request = this.createRequest("cancelcontext", WSTrustConstants.CANCEL_REQUEST, null, null);
       CancelTargetType cancelTarget = new CancelTargetType();
-      cancelTarget.setAny(assertion);
+      cancelTarget.add(assertion);
       request.setCancelTarget(cancelTarget);
 
       // invoke the token service.
@@ -763,13 +784,13 @@
       assertEquals("Unexpected number of responses", 1, collection.getRequestSecurityTokenResponses().size());
       RequestSecurityTokenResponse response = collection.getRequestSecurityTokenResponses().get(0);
       assertEquals("Unexpected response context", "cancelcontext", response.getContext());
-      assertNotNull("Cancel response should contain a RequestedTokenCancelled element", response
-            .getRequestedTokenCancelled());
+      assertNotNull("Cancel response should contain a RequestedTokenCancelled element",
+            response.getRequestedTokenCancelled());
 
       // try to validate the canceled assertion.
       request = this.createRequest("validatecontext", WSTrustConstants.VALIDATE_REQUEST, null, null);
       ValidateTargetType validateTarget = new ValidateTargetType();
-      validateTarget.setAny(assertion);
+      validateTarget.add(assertion);
       request.setValidateTarget(validateTarget);
 
       // the response should contain a status indicating that the token is not valid.
@@ -789,7 +810,7 @@
       // now try to renew the canceled assertion.
       request = this.createRequest("renewcontext", WSTrustConstants.RENEW_REQUEST, null, null);
       RenewTargetType renewTarget = new RenewTargetType();
-      renewTarget.setAny(assertion);
+      renewTarget.add(assertion);
       request.setRenewTarget(renewTarget);
 
       // we should receive an exception when renewing the token.
@@ -815,6 +836,7 @@
     * @throws Exception
     *            if an error occurs while running the test.
     */
+   @Test
    public void testInvokeUnknownTokenType() throws Exception
    {
       // create a simple token request, asking for an "unknown" test token.
@@ -832,7 +854,7 @@
       catch (WebServiceException we)
       {
          assertNotNull("Unexpected null cause", we.getCause());
-         assertTrue("Unexpected cause type", we.getCause() instanceof WSTrustException); 
+         assertTrue("Unexpected cause type", we.getCause() instanceof WSTrustException);
       }
    }
 
@@ -844,6 +866,7 @@
     * @throws Exception
     *            if an error occurs while running the test.
     */
+   @Test
    public void testInvalidIssueRequests() throws Exception
    {
       // lets create an issue request that container neither an applies-to nor a token type.
@@ -890,6 +913,7 @@
     * @throws Exception
     *            if an error occurs while running the test.
     */
+   @Test
    public void testInvalidRenewRequests() throws Exception
    {
       // first create a request that doesn't have a renew target element.
@@ -926,7 +950,7 @@
       }
 
       // a request to renew an unknown token (i.e. there's no provider can handle the token) should also fail.
-      request.getRenewTarget().setAny(this.createUnknownToken());
+      request.getRenewTarget().add(this.createUnknownToken());
       requestMessage = this.createSourceFromRequest(request);
       try
       {
@@ -950,6 +974,7 @@
     * @throws Exception
     *            if an error occurs while running the test.
     */
+   @Test
    public void testInvalidValidateRequests() throws Exception
    {
       // first create a request that doesn't have a validate target element.
@@ -986,18 +1011,18 @@
       }
 
       // a request to validate an unknown token (i.e. there's no provider can handle the token) should also fail.
-      request.getValidateTarget().setAny(this.createUnknownToken());
+      request.getValidateTarget().add(this.createUnknownToken());
       requestMessage = this.createSourceFromRequest(request);
       try
       {
          this.tokenService.invoke(requestMessage);
          Source responseMessage = this.tokenService.invoke(requestMessage);
          RequestSecurityTokenResponseCollection baseResponseColl = (RequestSecurityTokenResponseCollection) new WSTrustParser()
-               .parse(DocumentUtil.getSourceAsStream(responseMessage)); 
-         
+               .parse(DocumentUtil.getSourceAsStream(responseMessage));
+
          RequestSecurityTokenResponse response = baseResponseColl.getRequestSecurityTokenResponses().get(0);
          StatusType status = response.getStatus();
-         assertTrue( status.getCode().equals( WSTrustConstants.STATUS_CODE_INVALID ));
+         assertTrue(status.getCode().equals(WSTrustConstants.STATUS_CODE_INVALID));
          //fail("An exception should have been raised by the security token service");
       }
       catch (WebServiceException we)
@@ -1017,6 +1042,7 @@
     * @throws Exception
     *            if an error occurs while running the test.
     */
+   @Test
    public void testInvalidCancelRequests() throws Exception
    {
       // first create a request that doesn't have a cancel target element.
@@ -1053,7 +1079,7 @@
       }
 
       // a request to cancel an unknown token (i.e. there's no provider can handle the token) should also fail.
-      request.getCancelTarget().setAny(this.createUnknownToken());
+      request.getCancelTarget().add(this.createUnknownToken());
       requestMessage = this.createSourceFromRequest(request);
       try
       {
@@ -1064,8 +1090,8 @@
       {
          assertNotNull("Unexpected null cause", we.getCause());
          assertTrue("Unexpected cause type", we.getCause() instanceof WSTrustException);
-         assertEquals("No SecurityTokenProvider configured for http://www.unknowntoken.org:UnknownToken", we.getCause().getCause()
-               .getMessage());
+         assertEquals("No SecurityTokenProvider configured for http://www.unknowntoken.org:UnknownToken", we.getCause()
+               .getCause().getMessage());
       }
    }
 
@@ -1099,14 +1125,14 @@
 
       RequestedSecurityTokenType requestedToken = response.getRequestedSecurityToken();
       assertNotNull("Unexpected null requested security token", requestedToken);
-      Object token = requestedToken.getAny();
+      Object token = requestedToken.getAny().get(0);
       assertNotNull("Unexpected null token", token);
       assertTrue("Unexpected token class", token instanceof Element);
-      Element element = (Element) requestedToken.getAny();
+      Element element = (Element) requestedToken.getAny().get(0);
       assertEquals("Unexpected root element name", "SpecialToken", element.getLocalName());
       assertEquals("Unexpected namespace value", "http://www.tokens.org", element.getNamespaceURI());
-      assertEquals("Unexpected attribute value", "http://www.tokens.org/SpecialToken", element
-            .getAttribute("TokenType"));
+      assertEquals("Unexpected attribute value", "http://www.tokens.org/SpecialToken",
+            element.getAttribute("TokenType"));
       element = (Element) element.getFirstChild();
       assertEquals("Unexpected child element name", "SpecialTokenValue", element.getLocalName());
       assertEquals("Unexpected token value", "Principal:jduke", element.getFirstChild().getNodeValue());
@@ -1165,7 +1191,7 @@
       assertNotNull("Unexpected null requested security token", requestedToken);
 
       // unmarshall the SAMLV2.0 assertion.
-      Element assertionElement = (Element) requestedToken.getAny();
+      Element assertionElement = (Element) requestedToken.getAny().get(0);
       System.out.println(DocumentUtil.getNodeAsString(assertionElement));
       AssertionType assertion = SAMLUtil.fromElement(assertionElement);
 
@@ -1186,7 +1212,7 @@
       assertEquals("Unexpected name id qualifier", "urn:picketlink:identity-federation", nameID.getNameQualifier());
       assertEquals("Unexpected name id value", principal, nameID.getValue());
 
-      SubjectConfirmationType subjType = (SubjectConfirmationType) subject.getConfirmation().get(0);
+      SubjectConfirmationType subjType = subject.getConfirmation().get(0);
       assertEquals("Unexpected confirmation method", confirmationMethod, subjType.getMethod());
 
       // validate the assertion conditions.
@@ -1229,8 +1255,8 @@
       if (WSTrustConstants.KEY_TYPE_SYMMETRIC.equals(keyType))
       {
          Element encKeyElement = (Element) keyInfo.getContent().get(0);
-         assertEquals("Unexpected key info content type", WSTrustConstants.XMLEnc.ENCRYPTED_KEY, encKeyElement
-               .getLocalName());
+         assertEquals("Unexpected key info content type", WSTrustConstants.XMLEnc.ENCRYPTED_KEY,
+               encKeyElement.getLocalName());
       }
       // if the key is public, KeyInfo should either contain an encoded certificate or an encoded public key.
       else if (WSTrustConstants.KEY_TYPE_PUBLIC.equals(keyType))
@@ -1256,8 +1282,7 @@
          else
          {
             X509DataType x509Data = (X509DataType) keyInfo.getContent().get(0);
-            assertEquals("Unexpected X509 data content size", 1, x509Data
-                  .getDataObjects().size());
+            assertEquals("Unexpected X509 data content size", 1, x509Data.getDataObjects().size());
             Object content = x509Data.getDataObjects().get(0);
             assertTrue("Unexpected X509 data content type", content instanceof X509CertificateType);
             byte[] encodedCertificate = ((X509CertificateType) content).getEncodedCertificate();

Modified: federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/SAML20TokenProviderUnitTestCase.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/SAML20TokenProviderUnitTestCase.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/SAML20TokenProviderUnitTestCase.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -144,7 +144,7 @@
       assertEquals("Unexpected name id qualifier", "urn:picketlink:identity-federation", nameID.getNameQualifier());
       assertEquals("Unexpected name id", "sguilhen", nameID.getValue());
 
-      SubjectConfirmationType confirmation = (SubjectConfirmationType) subject.getConfirmation().get(0);
+      SubjectConfirmationType confirmation = subject.getConfirmation().get(0);
       assertEquals("Unexpected confirmation method", SAMLUtil.SAML2_BEARER_URI, confirmation.getMethod());
 
       // validate the attached token reference created by the SAML provider.
@@ -203,15 +203,15 @@
       assertEquals("Unexpected name id qualifier", "urn:picketlink:identity-federation", nameID.getNameQualifier());
       assertEquals("Unexpected name id", "sguilhen", nameID.getValue());
 
-      SubjectConfirmationType confirmation = (SubjectConfirmationType) subject.getConfirmation().get(0);
+      SubjectConfirmationType confirmation = subject.getConfirmation().get(0);
       assertEquals("Unexpected confirmation method", SAMLUtil.SAML2_HOLDER_OF_KEY_URI, confirmation.getMethod());
 
       SubjectConfirmationDataType confirmData = confirmation.getSubjectConfirmationData();
       KeyInfoType keyInfo = (KeyInfoType) confirmData.getAnyType();
       assertEquals("Unexpected key info content size", 1, keyInfo.getContent().size());
       Element encKeyElement = (Element) keyInfo.getContent().get(0);
-      assertEquals("Unexpected key info content type", WSTrustConstants.XMLEnc.ENCRYPTED_KEY, encKeyElement
-            .getLocalName());
+      assertEquals("Unexpected key info content type", WSTrustConstants.XMLEnc.ENCRYPTED_KEY,
+            encKeyElement.getLocalName());
 
       // Now let's set an asymmetric proof of possession token in the context.
       Certificate certificate = this.getCertificate("keystore/sts_keystore.jks", "testpass", "service1");
@@ -227,7 +227,7 @@
       nameID = (NameIDType) subject.getSubType().getBaseID();
       assertEquals("Unexpected name id qualifier", "urn:picketlink:identity-federation", nameID.getNameQualifier());
       assertEquals("Unexpected name id", "sguilhen", nameID.getValue());
-      confirmation = (SubjectConfirmationType) subject.getConfirmation().get(0);
+      confirmation = subject.getConfirmation().get(0);
       assertEquals("Unexpected confirmation method", SAMLUtil.SAML2_HOLDER_OF_KEY_URI, confirmation.getMethod());
 
       /*
@@ -241,8 +241,7 @@
 
       // key info should contain a X509Data section with the encoded certificate.
       X509DataType x509Data = (X509DataType) keyInfo.getContent().get(0);
-      assertEquals("Unexpected X509 data content size", 1, x509Data.getDataObjects()
-            .size());
+      assertEquals("Unexpected X509 data content size", 1, x509Data.getDataObjects().size());
       X509CertificateType cert = (X509CertificateType) x509Data.getDataObjects().get(0);
 
       // certificate should have been encoded to Base64, so we need to decode it first.
@@ -346,7 +345,7 @@
       request.setRequestType(URI.create(WSTrustConstants.VALIDATE_REQUEST));
       request.setTokenType(URI.create(WSTrustConstants.STATUS_TYPE));
       ValidateTargetType validateTarget = new ValidateTargetType();
-      validateTarget.setAny(assertion);
+      validateTarget.add(assertion);
       request.setValidateTarget(validateTarget);
       // we need to set the request document in the request object for the test.
       DOMSource requestSource = (DOMSource) this.createSourceFromRequest(request);

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AnyAddressingType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AnyAddressingType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AnyAddressingType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -49,13 +49,13 @@
       return Collections.unmodifiableList(this.any);
    }
 
-   /**
-    * Add an any
-    * @param obj
-    */
-   public void addAny(Object obj)
+   public void addAny(Object t)
    {
-      this.any.add(obj);
+      this.any.add(t);
    }
 
+   public boolean removeAny(Object t)
+   {
+      return any.remove(t);
+   }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/BaseAddressingType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/BaseAddressingType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/BaseAddressingType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -45,6 +45,11 @@
       otherAttributes.put(qname, str);
    }
 
+   public void addOtherAttributes(Map<QName, String> otherMap)
+   {
+      otherAttributes.putAll(otherMap);
+   }
+
    /**
     * Gets a map that contains attributes that aren't bound to any typed property on this class.
     * 

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/AllowPostdatingType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/AllowPostdatingType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/AllowPostdatingType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,18 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlType;
-
-
 /**
  * <p>Java class for AllowPostdatingType complex type.
  * 
@@ -29,9 +37,6 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "AllowPostdatingType")
-public class AllowPostdatingType {
-
-
+public class AllowPostdatingType
+{
 }

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/AuthenticatorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/AuthenticatorType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/AuthenticatorType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,25 +1,28 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import java.util.ArrayList;
-import java.util.List;
+import org.picketlink.identity.federation.ws.addressing.AnyAddressingType;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.w3c.dom.Element;
-
-
 /**
  * <p>Java class for AuthenticatorType complex type.
  * 
@@ -40,68 +43,31 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "AuthenticatorType", propOrder = {
-    "combinedHash",
-    "any"
-})
-public class AuthenticatorType {
+public class AuthenticatorType extends AnyAddressingType
+{
+   protected byte[] combinedHash;
 
-    @XmlElement(name = "CombinedHash")
-    protected byte[] combinedHash;
-    @XmlAnyElement(lax = true)
-    protected List<Object> any;
+   /**
+    * Gets the value of the combinedHash property.
+    * 
+    * @return
+    *     possible object is
+    *     byte[]
+    */
+   public byte[] getCombinedHash()
+   {
+      return combinedHash;
+   }
 
-    /**
-     * Gets the value of the combinedHash property.
-     * 
-     * @return
-     *     possible object is
-     *     byte[]
-     */
-    public byte[] getCombinedHash() {
-        return combinedHash;
-    }
-
-    /**
-     * Sets the value of the combinedHash property.
-     * 
-     * @param value
-     *     allowed object is
-     *     byte[]
-     */
-    public void setCombinedHash(byte[] value) {
-        this.combinedHash = ((byte[]) value);
-    }
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the any property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getAny().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link Object }
-     * {@link Element }
-     * 
-     * 
-     */
-    public List<Object> getAny() {
-        if (any == null) {
-            any = new ArrayList<Object>();
-        }
-        return this.any;
-    }
-
-}
+   /**
+    * Sets the value of the combinedHash property.
+    * 
+    * @param value
+    *     allowed object is
+    *     byte[]
+    */
+   public void setCombinedHash(byte[] value)
+   {
+      this.combinedHash = (value);
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/BinaryExchangeType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/BinaryExchangeType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/BinaryExchangeType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,26 +1,28 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import java.util.HashMap;
-import java.util.Map;
+import org.picketlink.identity.federation.ws.addressing.BaseAddressingType;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.namespace.QName;
-
-
 /**
  * <p>Java class for BinaryExchangeType complex type.
  * 
@@ -39,111 +41,89 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "BinaryExchangeType", propOrder = {
-    "value"
-})
-public class BinaryExchangeType {
+public class BinaryExchangeType extends BaseAddressingType
+{
+   protected String value;
 
-    @XmlValue
-    protected String value;
-    @XmlAttribute(name = "ValueType", required = true)
-    @XmlSchemaType(name = "anyURI")
-    protected String valueType;
-    @XmlAttribute(name = "EncodingType", required = true)
-    @XmlSchemaType(name = "anyURI")
-    protected String encodingType;
-    @XmlAnyAttribute
-    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+   protected String valueType;
 
-    /**
-     * Gets the value of the value property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getValue() {
-        return value;
-    }
+   protected String encodingType;
 
-    /**
-     * Sets the value of the value property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setValue(String value) {
-        this.value = value;
-    }
+   /**
+    * Gets the value of the value property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getValue()
+   {
+      return value;
+   }
 
-    /**
-     * Gets the value of the valueType property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getValueType() {
-        return valueType;
-    }
+   /**
+    * Sets the value of the value property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setValue(String value)
+   {
+      this.value = value;
+   }
 
-    /**
-     * Sets the value of the valueType property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setValueType(String value) {
-        this.valueType = value;
-    }
+   /**
+    * Gets the value of the valueType property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getValueType()
+   {
+      return valueType;
+   }
 
-    /**
-     * Gets the value of the encodingType property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getEncodingType() {
-        return encodingType;
-    }
+   /**
+    * Sets the value of the valueType property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setValueType(String value)
+   {
+      this.valueType = value;
+   }
 
-    /**
-     * Sets the value of the encodingType property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setEncodingType(String value) {
-        this.encodingType = value;
-    }
+   /**
+    * Gets the value of the encodingType property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getEncodingType()
+   {
+      return encodingType;
+   }
 
-    /**
-     * Gets a map that contains attributes that aren't bound to any typed property on this class.
-     * 
-     * <p>
-     * the map is keyed by the name of the attribute and 
-     * the value is the string value of the attribute.
-     * 
-     * the map returned by this method is live, and you can add new attribute
-     * by updating the map directly. Because of this design, there's no setter.
-     * 
-     * 
-     * @return
-     *     always non-null
-     */
-    public Map<QName, String> getOtherAttributes() {
-        return otherAttributes;
-    }
-
-}
+   /**
+    * Sets the value of the encodingType property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setEncodingType(String value)
+   {
+      this.encodingType = value;
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/BinarySecretType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/BinarySecretType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/BinarySecretType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,25 +1,28 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import java.util.HashMap;
-import java.util.Map;
+import org.picketlink.identity.federation.ws.addressing.BaseAddressingType;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.namespace.QName;
-
-
 /**
  * <p>Java class for BinarySecretType complex type.
  * 
@@ -37,81 +40,59 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "BinarySecretType", propOrder = {
-    "value"
-})
-public class BinarySecretType {
+public class BinarySecretType extends BaseAddressingType
+{
+   protected byte[] value;
 
-    @XmlValue
-    protected byte[] value;
-    @XmlAttribute(name = "Type")
-    protected String type;
-    @XmlAnyAttribute
-    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+   protected String type;
 
-    /**
-     * Gets the value of the value property.
-     * 
-     * @return
-     *     possible object is
-     *     byte[]
-     */
-    public byte[] getValue() {
-        return value;
-    }
+   /**
+    * Gets the value of the value property.
+    * 
+    * @return
+    *     possible object is
+    *     byte[]
+    */
+   public byte[] getValue()
+   {
+      return value;
+   }
 
-    /**
-     * Sets the value of the value property.
-     * 
-     * @param value
-     *     allowed object is
-     *     byte[]
-     */
-    public void setValue(byte[] value) {
-        this.value = ((byte[]) value);
-    }
+   /**
+    * Sets the value of the value property.
+    * 
+    * @param value
+    *     allowed object is
+    *     byte[]
+    */
+   public void setValue(byte[] value)
+   {
+      this.value = (value);
+   }
 
-    /**
-     * Gets the value of the type property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getType() {
-        return type;
-    }
+   /**
+    * Gets the value of the type property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getType()
+   {
+      return type;
+   }
 
-    /**
-     * Sets the value of the type property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setType(String value) {
-        this.type = value;
-    }
-
-    /**
-     * Gets a map that contains attributes that aren't bound to any typed property on this class.
-     * 
-     * <p>
-     * the map is keyed by the name of the attribute and 
-     * the value is the string value of the attribute.
-     * 
-     * the map returned by this method is live, and you can add new attribute
-     * by updating the map directly. Because of this design, there's no setter.
-     * 
-     * 
-     * @return
-     *     always non-null
-     */
-    public Map<QName, String> getOtherAttributes() {
-        return otherAttributes;
-    }
-
-}
+   /**
+    * Sets the value of the type property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setType(String value)
+   {
+      this.type = value;
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/CancelTargetType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/CancelTargetType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/CancelTargetType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,19 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlType;
-
-
 /**
  * <p>Java class for CancelTargetType complex type.
  * 
@@ -33,37 +40,13 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "CancelTargetType", propOrder = {
-    "any"
-})
-public class CancelTargetType {
-
-    @XmlAnyElement(lax = true)
-    protected Object any;
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link Object }
-     *     
-     */
-    public Object getAny() {
-        return any;
-    }
-
-    /**
-     * Sets the value of the any property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link Object }
-     *     
-     */
-    public void setAny(Object value) {
-        this.any = value;
-    }
-
-}
+public class CancelTargetType extends SimpleAnyType
+{
+   @Override
+   public void add(Object t)
+   {
+      //ensure that we clear
+      this.any.clear();
+      super.add(t);
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ClaimsType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ClaimsType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ClaimsType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,30 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Element;
-
-
 /**
  * <p>Java class for ClaimsType complex type.
  * 
@@ -45,90 +41,33 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "ClaimsType", propOrder = {
-    "any"
-})
-public class ClaimsType {
+public class ClaimsType extends SimpleAnyType
+{
+   protected String dialect;
 
-    @XmlAnyElement(lax = true)
-    protected List<Object> any;
-    @XmlAttribute(name = "Dialect")
-    @XmlSchemaType(name = "anyURI")
-    protected String dialect;
-    @XmlAnyAttribute
-    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+   /**
+    * Gets the value of the dialect property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getDialect()
+   {
+      return dialect;
+   }
 
-    /**
-     * Gets the value of the any property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the any property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getAny().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link Object }
-     * {@link Element }
-     * 
-     * 
-     */
-    public List<Object> getAny() {
-        if (any == null) {
-            any = new ArrayList<Object>();
-        }
-        return this.any;
-    }
-
-    /**
-     * Gets the value of the dialect property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getDialect() {
-        return dialect;
-    }
-
-    /**
-     * Sets the value of the dialect property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setDialect(String value) {
-        this.dialect = value;
-    }
-
-    /**
-     * Gets a map that contains attributes that aren't bound to any typed property on this class.
-     * 
-     * <p>
-     * the map is keyed by the name of the attribute and 
-     * the value is the string value of the attribute.
-     * 
-     * the map returned by this method is live, and you can add new attribute
-     * by updating the map directly. Because of this design, there's no setter.
-     * 
-     * 
-     * @return
-     *     always non-null
-     */
-    public Map<QName, String> getOtherAttributes() {
-        return otherAttributes;
-    }
-
-}
+   /**
+    * Sets the value of the dialect property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setDialect(String value)
+   {
+      this.dialect = value;
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/DelegateToType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/DelegateToType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/DelegateToType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,21 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.w3c.dom.Element;
-
-
 /**
  * <p>Java class for DelegateToType complex type.
  * 
@@ -35,39 +40,6 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "DelegateToType", propOrder = {
-    "any"
-})
-public class DelegateToType {
-
-    @XmlAnyElement(lax = true)
-    protected Object any;
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link Object }
-     *     {@link Element }
-     *     
-     */
-    public Object getAny() {
-        return any;
-    }
-
-    /**
-     * Sets the value of the any property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link Object }
-     *     {@link Element }
-     *     
-     */
-    public void setAny(Object value) {
-        this.any = value;
-    }
-
-}
+public class DelegateToType extends SimpleAnyType
+{
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/EncryptionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/EncryptionType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/EncryptionType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,21 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.w3c.dom.Element;
-
-
 /**
  * <p>Java class for EncryptionType complex type.
  * 
@@ -35,39 +40,6 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "EncryptionType", propOrder = {
-    "any"
-})
-public class EncryptionType {
-
-    @XmlAnyElement(lax = true)
-    protected Object any;
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link Object }
-     *     {@link Element }
-     *     
-     */
-    public Object getAny() {
-        return any;
-    }
-
-    /**
-     * Sets the value of the any property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link Object }
-     *     {@link Element }
-     *     
-     */
-    public void setAny(Object value) {
-        this.any = value;
-    }
-
+public class EncryptionType extends SimpleAnyType
+{
 }

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/EntropyType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/EntropyType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/EntropyType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,28 +1,28 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import org.picketlink.identity.federation.ws.addressing.AnyAddressingType;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Element;
-
-
 /**
  * <p>Java class for EntropyType complex type.
  * 
@@ -42,63 +42,6 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "EntropyType", propOrder = {
-    "any"
-})
-public class EntropyType {
-
-    @XmlAnyElement(lax = true)
-    protected List<Object> any;
-    @XmlAnyAttribute
-    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the any property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getAny().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link Object }
-     * {@link Element }
-     * 
-     * 
-     */
-    public List<Object> getAny() {
-        if (any == null) {
-            any = new ArrayList<Object>();
-        }
-        return this.any;
-    }
-
-    /**
-     * Gets a map that contains attributes that aren't bound to any typed property on this class.
-     * 
-     * <p>
-     * the map is keyed by the name of the attribute and 
-     * the value is the string value of the attribute.
-     * 
-     * the map returned by this method is live, and you can add new attribute
-     * by updating the map directly. Because of this design, there's no setter.
-     * 
-     * 
-     * @return
-     *     always non-null
-     */
-    public Map<QName, String> getOtherAttributes() {
-        return otherAttributes;
-    }
-
-}
+public class EntropyType extends AnyAddressingType
+{
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/KeyExchangeTokenType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/KeyExchangeTokenType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/KeyExchangeTokenType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,24 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.w3c.dom.Element;
-
-
 /**
  * <p>Java class for KeyExchangeTokenType complex type.
  * 
@@ -38,43 +40,6 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "KeyExchangeTokenType", propOrder = {
-    "any"
-})
-public class KeyExchangeTokenType {
-
-    @XmlAnyElement(lax = true)
-    protected List<Object> any;
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the any property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getAny().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link Object }
-     * {@link Element }
-     * 
-     * 
-     */
-    public List<Object> getAny() {
-        if (any == null) {
-            any = new ArrayList<Object>();
-        }
-        return this.any;
-    }
-
+public class KeyExchangeTokenType extends SimpleAnyType
+{
 }

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/LifetimeType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/LifetimeType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/LifetimeType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,21 +1,28 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
 import org.picketlink.identity.federation.ws.wss.utility.AttributedDateTime;
 
-
 /**
  * <p>Java class for LifetimeType complex type.
  * 
@@ -36,64 +43,61 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "LifetimeType", propOrder = {
-    "created",
-    "expires"
-})
-public class LifetimeType {
+public class LifetimeType
+{
+   protected AttributedDateTime created;
 
-    @XmlElement(name = "Created", namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd")
-    protected AttributedDateTime created;
-    @XmlElement(name = "Expires", namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd")
-    protected AttributedDateTime expires;
+   protected AttributedDateTime expires;
 
-    /**
-     * Gets the value of the created property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link AttributedDateTime }
-     *     
-     */
-    public AttributedDateTime getCreated() {
-        return created;
-    }
+   /**
+    * Gets the value of the created property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link AttributedDateTime }
+    *     
+    */
+   public AttributedDateTime getCreated()
+   {
+      return created;
+   }
 
-    /**
-     * Sets the value of the created property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link AttributedDateTime }
-     *     
-     */
-    public void setCreated(AttributedDateTime value) {
-        this.created = value;
-    }
+   /**
+    * Sets the value of the created property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link AttributedDateTime }
+    *     
+    */
+   public void setCreated(AttributedDateTime value)
+   {
+      this.created = value;
+   }
 
-    /**
-     * Gets the value of the expires property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link AttributedDateTime }
-     *     
-     */
-    public AttributedDateTime getExpires() {
-        return expires;
-    }
+   /**
+    * Gets the value of the expires property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link AttributedDateTime }
+    *     
+    */
+   public AttributedDateTime getExpires()
+   {
+      return expires;
+   }
 
-    /**
-     * Sets the value of the expires property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link AttributedDateTime }
-     *     
-     */
-    public void setExpires(AttributedDateTime value) {
-        this.expires = value;
-    }
-
-}
+   /**
+    * Sets the value of the expires property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link AttributedDateTime }
+    *     
+    */
+   public void setExpires(AttributedDateTime value)
+   {
+      this.expires = value;
+   }
+}
\ No newline at end of file

Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ObjectFactory.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ObjectFactory.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ObjectFactory.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,784 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
-package org.picketlink.identity.federation.ws.trust;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlElementDecl;
-import javax.xml.bind.annotation.XmlRegistry;
-import javax.xml.namespace.QName;
-
-import org.picketlink.identity.federation.ws.addressing.EndpointReferenceType;
-
-
-/**
- * This object contains factory methods for each 
- * Java content interface and Java element interface 
- * generated in the org.oasis_open.docs.ws_sx.ws_trust._200512 package. 
- * <p>An ObjectFactory allows you to programatically 
- * construct new instances of the Java representation 
- * for XML content. The Java representation of XML 
- * content can consist of schema derived interfaces 
- * and classes representing the binding of schema 
- * type definitions, element declarations and model 
- * groups.  Factory methods for each of these are 
- * provided in this class.
- * 
- */
- at XmlRegistry
-public class ObjectFactory {
-
-    private final static QName _RequestSecurityTokenResponseCollection_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "RequestSecurityTokenResponseCollection");
-    private final static QName _Lifetime_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "Lifetime");
-    private final static QName _KeyType_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "KeyType");
-    private final static QName _DelegateTo_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "DelegateTo");
-    private final static QName _ValidateTarget_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "ValidateTarget");
-    private final static QName _Issuer_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "Issuer");
-    private final static QName _SignChallenge_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "SignChallenge");
-    private final static QName _Forwardable_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "Forwardable");
-    private final static QName _IssuedTokens_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "IssuedTokens");
-    private final static QName _RequestSecurityTokenCollection_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "RequestSecurityTokenCollection");
-    private final static QName _SignatureAlgorithm_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "SignatureAlgorithm");
-    private final static QName _RequestType_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "RequestType");
-    private final static QName _RequestedProofToken_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "RequestedProofToken");
-    private final static QName _KeyExchangeToken_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "KeyExchangeToken");
-    private final static QName _ComputedKey_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "ComputedKey");
-    private final static QName _RequestedSecurityToken_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "RequestedSecurityToken");
-    private final static QName _KeySize_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "KeySize");
-    private final static QName _Participants_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "Participants");
-    private final static QName _Claims_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "Claims");
-    private final static QName _CancelTarget_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "CancelTarget");
-    private final static QName _EncryptionAlgorithm_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "EncryptionAlgorithm");
-    private final static QName _CombinedHash_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "CombinedHash");
-    private final static QName _Challenge_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "Challenge");
-    private final static QName _Status_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "Status");
-    private final static QName _CanonicalizationAlgorithm_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "CanonicalizationAlgorithm");
-    private final static QName _RenewTarget_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "RenewTarget");
-    private final static QName _RequestSecurityToken_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "RequestSecurityToken");
-    private final static QName _KeyWrapAlgorithm_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "KeyWrapAlgorithm");
-    private final static QName _ProofEncryption_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "ProofEncryption");
-    private final static QName _BinaryExchange_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "BinaryExchange");
-    private final static QName _Delegatable_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "Delegatable");
-    private final static QName _Entropy_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "Entropy");
-    private final static QName _RequestSecurityTokenResponse_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "RequestSecurityTokenResponse");
-    private final static QName _Authenticator_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "Authenticator");
-    private final static QName _RequestKET_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "RequestKET");
-    private final static QName _Renewing_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "Renewing");
-    private final static QName _BinarySecret_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "BinarySecret");
-    private final static QName _RequestedAttachedReference_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "RequestedAttachedReference");
-    private final static QName _ComputedKeyAlgorithm_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "ComputedKeyAlgorithm");
-    private final static QName _SignWith_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "SignWith");
-    private final static QName _AuthenticationType_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "AuthenticationType");
-    private final static QName _Encryption_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "Encryption");
-    private final static QName _RequestedUnattachedReference_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "RequestedUnattachedReference");
-    private final static QName _EncryptWith_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "EncryptWith");
-    private final static QName _SignChallengeResponse_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "SignChallengeResponse");
-    private final static QName _AllowPostdating_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "AllowPostdating");
-    private final static QName _OnBehalfOf_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "OnBehalfOf");
-    private final static QName _RequestedTokenCancelled_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "RequestedTokenCancelled");
-    private final static QName _TokenType_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "TokenType");
-    private final static QName _UseKey_QNAME = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512", "UseKey");
-
-    /**
-     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.oasis_open.docs.ws_sx.ws_trust._200512
-     * 
-     */
-    public ObjectFactory() {
-    }
-
-    /**
-     * Create an instance of {@link EntropyType }
-     * 
-     */
-    public EntropyType createEntropyType() {
-        return new EntropyType();
-    }
-
-    /**
-     * Create an instance of {@link RequestSecurityTokenResponseType }
-     * 
-     */
-    public RequestSecurityTokenResponseType createRequestSecurityTokenResponseType() {
-        return new RequestSecurityTokenResponseType();
-    }
-
-    /**
-     * Create an instance of {@link AllowPostdatingType }
-     * 
-     */
-    public AllowPostdatingType createAllowPostdatingType() {
-        return new AllowPostdatingType();
-    }
-
-    /**
-     * Create an instance of {@link RequestSecurityTokenType }
-     * 
-     */
-    public RequestSecurityTokenType createRequestSecurityTokenType() {
-        return new RequestSecurityTokenType();
-    }
-
-    /**
-     * Create an instance of {@link OnBehalfOfType }
-     * 
-     */
-    public OnBehalfOfType createOnBehalfOfType() {
-        return new OnBehalfOfType();
-    }
-
-    /**
-     * Create an instance of {@link RequestedProofTokenType }
-     * 
-     */
-    public RequestedProofTokenType createRequestedProofTokenType() {
-        return new RequestedProofTokenType();
-    }
-
-    /**
-     * Create an instance of {@link RequestedTokenCancelledType }
-     * 
-     */
-    public RequestedTokenCancelledType createRequestedTokenCancelledType() {
-        return new RequestedTokenCancelledType();
-    }
-
-    /**
-     * Create an instance of {@link RequestSecurityTokenResponseCollectionType }
-     * 
-     */
-    public RequestSecurityTokenResponseCollectionType createRequestSecurityTokenResponseCollectionType() {
-        return new RequestSecurityTokenResponseCollectionType();
-    }
-
-    /**
-     * Create an instance of {@link RequestKETType }
-     * 
-     */
-    public RequestKETType createRequestKETType() {
-        return new RequestKETType();
-    }
-
-    /**
-     * Create an instance of {@link RenewTargetType }
-     * 
-     */
-    public RenewTargetType createRenewTargetType() {
-        return new RenewTargetType();
-    }
-
-    /**
-     * Create an instance of {@link BinaryExchangeType }
-     * 
-     */
-    public BinaryExchangeType createBinaryExchangeType() {
-        return new BinaryExchangeType();
-    }
-
-    /**
-     * Create an instance of {@link ClaimsType }
-     * 
-     */
-    public ClaimsType createClaimsType() {
-        return new ClaimsType();
-    }
-
-    /**
-     * Create an instance of {@link CancelTargetType }
-     * 
-     */
-    public CancelTargetType createCancelTargetType() {
-        return new CancelTargetType();
-    }
-
-    /**
-     * Create an instance of {@link AuthenticatorType }
-     * 
-     */
-    public AuthenticatorType createAuthenticatorType() {
-        return new AuthenticatorType();
-    }
-
-    /**
-     * Create an instance of {@link ParticipantType }
-     * 
-     */
-    public ParticipantType createParticipantType() {
-        return new ParticipantType();
-    }
-
-    /**
-     * Create an instance of {@link ValidateTargetType }
-     * 
-     */
-    public ValidateTargetType createValidateTargetType() {
-        return new ValidateTargetType();
-    }
-
-    /**
-     * Create an instance of {@link LifetimeType }
-     * 
-     */
-    public LifetimeType createLifetimeType() {
-        return new LifetimeType();
-    }
-
-    /**
-     * Create an instance of {@link KeyExchangeTokenType }
-     * 
-     */
-    public KeyExchangeTokenType createKeyExchangeTokenType() {
-        return new KeyExchangeTokenType();
-    }
-
-    /**
-     * Create an instance of {@link RenewingType }
-     * 
-     */
-    public RenewingType createRenewingType() {
-        return new RenewingType();
-    }
-
-    /**
-     * Create an instance of {@link RequestedReferenceType }
-     * 
-     */
-    public RequestedReferenceType createRequestedReferenceType() {
-        return new RequestedReferenceType();
-    }
-
-    /**
-     * Create an instance of {@link DelegateToType }
-     * 
-     */
-    public DelegateToType createDelegateToType() {
-        return new DelegateToType();
-    }
-
-    /**
-     * Create an instance of {@link UseKeyType }
-     * 
-     */
-    public UseKeyType createUseKeyType() {
-        return new UseKeyType();
-    }
-
-    /**
-     * Create an instance of {@link RequestSecurityTokenCollectionType }
-     * 
-     */
-    public RequestSecurityTokenCollectionType createRequestSecurityTokenCollectionType() {
-        return new RequestSecurityTokenCollectionType();
-    }
-
-    /**
-     * Create an instance of {@link EncryptionType }
-     * 
-     */
-    public EncryptionType createEncryptionType() {
-        return new EncryptionType();
-    }
-
-    /**
-     * Create an instance of {@link BinarySecretType }
-     * 
-     */
-    public BinarySecretType createBinarySecretType() {
-        return new BinarySecretType();
-    }
-
-    /**
-     * Create an instance of {@link StatusType }
-     * 
-     */
-    public StatusType createStatusType() {
-        return new StatusType();
-    }
-
-    /**
-     * Create an instance of {@link ParticipantsType }
-     * 
-     */
-    public ParticipantsType createParticipantsType() {
-        return new ParticipantsType();
-    }
-
-    /**
-     * Create an instance of {@link SignChallengeType }
-     * 
-     */
-    public SignChallengeType createSignChallengeType() {
-        return new SignChallengeType();
-    }
-
-    /**
-     * Create an instance of {@link RequestedSecurityTokenType }
-     * 
-     */
-    public RequestedSecurityTokenType createRequestedSecurityTokenType() {
-        return new RequestedSecurityTokenType();
-    }
-
-    /**
-     * Create an instance of {@link ProofEncryptionType }
-     * 
-     */
-    public ProofEncryptionType createProofEncryptionType() {
-        return new ProofEncryptionType();
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link RequestSecurityTokenResponseCollectionType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "RequestSecurityTokenResponseCollection")
-    public JAXBElement<RequestSecurityTokenResponseCollectionType> createRequestSecurityTokenResponseCollection(RequestSecurityTokenResponseCollectionType value) {
-        return new JAXBElement<RequestSecurityTokenResponseCollectionType>(_RequestSecurityTokenResponseCollection_QNAME, RequestSecurityTokenResponseCollectionType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link LifetimeType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "Lifetime")
-    public JAXBElement<LifetimeType> createLifetime(LifetimeType value) {
-        return new JAXBElement<LifetimeType>(_Lifetime_QNAME, LifetimeType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "KeyType")
-    public JAXBElement<String> createKeyType(String value) {
-        return new JAXBElement<String>(_KeyType_QNAME, String.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link DelegateToType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "DelegateTo")
-    public JAXBElement<DelegateToType> createDelegateTo(DelegateToType value) {
-        return new JAXBElement<DelegateToType>(_DelegateTo_QNAME, DelegateToType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link ValidateTargetType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "ValidateTarget")
-    public JAXBElement<ValidateTargetType> createValidateTarget(ValidateTargetType value) {
-        return new JAXBElement<ValidateTargetType>(_ValidateTarget_QNAME, ValidateTargetType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link EndpointReferenceType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "Issuer")
-    public JAXBElement<EndpointReferenceType> createIssuer(EndpointReferenceType value) {
-        return new JAXBElement<EndpointReferenceType>(_Issuer_QNAME, EndpointReferenceType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link SignChallengeType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "SignChallenge")
-    public JAXBElement<SignChallengeType> createSignChallenge(SignChallengeType value) {
-        return new JAXBElement<SignChallengeType>(_SignChallenge_QNAME, SignChallengeType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link Boolean }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "Forwardable")
-    public JAXBElement<Boolean> createForwardable(Boolean value) {
-        return new JAXBElement<Boolean>(_Forwardable_QNAME, Boolean.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link RequestSecurityTokenResponseCollectionType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "IssuedTokens")
-    public JAXBElement<RequestSecurityTokenResponseCollectionType> createIssuedTokens(RequestSecurityTokenResponseCollectionType value) {
-        return new JAXBElement<RequestSecurityTokenResponseCollectionType>(_IssuedTokens_QNAME, RequestSecurityTokenResponseCollectionType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link RequestSecurityTokenCollectionType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "RequestSecurityTokenCollection")
-    public JAXBElement<RequestSecurityTokenCollectionType> createRequestSecurityTokenCollection(RequestSecurityTokenCollectionType value) {
-        return new JAXBElement<RequestSecurityTokenCollectionType>(_RequestSecurityTokenCollection_QNAME, RequestSecurityTokenCollectionType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "SignatureAlgorithm")
-    public JAXBElement<String> createSignatureAlgorithm(String value) {
-        return new JAXBElement<String>(_SignatureAlgorithm_QNAME, String.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "RequestType")
-    public JAXBElement<String> createRequestType(String value) {
-        return new JAXBElement<String>(_RequestType_QNAME, String.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link RequestedProofTokenType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "RequestedProofToken")
-    public JAXBElement<RequestedProofTokenType> createRequestedProofToken(RequestedProofTokenType value) {
-        return new JAXBElement<RequestedProofTokenType>(_RequestedProofToken_QNAME, RequestedProofTokenType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link KeyExchangeTokenType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "KeyExchangeToken")
-    public JAXBElement<KeyExchangeTokenType> createKeyExchangeToken(KeyExchangeTokenType value) {
-        return new JAXBElement<KeyExchangeTokenType>(_KeyExchangeToken_QNAME, KeyExchangeTokenType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "ComputedKey")
-    public JAXBElement<String> createComputedKey(String value) {
-        return new JAXBElement<String>(_ComputedKey_QNAME, String.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link RequestedSecurityTokenType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "RequestedSecurityToken")
-    public JAXBElement<RequestedSecurityTokenType> createRequestedSecurityToken(RequestedSecurityTokenType value) {
-        return new JAXBElement<RequestedSecurityTokenType>(_RequestedSecurityToken_QNAME, RequestedSecurityTokenType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link Long }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "KeySize")
-    public JAXBElement<Long> createKeySize(Long value) {
-        return new JAXBElement<Long>(_KeySize_QNAME, Long.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link ParticipantsType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "Participants")
-    public JAXBElement<ParticipantsType> createParticipants(ParticipantsType value) {
-        return new JAXBElement<ParticipantsType>(_Participants_QNAME, ParticipantsType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link ClaimsType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "Claims")
-    public JAXBElement<ClaimsType> createClaims(ClaimsType value) {
-        return new JAXBElement<ClaimsType>(_Claims_QNAME, ClaimsType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link CancelTargetType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "CancelTarget")
-    public JAXBElement<CancelTargetType> createCancelTarget(CancelTargetType value) {
-        return new JAXBElement<CancelTargetType>(_CancelTarget_QNAME, CancelTargetType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "EncryptionAlgorithm")
-    public JAXBElement<String> createEncryptionAlgorithm(String value) {
-        return new JAXBElement<String>(_EncryptionAlgorithm_QNAME, String.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "CombinedHash")
-    public JAXBElement<byte[]> createCombinedHash(byte[] value) {
-        return new JAXBElement<byte[]>(_CombinedHash_QNAME, byte[].class, null, ((byte[]) value));
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "Challenge")
-    public JAXBElement<String> createChallenge(String value) {
-        return new JAXBElement<String>(_Challenge_QNAME, String.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link StatusType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "Status")
-    public JAXBElement<StatusType> createStatus(StatusType value) {
-        return new JAXBElement<StatusType>(_Status_QNAME, StatusType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "CanonicalizationAlgorithm")
-    public JAXBElement<String> createCanonicalizationAlgorithm(String value) {
-        return new JAXBElement<String>(_CanonicalizationAlgorithm_QNAME, String.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link RenewTargetType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "RenewTarget")
-    public JAXBElement<RenewTargetType> createRenewTarget(RenewTargetType value) {
-        return new JAXBElement<RenewTargetType>(_RenewTarget_QNAME, RenewTargetType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link RequestSecurityTokenType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "RequestSecurityToken")
-    public JAXBElement<RequestSecurityTokenType> createRequestSecurityToken(RequestSecurityTokenType value) {
-        return new JAXBElement<RequestSecurityTokenType>(_RequestSecurityToken_QNAME, RequestSecurityTokenType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "KeyWrapAlgorithm")
-    public JAXBElement<String> createKeyWrapAlgorithm(String value) {
-        return new JAXBElement<String>(_KeyWrapAlgorithm_QNAME, String.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link ProofEncryptionType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "ProofEncryption")
-    public JAXBElement<ProofEncryptionType> createProofEncryption(ProofEncryptionType value) {
-        return new JAXBElement<ProofEncryptionType>(_ProofEncryption_QNAME, ProofEncryptionType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link BinaryExchangeType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "BinaryExchange")
-    public JAXBElement<BinaryExchangeType> createBinaryExchange(BinaryExchangeType value) {
-        return new JAXBElement<BinaryExchangeType>(_BinaryExchange_QNAME, BinaryExchangeType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link Boolean }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "Delegatable")
-    public JAXBElement<Boolean> createDelegatable(Boolean value) {
-        return new JAXBElement<Boolean>(_Delegatable_QNAME, Boolean.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link EntropyType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "Entropy")
-    public JAXBElement<EntropyType> createEntropy(EntropyType value) {
-        return new JAXBElement<EntropyType>(_Entropy_QNAME, EntropyType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link RequestSecurityTokenResponseType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "RequestSecurityTokenResponse")
-    public JAXBElement<RequestSecurityTokenResponseType> createRequestSecurityTokenResponse(RequestSecurityTokenResponseType value) {
-        return new JAXBElement<RequestSecurityTokenResponseType>(_RequestSecurityTokenResponse_QNAME, RequestSecurityTokenResponseType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link AuthenticatorType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "Authenticator")
-    public JAXBElement<AuthenticatorType> createAuthenticator(AuthenticatorType value) {
-        return new JAXBElement<AuthenticatorType>(_Authenticator_QNAME, AuthenticatorType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link RequestKETType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "RequestKET")
-    public JAXBElement<RequestKETType> createRequestKET(RequestKETType value) {
-        return new JAXBElement<RequestKETType>(_RequestKET_QNAME, RequestKETType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link RenewingType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "Renewing")
-    public JAXBElement<RenewingType> createRenewing(RenewingType value) {
-        return new JAXBElement<RenewingType>(_Renewing_QNAME, RenewingType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link BinarySecretType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "BinarySecret")
-    public JAXBElement<BinarySecretType> createBinarySecret(BinarySecretType value) {
-        return new JAXBElement<BinarySecretType>(_BinarySecret_QNAME, BinarySecretType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link RequestedReferenceType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "RequestedAttachedReference")
-    public JAXBElement<RequestedReferenceType> createRequestedAttachedReference(RequestedReferenceType value) {
-        return new JAXBElement<RequestedReferenceType>(_RequestedAttachedReference_QNAME, RequestedReferenceType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "ComputedKeyAlgorithm")
-    public JAXBElement<String> createComputedKeyAlgorithm(String value) {
-        return new JAXBElement<String>(_ComputedKeyAlgorithm_QNAME, String.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "SignWith")
-    public JAXBElement<String> createSignWith(String value) {
-        return new JAXBElement<String>(_SignWith_QNAME, String.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "AuthenticationType")
-    public JAXBElement<String> createAuthenticationType(String value) {
-        return new JAXBElement<String>(_AuthenticationType_QNAME, String.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link EncryptionType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "Encryption")
-    public JAXBElement<EncryptionType> createEncryption(EncryptionType value) {
-        return new JAXBElement<EncryptionType>(_Encryption_QNAME, EncryptionType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link RequestedReferenceType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "RequestedUnattachedReference")
-    public JAXBElement<RequestedReferenceType> createRequestedUnattachedReference(RequestedReferenceType value) {
-        return new JAXBElement<RequestedReferenceType>(_RequestedUnattachedReference_QNAME, RequestedReferenceType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "EncryptWith")
-    public JAXBElement<String> createEncryptWith(String value) {
-        return new JAXBElement<String>(_EncryptWith_QNAME, String.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link SignChallengeType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "SignChallengeResponse")
-    public JAXBElement<SignChallengeType> createSignChallengeResponse(SignChallengeType value) {
-        return new JAXBElement<SignChallengeType>(_SignChallengeResponse_QNAME, SignChallengeType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link AllowPostdatingType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "AllowPostdating")
-    public JAXBElement<AllowPostdatingType> createAllowPostdating(AllowPostdatingType value) {
-        return new JAXBElement<AllowPostdatingType>(_AllowPostdating_QNAME, AllowPostdatingType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link OnBehalfOfType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "OnBehalfOf")
-    public JAXBElement<OnBehalfOfType> createOnBehalfOf(OnBehalfOfType value) {
-        return new JAXBElement<OnBehalfOfType>(_OnBehalfOf_QNAME, OnBehalfOfType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link RequestedTokenCancelledType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "RequestedTokenCancelled")
-    public JAXBElement<RequestedTokenCancelledType> createRequestedTokenCancelled(RequestedTokenCancelledType value) {
-        return new JAXBElement<RequestedTokenCancelledType>(_RequestedTokenCancelled_QNAME, RequestedTokenCancelledType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "TokenType")
-    public JAXBElement<String> createTokenType(String value) {
-        return new JAXBElement<String>(_TokenType_QNAME, String.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link UseKeyType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", name = "UseKey")
-    public JAXBElement<UseKeyType> createUseKey(UseKeyType value) {
-        return new JAXBElement<UseKeyType>(_UseKey_QNAME, UseKeyType.class, null, value);
-    }
-
-}

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/OnBehalfOfType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/OnBehalfOfType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/OnBehalfOfType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,21 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.w3c.dom.Element;
-
-
 /**
  * <p>Java class for OnBehalfOfType complex type.
  * 
@@ -35,39 +40,6 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "OnBehalfOfType", propOrder = {
-    "any"
-})
-public class OnBehalfOfType {
-
-    @XmlAnyElement(lax = true)
-    protected Object any;
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link Object }
-     *     {@link Element }
-     *     
-     */
-    public Object getAny() {
-        return any;
-    }
-
-    /**
-     * Sets the value of the any property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link Object }
-     *     {@link Element }
-     *     
-     */
-    public void setAny(Object value) {
-        this.any = value;
-    }
-
-}
+public class OnBehalfOfType extends SimpleAnyType
+{
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ParticipantType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ParticipantType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ParticipantType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,21 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.w3c.dom.Element;
-
-
 /**
  * <p>Java class for ParticipantType complex type.
  * 
@@ -35,39 +40,6 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "ParticipantType", propOrder = {
-    "any"
-})
-public class ParticipantType {
-
-    @XmlAnyElement(lax = true)
-    protected Object any;
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link Object }
-     *     {@link Element }
-     *     
-     */
-    public Object getAny() {
-        return any;
-    }
-
-    /**
-     * Sets the value of the any property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link Object }
-     *     {@link Element }
-     *     
-     */
-    public void setAny(Object value) {
-        this.any = value;
-    }
-
-}
+public class ParticipantType extends SimpleAnyType
+{
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ParticipantsType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ParticipantsType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ParticipantsType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,25 +1,30 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.w3c.dom.Element;
-
-
 /**
  * <p>Java class for ParticipantsType complex type.
  * 
@@ -41,102 +46,59 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "ParticipantsType", propOrder = {
-    "primary",
-    "participant",
-    "any"
-})
-public class ParticipantsType {
+public class ParticipantsType extends SimpleAnyType
+{
+   protected ParticipantType primary;
 
-    @XmlElement(name = "Primary")
-    protected ParticipantType primary;
-    @XmlElement(name = "Participant")
-    protected List<ParticipantType> participant;
-    @XmlAnyElement(lax = true)
-    protected List<Object> any;
+   protected List<ParticipantType> participant = new ArrayList<ParticipantType>();
 
-    /**
-     * Gets the value of the primary property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link ParticipantType }
-     *     
-     */
-    public ParticipantType getPrimary() {
-        return primary;
-    }
+   /**
+    * Gets the value of the primary property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link ParticipantType }
+    *     
+    */
+   public ParticipantType getPrimary()
+   {
+      return primary;
+   }
 
-    /**
-     * Sets the value of the primary property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link ParticipantType }
-     *     
-     */
-    public void setPrimary(ParticipantType value) {
-        this.primary = value;
-    }
+   /**
+    * Sets the value of the primary property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link ParticipantType }
+    *     
+    */
+   public void setPrimary(ParticipantType value)
+   {
+      this.primary = value;
+   }
 
-    /**
-     * Gets the value of the participant property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the participant property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getParticipant().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link ParticipantType }
-     * 
-     * 
-     */
-    public List<ParticipantType> getParticipant() {
-        if (participant == null) {
-            participant = new ArrayList<ParticipantType>();
-        }
-        return this.participant;
-    }
+   public void add(ParticipantType p)
+   {
+      this.participant.add(p);
+   }
 
-    /**
-     * Gets the value of the any property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the any property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getAny().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link Object }
-     * {@link Element }
-     * 
-     * 
-     */
-    public List<Object> getAny() {
-        if (any == null) {
-            any = new ArrayList<Object>();
-        }
-        return this.any;
-    }
+   public boolean remove(ParticipantType p)
+   {
+      return this.participant.remove(p);
+   }
 
-}
+   /**
+    * Gets the value of the participant property.
+    * 
+    * <p>
+    * Objects of the following type(s) are allowed in the list
+    * {@link ParticipantType }
+    * 
+    * 
+    */
+   public List<ParticipantType> getParticipant()
+   {
+      return Collections.unmodifiableList(this.participant);
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ProofEncryptionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ProofEncryptionType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ProofEncryptionType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,21 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.w3c.dom.Element;
-
-
 /**
  * <p>Java class for ProofEncryptionType complex type.
  * 
@@ -35,39 +40,6 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "ProofEncryptionType", propOrder = {
-    "any"
-})
-public class ProofEncryptionType {
-
-    @XmlAnyElement(lax = true)
-    protected Object any;
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link Object }
-     *     {@link Element }
-     *     
-     */
-    public Object getAny() {
-        return any;
-    }
-
-    /**
-     * Sets the value of the any property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link Object }
-     *     {@link Element }
-     *     
-     */
-    public void setAny(Object value) {
-        this.any = value;
-    }
-
-}
+public class ProofEncryptionType extends SimpleAnyType
+{
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RenewTargetType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RenewTargetType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RenewTargetType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,19 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlType;
-
-
 /**
  * <p>Java class for RenewTargetType complex type.
  * 
@@ -33,37 +40,13 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "RenewTargetType", propOrder = {
-    "any"
-})
-public class RenewTargetType {
-
-    @XmlAnyElement(lax = true)
-    protected Object any;
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link Object }
-     *     
-     */
-    public Object getAny() {
-        return any;
-    }
-
-    /**
-     * Sets the value of the any property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link Object }
-     *     
-     */
-    public void setAny(Object value) {
-        this.any = value;
-    }
-
-}
+public class RenewTargetType extends SimpleAnyType
+{
+   @Override
+   public void add(Object t)
+   {
+      //ensure that we clear
+      this.any.clear();
+      super.add(t);
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RenewingType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RenewingType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RenewingType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,19 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-
 /**
  * <p>Java class for RenewingType complex type.
  * 
@@ -32,61 +39,62 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "RenewingType")
-public class RenewingType {
+public class RenewingType
+{
 
-    @XmlAttribute(name = "Allow")
-    protected Boolean allow;
-    @XmlAttribute(name = "OK")
-    protected Boolean ok;
+   protected Boolean allow;
 
-    /**
-     * Gets the value of the allow property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link Boolean }
-     *     
-     */
-    public Boolean isAllow() {
-        return allow;
-    }
+   protected Boolean ok;
 
-    /**
-     * Sets the value of the allow property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link Boolean }
-     *     
-     */
-    public void setAllow(Boolean value) {
-        this.allow = value;
-    }
+   /**
+    * Gets the value of the allow property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link Boolean }
+    *     
+    */
+   public Boolean isAllow()
+   {
+      return allow;
+   }
 
-    /**
-     * Gets the value of the ok property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link Boolean }
-     *     
-     */
-    public Boolean isOK() {
-        return ok;
-    }
+   /**
+    * Sets the value of the allow property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link Boolean }
+    *     
+    */
+   public void setAllow(Boolean value)
+   {
+      this.allow = value;
+   }
 
-    /**
-     * Sets the value of the ok property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link Boolean }
-     *     
-     */
-    public void setOK(Boolean value) {
-        this.ok = value;
-    }
+   /**
+    * Gets the value of the ok property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link Boolean }
+    *     
+    */
+   public Boolean isOK()
+   {
+      return ok;
+   }
 
-}
+   /**
+    * Sets the value of the ok property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link Boolean }
+    *     
+    */
+   public void setOK(Boolean value)
+   {
+      this.ok = value;
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestKETType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestKETType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestKETType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,18 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlType;
-
-
 /**
  * <p>Java class for RequestKETType complex type.
  * 
@@ -29,9 +37,6 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "RequestKETType")
-public class RequestKETType {
-
-
-}
+public class RequestKETType
+{
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestSecurityTokenCollectionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestSecurityTokenCollectionType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestSecurityTokenCollectionType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,22 +1,30 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
 /**
  * 
  *         The RequestSecurityTokenCollection (RSTC) element is used to provide multiple RST requests. 
@@ -41,42 +49,30 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "RequestSecurityTokenCollectionType", propOrder = {
-    "requestSecurityToken"
-})
-public class RequestSecurityTokenCollectionType {
+public class RequestSecurityTokenCollectionType implements SimpleCollectionUsage<RequestSecurityTokenType>
+{
+   protected List<RequestSecurityTokenType> requestSecurityToken = new ArrayList<RequestSecurityTokenType>();
 
-    @XmlElement(name = "RequestSecurityToken", required = true)
-    protected List<RequestSecurityTokenType> requestSecurityToken;
+   /**
+    * Gets the value of the requestSecurityToken property. 
+    * <p>
+    * Objects of the following type(s) are allowed in the list
+    * {@link RequestSecurityTokenType }
+    * 
+    * 
+    */
+   public List<RequestSecurityTokenType> getRequestSecurityToken()
+   {
+      return Collections.unmodifiableList(this.requestSecurityToken);
+   }
 
-    /**
-     * Gets the value of the requestSecurityToken property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the requestSecurityToken property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getRequestSecurityToken().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link RequestSecurityTokenType }
-     * 
-     * 
-     */
-    public List<RequestSecurityTokenType> getRequestSecurityToken() {
-        if (requestSecurityToken == null) {
-            requestSecurityToken = new ArrayList<RequestSecurityTokenType>();
-        }
-        return this.requestSecurityToken;
-    }
+   public void add(RequestSecurityTokenType t)
+   {
+      this.requestSecurityToken.add(t);
+   }
 
-}
+   public boolean remove(RequestSecurityTokenType t)
+   {
+      return requestSecurityToken.remove(t);
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestSecurityTokenResponseCollectionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestSecurityTokenResponseCollectionType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestSecurityTokenResponseCollectionType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,26 +1,32 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
 import java.util.ArrayList;
-import java.util.HashMap;
+import java.util.Collections;
 import java.util.List;
-import java.util.Map;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
+import org.picketlink.identity.federation.ws.addressing.AnyAddressingType;
 
-
 /**
  * 
  *         The <wst:RequestSecurityTokenResponseCollection> element (RSTRC) MUST be used to return a security token or 
@@ -45,62 +51,34 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "RequestSecurityTokenResponseCollectionType", propOrder = {
-    "requestSecurityTokenResponse"
-})
-public class RequestSecurityTokenResponseCollectionType {
+public class RequestSecurityTokenResponseCollectionType extends AnyAddressingType
+      implements
+         SimpleCollectionUsage<RequestSecurityTokenResponseType>
+{
+   protected List<RequestSecurityTokenResponseType> requestSecurityTokenResponse = new ArrayList<RequestSecurityTokenResponseType>();
 
-    @XmlElement(name = "RequestSecurityTokenResponse", required = true)
-    protected List<RequestSecurityTokenResponseType> requestSecurityTokenResponse;
-    @XmlAnyAttribute
-    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+   /**
+    * Gets the value of the requestSecurityTokenResponse property. 
+    * 
+    * <p>
+    * Objects of the following type(s) are allowed in the list
+    * {@link RequestSecurityTokenResponseType }
+    * 
+    * 
+    */
+   public List<RequestSecurityTokenResponseType> getRequestSecurityTokenResponse()
+   {
+      return Collections.unmodifiableList(this.requestSecurityTokenResponse);
+   }
 
-    /**
-     * Gets the value of the requestSecurityTokenResponse property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the requestSecurityTokenResponse property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getRequestSecurityTokenResponse().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link RequestSecurityTokenResponseType }
-     * 
-     * 
-     */
-    public List<RequestSecurityTokenResponseType> getRequestSecurityTokenResponse() {
-        if (requestSecurityTokenResponse == null) {
-            requestSecurityTokenResponse = new ArrayList<RequestSecurityTokenResponseType>();
-        }
-        return this.requestSecurityTokenResponse;
-    }
+   public void add(RequestSecurityTokenResponseType t)
+   {
+      this.requestSecurityTokenResponse.add(t);
 
-    /**
-     * Gets a map that contains attributes that aren't bound to any typed property on this class.
-     * 
-     * <p>
-     * the map is keyed by the name of the attribute and 
-     * the value is the string value of the attribute.
-     * 
-     * the map returned by this method is live, and you can add new attribute
-     * by updating the map directly. Because of this design, there's no setter.
-     * 
-     * 
-     * @return
-     *     always non-null
-     */
-    public Map<QName, String> getOtherAttributes() {
-        return otherAttributes;
-    }
+   }
 
-}
+   public boolean remove(RequestSecurityTokenResponseType t)
+   {
+      return this.requestSecurityTokenResponse.remove(t);
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestSecurityTokenResponseType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestSecurityTokenResponseType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestSecurityTokenResponseType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,30 +1,28 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import org.picketlink.identity.federation.ws.addressing.AnyAddressingType;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Element;
-
-
 /**
  * 
  *         Actual content model is non-deterministic, hence wildcard. The following shows intended content model:
@@ -83,90 +81,33 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "RequestSecurityTokenResponseType", propOrder = {
-    "any"
-})
-public class RequestSecurityTokenResponseType {
+public class RequestSecurityTokenResponseType extends AnyAddressingType
+{
+   protected String context;
 
-    @XmlAnyElement(lax = true)
-    protected List<Object> any;
-    @XmlAttribute(name = "Context")
-    @XmlSchemaType(name = "anyURI")
-    protected String context;
-    @XmlAnyAttribute
-    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+   /**
+    * Gets the value of the context property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getContext()
+   {
+      return context;
+   }
 
-    /**
-     * Gets the value of the any property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the any property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getAny().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link Object }
-     * {@link Element }
-     * 
-     * 
-     */
-    public List<Object> getAny() {
-        if (any == null) {
-            any = new ArrayList<Object>();
-        }
-        return this.any;
-    }
-
-    /**
-     * Gets the value of the context property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getContext() {
-        return context;
-    }
-
-    /**
-     * Sets the value of the context property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setContext(String value) {
-        this.context = value;
-    }
-
-    /**
-     * Gets a map that contains attributes that aren't bound to any typed property on this class.
-     * 
-     * <p>
-     * the map is keyed by the name of the attribute and 
-     * the value is the string value of the attribute.
-     * 
-     * the map returned by this method is live, and you can add new attribute
-     * by updating the map directly. Because of this design, there's no setter.
-     * 
-     * 
-     * @return
-     *     always non-null
-     */
-    public Map<QName, String> getOtherAttributes() {
-        return otherAttributes;
-    }
-
-}
+   /**
+    * Sets the value of the context property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setContext(String value)
+   {
+      this.context = value;
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestSecurityTokenType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestSecurityTokenType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestSecurityTokenType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,30 +1,28 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import org.picketlink.identity.federation.ws.addressing.AnyAddressingType;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Element;
-
-
 /**
  * 
  *         Actual content model is non-deterministic, hence wildcard. The following shows intended content model:
@@ -78,90 +76,33 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "RequestSecurityTokenType", propOrder = {
-    "any"
-})
-public class RequestSecurityTokenType {
+public class RequestSecurityTokenType extends AnyAddressingType
+{
+   protected String context;
 
-    @XmlAnyElement(lax = true)
-    protected List<Object> any;
-    @XmlAttribute(name = "Context")
-    @XmlSchemaType(name = "anyURI")
-    protected String context;
-    @XmlAnyAttribute
-    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+   /**
+    * Gets the value of the context property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getContext()
+   {
+      return context;
+   }
 
-    /**
-     * Gets the value of the any property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the any property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getAny().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link Object }
-     * {@link Element }
-     * 
-     * 
-     */
-    public List<Object> getAny() {
-        if (any == null) {
-            any = new ArrayList<Object>();
-        }
-        return this.any;
-    }
-
-    /**
-     * Gets the value of the context property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getContext() {
-        return context;
-    }
-
-    /**
-     * Sets the value of the context property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setContext(String value) {
-        this.context = value;
-    }
-
-    /**
-     * Gets a map that contains attributes that aren't bound to any typed property on this class.
-     * 
-     * <p>
-     * the map is keyed by the name of the attribute and 
-     * the value is the string value of the attribute.
-     * 
-     * the map returned by this method is live, and you can add new attribute
-     * by updating the map directly. Because of this design, there's no setter.
-     * 
-     * 
-     * @return
-     *     always non-null
-     */
-    public Map<QName, String> getOtherAttributes() {
-        return otherAttributes;
-    }
-
-}
+   /**
+    * Sets the value of the context property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setContext(String value)
+   {
+      this.context = value;
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestedProofTokenType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestedProofTokenType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestedProofTokenType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,21 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.w3c.dom.Element;
-
-
 /**
  * <p>Java class for RequestedProofTokenType complex type.
  * 
@@ -35,39 +40,6 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "RequestedProofTokenType", propOrder = {
-    "any"
-})
-public class RequestedProofTokenType {
-
-    @XmlAnyElement(lax = true)
-    protected Object any;
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link Object }
-     *     {@link Element }
-     *     
-     */
-    public Object getAny() {
-        return any;
-    }
-
-    /**
-     * Sets the value of the any property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link Object }
-     *     {@link Element }
-     *     
-     */
-    public void setAny(Object value) {
-        this.any = value;
-    }
-
-}
+public class RequestedProofTokenType extends SimpleAnyType
+{
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestedReferenceType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestedReferenceType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestedReferenceType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,21 +1,28 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
 import org.picketlink.identity.federation.ws.wss.secext.SecurityTokenReferenceType;
 
-
 /**
  * <p>Java class for RequestedReferenceType complex type.
  * 
@@ -35,37 +42,33 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "RequestedReferenceType", propOrder = {
-    "securityTokenReference"
-})
-public class RequestedReferenceType {
+public class RequestedReferenceType
+{
+   protected SecurityTokenReferenceType securityTokenReference;
 
-    @XmlElement(name = "SecurityTokenReference", namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", required = true)
-    protected SecurityTokenReferenceType securityTokenReference;
+   /**
+    * Gets the value of the securityTokenReference property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link SecurityTokenReferenceType }
+    *     
+    */
+   public SecurityTokenReferenceType getSecurityTokenReference()
+   {
+      return securityTokenReference;
+   }
 
-    /**
-     * Gets the value of the securityTokenReference property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link SecurityTokenReferenceType }
-     *     
-     */
-    public SecurityTokenReferenceType getSecurityTokenReference() {
-        return securityTokenReference;
-    }
-
-    /**
-     * Sets the value of the securityTokenReference property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link SecurityTokenReferenceType }
-     *     
-     */
-    public void setSecurityTokenReference(SecurityTokenReferenceType value) {
-        this.securityTokenReference = value;
-    }
-
-}
+   /**
+    * Sets the value of the securityTokenReference property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link SecurityTokenReferenceType }
+    *     
+    */
+   public void setSecurityTokenReference(SecurityTokenReferenceType value)
+   {
+      this.securityTokenReference = value;
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestedSecurityTokenType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestedSecurityTokenType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestedSecurityTokenType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,21 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.w3c.dom.Element;
-
-
 /**
  * <p>Java class for RequestedSecurityTokenType complex type.
  * 
@@ -35,39 +40,6 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "RequestedSecurityTokenType", propOrder = {
-    "any"
-})
-public class RequestedSecurityTokenType {
-
-    @XmlAnyElement(lax = true)
-    protected Object any;
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link Object }
-     *     {@link Element }
-     *     
-     */
-    public Object getAny() {
-        return any;
-    }
-
-    /**
-     * Sets the value of the any property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link Object }
-     *     {@link Element }
-     *     
-     */
-    public void setAny(Object value) {
-        this.any = value;
-    }
-
-}
+public class RequestedSecurityTokenType extends SimpleAnyType
+{
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestedTokenCancelledType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestedTokenCancelledType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/RequestedTokenCancelledType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,18 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlType;
-
-
 /**
  * <p>Java class for RequestedTokenCancelledType complex type.
  * 
@@ -29,9 +37,6 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "RequestedTokenCancelledType")
-public class RequestedTokenCancelledType {
-
-
-}
+public class RequestedTokenCancelledType
+{
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/SignChallengeType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/SignChallengeType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/SignChallengeType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,29 +1,28 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import org.picketlink.identity.federation.ws.addressing.AnyAddressingType;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Element;
-
-
 /**
  * <p>Java class for SignChallengeType complex type.
  * 
@@ -44,90 +43,33 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "SignChallengeType", propOrder = {
-    "challenge",
-    "any"
-})
-public class SignChallengeType {
+public class SignChallengeType extends AnyAddressingType
+{
+   protected String challenge;
 
-    @XmlElement(name = "Challenge", required = true)
-    protected String challenge;
-    @XmlAnyElement(lax = true)
-    protected List<Object> any;
-    @XmlAnyAttribute
-    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+   /**
+    * Gets the value of the challenge property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getChallenge()
+   {
+      return challenge;
+   }
 
-    /**
-     * Gets the value of the challenge property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getChallenge() {
-        return challenge;
-    }
-
-    /**
-     * Sets the value of the challenge property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setChallenge(String value) {
-        this.challenge = value;
-    }
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the any property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getAny().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link Object }
-     * {@link Element }
-     * 
-     * 
-     */
-    public List<Object> getAny() {
-        if (any == null) {
-            any = new ArrayList<Object>();
-        }
-        return this.any;
-    }
-
-    /**
-     * Gets a map that contains attributes that aren't bound to any typed property on this class.
-     * 
-     * <p>
-     * the map is keyed by the name of the attribute and 
-     * the value is the string value of the attribute.
-     * 
-     * the map returned by this method is live, and you can add new attribute
-     * by updating the map directly. Because of this design, there's no setter.
-     * 
-     * 
-     * @return
-     *     always non-null
-     */
-    public Map<QName, String> getOtherAttributes() {
-        return otherAttributes;
-    }
-
-}
+   /**
+    * Sets the value of the challenge property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setChallenge(String value)
+   {
+      this.challenge = value;
+   }
+}
\ No newline at end of file

Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/SimpleAnyType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/SimpleAnyType.java	                        (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/SimpleAnyType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -0,0 +1,62 @@
+/*
+ * 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.identity.federation.ws.trust;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+/**
+ * @author Anil.Saldhana at redhat.com
+ * @since Jun 16, 2011
+ */
+public class SimpleAnyType implements SimpleCollectionUsage<Object>
+{
+   protected List<Object> any = new ArrayList<Object>();
+
+   /**
+    * Gets the value of the any property. 
+    * 
+    * <p>
+    * Objects of the following type(s) are allowed in the list
+    * {@link Object }
+    * {@link Element }
+    * 
+    */
+   public List<Object> getAny()
+   {
+      return Collections.unmodifiableList(this.any);
+   }
+
+   public void add(Object t)
+   {
+      this.any.add(t);
+   }
+
+   public boolean remove(Object t)
+   {
+      return any.remove(t);
+
+   }
+}
\ No newline at end of file

Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/SimpleCollectionUsage.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/SimpleCollectionUsage.java	                        (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/SimpleCollectionUsage.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -0,0 +1,45 @@
+/*
+ * 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.identity.federation.ws.trust;
+
+import java.util.Collection;
+
+/**
+ * A simple interface to add in methods for a {@link Collection}
+ * @author Anil.Saldhana at redhat.com
+ * @since Jun 16, 2011
+ */
+public interface SimpleCollectionUsage<T>
+{
+   /**
+    * Add a {@link T} to the collection
+    * @param t
+    */
+   public void add(T t);
+
+   /**
+    * Remove a {@link T} from collection
+    * @param t
+    * @return
+    */
+   public boolean remove(T t);
+}

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/StatusType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/StatusType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/StatusType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,19 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
 /**
  * <p>Java class for StatusType complex type.
  * 
@@ -34,64 +41,62 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "StatusType", propOrder = {
-    "code",
-    "reason"
-})
-public class StatusType {
+public class StatusType
+{
 
-    @XmlElement(name = "Code", required = true)
-    protected String code;
-    @XmlElement(name = "Reason")
-    protected String reason;
+   protected String code;
 
-    /**
-     * Gets the value of the code property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getCode() {
-        return code;
-    }
+   protected String reason;
 
-    /**
-     * Sets the value of the code property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setCode(String value) {
-        this.code = value;
-    }
+   /**
+    * Gets the value of the code property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getCode()
+   {
+      return code;
+   }
 
-    /**
-     * Gets the value of the reason property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getReason() {
-        return reason;
-    }
+   /**
+    * Sets the value of the code property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setCode(String value)
+   {
+      this.code = value;
+   }
 
-    /**
-     * Sets the value of the reason property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setReason(String value) {
-        this.reason = value;
-    }
+   /**
+    * Gets the value of the reason property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getReason()
+   {
+      return reason;
+   }
 
-}
+   /**
+    * Sets the value of the reason property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setReason(String value)
+   {
+      this.reason = value;
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/UseKeyType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/UseKeyType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/UseKeyType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,23 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-
-import org.w3c.dom.Element;
-
-
 /**
  * <p>Java class for UseKeyType complex type.
  * 
@@ -38,66 +41,33 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "UseKeyType", propOrder = {
-    "any"
-})
-public class UseKeyType {
+public class UseKeyType extends SimpleAnyType
+{
+   protected String sig;
 
-    @XmlAnyElement(lax = true)
-    protected Object any;
-    @XmlAttribute(name = "Sig")
-    @XmlSchemaType(name = "anyURI")
-    protected String sig;
+   /**
+    * Gets the value of the sig property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getSig()
+   {
+      return sig;
+   }
 
-    /**
-     * Gets the value of the any property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link Object }
-     *     {@link Element }
-     *     
-     */
-    public Object getAny() {
-        return any;
-    }
-
-    /**
-     * Sets the value of the any property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link Object }
-     *     {@link Element }
-     *     
-     */
-    public void setAny(Object value) {
-        this.any = value;
-    }
-
-    /**
-     * Gets the value of the sig property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getSig() {
-        return sig;
-    }
-
-    /**
-     * Sets the value of the sig property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setSig(String value) {
-        this.sig = value;
-    }
-
-}
+   /**
+    * Sets the value of the sig property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setSig(String value)
+   {
+      this.sig = value;
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ValidateTargetType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ValidateTargetType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/ValidateTargetType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,19 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.trust;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlType;
-
-
 /**
  * <p>Java class for ValidateTargetType complex type.
  * 
@@ -33,37 +40,13 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "ValidateTargetType", propOrder = {
-    "any"
-})
-public class ValidateTargetType {
-
-    @XmlAnyElement(lax = true)
-    protected Object any;
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link Object }
-     *     
-     */
-    public Object getAny() {
-        return any;
-    }
-
-    /**
-     * Sets the value of the any property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link Object }
-     *     
-     */
-    public void setAny(Object value) {
-        this.any = value;
-    }
-
-}
+public class ValidateTargetType extends SimpleAnyType
+{
+   @Override
+   public void add(Object t)
+   {
+      //ensure that we clear
+      this.any.clear();
+      super.add(t);
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/package-info.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/package-info.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/trust/package-info.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,9 +1,23 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
+/*
+ * 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.identity.federation.ws.trust;
 
- at javax.xml.bind.annotation.XmlSchema(namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
-package org.picketlink.identity.federation.ws.trust;

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/AttributedString.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/AttributedString.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/AttributedString.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,30 +1,28 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.wss.secext;
 
-import java.util.HashMap;
-import java.util.Map;
+import org.picketlink.identity.federation.ws.addressing.BaseAddressingType;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlID;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.namespace.QName;
-
-
 /**
  * This type represents an element with arbitrary attributes.
  * 
@@ -44,90 +42,62 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "AttributedString", propOrder = {
-    "value"
-})
- at XmlSeeAlso({
-    PasswordString.class,
-    EncodedString.class
-})
-public class AttributedString {
+public class AttributedString extends BaseAddressingType
+{
 
-    @XmlValue
-    protected String value;
-    @XmlAttribute(name = "Id", namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd")
-    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
-    @XmlID
-    @XmlSchemaType(name = "ID")
-    protected String id;
-    @XmlAnyAttribute
-    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+   protected String value;
 
-    /**
-     * Gets the value of the value property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getValue() {
-        return value;
-    }
+   protected String id;
 
-    /**
-     * Sets the value of the value property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setValue(String value) {
-        this.value = value;
-    }
+   /**
+    * Gets the value of the value property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getValue()
+   {
+      return value;
+   }
 
-    /**
-     * Gets the value of the id property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getId() {
-        return id;
-    }
+   /**
+    * Sets the value of the value property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setValue(String value)
+   {
+      this.value = value;
+   }
 
-    /**
-     * Sets the value of the id property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setId(String value) {
-        this.id = value;
-    }
+   /**
+    * Gets the value of the id property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getId()
+   {
+      return id;
+   }
 
-    /**
-     * Gets a map that contains attributes that aren't bound to any typed property on this class.
-     * 
-     * <p>
-     * the map is keyed by the name of the attribute and 
-     * the value is the string value of the attribute.
-     * 
-     * the map returned by this method is live, and you can add new attribute
-     * by updating the map directly. Because of this design, there's no setter.
-     * 
-     * 
-     * @return
-     *     always non-null
-     */
-    public Map<QName, String> getOtherAttributes() {
-        return otherAttributes;
-    }
-
-}
+   /**
+    * Sets the value of the id property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setId(String value)
+   {
+      this.id = value;
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/BinarySecurityTokenType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/BinarySecurityTokenType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/BinarySecurityTokenType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,20 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.wss.secext;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-
-
 /**
  * A security token that is encoded in binary
  * 
@@ -34,38 +40,33 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "BinarySecurityTokenType")
-public class BinarySecurityTokenType
-    extends EncodedString
+public class BinarySecurityTokenType extends EncodedString
 {
+   protected String valueType;
 
-    @XmlAttribute(name = "ValueType")
-    @XmlSchemaType(name = "anyURI")
-    protected String valueType;
+   /**
+    * Gets the value of the valueType property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getValueType()
+   {
+      return valueType;
+   }
 
-    /**
-     * Gets the value of the valueType property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getValueType() {
-        return valueType;
-    }
-
-    /**
-     * Sets the value of the valueType property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setValueType(String value) {
-        this.valueType = value;
-    }
-
-}
+   /**
+    * Sets the value of the valueType property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setValueType(String value)
+   {
+      this.valueType = value;
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/EmbeddedType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/EmbeddedType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/EmbeddedType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,30 +1,28 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.wss.secext;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import org.picketlink.identity.federation.ws.addressing.AnyAddressingType;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Element;
-
-
 /**
  * This type represents a reference to an embedded security token.
  * 
@@ -47,90 +45,33 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "EmbeddedType", propOrder = {
-    "any"
-})
-public class EmbeddedType {
+public class EmbeddedType extends AnyAddressingType
+{
+   protected String valueType;
 
-    @XmlAnyElement(lax = true)
-    protected List<Object> any;
-    @XmlAttribute(name = "ValueType")
-    @XmlSchemaType(name = "anyURI")
-    protected String valueType;
-    @XmlAnyAttribute
-    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+   /**
+    * Gets the value of the valueType property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getValueType()
+   {
+      return valueType;
+   }
 
-    /**
-     * Gets the value of the any property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the any property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getAny().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link Object }
-     * {@link Element }
-     * 
-     * 
-     */
-    public List<Object> getAny() {
-        if (any == null) {
-            any = new ArrayList<Object>();
-        }
-        return this.any;
-    }
-
-    /**
-     * Gets the value of the valueType property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getValueType() {
-        return valueType;
-    }
-
-    /**
-     * Sets the value of the valueType property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setValueType(String value) {
-        this.valueType = value;
-    }
-
-    /**
-     * Gets a map that contains attributes that aren't bound to any typed property on this class.
-     * 
-     * <p>
-     * the map is keyed by the name of the attribute and 
-     * the value is the string value of the attribute.
-     * 
-     * the map returned by this method is live, and you can add new attribute
-     * by updating the map directly. Because of this design, there's no setter.
-     * 
-     * 
-     * @return
-     *     always non-null
-     */
-    public Map<QName, String> getOtherAttributes() {
-        return otherAttributes;
-    }
-
-}
+   /**
+    * Sets the value of the valueType property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setValueType(String value)
+   {
+      this.valueType = value;
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/EncodedString.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/EncodedString.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/EncodedString.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,21 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.wss.secext;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
-
-
 /**
  * This type is used for elements containing stringified binary data.
  * 
@@ -35,42 +40,33 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "EncodedString")
- at XmlSeeAlso({
-    BinarySecurityTokenType.class,
-    KeyIdentifierType.class
-})
-public class EncodedString
-    extends AttributedString
+public class EncodedString extends AttributedString
 {
+   protected String encodingType;
 
-    @XmlAttribute(name = "EncodingType")
-    @XmlSchemaType(name = "anyURI")
-    protected String encodingType;
+   /**
+    * Gets the value of the encodingType property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getEncodingType()
+   {
+      return encodingType;
+   }
 
-    /**
-     * Gets the value of the encodingType property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getEncodingType() {
-        return encodingType;
-    }
-
-    /**
-     * Sets the value of the encodingType property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setEncodingType(String value) {
-        this.encodingType = value;
-    }
-
-}
+   /**
+    * Sets the value of the encodingType property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setEncodingType(String value)
+   {
+      this.encodingType = value;
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/KeyIdentifierType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/KeyIdentifierType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/KeyIdentifierType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,20 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.wss.secext;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-
-
 /**
  * A security token key identifier
  * 
@@ -34,38 +40,33 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "KeyIdentifierType")
-public class KeyIdentifierType
-    extends EncodedString
+public class KeyIdentifierType extends EncodedString
 {
+   protected String valueType;
 
-    @XmlAttribute(name = "ValueType")
-    @XmlSchemaType(name = "anyURI")
-    protected String valueType;
+   /**
+    * Gets the value of the valueType property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getValueType()
+   {
+      return valueType;
+   }
 
-    /**
-     * Gets the value of the valueType property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getValueType() {
-        return valueType;
-    }
-
-    /**
-     * Sets the value of the valueType property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setValueType(String value) {
-        this.valueType = value;
-    }
-
-}
+   /**
+    * Sets the value of the valueType property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setValueType(String value)
+   {
+      this.valueType = value;
+   }
+}
\ No newline at end of file

Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/ObjectFactory.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/ObjectFactory.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/ObjectFactory.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,230 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
-package org.picketlink.identity.federation.ws.wss.secext;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlElementDecl;
-import javax.xml.bind.annotation.XmlRegistry;
-import javax.xml.namespace.QName;
-
-
-/**
- * This object contains factory methods for each 
- * Java content interface and Java element interface 
- * generated in the org.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0 package. 
- * <p>An ObjectFactory allows you to programatically 
- * construct new instances of the Java representation 
- * for XML content. The Java representation of XML 
- * content can consist of schema derived interfaces 
- * and classes representing the binding of schema 
- * type definitions, element declarations and model 
- * groups.  Factory methods for each of these are 
- * provided in this class.
- * 
- */
- at XmlRegistry
-public class ObjectFactory {
-
-    private final static QName _BinarySecurityToken_QNAME = new QName("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "BinarySecurityToken");
-    private final static QName _KeyIdentifier_QNAME = new QName("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "KeyIdentifier");
-    private final static QName _UsernameToken_QNAME = new QName("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "UsernameToken");
-    private final static QName _Security_QNAME = new QName("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "Security");
-    private final static QName _TransformationParameters_QNAME = new QName("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "TransformationParameters");
-    private final static QName _Reference_QNAME = new QName("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "Reference");
-    private final static QName _Nonce_QNAME = new QName("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "Nonce");
-    private final static QName _Password_QNAME = new QName("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "Password");
-    private final static QName _Embedded_QNAME = new QName("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "Embedded");
-    private final static QName _SecurityTokenReference_QNAME = new QName("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "SecurityTokenReference");
-
-    /**
-     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0
-     * 
-     */
-    public ObjectFactory() {
-    }
-
-    /**
-     * Create an instance of {@link EmbeddedType }
-     * 
-     */
-    public EmbeddedType createEmbeddedType() {
-        return new EmbeddedType();
-    }
-
-    /**
-     * Create an instance of {@link SecurityTokenReferenceType }
-     * 
-     */
-    public SecurityTokenReferenceType createSecurityTokenReferenceType() {
-        return new SecurityTokenReferenceType();
-    }
-
-    /**
-     * Create an instance of {@link PasswordString }
-     * 
-     */
-    public PasswordString createPasswordString() {
-        return new PasswordString();
-    }
-
-    /**
-     * Create an instance of {@link EncodedString }
-     * 
-     */
-    public EncodedString createEncodedString() {
-        return new EncodedString();
-    }
-
-    /**
-     * Create an instance of {@link KeyIdentifierType }
-     * 
-     */
-    public KeyIdentifierType createKeyIdentifierType() {
-        return new KeyIdentifierType();
-    }
-
-    /**
-     * Create an instance of {@link AttributedString }
-     * 
-     */
-    public AttributedString createAttributedString() {
-        return new AttributedString();
-    }
-
-    /**
-     * Create an instance of {@link TransformationParametersType }
-     * 
-     */
-    public TransformationParametersType createTransformationParametersType() {
-        return new TransformationParametersType();
-    }
-
-    /**
-     * Create an instance of {@link BinarySecurityTokenType }
-     * 
-     */
-    public BinarySecurityTokenType createBinarySecurityTokenType() {
-        return new BinarySecurityTokenType();
-    }
-
-    /**
-     * Create an instance of {@link ReferenceType }
-     * 
-     */
-    public ReferenceType createReferenceType() {
-        return new ReferenceType();
-    }
-
-    /**
-     * Create an instance of {@link SecurityHeaderType }
-     * 
-     */
-    public SecurityHeaderType createSecurityHeaderType() {
-        return new SecurityHeaderType();
-    }
-
-    /**
-     * Create an instance of {@link UsernameTokenType }
-     * 
-     */
-    public UsernameTokenType createUsernameTokenType() {
-        return new UsernameTokenType();
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link BinarySecurityTokenType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", name = "BinarySecurityToken")
-    public JAXBElement<BinarySecurityTokenType> createBinarySecurityToken(BinarySecurityTokenType value) {
-        return new JAXBElement<BinarySecurityTokenType>(_BinarySecurityToken_QNAME, BinarySecurityTokenType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link KeyIdentifierType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", name = "KeyIdentifier")
-    public JAXBElement<KeyIdentifierType> createKeyIdentifier(KeyIdentifierType value) {
-        return new JAXBElement<KeyIdentifierType>(_KeyIdentifier_QNAME, KeyIdentifierType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link UsernameTokenType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", name = "UsernameToken")
-    public JAXBElement<UsernameTokenType> createUsernameToken(UsernameTokenType value) {
-        return new JAXBElement<UsernameTokenType>(_UsernameToken_QNAME, UsernameTokenType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link SecurityHeaderType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", name = "Security")
-    public JAXBElement<SecurityHeaderType> createSecurity(SecurityHeaderType value) {
-        return new JAXBElement<SecurityHeaderType>(_Security_QNAME, SecurityHeaderType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link TransformationParametersType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", name = "TransformationParameters")
-    public JAXBElement<TransformationParametersType> createTransformationParameters(TransformationParametersType value) {
-        return new JAXBElement<TransformationParametersType>(_TransformationParameters_QNAME, TransformationParametersType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link ReferenceType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", name = "Reference")
-    public JAXBElement<ReferenceType> createReference(ReferenceType value) {
-        return new JAXBElement<ReferenceType>(_Reference_QNAME, ReferenceType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link EncodedString }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", name = "Nonce")
-    public JAXBElement<EncodedString> createNonce(EncodedString value) {
-        return new JAXBElement<EncodedString>(_Nonce_QNAME, EncodedString.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link PasswordString }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", name = "Password")
-    public JAXBElement<PasswordString> createPassword(PasswordString value) {
-        return new JAXBElement<PasswordString>(_Password_QNAME, PasswordString.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link EmbeddedType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", name = "Embedded")
-    public JAXBElement<EmbeddedType> createEmbedded(EmbeddedType value) {
-        return new JAXBElement<EmbeddedType>(_Embedded_QNAME, EmbeddedType.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link SecurityTokenReferenceType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", name = "SecurityTokenReference")
-    public JAXBElement<SecurityTokenReferenceType> createSecurityTokenReference(SecurityTokenReferenceType value) {
-        return new JAXBElement<SecurityTokenReferenceType>(_SecurityTokenReference_QNAME, SecurityTokenReferenceType.class, null, value);
-    }
-
-}

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/PasswordString.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/PasswordString.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/PasswordString.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,20 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.wss.secext;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-
-
 /**
  * This type is used for password elements per Section 4.1.
  * 
@@ -34,38 +40,34 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "PasswordString")
-public class PasswordString
-    extends AttributedString
+public class PasswordString extends AttributedString
 {
+   protected String type;
 
-    @XmlAttribute(name = "Type")
-    @XmlSchemaType(name = "anyURI")
-    protected String type;
+   /**
+    * Gets the value of the type property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getType()
+   {
+      return type;
+   }
 
-    /**
-     * Gets the value of the type property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getType() {
-        return type;
-    }
+   /**
+    * Sets the value of the type property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setType(String value)
+   {
+      this.type = value;
+   }
 
-    /**
-     * Sets the value of the type property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setType(String value) {
-        this.type = value;
-    }
-
-}
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/ReferenceType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/ReferenceType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/ReferenceType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,25 +1,28 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.wss.secext;
 
-import java.util.HashMap;
-import java.util.Map;
+import org.picketlink.identity.federation.ws.addressing.BaseAddressingType;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-
-
 /**
  * This type represents a reference to an external security token.
  * 
@@ -40,83 +43,61 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "ReferenceType")
-public class ReferenceType {
+public class ReferenceType extends BaseAddressingType
+{
+   protected String uri;
 
-    @XmlAttribute(name = "URI")
-    @XmlSchemaType(name = "anyURI")
-    protected String uri;
-    @XmlAttribute(name = "ValueType")
-    @XmlSchemaType(name = "anyURI")
-    protected String valueType;
-    @XmlAnyAttribute
-    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+   protected String valueType;
 
-    /**
-     * Gets the value of the uri property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getURI() {
-        return uri;
-    }
+   /**
+    * Gets the value of the uri property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getURI()
+   {
+      return uri;
+   }
 
-    /**
-     * Sets the value of the uri property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setURI(String value) {
-        this.uri = value;
-    }
+   /**
+    * Sets the value of the uri property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setURI(String value)
+   {
+      this.uri = value;
+   }
 
-    /**
-     * Gets the value of the valueType property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getValueType() {
-        return valueType;
-    }
+   /**
+    * Gets the value of the valueType property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getValueType()
+   {
+      return valueType;
+   }
 
-    /**
-     * Sets the value of the valueType property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setValueType(String value) {
-        this.valueType = value;
-    }
-
-    /**
-     * Gets a map that contains attributes that aren't bound to any typed property on this class.
-     * 
-     * <p>
-     * the map is keyed by the name of the attribute and 
-     * the value is the string value of the attribute.
-     * 
-     * the map returned by this method is live, and you can add new attribute
-     * by updating the map directly. Because of this design, there's no setter.
-     * 
-     * 
-     * @return
-     *     always non-null
-     */
-    public Map<QName, String> getOtherAttributes() {
-        return otherAttributes;
-    }
-
-}
+   /**
+    * Sets the value of the valueType property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setValueType(String value)
+   {
+      this.valueType = value;
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/SecurityHeaderType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/SecurityHeaderType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/SecurityHeaderType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,28 +1,28 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.wss.secext;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import org.picketlink.identity.federation.ws.addressing.AnyAddressingType;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Element;
-
-
 /**
  * This complexType defines header block to use for security-relevant data directed at a specific SOAP actor.
  * 
@@ -44,63 +44,6 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "SecurityHeaderType", propOrder = {
-    "any"
-})
-public class SecurityHeaderType {
-
-    @XmlAnyElement(lax = true)
-    protected List<Object> any;
-    @XmlAnyAttribute
-    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the any property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getAny().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link Object }
-     * {@link Element }
-     * 
-     * 
-     */
-    public List<Object> getAny() {
-        if (any == null) {
-            any = new ArrayList<Object>();
-        }
-        return this.any;
-    }
-
-    /**
-     * Gets a map that contains attributes that aren't bound to any typed property on this class.
-     * 
-     * <p>
-     * the map is keyed by the name of the attribute and 
-     * the value is the string value of the attribute.
-     * 
-     * the map returned by this method is live, and you can add new attribute
-     * by updating the map directly. Because of this design, there's no setter.
-     * 
-     * 
-     * @return
-     *     always non-null
-     */
-    public Map<QName, String> getOtherAttributes() {
-        return otherAttributes;
-    }
-
-}
+public class SecurityHeaderType extends AnyAddressingType
+{
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/SecurityTokenReferenceType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/SecurityTokenReferenceType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/SecurityTokenReferenceType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,33 +1,32 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.wss.secext;
 
-import java.util.ArrayList;
-import java.util.HashMap;
+import java.util.Collections;
 import java.util.List;
-import java.util.Map;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlID;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.namespace.QName;
+import org.picketlink.identity.federation.ws.addressing.AnyAddressingType;
+import org.picketlink.identity.federation.ws.trust.SimpleCollectionUsage;
 
-import org.w3c.dom.Element;
-
-
 /**
  * This type is used reference a security token.
  * 
@@ -51,123 +50,58 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "SecurityTokenReferenceType", propOrder = {
-    "any"
-})
-public class SecurityTokenReferenceType {
+public class SecurityTokenReferenceType extends AnyAddressingType implements SimpleCollectionUsage<String>
+{
+   protected String id;
 
-    @XmlAnyElement(lax = true)
-    protected List<Object> any;
-    @XmlAttribute(name = "Id", namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd")
-    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
-    @XmlID
-    @XmlSchemaType(name = "ID")
-    protected String id;
-    @XmlAttribute(name = "Usage", namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd")
-    protected List<String> usage;
-    @XmlAnyAttribute
-    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+   protected List<String> usage;
 
-    /**
-     * Gets the value of the any property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the any property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getAny().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link Object }
-     * {@link Element }
-     * 
-     * 
-     */
-    public List<Object> getAny() {
-        if (any == null) {
-            any = new ArrayList<Object>();
-        }
-        return this.any;
-    }
+   /**
+    * Gets the value of the id property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getId()
+   {
+      return id;
+   }
 
-    /**
-     * Gets the value of the id property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getId() {
-        return id;
-    }
+   /**
+    * Sets the value of the id property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setId(String value)
+   {
+      this.id = value;
+   }
 
-    /**
-     * Sets the value of the id property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setId(String value) {
-        this.id = value;
-    }
+   /**
+    * Gets the value of the usage property. 
+    * <p>
+    * Objects of the following type(s) are allowed in the list
+    * {@link String }
+    * 
+    * 
+    */
+   public List<String> getUsage()
+   {
+      return Collections.unmodifiableList(this.usage);
+   }
 
-    /**
-     * Gets the value of the usage property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the usage property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getUsage().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link String }
-     * 
-     * 
-     */
-    public List<String> getUsage() {
-        if (usage == null) {
-            usage = new ArrayList<String>();
-        }
-        return this.usage;
-    }
+   public void add(String t)
+   {
+      this.usage.add(t);
+   }
 
-    /**
-     * Gets a map that contains attributes that aren't bound to any typed property on this class.
-     * 
-     * <p>
-     * the map is keyed by the name of the attribute and 
-     * the value is the string value of the attribute.
-     * 
-     * the map returned by this method is live, and you can add new attribute
-     * by updating the map directly. Because of this design, there's no setter.
-     * 
-     * 
-     * @return
-     *     always non-null
-     */
-    public Map<QName, String> getOtherAttributes() {
-        return otherAttributes;
-    }
-
-}
+   public boolean remove(String t)
+   {
+      return this.usage.remove(t);
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/TransformationParametersType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/TransformationParametersType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/TransformationParametersType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,28 +1,28 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.wss.secext;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import org.picketlink.identity.federation.ws.addressing.AnyAddressingType;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Element;
-
-
 /**
  * This complexType defines a container for elements to be specified from any namespace as properties/parameters of a DSIG transformation.
  * 
@@ -44,63 +44,6 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "TransformationParametersType", propOrder = {
-    "any"
-})
-public class TransformationParametersType {
-
-    @XmlAnyElement(lax = true)
-    protected List<Object> any;
-    @XmlAnyAttribute
-    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the any property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getAny().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link Object }
-     * {@link Element }
-     * 
-     * 
-     */
-    public List<Object> getAny() {
-        if (any == null) {
-            any = new ArrayList<Object>();
-        }
-        return this.any;
-    }
-
-    /**
-     * Gets a map that contains attributes that aren't bound to any typed property on this class.
-     * 
-     * <p>
-     * the map is keyed by the name of the attribute and 
-     * the value is the string value of the attribute.
-     * 
-     * the map returned by this method is live, and you can add new attribute
-     * by updating the map directly. Because of this design, there's no setter.
-     * 
-     * 
-     * @return
-     *     always non-null
-     */
-    public Map<QName, String> getOtherAttributes() {
-        return otherAttributes;
-    }
-
-}
+public class TransformationParametersType extends AnyAddressingType
+{
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/UsernameTokenType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/UsernameTokenType.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/UsernameTokenType.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,34 +1,28 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
-
-
+/*
+ * 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.identity.federation.ws.wss.secext;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import org.picketlink.identity.federation.ws.addressing.AnyAddressingType;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlID;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Element;
-
-
 /**
  * This type represents a username token per Section 4.1
  * 
@@ -52,119 +46,61 @@
  * 
  * 
  */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "UsernameTokenType", propOrder = {
-    "username",
-    "any"
-})
-public class UsernameTokenType {
+public class UsernameTokenType extends AnyAddressingType
+{
+   protected AttributedString username;
 
-    @XmlElement(name = "Username", required = true)
-    protected AttributedString username;
-    @XmlAnyElement(lax = true)
-    protected List<Object> any;
-    @XmlAttribute(name = "Id", namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd")
-    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
-    @XmlID
-    @XmlSchemaType(name = "ID")
-    protected String id;
-    @XmlAnyAttribute
-    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+   protected String id;
 
-    /**
-     * Gets the value of the username property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link AttributedString }
-     *     
-     */
-    public AttributedString getUsername() {
-        return username;
-    }
+   /**
+    * Gets the value of the username property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link AttributedString }
+    *     
+    */
+   public AttributedString getUsername()
+   {
+      return username;
+   }
 
-    /**
-     * Sets the value of the username property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link AttributedString }
-     *     
-     */
-    public void setUsername(AttributedString value) {
-        this.username = value;
-    }
+   /**
+    * Sets the value of the username property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link AttributedString }
+    *     
+    */
+   public void setUsername(AttributedString value)
+   {
+      this.username = value;
+   }
 
-    /**
-     * Gets the value of the any property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the any property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getAny().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link Object }
-     * {@link Element }
-     * 
-     * 
-     */
-    public List<Object> getAny() {
-        if (any == null) {
-            any = new ArrayList<Object>();
-        }
-        return this.any;
-    }
+   /**
+    * Gets the value of the id property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getId()
+   {
+      return id;
+   }
 
-    /**
-     * Gets the value of the id property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getId() {
-        return id;
-    }
-
-    /**
-     * Sets the value of the id property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setId(String value) {
-        this.id = value;
-    }
-
-    /**
-     * Gets a map that contains attributes that aren't bound to any typed property on this class.
-     * 
-     * <p>
-     * the map is keyed by the name of the attribute and 
-     * the value is the string value of the attribute.
-     * 
-     * the map returned by this method is live, and you can add new attribute
-     * by updating the map directly. Because of this design, there's no setter.
-     * 
-     * 
-     * @return
-     *     always non-null
-     */
-    public Map<QName, String> getOtherAttributes() {
-        return otherAttributes;
-    }
-
-}
+   /**
+    * Sets the value of the id property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setId(String value)
+   {
+      this.id = value;
+   }
+}
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/package-info.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/package-info.java	2011-06-14 01:24:38 UTC (rev 1003)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/wss/secext/package-info.java	2011-06-16 20:27:47 UTC (rev 1004)
@@ -1,9 +1,23 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.12.17 at 12:32:20 PM CST 
-//
+/*
+ * 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.identity.federation.ws.wss.secext;
 
- at javax.xml.bind.annotation.XmlSchema(namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
-package org.picketlink.identity.federation.ws.wss.secext;



More information about the jboss-cvs-commits mailing list