| Author |
Axis and HTTP version
|
JeanLouis Marechaux
Ranch Hand
Joined: Nov 12, 2001
Posts: 906
|
|
Hi all, Quite a silly question here...but... I've got one web service which is sending HTTP/1.0 requests. How can it be changed to HTTP/1.1 ? (The webservice is implemented with Axis 1.1)
|
/ JeanLouis<br /><i>"software development has been, is, and will remain fundamentally hard" (Grady Booch)</i><br /> <br />Take a look at <a href="http://www.epfwiki.net/wikis/openup/" target="_blank" rel="nofollow">Agile OpenUP</a> in the Eclipse community
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
Web service sending HTTP 1.0? Is it really so that the client is sending HTTP/1.1 and the server is responding back with HTTP/1.0?
|
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
|
 |
JeanLouis Marechaux
Ranch Hand
Joined: Nov 12, 2001
Posts: 906
|
|
Excuse me Lasse, I acknowledge I was not very clear. Actually, my Axis client (the consumer) sends HTTP/1.0 and the service deployed sends HTTP/1.1 back My consumer is written using Axis 1.1
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
|
Interesting. I wonder whether it's up to the Axis servlet or the underlying web server/container...
|
 |
JeanLouis Marechaux
Ranch Hand
Joined: Nov 12, 2001
Posts: 906
|
|
My understanding is that's it's up to Axis itself. If you take a look at the HTTPSender.jav (axis.jar), you can see there's a test to determine whether http10 or http11 will be used. Moreover, my other understanding is that Axis does not rely on the underlying webapp when it sends request, because it explicitally opens a socket. (still check HTTPSender.java) Maybe I'm wrong somewhere.... Any hint is appreciated.
|
 |
JeanLouis Marechaux
Ranch Hand
Joined: Nov 12, 2001
Posts: 906
|
|
From axis HTTPSender.java My problem is : How can I set the MessageContext.HTTP_TRANSPORT_VERSION to http 1.1. This is a final field I'm sure I am missing something trivial but what....
|
 |
Matt R. Hansen
Ranch Hand
Joined: Sep 05, 2001
Posts: 71
|
|
Jean - I believe it is something like this: Call call = (Call) service.createCall(); //Create a call to the service. call.setScopedProperty(MessageContext.HTTP_TRANSPORT_VERSION, HTTPConstants.HEADER_PROTOCOL_V11); Hope this helps.
|
 |
JeanLouis Marechaux
Ranch Hand
Joined: Nov 12, 2001
Posts: 906
|
|
and IT WORKS !! Now my Axis client sends HTTP/1.1 Where the hell did you find this infomation. The doc is so fuzzy about this !! Anyway, Thank you very much, Matt. This little problem was becoming irritating  [ December 03, 2003: Message edited by: Jean-Louis Marechaux ]
|
 |
Matt R. Hansen
Ranch Hand
Joined: Sep 05, 2001
Posts: 71
|
|
|
 |
Matt R. Hansen
Ranch Hand
Joined: Sep 05, 2001
Posts: 71
|
|
Almost forgot... It is in one of the Axis sample classes.
|
 |
 |
|
|
subject: Axis and HTTP version
|
|
|