tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lrese...@apache.org
Subject svn commit: r644060 [2/2] - in /incubator/tuscany/branches/sca-java-1.2/modules: ./ assembly-xml/ assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ binding-ws-axis2/ definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/ de...
Date Wed, 02 Apr 2008 21:06:05 GMT
Propchange: incubator/tuscany/branches/sca-java-1.2/modules/policy-xml-ws/src/test/resources/org/apache/tuscany/sca/policy/xml/test_definitions.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/branches/sca-java-1.2/modules/policy-xml-ws/src/test/resources/org/apache/tuscany/sca/policy/xml/test_definitions.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/branches/sca-java-1.2/modules/policy-xml-ws/src/test/resources/org/apache/tuscany/sca/policy/xml/test_definitions.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/tuscany/branches/sca-java-1.2/modules/policy-xml/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/modules/policy-xml/pom.xml?rev=644060&r1=644059&r2=644060&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.2/modules/policy-xml/pom.xml (original)
+++ incubator/tuscany/branches/sca-java-1.2/modules/policy-xml/pom.xml Wed Apr  2 14:06:01
2008
@@ -41,7 +41,7 @@
             <version>1.2-incubating-SNAPSHOT</version>
         </dependency>
 
-        <dependency>
+        <!--dependency>
             <groupId>org.apache.ws.commons.axiom</groupId>
             <artifactId>axiom-api</artifactId>
             <version>1.2.5</version>
@@ -95,7 +95,7 @@
                     <artifactId>mail</artifactId>
                 </exclusion>
             </exclusions>
-        </dependency>
+        </dependency-->
                 
         <dependency>
             <groupId>org.codehaus.woodstox</groupId>
@@ -104,7 +104,7 @@
             <scope>runtime</scope>
         </dependency>
         
-        <dependency>
+        <!--dependency>
             <groupId>commons-logging</groupId>
             <artifactId>commons-logging</artifactId>
             <version>1.1</version>
@@ -115,6 +115,6 @@
                    <artifactId>commons-logging</artifactId>
                </exclusion>
             </exclusions>
-        </dependency>        
+        </dependency-->        
     </dependencies>
 </project>

Modified: incubator/tuscany/branches/sca-java-1.2/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyConstants.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyConstants.java?rev=644060&r1=644059&r2=644060&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.2/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyConstants.java
(original)
+++ incubator/tuscany/branches/sca-java-1.2/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyConstants.java
Wed Apr  2 14:06:01 2008
@@ -45,10 +45,7 @@
     String INTENT_MAP_QUALIFIER = "qualifier";
     String REQUIRES = "requires";
     String DEFAULT = "default";
-    
-    String WS_POLICY_NS = "http://schemas.xmlsoap.org/ws/2004/09/policy";
-    String WS_POLICY = "Policy";
-    
+       
     String ALWAYS_PROVIDES = "alwaysProvides";
     String MAY_PROVIDE = "mayProvide";
     String TYPE = "type";
@@ -66,7 +63,6 @@
     QName DESCRIPTION_QNAME = new QName(SCA10_NS, DESCRIPTION);
     QName POLICY_INTENT_MAP_QUALIFIER_QNAME = new QName(SCA10_NS, INTENT_MAP_QUALIFIER);
     QName POLICY_SET_REFERENCE_QNAME = new QName(SCA10_NS, POLICY_SET_REFERENCE);
-    QName WS_POLICY_QNAME = new QName(WS_POLICY_NS, WS_POLICY);
     
     String QUALIFIED_INTENT_CONSTRAINS_ERROR = " - Qualified Intents must not specify 'constrains'
attribute";
     

Modified: incubator/tuscany/branches/sca-java-1.2/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java?rev=644060&r1=644059&r2=644060&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.2/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java
(original)
+++ incubator/tuscany/branches/sca-java-1.2/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java
Wed Apr  2 14:06:01 2008
@@ -29,7 +29,6 @@
 import java.util.StringTokenizer;
 
 import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
@@ -37,12 +36,6 @@
 import javax.xml.xpath.XPathExpressionException;
 import javax.xml.xpath.XPathFactory;
 
-import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.OMNamespace;
-import org.apache.neethi.Policy;
-import org.apache.neethi.PolicyEngine;
 import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
 import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
@@ -131,11 +124,11 @@
                         PolicySet referredPolicySet = policyFactory.createPolicySet();
                         referredPolicySet.setName(getQName(reader, NAME));
                         policySet.getReferencedPolicySets().add(referredPolicySet);
-                    } else if ( WS_POLICY_QNAME.equals(name) )  {
+                    } /*else if ( WS_POLICY_QNAME.equals(name) )  {
                         OMElement policyElement = loadElement(reader);
                         org.apache.neethi.Policy wsPolicy = PolicyEngine.getPolicy(policyElement);
                         policySet.getPolicies().add(wsPolicy);
-                    } else {
+                    } */ else {
                         Object extension = extensionProcessor.read(reader);
                         if ( extension != null ) {
                             policySet.getPolicies().add(extension);
@@ -195,7 +188,7 @@
                                                                     providedIntent + " does
not match parent qualifier " + qualifierName +
                                                                     " in policyset - " +
policySet);
                                 }
