You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2004/06/08 21:45:48 UTC
cvs commit: ws-axis/java/src/org/apache/axis/server server-config.wsdd
dims 2004/06/08 12:45:48
Modified: java/src/org/apache/axis AxisEngine.java
java/src/org/apache/axis/client client-config.wsdd
java/src/org/apache/axis/encoding
SerializationContextImpl.java
java/src/org/apache/axis/server server-config.wsdd
Log:
Fix for AXIS-1377 - newlines, indention .. added to SOAP messages -> breaks xml signature
Notes:
- Added PROP_DISABLE_PRETTY_XML flag
Revision Changes Path
1.113 +2 -1 ws-axis/java/src/org/apache/axis/AxisEngine.java
Index: AxisEngine.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/AxisEngine.java,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -r1.112 -r1.113
--- AxisEngine.java 3 Jun 2004 15:26:41 -0000 1.112
+++ AxisEngine.java 8 Jun 2004 19:45:48 -0000 1.113
@@ -55,6 +55,7 @@
public static final String PROP_DEBUG_LEVEL = "debugLevel";
public static final String PROP_DEBUG_FILE = "debugFile";
public static final String PROP_DOMULTIREFS = "sendMultiRefs";
+ public static final String PROP_DISABLE_PRETTY_XML = "disablePrettyXML";
public static final String PROP_PASSWORD = "adminPassword";
public static final String PROP_SYNC_CONFIG = "syncConfiguration";
public static final String PROP_SEND_XSI = "sendXsiTypes";
@@ -414,7 +415,7 @@
* web services.
*/
private static final String [] BOOLEAN_OPTIONS = new String [] {
- PROP_DOMULTIREFS, PROP_SEND_XSI, PROP_XML_DECL
+ PROP_DOMULTIREFS, PROP_SEND_XSI, PROP_XML_DECL, PROP_DISABLE_PRETTY_XML
};
/**
1.3 +3 -0 ws-axis/java/src/org/apache/axis/client/client-config.wsdd
Index: client-config.wsdd
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/client/client-config.wsdd,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- client-config.wsdd 28 Aug 2002 19:22:56 -0000 1.2
+++ client-config.wsdd 8 Jun 2004 19:45:48 -0000 1.3
@@ -2,6 +2,9 @@
<deployment name="defaultClientConfig"
xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
+ <globalConfiguration>
+ <parameter name="disablePrettyXML" value="true"/>
+ </globalConfiguration>
<transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>
<transport name="local" pivot="java:org.apache.axis.transport.local.LocalSender"/>
<transport name="java" pivot="java:org.apache.axis.transport.java.JavaSender"/>
1.110 +18 -2 ws-axis/java/src/org/apache/axis/encoding/SerializationContextImpl.java
Index: SerializationContextImpl.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/SerializationContextImpl.java,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -r1.109 -r1.110
--- SerializationContextImpl.java 18 May 2004 08:08:55 -0000 1.109
+++ SerializationContextImpl.java 8 Jun 2004 19:45:48 -0000 1.110
@@ -96,7 +96,6 @@
/** The SOAP context we're using */
private SOAPConstants soapConstants = SOAPConstants.SOAP11_CONSTANTS;
- private boolean pretty = false;
private static QName multirefQName = new QName("","multiRef");
private static Class[] SERIALIZER_CLASSES =
new Class[] {String.class, Class.class, QName.class};
@@ -111,8 +110,18 @@
* serializations of identical objects).
*/
private boolean doMultiRefs = false;
+
+ /**
+ * Should I disable the pretty xml completely.
+ */
+ private boolean disablePrettyXML = false;
/**
+ * current setting for pretty
+ */
+ private boolean pretty = false;
+
+ /**
* Should I send an XML declaration?
*/
private boolean sendXMLDecl = true;
@@ -225,6 +234,11 @@
if (shouldSendMultiRefs != null)
doMultiRefs = shouldSendMultiRefs.booleanValue();
+ Boolean shouldDisablePrettyXML =
+ (Boolean)msgContext.getProperty(AxisEngine.PROP_DISABLE_PRETTY_XML);
+ if (shouldDisablePrettyXML != null)
+ disablePrettyXML = shouldDisablePrettyXML.booleanValue();
+
boolean sendTypesDefault = sendXSIType;
// A Literal use operation overrides the above settings. Don't
@@ -278,7 +292,9 @@
* @param pretty true/false
*/
public void setPretty(boolean pretty) {
- this.pretty = pretty;
+ if(!disablePrettyXML) {
+ this.pretty = pretty;
+ }
}
/**
1.17 +1 -0 ws-axis/java/src/org/apache/axis/server/server-config.wsdd
Index: server-config.wsdd
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/server/server-config.wsdd,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- server-config.wsdd 7 Aug 2003 11:31:51 -0000 1.16
+++ server-config.wsdd 8 Jun 2004 19:45:48 -0000 1.17
@@ -5,6 +5,7 @@
xmlns:handler="http://xml.apache.org/axis/wsdd/providers/handler">
<globalConfiguration>
+ <parameter name="disablePrettyXML" value="true"/>
<requestFlow>
<handler type="java:org.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="session"/>