I am trying to fix axis2 to work on servlets 2.3 again. Step one, (uncommited) is to bind the build to servletapi-2.3.jar, and not geronimo.

This shows up the sole problem as ServletBasedOutTransportInfo, which is used in

CommonsHTTPTransportSender. invoke

                        omOutput.setSoap11(msgContext.isSOAP11());

transportInfo.setCharacterEncoding(omOutput.getCharSetEncoding());

transportInfo.setContentType(omOutput.getContentType());

As the javadocs say on setCharacterEncoding

"Calling setContentType(java.lang.String) with the String of text/html and calling this method with the String of UTF-8 is equivalent with calling setContentType with the String of text/html; charset=UTF-8."

Doing this makes CommonsHttpTransportSender as follows:
String encoding= omOutput.getContentType() +"; charset="+ omOutput.getCharSetEncoding();
                        transportInfo.setContentType(encoding);

Which will still work. Question is, what to do about ServletBasedOutTransportInfo? Delete the setCharacterEncoding entirely, or downgrade it to a no-op. Nobody is using the method once the change above is applied.

Reply via email to