You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by di...@apache.org on 2006/10/14 20:36:15 UTC
svn commit: r463986 - in /webservices/commons/trunk/modules/neethi: pom.xml
src/main/java/org/apache/neethi/PolicyReference.java
Author: dims
Date: Sat Oct 14 11:36:13 2006
New Revision: 463986
URL: http://svn.apache.org/viewvc?view=rev&rev=463986
Log:
fix for AXIS2-1374 - WSDL's with policy references cause the WSDL2Java to fail with an UnsupportedOperationException thrown by the PolicyReference class
Modified:
webservices/commons/trunk/modules/neethi/pom.xml
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyReference.java
Modified: webservices/commons/trunk/modules/neethi/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/neethi/pom.xml?view=diff&rev=463986&r1=463985&r2=463986
==============================================================================
--- webservices/commons/trunk/modules/neethi/pom.xml (original)
+++ webservices/commons/trunk/modules/neethi/pom.xml Sat Oct 14 11:36:13 2006
@@ -254,6 +254,21 @@
<artifactId>wstx-asl</artifactId>
<version>2.9.3</version>
</dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.0.4</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>avalon-framework</artifactId>
+ <groupId>avalon-framework</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>logkit</artifactId>
+ <groupId>logkit</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
</dependencies>
<reporting>
<plugins>
Modified: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyReference.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyReference.java?view=diff&rev=463986&r1=463985&r2=463986
==============================================================================
--- webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyReference.java (original)
+++ webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyReference.java Sat Oct 14 11:36:13 2006
@@ -15,6 +15,8 @@
*/
package org.apache.neethi;
+import org.apache.ws.policy.PolicyConstants;
+
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
@@ -61,7 +63,25 @@
}
public void serialize(XMLStreamWriter writer) throws XMLStreamException {
- throw new UnsupportedOperationException();
+ String writerPrefix = writer
+ .getPrefix(PolicyConstants.POLICY_NAMESPACE_URI);
+ if (writerPrefix != null) {
+ writer.writeStartElement(PolicyConstants.POLICY_NAMESPACE_URI,
+ PolicyConstants.POLICY_REFERENCE);
+ } else {
+
+ writer.writeStartElement(PolicyConstants.POLICY_PREFIX,
+ PolicyConstants.POLICY_REFERENCE,
+ PolicyConstants.POLICY_NAMESPACE_URI);
+ writer.writeNamespace(PolicyConstants.POLICY_PREFIX,
+ PolicyConstants.POLICY_NAMESPACE_URI);
+ writer.setPrefix(PolicyConstants.POLICY_PREFIX,
+ PolicyConstants.POLICY_NAMESPACE_URI);
+
+ }
+ writer.writeAttribute("URI", uri);
+
+ writer.writeEndElement();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org