Author: darran.lofthouse(a)jboss.com
Date: 2010-05-19 09:37:29 -0400 (Wed, 19 May 2010)
New Revision: 12272
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/StubExt.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java
Log:
[JBPAPP-2142] Enable simpler approach to disable chunked encoding.
Added PROPERTY_CHUNKED_ENCODING_SIZE to StubExt.
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/StubExt.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/StubExt.java 2010-05-19
11:01:17 UTC (rev 12271)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/StubExt.java 2010-05-19
13:37:29 UTC (rev 12272)
@@ -69,6 +69,9 @@
static final String PROPERTY_AUTH_TYPE_WSSE = "org.jboss.ws.authType.wsse";
/** Enable MTOM on the stub */
static final String PROPERTY_MTOM_ENABLED= "org.jboss.ws.mtom.enabled";
+ /** HTTP chunk size */
+ static final String PROPERTY_CHUNKED_ENCODING_SIZE =
"http://org.jboss.ws/http#chunksize";
+
/**
* Add a header that is not bound to an input parameter.
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java 2010-05-19
11:01:17 UTC (rev 12271)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java 2010-05-19
13:37:29 UTC (rev 12272)
@@ -301,7 +301,8 @@
// Enable chunked encoding. This is the default size.
int chunkSizeValue = (chunkedLength != null ? chunkedLength : 1024);
-
+ boolean fastInfosetEnabled = false;
+
// Overwrite, through endpoint config
if (msgContext != null)
{
@@ -313,9 +314,19 @@
chunkSizeValue = Integer.valueOf(sizeValue);
if (epMetaData.isFeatureEnabled(FastInfosetFeature.class))
+ {
+ fastInfosetEnabled = true;
chunkSizeValue = 0;
+ }
}
-
+
+ if (fastInfosetEnabled == false)
+ {
+ String sizeValue =
(String)callProps.get(StubExt.PROPERTY_CHUNKED_ENCODING_SIZE);
+ if (sizeValue != null)
+ chunkSizeValue = Integer.valueOf(sizeValue);
+ }
+
if (chunkSizeValue > 0)
{
clientConfig.put("chunkedLength", String.valueOf(chunkSizeValue));
Show replies by date