How to turn off HTTP chunking in Apache Axis2?
Apache Axis2 by default allow HTTP content to be chunked. This causes the SOAP request to be broken up into chunks and caused our webservice to return last cached results disregarding symbol, username…etc. So a request of IDX could return results for RUT. Following is some sample code that shows how to turn off HTTP chunking before calling our web services: XigniteRealTimeStub stub = new XigniteRealTimeStub(“http://www.xignite.com/xRealTime.asmx”); // Begin – code to turn off HTTP chunking Options options = stub._getServiceClient().getOptions(); options.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); stub._getServiceClient().setOptions( options ); // End – code to turn off HTTP chunking GetRealQuote quote = new GetRealQuote(); quote.setExchange(ECNTypes.INET); quote.setSymbol(symbol); Header3 header = new Header3(); Header h = new Header(); h.setUsername(“yourusername”); h.setPassword(“yourpassword”); // Note: if you set the tracer with a different