Re: Axis 1.4 configuration to use HTTP/1.1
Hello again Jeff! That did the trick. The configuration I was trying to set on the Call object directly before was incorrect and was causing the multiple requests and the incorrect transport of the actual call. I appreciate the help with this, and thanks to Shadab as well! Mario- - Original Message From: "Walker, Jeff" <[EMAIL PROTECTED]> To: axis-user@ws.apache.org Sent: Monday, October 8, 2007 11:27:23 AM Subject: RE: Axis 1.4 configuration to use HTTP/1.1 DIV { MARGIN:0px;} Hi Mario, Shadab got his problem solved. (He wanted to use HTTP 1.1 in Axis 1.4 and do it programmmatically on the clientside). the solution he emailed to me is: Hi Jeff, Thank you so much for all the info.. I have succesfully implemented the second alternative of using - CommonsHTTPSender as the Transport Sender of the axis client, viz., BasicClientConfig basicClientConfig = new BasicClientConfig(); SimpleChain simpleChain = new SimpleChain(); simpleChain.addHandler(new CommonsHTTPSender()); basicClientConfig.deployTransport("http", simpleChain); LogonService_Service logonService = new LogonService_ServiceLocator(basicClientConfig); and in the server-config.wsdd I added the pivot="java:org.apache.axis.transport.http.CommonsHTTPSender" Cheers, Shadab But your issue is the three requests, where one is in http 1.0 and the other two are http 1.1. Correct? If so, I still think you are registering two handlers (that use CommonsSender and hence http 1.1) and the default HTTPSender is called in the middle to send it using HTTP 1.0. If that is also true, then the programmatic registering of the two handlers is incorrect. -jeff From: Mario Felarca [mailto:[EMAIL PROTECTED] Sent: Monday, October 08, 2007 11:56 AM To: axis-user@ws.apache.org Subject: Re: Axis 1.4 configuration to use HTTP/1.1 Hello Shadab! Sorry I was not able to reply to this until now. I was trying to set the configuration of the client-side transport to utilize CommonsHTTPSender via settings on the Call object. That was not working. Jeff had given me some alternatives to try, such as setting the properties on the client-side EngineConfiguration. Unfortunately, I have not had the chance to try that yet as another project took precedence. Hopefully I can try that out later today or tomorrow and get back to the list with my results. Were you able to make some progress on this front in a different direction? Thanks! Mario- - Original Message From: Shadab <[EMAIL PROTECTED]> To: axis-user@ws.apache.org Sent: Wednesday, October 3, 2007 2:36:50 AM Subject: Axis 1.4 configuration to use HTTP/1.1 Hi All, Please let me know if there is any way to configure Axis1.4 such that it uses HTTP/1.1 instead of HTTP/1.0 The request from the soapclient (implemented using service stub) lands with Axis/1.4 which in turn by default presumably uses HTTP/1.0. Can't this be changed somehow using CommonsHTTPSender as pointed by mail thread of Mario/Jeff "Axis 1.4 CommonsHTTPSender question" Date Sep:20:2007 ? Mario/Jeff, Please let me know if you people have reached some solution and will that solution be helpful in the scenario I have told above... Thanks, Shadab -- View this message in context: http://www.nabble.com/Axis-1.4-configuration-to-use-HTTP-1.1-tf4560281.html#a13014221 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis 1.4 configuration to use HTTP/1.1
Hello Jeff! Thank you for the information. This seems similar conceptually to the direction you were pointing me in earlier, correct? I'll give it a shot. You are correct, the other issue I had was the 3 requests instead of one, however you may be right that the issues were related. I'll make this change first and go from there. Thanks again for the help! Mario- - Original Message From: "Walker, Jeff" <[EMAIL PROTECTED]> To: axis-user@ws.apache.org Sent: Monday, October 8, 2007 11:27:23 AM Subject: RE: Axis 1.4 configuration to use HTTP/1.1 DIV { MARGIN:0px;} Hi Mario, Shadab got his problem solved. (He wanted to use HTTP 1.1 in Axis 1.4 and do it programmmatically on the clientside). the solution he emailed to me is: Hi Jeff, Thank you so much for all the info.. I have succesfully implemented the second alternative of using - CommonsHTTPSender as the Transport Sender of the axis client, viz., BasicClientConfig basicClientConfig = new BasicClientConfig(); SimpleChain simpleChain = new SimpleChain(); simpleChain.addHandler(new CommonsHTTPSender()); basicClientConfig.deployTransport("http", simpleChain); LogonService_Service logonService = new LogonService_ServiceLocator(basicClientConfig); and in the server-config.wsdd I added the pivot="java:org.apache.axis.transport.http.CommonsHTTPSender" Cheers, Shadab But your issue is the three requests, where one is in http 1.0 and the other two are http 1.1. Correct? If so, I still think you are registering two handlers (that use CommonsSender and hence http 1.1) and the default HTTPSender is called in the middle to send it using HTTP 1.0. If that is also true, then the programmatic registering of the two handlers is incorrect. -jeff From: Mario Felarca [mailto:[EMAIL PROTECTED] Sent: Monday, October 08, 2007 11:56 AM To: axis-user@ws.apache.org Subject: Re: Axis 1.4 configuration to use HTTP/1.1 Hello Shadab! Sorry I was not able to reply to this until now. I was trying to set the configuration of the client-side transport to utilize CommonsHTTPSender via settings on the Call object. That was not working. Jeff had given me some alternatives to try, such as setting the properties on the client-side EngineConfiguration. Unfortunately, I have not had the chance to try that yet as another project took precedence. Hopefully I can try that out later today or tomorrow and get back to the list with my results. Were you able to make some progress on this front in a different direction? Thanks! Mario- - Original Message From: Shadab <[EMAIL PROTECTED]> To: axis-user@ws.apache.org Sent: Wednesday, October 3, 2007 2:36:50 AM Subject: Axis 1.4 configuration to use HTTP/1.1 Hi All, Please let me know if there is any way to configure Axis1.4 such that it uses HTTP/1.1 instead of HTTP/1.0 The request from the soapclient (implemented using service stub) lands with Axis/1.4 which in turn by default presumably uses HTTP/1.0. Can't this be changed somehow using CommonsHTTPSender as pointed by mail thread of Mario/Jeff "Axis 1.4 CommonsHTTPSender question" Date Sep:20:2007 ? Mario/Jeff, Please let me know if you people have reached some solution and will that solution be helpful in the scenario I have told above... Thanks, Shadab -- View this message in context: http://www.nabble.com/Axis-1.4-configuration-to-use-HTTP-1.1-tf4560281.html#a13014221 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Axis 1.4 configuration to use HTTP/1.1
Hi Mario, Shadab got his problem solved. (He wanted to use HTTP 1.1 in Axis 1.4 and do it programmmatically on the clientside). the solution he emailed to me is: Hi Jeff, Thank you so much for all the info.. I have succesfully implemented the second alternative of using - CommonsHTTPSender as the Transport Sender of the axis client, viz., BasicClientConfig basicClientConfig = new BasicClientConfig(); SimpleChain simpleChain = new SimpleChain(); simpleChain.addHandler(new CommonsHTTPSender()); basicClientConfig.deployTransport("http", simpleChain); LogonService_Service logonService = new LogonService_ServiceLocator(basicClientConfig); and in the server-config.wsdd I added the pivot="java:org.apache.axis.transport.http.CommonsHTTPSender" Cheers, Shadab But your issue is the three requests, where one is in http 1.0 and the other two are http 1.1. Correct? If so, I still think you are registering two handlers (that use CommonsSender and hence http 1.1) and the default HTTPSender is called in the middle to send it using HTTP 1.0. If that is also true, then the programmatic registering of the two handlers is incorrect. -jeff _ From: Mario Felarca [mailto:[EMAIL PROTECTED] Sent: Monday, October 08, 2007 11:56 AM To: axis-user@ws.apache.org Subject: Re: Axis 1.4 configuration to use HTTP/1.1 Hello Shadab! Sorry I was not able to reply to this until now. I was trying to set the configuration of the client-side transport to utilize CommonsHTTPSender via settings on the Call object. That was not working. Jeff had given me some alternatives to try, such as setting the properties on the client-side EngineConfiguration. Unfortunately, I have not had the chance to try that yet as another project took precedence. Hopefully I can try that out later today or tomorrow and get back to the list with my results. Were you able to make some progress on this front in a different direction? Thanks! Mario- - Original Message From: Shadab <[EMAIL PROTECTED]> To: axis-user@ws.apache.org Sent: Wednesday, October 3, 2007 2:36:50 AM Subject: Axis 1.4 configuration to use HTTP/1.1 Hi All, Please let me know if there is any way to configure Axis1.4 such that it uses HTTP/1.1 instead of HTTP/1.0 The request from the soapclient (implemented using service stub) lands with Axis/1.4 which in turn by default presumably uses HTTP/1.0. Can't this be changed somehow using CommonsHTTPSender as pointed by mail thread of Mario/Jeff "Axis 1.4 CommonsHTTPSender question" Date Sep:20:2007 ? Mario/Jeff, Please let me know if you people have reached some solution and will that solution be helpful in the scenario I have told above... Thanks, Shadab -- View this message in context: http://www.nabble.com/Axis-1.4-configuration-to-use-HTTP-1.1-tf4560281.h tml#a13014221 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis 1.4 configuration to use HTTP/1.1
Hello Shadab! Sorry I was not able to reply to this until now. I was trying to set the configuration of the client-side transport to utilize CommonsHTTPSender via settings on the Call object. That was not working. Jeff had given me some alternatives to try, such as setting the properties on the client-side EngineConfiguration. Unfortunately, I have not had the chance to try that yet as another project took precedence. Hopefully I can try that out later today or tomorrow and get back to the list with my results. Were you able to make some progress on this front in a different direction? Thanks! Mario- - Original Message From: Shadab <[EMAIL PROTECTED]> To: axis-user@ws.apache.org Sent: Wednesday, October 3, 2007 2:36:50 AM Subject: Axis 1.4 configuration to use HTTP/1.1 Hi All, Please let me know if there is any way to configure Axis1.4 such that it uses HTTP/1.1 instead of HTTP/1.0 The request from the soapclient (implemented using service stub) lands with Axis/1.4 which in turn by default presumably uses HTTP/1.0. Can't this be changed somehow using CommonsHTTPSender as pointed by mail thread of Mario/Jeff "Axis 1.4 CommonsHTTPSender question" Date Sep:20:2007 ? Mario/Jeff, Please let me know if you people have reached some solution and will that solution be helpful in the scenario I have told above... Thanks, Shadab -- View this message in context: http://www.nabble.com/Axis-1.4-configuration-to-use-HTTP-1.1-tf4560281.html#a13014221 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Axis 1.4 configuration to use HTTP/1.1
Using Commons HTTP client with Axis By default Apache Axis 1.4 uses 'org.apache.axis.transport.http.HTTPSender' for http sending. It is possible to change this to use 'org.apache.commons.httpclient'. Change the transport pivot attribute in the configuration to point to the CommonsHTTPSender class. The following is an example of an axis client configuration file. http://xml.apache.org/axis/wsdd/"; xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";> You also need to add the common.codec.1.3.jar and common-httpclient-3.0-rc4.jar to the jar directory. http://jakarta.apache.org/commons/ http://jakarta.apache.org/commons/httpclient/ http://jakarta.apache.org/commons/httpclient/features.html http://jakarta.apache.org/site/downloads/downloads_commons.html http://jakarta.apache.org/commons/httpclient/logging.html By default commons http client uses HTTP protocol 1.1 and by default it uses chunked transfer encoding. When a HTTP client program sends Transfer-Encoding chunked, it cannot send Content-Length. You can also programmatically switch back to HTTP/1.0 by using the following code. stub._setProperty ( org.apache.axis.MessageContext.HTTP_TRANSPORT_VERSION , org.apache.axis.transport.http.HTTPConstants.HEADER_PROTOCOL_V10); === -Original Message- From: Walker, Jeff [mailto:[EMAIL PROTECTED] Sent: Thursday, 4 October 2007 2:35 AM To: axis-user@ws.apache.org Subject: RE: Axis 1.4 configuration to use HTTP/1.1 Hi, So, I tried playing around with the http version. Theoretically, you should be able to set a property on the binding (or at least, the Call object) to switch between http 1.0 and http 1.1 This did not work. I could only manage to change to http 1.1 by editing the method writeToSocket() in HTTPSender where it says: String httpver = msgContext.getStrProp(MessageContext.HTTP_TRANSPORT_VERSION); if (null == httpver) { httpver = HTTPConstants.HEADER_PROTOCOL_V10; } To String httpver = msgContext.getStrProp(MessageContext.HTTP_TRANSPORT_VERSION); if (null == httpver) { httpver = HTTPConstants.HEADER_PROTOCOL_V11; } Note how all I did was change the httpver variable. The issue is, you then need to recompile Axis to pick up the change in HTTPSender. To get around the fact we are supposed to use the binary distribution and can't recompile Axis, I wrote my own class that extends HTTPSender and then over rode the writeToSocket() method. I simply cut and pasted that method in its entirety to the equivalent method in my class and edited the line I mentioned above. The next step is to make sure you pick up your sender and not the default HTTPSender. You can do this by edting the client-config.wsdd file to pick up your class like this: Client-config.wsdd: http://xml.apache.org/axis/wsdd/"; xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";> Where my class is obviously called FMRHTTPSender. After all that, it worked. - As a much easier alternative, CommonsHTTPSender by default uses http 1.1. So, simply create a client-config.wsdd file and pick up the Commons sender. Something like this should work: http://xml.apache.org/axis/wsdd/"; xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";> The above commons sender also worked for me. Cheers, -jeff -Original Message- From: Shadab [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 03, 2007 3:37 AM To: axis-user@ws.apache.org Subject: Axis 1.4 configuration to use HTTP/1.1 Hi All, Please let me know if there is any way to configure Axis1.4 such that it uses HTTP/1.1 instead of HTTP/1.0 The request from the soapclient (implemented using service stub) lands with Axis/1.4 which in turn by default presumably uses HTTP/1.0. Can't this be changed somehow using CommonsHTTPSender as pointed by mail thread of Mario/Jeff "Axis 1.4 CommonsHTTPSender question" Date Sep:20:2007 ? Mario/Jeff, Please let me know if you people have reached some solution and will that solution be helpful in the scenario I have told above... Thanks, Shadab -- View this message in context: http://www.nabble.com/Axis-1.4-configuration-to-use-HTTP-1.1-tf4560281.h tml#a13014221 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Axis 1.4 configuration to use HTTP/1.1
Hi, So, I tried playing around with the http version. Theoretically, you should be able to set a property on the binding (or at least, the Call object) to switch between http 1.0 and http 1.1 This did not work. I could only manage to change to http 1.1 by editing the method writeToSocket() in HTTPSender where it says: String httpver = msgContext.getStrProp(MessageContext.HTTP_TRANSPORT_VERSION); if (null == httpver) { httpver = HTTPConstants.HEADER_PROTOCOL_V10; } To String httpver = msgContext.getStrProp(MessageContext.HTTP_TRANSPORT_VERSION); if (null == httpver) { httpver = HTTPConstants.HEADER_PROTOCOL_V11; } Note how all I did was change the httpver variable. The issue is, you then need to recompile Axis to pick up the change in HTTPSender. To get around the fact we are supposed to use the binary distribution and can't recompile Axis, I wrote my own class that extends HTTPSender and then over rode the writeToSocket() method. I simply cut and pasted that method in its entirety to the equivalent method in my class and edited the line I mentioned above. The next step is to make sure you pick up your sender and not the default HTTPSender. You can do this by edting the client-config.wsdd file to pick up your class like this: Client-config.wsdd: http://xml.apache.org/axis/wsdd/"; xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";> Where my class is obviously called FMRHTTPSender. After all that, it worked. - As a much easier alternative, CommonsHTTPSender by default uses http 1.1. So, simply create a client-config.wsdd file and pick up the Commons sender. Something like this should work: http://xml.apache.org/axis/wsdd/"; xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";> The above commons sender also worked for me. Cheers, -jeff -Original Message- From: Shadab [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 03, 2007 3:37 AM To: axis-user@ws.apache.org Subject: Axis 1.4 configuration to use HTTP/1.1 Hi All, Please let me know if there is any way to configure Axis1.4 such that it uses HTTP/1.1 instead of HTTP/1.0 The request from the soapclient (implemented using service stub) lands with Axis/1.4 which in turn by default presumably uses HTTP/1.0. Can't this be changed somehow using CommonsHTTPSender as pointed by mail thread of Mario/Jeff "Axis 1.4 CommonsHTTPSender question" Date Sep:20:2007 ? Mario/Jeff, Please let me know if you people have reached some solution and will that solution be helpful in the scenario I have told above... Thanks, Shadab -- View this message in context: http://www.nabble.com/Axis-1.4-configuration-to-use-HTTP-1.1-tf4560281.h tml#a13014221 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]