-                            } else if ( WS_POLICY_QNAME.equals(name) )  {
+                            }/* else if ( WS_POLICY_QNAME.equals(name) )  {
                                 OMElement policyElement = loadElement(reader);
                                 Policy wsPolicy = PolicyEngine.getPolicy(policyElement);
                                 policySet.getPolicies().add(wsPolicy);
@@ -210,7 +203,7 @@
                                     }
                                 }
                                 policyList.add((Policy)wsPolicy);
-                            } else {
+                            }*/ else {
                                 Object extension = extensionProcessor.read(reader);
                                 if ( extension != null ) {
                                     List<Object> policyList = mappedPolicies.get(qualifiedIntent);
@@ -320,64 +313,6 @@
     
     public Class<PolicySet> getModelType() {
         return PolicySet.class;
-    }
-    
-    private OMElement loadElement(XMLStreamReader reader) throws XMLStreamException {
-        OMFactory fac = OMAbstractFactory.getOMFactory();
-        OMElement head = fac.createOMElement(reader.getName());
-        OMElement current = head;
-        
-        while (true) {
-            switch (reader.next()) {
-                case XMLStreamConstants.START_ELEMENT:
-                    QName name = reader.getName();
-                    OMElement child = fac.createOMElement(name, current);
-
-                    int count = reader.getNamespaceCount();
-                    for (int i = 0; i < count; i++) {
-                        String prefix = reader.getNamespacePrefix(i);
-                        String ns = reader.getNamespaceURI(i);
-                        child.declareNamespace(ns, prefix);
-                    }
-
-                    if(!"".equals(name.getNamespaceURI())) {
-                        child.declareNamespace(name.getNamespaceURI(), name.getPrefix());
-                    }
-
-                    // add the attributes for this element
-                    count = reader.getAttributeCount();
-                    for (int i = 0; i < count; i++) {
-                        OMNamespace omNs = null;
-                        String ns = reader.getAttributeNamespace(i);
-                        String prefix = reader.getAttributePrefix(i);
-                        String qname = reader.getAttributeLocalName(i);
-                        String value = reader.getAttributeValue(i);
-                        
-                        if ( ns != null ) {
-                            omNs = fac.createOMNamespace(ns, prefix);
-                        }
-                            
-                        child.addAttribute(qname, value, omNs);
-                        if (ns != null) {
-                            child.declareNamespace(ns, prefix);
-                        }
-                    }
-                    current = child;
-                    break;
-                case XMLStreamConstants.CDATA:
-                    fac.createOMText(current, reader.getText());
-                    break;
-                case XMLStreamConstants.CHARACTERS:
-                    fac.createOMText(current, reader.getText());
-                    break;
-                case XMLStreamConstants.END_ELEMENT:
-                    if ( current == head ) {
-                        return head;
-                    } else {
-                        current = (OMElement)current.getParent();
-                    }
-            }
-        }
     }
     
     private void resolveProvidedIntents(PolicySet policySet, ModelResolver resolver) throws
ContributionResolveException {

Modified: incubator/tuscany/branches/sca-java-1.2/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/ReadDocumentTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/ReadDocumentTestCase.java?rev=644060&r1=644059&r2=644060&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.2/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/ReadDocumentTestCase.java
(original)
+++ incubator/tuscany/branches/sca-java-1.2/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/ReadDocumentTestCase.java
Wed Apr  2 14:06:01 2008
@@ -33,7 +33,6 @@
 
 import junit.framework.TestCase;
 
-import org.apache.neethi.Policy;
 import org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
@@ -69,7 +68,6 @@
     public static final String scaNamespace = "http://www.osoa.org/xmlns/sca/1.0";
     public static final String namespace = "http://test";
     
-    private static final QName secureWsPolicy = new QName(namespace, "SecureWSPolicy");
     private static final QName confidentiality = new QName(namespace, "confidentiality");
     private static final QName integrity = new QName(namespace, "integrity");
     private static final QName messageProtection = new QName(namespace, "messageProtection");
@@ -163,7 +161,6 @@
         
         assertNotNull(policySetTable.get(secureMessagingPolicies));
         assertEquals(policySetTable.get(secureMessagingPolicies).getMappedPolicies().size(),
3);
-        assertTrue(policySetTable.get(secureWsPolicy).getPolicies().get(0) instanceof Policy);
         
         assertEquals(bindingTypesTable.size(), 1);
         assertNotNull(bindingTypesTable.get(wsBinding));

Modified: incubator/tuscany/branches/sca-java-1.2/modules/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/modules/pom.xml?rev=644060&r1=644059&r2=644060&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.2/modules/pom.xml (original)
+++ incubator/tuscany/branches/sca-java-1.2/modules/pom.xml Wed Apr  2 14:06:01 2008
@@ -129,12 +129,12 @@
                 <module>osgi-runtime</module>
                 <module>policy</module>
                 <module>policy-xml</module>
+                <module>policy-xml-ws</module>
                 <module>policy-logging</module>
                 <module>policy-security</module>
+                <module>policy-security-ws</module>
                 <module>policy-transaction</module>
                 <module>runtime</module>
-                <!-- module>runtime-geronimo</module -->
-                <!-- module>runtime-standalone</module -->
                 <module>runtime-tomcat</module>
                 <module>runtime-war</module>
                 <module>sca-api</module>



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


Mime
View raw message