axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Charnoky (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Created: (AXIS-2034) CommonsHTTPSender: duplicate SOAPAction when sending SOAPMessage
Date Thu, 02 Jun 2005 14:04:57 GMT
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


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


Mime
View raw message