reta commented on code in PR #3721:
URL: https://github.com/apache/cxf/pull/3721#discussion_r4587453767


##########
rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/encoded/SoapArrayType.java:
##########
@@ -39,15 +39,29 @@
 import org.apache.cxf.aegis.xml.MessageWriter;
 import org.apache.cxf.binding.soap.Soap11;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.SystemPropertyAction;
 import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.message.Message;
 import org.apache.ws.commons.schema.XmlSchema;
 
 import static 
org.apache.cxf.aegis.type.encoded.SoapEncodingUtil.readAttributeValue;
 
 public class SoapArrayType extends AegisType {
+    /**
+     * The maximum total number of elements of the SOAP encoded arrays read 
from a message. Each array is
+     * created at the size declared in its arrayType attribute, however many 
elements are actually sent,
+     * so this limits the memory a message can make the service allocate. The 
default is 1000000, and a
+     * negative value means no limit. It can be set as a message (endpoint or 
client) property, or as a
+     * system property.
+     */
+    public static final String MAX_ARRAY_ELEMENTS = 
"org.apache.cxf.aegis.encoded.maxArrayElements";

Review Comment:
   > How about mirroring the StAX limits (maxChildElements/maxElementCount) 
instead:
   
   +1, I think this is even better option, thanks @coheigea 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to