You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Michael Charnoky (JIRA)" <ax...@ws.apache.org> on 2005/06/02 16:04:57 UTC

[jira] Created: (AXIS-2034) CommonsHTTPSender: duplicate SOAPAction when sending SOAPMessage

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


[jira] Assigned: (AXIS-2034) CommonsHTTPSender: duplicate SOAPAction when sending SOAPMessage

Posted by "Jayachandra Sekhara Rao Sunkara (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2034?page=all ]

Jayachandra Sekhara Rao Sunkara reassigned AXIS-2034:
-----------------------------------------------------

    Assign To: Jayachandra Sekhara Rao Sunkara  (was: Venkat Reddy)

> 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: Jayachandra Sekhara Rao Sunkara
>  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


[jira] Assigned: (AXIS-2034) CommonsHTTPSender: duplicate SOAPAction when sending SOAPMessage

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2034?page=all ]

Davanum Srinivas reassigned AXIS-2034:
--------------------------------------

    Assign To: Venkat Reddy

> 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

>
> 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


[jira] Updated: (AXIS-2034) CommonsHTTPSender: duplicate SOAPAction when sending SOAPMessage

Posted by "Jayachandra Sekhara Rao Sunkara (JIRA)" <ax...@ws.apache.org>.
     [ 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


[jira] Resolved: (AXIS-2034) CommonsHTTPSender: duplicate SOAPAction when sending SOAPMessage

Posted by "Jayachandra Sekhara Rao Sunkara (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2034?page=all ]
     
Jayachandra Sekhara Rao Sunkara resolved AXIS-2034:
---------------------------------------------------

    Resolution: Fixed

Applied patch

> 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: Jayachandra Sekhara Rao Sunkara
>  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