I want to compress XML in Flex, send it to Java, decompress it in Java and recompress it in Java, resend it to Flex, decompress it and use i开发者_JS百科t. How to do please ? thnx
Just use an AMF Gateway which is a binary format and gives much smaller transfer sizes for your data.
Look into BlazeDS and/or LiveCycle. I believe it is possible to send XML over an AMF Gateway, although most of hte time I take advantage of the built in "Backend Object to AS Object" translation,
Just turn on gzip in your server. Then requests and responses will be automatically gzipped across the wire. In Tomcat add the compression property to the server config, like:
<Connector protocol="HTTP/1.1" port="8080" connectionTimeout="20000"
redirectPort="8443" compression="force" maxThreads="500"
minSpareThreads="100" maxSpareThreads="75"/>
精彩评论