开发者

How to set Axis2 Web Service Client configuration using axis2.xml?

The documentation for Axis2 mentions axis2.xml file for configuration transport settings. However I could not seem to set transport type from HTTP/1.1 to HTTP/1.0 without chunking. 开发者_运维百科I have put axis2.xml file in the classpath, in the same directory but no luck. Where should I put this configuration file in order to change the transport settings?


I believe that the axis2.xml file location can specified as a jvm property parameter:

java MyApp -Daxis2.xml="location of axis2.xml"

or by creating a ConfigurationContext using a ConfigurationContextFactory and passing this to the ServiceClient constructor


you should be able to create a configuration context from the axis2.xml and set it as given above. But your requirement is just to use http 1.0 you can do that like this as well.

serviceClient.getOptions().setProperty(HTTPConstants.HTTP_PROTOCOL_VERSION, HTTPConstants.HEADER_PROTOCOL_10);

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