axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r451905 [3/3] - in /webservices/axis2/trunk/java/modules: codegen/src/org/apache/axis2/wsdl/template/java/ integration/test/org/apache/axis2/async/ kernel/src/org/apache/axis2/client/ kernel/src/org/apache/axis2/deployment/ kernel/src/org/a...
Date Mon, 02 Oct 2006 08:02:09 GMT
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java?view=diff&rev=451905&r1=451904&r2=451905
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java
Mon Oct  2 01:02:06 2006
@@ -56,6 +56,9 @@
     private final HashMap transportsOut = new HashMap();
 
     private final HashMap policySupportedModules = new HashMap();
+    
+    /** Stores the QNames of local policy assertions */
+    private final ArrayList localPolicyAssertions = new ArrayList();
 
     // to store AxisObserver Objects
     private ArrayList observersList = null;
@@ -155,7 +158,12 @@
         } else {
             allModules.put(module.getName(), module);
         }
+        
+        // Registering the policy namespaces that the module understand        
         registerModulePolicySupport(module);
+        // Registering the policy assertions that are local to the system 
+        registerLocalPolicyAssertions(module);
+        
     }
 
     /**
@@ -810,6 +818,18 @@
             }
         }
     }
+    
+    public void registerLocalPolicyAssertions(AxisModule axisModule) {
+        QName[] localPolicyAssertions = axisModule.getLocalPolicyAssertions();
+        
+        if (localPolicyAssertions == null) {
+            return;
+        }
+        
+        for (int i = 0; i < localPolicyAssertions.length; i++) {
+            addLocalPolicyAssertion(localPolicyAssertions[i]);                        
+        }
+    }
 
     public ArrayList getObserversList() {
         return observersList;
@@ -843,5 +863,21 @@
     
     public void addTargetResolver(TargetResolver tr) {
         targetResolvers.add(tr);
+    }
+    
+    public void addLocalPolicyAssertion(QName name) {
+        this.localPolicyAssertions.add(name);        
+    }
+    
+    public List getLocalPolicyAssertions() {
+        return this.localPolicyAssertions;
+    }
+    
+    public void removeLocalPolicyAssertion(QName name) {
+        this.localPolicyAssertions.remove(name);        
+    }
+    
+    public boolean isAssertionLocal(QName name) {
+        return this.localPolicyAssertions.contains(name);
     }
 }

Modified: webservices/axis2/trunk/java/modules/rahas/src/META-INF/module.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rahas/src/META-INF/module.xml?view=diff&rev=451905&r1=451904&r2=451905
==============================================================================
--- webservices/axis2/trunk/java/modules/rahas/src/META-INF/module.xml (original)
+++ webservices/axis2/trunk/java/modules/rahas/src/META-INF/module.xml Mon Oct  2 01:02:06
2006
@@ -3,7 +3,7 @@
         the RequestSecurityToken operation to a service that the module is engaged to</Description>
 
     <supported-policy-namespaces namespaces="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"/>
-
+    
     <operation name="RequestSecurityToken" mep="http://www.w3.org/2004/08/wsdl/in-out">
         <messageReceiver class="org.apache.rahas.STSMessageReceiver"/>
 

Modified: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Trust10.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Trust10.java?view=diff&rev=451905&r1=451904&r2=451905
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Trust10.java
(original)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Trust10.java
Mon Oct  2 01:02:06 2006
@@ -125,6 +125,69 @@
 
     public void serialize(XMLStreamWriter writer) throws XMLStreamException {
         
+        String localname = Constants.TRUST_10.getLocalPart();
+        String namespaceURI = Constants.TRUST_10.getNamespaceURI();
+        
+        String prefix = writer.getPrefix(namespaceURI);
+        if (prefix == null) {
+            prefix = Constants.TRUST_10.getPrefix();
+            writer.setPrefix(prefix, namespaceURI);
+        }
+        
+        // <sp:Trust10>
+        writer.writeStartElement(prefix, localname, namespaceURI);
+        // xmlns:sp=".."
+        writer.writeNamespace(prefix, namespaceURI);
+        
+        String wspPrefix = writer.getPrefix(Constants.POLICY.getNamespaceURI());
+        if (wspPrefix == null) {
+            writer.setPrefix(wspPrefix, Constants.POLICY.getNamespaceURI());
+        }
+        
+        // <wsp:Policy>
+        writer.writeStartElement(Constants.POLICY.getPrefix(), Constants.POLICY.getLocalPart(),
Constants.POLICY.getNamespaceURI());
+        
+        if (isMustSupportClientChallenge()) {
+            // <sp:MustSupportClientChallenge />
+            writer.writeStartElement(prefix, Constants.MUST_SUPPORT_CLIENT_CHALLENGE.getLocalPart(),
namespaceURI);
+            writer.writeEndElement();
+        }
+        
+        if (isMustSupportServerChallenge()) {
+            // <sp:MustSupportServerChallenge />
+            writer.writeStartElement(prefix, Constants.MUST_SUPPORT_SERVER_CHALLENGE.getLocalPart(),
namespaceURI);
+            writer.writeEndElement();
+        }
+        
+        if (isRequireClientEntropy()) {
+            // <sp:RequireClientEntropy />
+            writer.writeStartElement(prefix, Constants.REQUIRE_CLIENT_ENTROPY.getLocalPart(),
namespaceURI);
+            writer.writeEndElement();
+        }
+        
+        
+        if (isRequireServerEntropy()) {
+            // <sp:RequireServerEntropy />
+            writer.writeStartElement(prefix, Constants.REQUIRE_SERVER_ENTROPY.getLocalPart(),
namespaceURI);
+            writer.writeEndElement();
+        }
+        
+        if (isMustSupportIssuedTokens()) {
+            // <sp:MustSupportIssuedTokens />
+            writer.writeStartElement(prefix, Constants.MUST_SUPPORT_ISSUED_TOKENS.getLocalPart(),
namespaceURI);
+            writer.writeEndElement();
+        }
+        
+        // </wsp:Policy>
+        writer.writeEndElement();
+        
+        
+        // </sp:Trust10>
+        writer.writeEndElement();
+        
+        
+        
+        
     }
 
     public short getType() {

Modified: webservices/axis2/trunk/java/modules/security/src/META-INF/module.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/META-INF/module.xml?view=diff&rev=451905&r1=451904&r2=451905
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/META-INF/module.xml (original)
+++ webservices/axis2/trunk/java/modules/security/src/META-INF/module.xml Mon Oct  2 01:02:06
2006
@@ -23,4 +23,7 @@
         </handler>
     </outflow>
     <supported-policy-namespaces namespaces="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"/>
+    <local-policy-assertions>
+    	<rampart:RampartConfig xmlns:rampart="http://ws.apache.org/rampart/policy" />
+    </local-policy-assertions>
 </module>

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/policy/model/CryptoConfig.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/policy/model/CryptoConfig.java?view=diff&rev=451905&r1=451904&r2=451905
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/policy/model/CryptoConfig.java
(original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/policy/model/CryptoConfig.java
Mon Oct  2 01:02:06 2006
@@ -97,7 +97,9 @@
             key = (String) iterator.next();
             value = prop.getProperty(key);
             writer.writeStartElement(RampartConfig.NS, PROPERTY_LN);
-            writer.writeAttribute("nmaame", key);
+
+            writer.writeAttribute("name", key);
+
             writer.writeCharacters(value);
             writer.writeEndElement();
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message