[ http://issues.apache.org/jira/browse/AXIS-2034?page=all ]
Jayachandra Sekhara Rao Sunkara updated AXIS-2034: -------------------------------------------------- Attachment: 2034_commonsHTTPSender.patch Yes Michael! you got it right. HEADER_CONTENT_TYPE and HEADER_SOAP_ACTION are being set once, and while transforming the mime headers of request message to HTTP headers because of not having this check header duplication is happening. I've made a patch for this bug and am uploading it in the cvs -q diff -u format. The patch is created from the src/org/apache/axis/transport/http directory against latest CVS. Thank you Jayachandra > CommonsHTTPSender: duplicate SOAPAction when sending SOAPMessage > ---------------------------------------------------------------- > > Key: AXIS-2034 > URL: http://issues.apache.org/jira/browse/AXIS-2034 > Project: Axis > Type: Bug > Components: SAAJ > Versions: 1.2 > Environment: Linux (Fedora Core 3) > Java 1.4.2_08 > Axis 1.2 (final) > Commons HttpClient 3.0rc2 > Reporter: Michael Charnoky > Assignee: Venkat Reddy > Attachments: 2034_commonsHTTPSender.patch > > I am using Axis 1.2 (final) with the Commons HTTPClient 3.0rc2. I > am using these libraries to create a SOAP client using the SAAJ API. When I > send a SOAPMessage, the http headers contain two copies of the SOAPAction. > There seems to be a bug in org.apache.axis.transport.http.CommonsHTTPSender. > Here is what is happening: > 1) Create a SOAPMessage > 2) set the SOAPAction MIME header in a SOAPMessage: > soapMsg.getMimeHeaders().setHeader("SOAPAction", "someaction"); > 3) Invoke SOAPConnection.call(). The "SOAPAction" gets written to the http > headers two times. > My client code has always worked fine in the past when using the Sun SAAJ > implementation and when using the standard Axis HttpSender. This problem > only showed up when I switched to using the CommonsHTTPSender. > It looks like the CommonsHTTPSender is missing some logic which can be found > in HttpSender. Here is a patch against Axis 1.2 (final) which fixes the > problem. > 477a478,482 > > String headerName = mimeHeader.getName(); > > if (headerName.equals(HTTPConstants.HEADER_CONTENT_TYPE) || > > headerName.equals(HTTPConstants.HEADER_SOAP_ACTION)) { > > continue; > > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira