Hi Guys, Am facing a very peculiar problem while trying to set HTTP headers from axis2 1.3api. Setting some HTTP headers works while others do not. The following two work like a charm,
_serviceClient.getOptions().setProperty(org.apache.axis2.transport.http. HTTPConstants.HTTP_PROTOCOL_VERSION, org.apache.axis2.transport.http.HTTPConstants.HEADER_PROTOCOL_10); _serviceClient.getOptions().setProperty(org.apache.axis2.transport.http. HTTPConstants.CHUNKED, Boolean.FALSE); But this just does not work and this is what I need for my application problem, _serviceClient.getOptions().setProperty(org.apache.axis2.transport.http. HTTPConstants.HEADER_CONNECTION, org.apache.axis2.transport.http.HTTPConstants.HEADER_CONNECTION_CLOSE); Is there some thing that am missing or is it some bug that needs to be fixed.Could someone please help me out here. BACKGROUND: I have Axis2 running in an ear deployed on JBOSS. There is a thread that creates SOAP requests and sends them using a stub generated client to a MockService hosted on SoapUI. All of them co-exist on the same machine. I am facing a strange problem in the sense that the thread always throws SocketTimeOut exception (which results in the thread resending the packet twice again). But SoapUI displays all three messages after a long time. However this is not consistent behavior as the same message comes perfectly sometimes but times out at other times. I presume SoapUI is still waiting for some more input from the connection and hence the time out exception. I changed the HTTP protocol version in Axis2.xml to 1.0 and this problem does not occur. Am guessing it is because of 1.1persistent connections. However changing to 1.0 would mean losing out on all the enhancements which is not correct. Hence am trying to close the connection for every request but thats not working as mentioned above. Please suggest any alternatives as am working against a deadline. :o( Thanks a lot in advance Regards, Pritam Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com