Monday, 4 April 2016

How to set HTTP protocol version in Axis 1x client stubs ?


We can add following code in order to set a specific HTTP protocol version to your calls thorugh your client stub of Axis 1x.
Example
MessageContext msgContext = MessageContext.getCurrentContext();
stub._setProperty(msgContext.HTTP_TRANSPORT_VERSION,  
                    HTTPConstants.HEADER_PROTOCOL_V11);

We can use following properties of HTTPConstants to set HTTP version :
HEADER_PROTOCOL_V11 for HTTP version 1.1
HEADER_PROTOCOL_V10 for HTTP version 1.0

No comments:

Post a Comment

Note: only a member of this blog may post a comment.