summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/policy-wspolicy
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2011-07-05 08:26:12 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2011-07-05 08:26:12 +0000
commitf07051ecf40f234baf3f6b7f897abc0322dda4d4 (patch)
tree06e59590d442ea69eb911176993cdad9ab9e8d65 /sca-java-2.x/trunk/modules/policy-wspolicy
parente14213fce7c1427b333d3f19c7bcc362cb020d98 (diff)
TUSCANY-3881 - Tidy up the binding context and test by re-enabling Rampart support in the ws binding so that WS policy can be applied. For the time being it only demonstrates integrity.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1142920 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/policy-wspolicy')
-rw-r--r--sca-java-2.x/trunk/modules/policy-wspolicy/pom.xml63
-rw-r--r--sca-java-2.x/trunk/modules/policy-wspolicy/src/main/java/org/apache/tuscany/sca/policy/wspolicy/xml/WSPolicyProcessor.java12
2 files changed, 40 insertions, 35 deletions
diff --git a/sca-java-2.x/trunk/modules/policy-wspolicy/pom.xml b/sca-java-2.x/trunk/modules/policy-wspolicy/pom.xml
index 388fa4ad40..608ca2671c 100644
--- a/sca-java-2.x/trunk/modules/policy-wspolicy/pom.xml
+++ b/sca-java-2.x/trunk/modules/policy-wspolicy/pom.xml
@@ -36,26 +36,24 @@
<version>2.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-assembly-xml</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
+
<dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-contribution</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <groupId>org.apache.neethi</groupId>
+ <artifactId>neethi</artifactId>
+ <version>2.0.4</version>
+ <exclusions>
+ <exclusion>
+ <groupId>wsdl4j</groupId>
+ <artifactId>wsdl4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-core-spi</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-api</artifactId>
<version>1.2.10</version>
@@ -76,24 +74,12 @@
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.apache.neethi</groupId>
- <artifactId>neethi</artifactId>
- <version>2.0.4</version>
- <exclusions>
- <exclusion>
- <groupId>wsdl4j</groupId>
- <artifactId>wsdl4j</artifactId>
- </exclusion>
<exclusion>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>wstx-asl</artifactId>
- </exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-stax-api_1.0_spec</artifactId>
+ </exclusion>
</exclusions>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
@@ -105,9 +91,17 @@
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-stax-api_1.0_spec</artifactId>
+ </exclusion>
</exclusions>
</dependency>
-
+<!--
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
@@ -119,7 +113,8 @@
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
- </dependency>
+ </dependency>
+-->
</dependencies>
</project>
diff --git a/sca-java-2.x/trunk/modules/policy-wspolicy/src/main/java/org/apache/tuscany/sca/policy/wspolicy/xml/WSPolicyProcessor.java b/sca-java-2.x/trunk/modules/policy-wspolicy/src/main/java/org/apache/tuscany/sca/policy/wspolicy/xml/WSPolicyProcessor.java
index 48bf932c27..cbc234bc47 100644
--- a/sca-java-2.x/trunk/modules/policy-wspolicy/src/main/java/org/apache/tuscany/sca/policy/wspolicy/xml/WSPolicyProcessor.java
+++ b/sca-java-2.x/trunk/modules/policy-wspolicy/src/main/java/org/apache/tuscany/sca/policy/wspolicy/xml/WSPolicyProcessor.java
@@ -97,7 +97,13 @@ public class WSPolicyProcessor extends BaseStAXArtifactProcessor implements
// normalize the neethi tree so we can easily identify
// the policy alternatives
- neethiPolicy.normalize(true);
+/* Messes up the hierarchy if rampart config policies included
+ try {
+ neethiPolicy.normalize(true);
+ } catch (UnsupportedOperationException ex){
+ // RampartConfig policies don't support this yet
+ }
+*/
// top-level children of ExactlyOne are policy alternatives so
// for each child create a policy model list and pull the
@@ -138,6 +144,10 @@ public class WSPolicyProcessor extends BaseStAXArtifactProcessor implements
XMLStreamWriter writer = outputFactory.createXMLStreamWriter(outputStream);
policyComponent.serialize(writer);
+ writer.flush();
+ writer.close();
+ outputStream.flush();
+ outputStream.close();
ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
XMLStreamReader reader = inputFactory.createXMLStreamReader(inputStream);