You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by na...@apache.org on 2008/10/15 08:11:45 UTC
svn commit: r704786 - in
/webservices/axis2/trunk/java/modules/mtompolicy/src/org/apache/axis2/policy/model:
MTOM10Assertion.java MTOM11Assertion.java
Author: nandana
Date: Tue Oct 14 23:11:45 2008
New Revision: 704786
URL: http://svn.apache.org/viewvc?rev=704786&view=rev
Log:
namespace prefix is not serialized
Modified:
webservices/axis2/trunk/java/modules/mtompolicy/src/org/apache/axis2/policy/model/MTOM10Assertion.java
webservices/axis2/trunk/java/modules/mtompolicy/src/org/apache/axis2/policy/model/MTOM11Assertion.java
Modified: webservices/axis2/trunk/java/modules/mtompolicy/src/org/apache/axis2/policy/model/MTOM10Assertion.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/mtompolicy/src/org/apache/axis2/policy/model/MTOM10Assertion.java?rev=704786&r1=704785&r2=704786&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/mtompolicy/src/org/apache/axis2/policy/model/MTOM10Assertion.java (original)
+++ webservices/axis2/trunk/java/modules/mtompolicy/src/org/apache/axis2/policy/model/MTOM10Assertion.java Tue Oct 14 23:11:45 2008
@@ -4,12 +4,20 @@
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.neethi.Constants;
import org.apache.neethi.PolicyComponent;
-/** Assertion to pick up the QName <wsoma:OptimizedMimeSerialization xmlns:wsoma="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization"/> */
+/**
+ * Assertion to pick up the QName <wsoma:OptimizedMimeSerialization
+ * xmlns:wsoma="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization"/>
+ */
public class MTOM10Assertion extends MTOMAssertion {
+ // creating a logger instance
+ private static Log log = LogFactory.getLog(MTOM10Assertion.class);
+
public final static String NS = "http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization";
public final static String MTOM_SERIALIZATION_CONFIG_LN = "OptimizedMimeSerialization";
@@ -38,8 +46,10 @@
writer.writeStartElement(PREFIX, MTOM_SERIALIZATION_CONFIG_LN, NS);
- if (optional)
- writer.writeAttribute("Optional", "true");
+ if (optional) {
+ writer.writeAttribute(Constants.ATTR_WSP, null,
+ Constants.Q_ELEM_OPTIONAL_ATTR.getLocalPart(), "true");
+ }
writer.writeNamespace(PREFIX, NS);
writer.writeEndElement();
Modified: webservices/axis2/trunk/java/modules/mtompolicy/src/org/apache/axis2/policy/model/MTOM11Assertion.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/mtompolicy/src/org/apache/axis2/policy/model/MTOM11Assertion.java?rev=704786&r1=704785&r2=704786&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/mtompolicy/src/org/apache/axis2/policy/model/MTOM11Assertion.java (original)
+++ webservices/axis2/trunk/java/modules/mtompolicy/src/org/apache/axis2/policy/model/MTOM11Assertion.java Tue Oct 14 23:11:45 2008
@@ -4,11 +4,16 @@
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.neethi.Constants;
import org.apache.neethi.PolicyComponent;
public class MTOM11Assertion extends MTOMAssertion {
-
+
+ // creating a logger instance
+ private static Log log = LogFactory.getLog(MTOM11Assertion.class);
+
public final static String NS = "http://www.w3.org/2007/08/soap12-mtom-policy";
public final static String MTOM_LN = "MTOM";
@@ -33,12 +38,14 @@
writer.writeStartElement(PREFIX, MTOM_LN, NS);
- if (optional)
- writer.writeAttribute("Optional", "true");
+ if (optional) {
+ writer.writeAttribute(Constants.ATTR_WSP, null,
+ Constants.Q_ELEM_OPTIONAL_ATTR.getLocalPart(), "true");
+ }
writer.writeNamespace(PREFIX, NS);
writer.writeEndElement();
-
+
}
public boolean equal(PolicyComponent policyComponent) {