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 di...@apache.org on 2004/10/15 18:01:07 UTC

cvs commit: ws-axis/java/src/org/apache/axis/transport/http CommonsHTTPSender.java

dims        2004/10/15 09:01:07

  Modified:    java/src/org/apache/axis/transport/http
                        CommonsHTTPSender.java
  Log:
  Fix for AXIS-1611 - CommonsHTTPSender does not add HTTP error code to fault details
  from Robert H. Pollack (robert_h_pollack@yahoo.com)
  
  Revision  Changes    Path
  1.26      +4 -1      ws-axis/java/src/org/apache/axis/transport/http/CommonsHTTPSender.java
  
  Index: CommonsHTTPSender.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/transport/http/CommonsHTTPSender.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- CommonsHTTPSender.java	19 Jun 2004 21:11:26 -0000	1.25
  +++ CommonsHTTPSender.java	15 Oct 2004 16:01:05 -0000	1.26
  @@ -18,6 +18,7 @@
   import org.apache.axis.AxisFault;
   import org.apache.axis.Message;
   import org.apache.axis.MessageContext;
  +import org.apache.axis.Constants;
   import org.apache.axis.components.logger.LogFactory;
   import org.apache.axis.components.net.CommonsHTTPClientProperties;
   import org.apache.axis.components.net.CommonsHTTPClientPropertiesFactory;
  @@ -201,7 +202,9 @@
                   
                   try {
                       fault.setFaultDetailString(Messages.getMessage("return01",
  -                    "" + returnCode, method.getResponseBodyAsString()));
  +                            "" + returnCode, method.getResponseBodyAsString()));
  +                    fault.addFaultDetail(Constants.QNAME_FAULTDETAIL_HTTPERRORCODE,
  +                            Integer.toString(returnCode));
                       throw fault;
                   } finally {
                       method.releaseConnection(); // release connection back to pool.
  
  
  

RE: cvs commit: ws-axis/java/src/org/apache/axis/transport/http CommonsHTTPSender.java

Posted by Glen Daniels <gl...@thoughtcraft.com>.
Ew.

--Glen 

> -----Original Message-----
> From: Davanum Srinivas [mailto:davanum@gmail.com] 
> Sent: Friday, October 15, 2004 10:09 AM
> To: Glen Daniels
> Cc: ws-axis-cvs@apache.org
> Subject: Re: cvs commit: 
> ws-axis/java/src/org/apache/axis/transport/http CommonsHTTPSender.java
> 
> Glen,
> 
> This code is already in HTTPSender....I was just mirroring 
> what is in HTTPSender to CommonsHTTPSender.
> 
> -- dims
> 
> 
> On Fri, 15 Oct 2004 09:46:15 -0700, Glen Daniels 
> <gl...@thoughtcraft.com> wrote:
> > 
> > What's up with this?  This seems kind of broken to me - layering 
> > violation and all.  Why are we putting the HTTP error code 
> inside the SOAP message??
> > We should never have been doing this, and the HTTP error code is 
> > available in a well-known property name in the 
> MessageContext if you want to get it.
> > 
> > -0.75
> > 
> > --G
> > 
> > > -----Original Message-----
> > > From: dims@apache.org [mailto:dims@apache.org]
> > > Sent: Friday, October 15, 2004 9:01 AM
> > > To: ws-axis-cvs@apache.org
> > > Subject: cvs commit:
> > > ws-axis/java/src/org/apache/axis/transport/http 
> > > CommonsHTTPSender.java
> > >
> > > dims        2004/10/15 09:01:07
> > >
> > >   Modified:    java/src/org/apache/axis/transport/http
> > >                         CommonsHTTPSender.java
> > >   Log:
> > >   Fix for AXIS-1611 - CommonsHTTPSender does not add HTTP 
> error code 
> > > to fault details
> > >   from Robert H. Pollack (robert_h_pollack@yahoo.com)
> > >
> > >   Revision  Changes    Path
> > >   1.26      +4 -1
> > > 
> ws-axis/java/src/org/apache/axis/transport/http/CommonsHTTPSender.ja
> > > va
> > >
> > >   Index: CommonsHTTPSender.java
> > >   
> ===================================================================
> > >   RCS file:
> > > /home/cvs/ws-axis/java/src/org/apache/axis/transport/http/Comm
> > > onsHTTPSender.java,v
> > >   retrieving revision 1.25
> > >   retrieving revision 1.26
> > >   diff -u -r1.25 -r1.26
> > >   --- CommonsHTTPSender.java  19 Jun 2004 21:11:26 -0000      1.25
> > >   +++ CommonsHTTPSender.java  15 Oct 2004 16:01:05 -0000      1.26
> > >   @@ -18,6 +18,7 @@
> > >    import org.apache.axis.AxisFault;
> > >    import org.apache.axis.Message;
> > >    import org.apache.axis.MessageContext;
> > >   +import org.apache.axis.Constants;
> > >    import org.apache.axis.components.logger.LogFactory;
> > >    import 
> org.apache.axis.components.net.CommonsHTTPClientProperties;
> > >    import
> > > org.apache.axis.components.net.CommonsHTTPClientPropertiesFactory;
> > >   @@ -201,7 +202,9 @@
> > >
> > >                    try {
> > >
> > > fault.setFaultDetailString(Messages.getMessage("return01",
> > >   -                    "" + returnCode,
> > > method.getResponseBodyAsString()));
> > >   +                            "" + returnCode,
> > > method.getResponseBodyAsString()));
> > >   +
> > > fault.addFaultDetail(Constants.QNAME_FAULTDETAIL_HTTPERRORCODE,
> > >   +                            Integer.toString(returnCode));
> > >                        throw fault;
> > >                    } finally {
> > >                        method.releaseConnection(); // release 
> > > connection back to pool.
> > >
> > >
> > >
> > >
> > >
> > 
> 
> 
> --
> Davanum Srinivas - http://webservices.apache.org/~dims/
> 
> 

RE: cvs commit: ws-axis/java/src/org/apache/axis/transport/http CommonsHTTPSender.java

Posted by Glen Daniels <gl...@thoughtcraft.com>.
Ew.

--Glen 

> -----Original Message-----
> From: Davanum Srinivas [mailto:davanum@gmail.com] 
> Sent: Friday, October 15, 2004 10:09 AM
> To: Glen Daniels
> Cc: ws-axis-cvs@apache.org
> Subject: Re: cvs commit: 
> ws-axis/java/src/org/apache/axis/transport/http CommonsHTTPSender.java
> 
> Glen,
> 
> This code is already in HTTPSender....I was just mirroring 
> what is in HTTPSender to CommonsHTTPSender.
> 
> -- dims
> 
> 
> On Fri, 15 Oct 2004 09:46:15 -0700, Glen Daniels 
> <gl...@thoughtcraft.com> wrote:
> > 
> > What's up with this?  This seems kind of broken to me - layering 
> > violation and all.  Why are we putting the HTTP error code 
> inside the SOAP message??
> > We should never have been doing this, and the HTTP error code is 
> > available in a well-known property name in the 
> MessageContext if you want to get it.
> > 
> > -0.75
> > 
> > --G
> > 
> > > -----Original Message-----
> > > From: dims@apache.org [mailto:dims@apache.org]
> > > Sent: Friday, October 15, 2004 9:01 AM
> > > To: ws-axis-cvs@apache.org
> > > Subject: cvs commit:
> > > ws-axis/java/src/org/apache/axis/transport/http 
> > > CommonsHTTPSender.java
> > >
> > > dims        2004/10/15 09:01:07
> > >
> > >   Modified:    java/src/org/apache/axis/transport/http
> > >                         CommonsHTTPSender.java
> > >   Log:
> > >   Fix for AXIS-1611 - CommonsHTTPSender does not add HTTP 
> error code 
> > > to fault details
> > >   from Robert H. Pollack (robert_h_pollack@yahoo.com)
> > >
> > >   Revision  Changes    Path
> > >   1.26      +4 -1
> > > 
> ws-axis/java/src/org/apache/axis/transport/http/CommonsHTTPSender.ja
> > > va
> > >
> > >   Index: CommonsHTTPSender.java
> > >   
> ===================================================================
> > >   RCS file:
> > > /home/cvs/ws-axis/java/src/org/apache/axis/transport/http/Comm
> > > onsHTTPSender.java,v
> > >   retrieving revision 1.25
> > >   retrieving revision 1.26
> > >   diff -u -r1.25 -r1.26
> > >   --- CommonsHTTPSender.java  19 Jun 2004 21:11:26 -0000      1.25
> > >   +++ CommonsHTTPSender.java  15 Oct 2004 16:01:05 -0000      1.26
> > >   @@ -18,6 +18,7 @@
> > >    import org.apache.axis.AxisFault;
> > >    import org.apache.axis.Message;
> > >    import org.apache.axis.MessageContext;
> > >   +import org.apache.axis.Constants;
> > >    import org.apache.axis.components.logger.LogFactory;
> > >    import 
> org.apache.axis.components.net.CommonsHTTPClientProperties;
> > >    import
> > > org.apache.axis.components.net.CommonsHTTPClientPropertiesFactory;
> > >   @@ -201,7 +202,9 @@
> > >
> > >                    try {
> > >
> > > fault.setFaultDetailString(Messages.getMessage("return01",
> > >   -                    "" + returnCode,
> > > method.getResponseBodyAsString()));
> > >   +                            "" + returnCode,
> > > method.getResponseBodyAsString()));
> > >   +
> > > fault.addFaultDetail(Constants.QNAME_FAULTDETAIL_HTTPERRORCODE,
> > >   +                            Integer.toString(returnCode));
> > >                        throw fault;
> > >                    } finally {
> > >                        method.releaseConnection(); // release 
> > > connection back to pool.
> > >
> > >
> > >
> > >
> > >
> > 
> 
> 
> --
> Davanum Srinivas - http://webservices.apache.org/~dims/
> 
> 

Re: cvs commit: ws-axis/java/src/org/apache/axis/transport/http CommonsHTTPSender.java

Posted by Davanum Srinivas <da...@gmail.com>.
Glen,

This code is already in HTTPSender....I was just mirroring what is in
HTTPSender to CommonsHTTPSender.

-- dims


On Fri, 15 Oct 2004 09:46:15 -0700, Glen Daniels <gl...@thoughtcraft.com> wrote:
> 
> What's up with this?  This seems kind of broken to me - layering violation
> and all.  Why are we putting the HTTP error code inside the SOAP message??
> We should never have been doing this, and the HTTP error code is available
> in a well-known property name in the MessageContext if you want to get it.
> 
> -0.75
> 
> --G
> 
> > -----Original Message-----
> > From: dims@apache.org [mailto:dims@apache.org]
> > Sent: Friday, October 15, 2004 9:01 AM
> > To: ws-axis-cvs@apache.org
> > Subject: cvs commit:
> > ws-axis/java/src/org/apache/axis/transport/http CommonsHTTPSender.java
> >
> > dims        2004/10/15 09:01:07
> >
> >   Modified:    java/src/org/apache/axis/transport/http
> >                         CommonsHTTPSender.java
> >   Log:
> >   Fix for AXIS-1611 - CommonsHTTPSender does not add HTTP
> > error code to fault details
> >   from Robert H. Pollack (robert_h_pollack@yahoo.com)
> >
> >   Revision  Changes    Path
> >   1.26      +4 -1
> > ws-axis/java/src/org/apache/axis/transport/http/CommonsHTTPSender.java
> >
> >   Index: CommonsHTTPSender.java
> >   ===================================================================
> >   RCS file:
> > /home/cvs/ws-axis/java/src/org/apache/axis/transport/http/Comm
> > onsHTTPSender.java,v
> >   retrieving revision 1.25
> >   retrieving revision 1.26
> >   diff -u -r1.25 -r1.26
> >   --- CommonsHTTPSender.java  19 Jun 2004 21:11:26 -0000      1.25
> >   +++ CommonsHTTPSender.java  15 Oct 2004 16:01:05 -0000      1.26
> >   @@ -18,6 +18,7 @@
> >    import org.apache.axis.AxisFault;
> >    import org.apache.axis.Message;
> >    import org.apache.axis.MessageContext;
> >   +import org.apache.axis.Constants;
> >    import org.apache.axis.components.logger.LogFactory;
> >    import org.apache.axis.components.net.CommonsHTTPClientProperties;
> >    import
> > org.apache.axis.components.net.CommonsHTTPClientPropertiesFactory;
> >   @@ -201,7 +202,9 @@
> >
> >                    try {
> >
> > fault.setFaultDetailString(Messages.getMessage("return01",
> >   -                    "" + returnCode,
> > method.getResponseBodyAsString()));
> >   +                            "" + returnCode,
> > method.getResponseBodyAsString()));
> >   +
> > fault.addFaultDetail(Constants.QNAME_FAULTDETAIL_HTTPERRORCODE,
> >   +                            Integer.toString(returnCode));
> >                        throw fault;
> >                    } finally {
> >                        method.releaseConnection(); // release
> > connection back to pool.
> >
> >
> >
> >
> >
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/

Re: cvs commit: ws-axis/java/src/org/apache/axis/transport/http CommonsHTTPSender.java

Posted by Davanum Srinivas <da...@gmail.com>.
Glen,

This code is already in HTTPSender....I was just mirroring what is in
HTTPSender to CommonsHTTPSender.

-- dims


On Fri, 15 Oct 2004 09:46:15 -0700, Glen Daniels <gl...@thoughtcraft.com> wrote:
> 
> What's up with this?  This seems kind of broken to me - layering violation
> and all.  Why are we putting the HTTP error code inside the SOAP message??
> We should never have been doing this, and the HTTP error code is available
> in a well-known property name in the MessageContext if you want to get it.
> 
> -0.75
> 
> --G
> 
> > -----Original Message-----
> > From: dims@apache.org [mailto:dims@apache.org]
> > Sent: Friday, October 15, 2004 9:01 AM
> > To: ws-axis-cvs@apache.org
> > Subject: cvs commit:
> > ws-axis/java/src/org/apache/axis/transport/http CommonsHTTPSender.java
> >
> > dims        2004/10/15 09:01:07
> >
> >   Modified:    java/src/org/apache/axis/transport/http
> >                         CommonsHTTPSender.java
> >   Log:
> >   Fix for AXIS-1611 - CommonsHTTPSender does not add HTTP
> > error code to fault details
> >   from Robert H. Pollack (robert_h_pollack@yahoo.com)
> >
> >   Revision  Changes    Path
> >   1.26      +4 -1
> > ws-axis/java/src/org/apache/axis/transport/http/CommonsHTTPSender.java
> >
> >   Index: CommonsHTTPSender.java
> >   ===================================================================
> >   RCS file:
> > /home/cvs/ws-axis/java/src/org/apache/axis/transport/http/Comm
> > onsHTTPSender.java,v
> >   retrieving revision 1.25
> >   retrieving revision 1.26
> >   diff -u -r1.25 -r1.26
> >   --- CommonsHTTPSender.java  19 Jun 2004 21:11:26 -0000      1.25
> >   +++ CommonsHTTPSender.java  15 Oct 2004 16:01:05 -0000      1.26
> >   @@ -18,6 +18,7 @@
> >    import org.apache.axis.AxisFault;
> >    import org.apache.axis.Message;
> >    import org.apache.axis.MessageContext;
> >   +import org.apache.axis.Constants;
> >    import org.apache.axis.components.logger.LogFactory;
> >    import org.apache.axis.components.net.CommonsHTTPClientProperties;
> >    import
> > org.apache.axis.components.net.CommonsHTTPClientPropertiesFactory;
> >   @@ -201,7 +202,9 @@
> >
> >                    try {
> >
> > fault.setFaultDetailString(Messages.getMessage("return01",
> >   -                    "" + returnCode,
> > method.getResponseBodyAsString()));
> >   +                            "" + returnCode,
> > method.getResponseBodyAsString()));
> >   +
> > fault.addFaultDetail(Constants.QNAME_FAULTDETAIL_HTTPERRORCODE,
> >   +                            Integer.toString(returnCode));
> >                        throw fault;
> >                    } finally {
> >                        method.releaseConnection(); // release
> > connection back to pool.
> >
> >
> >
> >
> >
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/

RE: cvs commit: ws-axis/java/src/org/apache/axis/transport/http CommonsHTTPSender.java

Posted by Glen Daniels <gl...@thoughtcraft.com>.
What's up with this?  This seems kind of broken to me - layering violation
and all.  Why are we putting the HTTP error code inside the SOAP message??
We should never have been doing this, and the HTTP error code is available
in a well-known property name in the MessageContext if you want to get it.

-0.75

--G 

> -----Original Message-----
> From: dims@apache.org [mailto:dims@apache.org] 
> Sent: Friday, October 15, 2004 9:01 AM
> To: ws-axis-cvs@apache.org
> Subject: cvs commit: 
> ws-axis/java/src/org/apache/axis/transport/http CommonsHTTPSender.java
> 
> dims        2004/10/15 09:01:07
> 
>   Modified:    java/src/org/apache/axis/transport/http
>                         CommonsHTTPSender.java
>   Log:
>   Fix for AXIS-1611 - CommonsHTTPSender does not add HTTP 
> error code to fault details
>   from Robert H. Pollack (robert_h_pollack@yahoo.com)
>   
>   Revision  Changes    Path
>   1.26      +4 -1      
> ws-axis/java/src/org/apache/axis/transport/http/CommonsHTTPSender.java
>   
>   Index: CommonsHTTPSender.java
>   ===================================================================
>   RCS file: 
> /home/cvs/ws-axis/java/src/org/apache/axis/transport/http/Comm
> onsHTTPSender.java,v
>   retrieving revision 1.25
>   retrieving revision 1.26
>   diff -u -r1.25 -r1.26
>   --- CommonsHTTPSender.java	19 Jun 2004 21:11:26 -0000	1.25
>   +++ CommonsHTTPSender.java	15 Oct 2004 16:01:05 -0000	1.26
>   @@ -18,6 +18,7 @@
>    import org.apache.axis.AxisFault;
>    import org.apache.axis.Message;
>    import org.apache.axis.MessageContext;
>   +import org.apache.axis.Constants;
>    import org.apache.axis.components.logger.LogFactory;
>    import org.apache.axis.components.net.CommonsHTTPClientProperties;
>    import 
> org.apache.axis.components.net.CommonsHTTPClientPropertiesFactory;
>   @@ -201,7 +202,9 @@
>                    
>                    try {
>                        
> fault.setFaultDetailString(Messages.getMessage("return01",
>   -                    "" + returnCode, 
> method.getResponseBodyAsString()));
>   +                            "" + returnCode, 
> method.getResponseBodyAsString()));
>   +                    
> fault.addFaultDetail(Constants.QNAME_FAULTDETAIL_HTTPERRORCODE,
>   +                            Integer.toString(returnCode));
>                        throw fault;
>                    } finally {
>                        method.releaseConnection(); // release 
> connection back to pool.
>   
>   
>   
> 
> 

RE: cvs commit: ws-axis/java/src/org/apache/axis/transport/http CommonsHTTPSender.java

Posted by Glen Daniels <gl...@thoughtcraft.com>.
What's up with this?  This seems kind of broken to me - layering violation
and all.  Why are we putting the HTTP error code inside the SOAP message??
We should never have been doing this, and the HTTP error code is available
in a well-known property name in the MessageContext if you want to get it.

-0.75

--G 

> -----Original Message-----
> From: dims@apache.org [mailto:dims@apache.org] 
> Sent: Friday, October 15, 2004 9:01 AM
> To: ws-axis-cvs@apache.org
> Subject: cvs commit: 
> ws-axis/java/src/org/apache/axis/transport/http CommonsHTTPSender.java
> 
> dims        2004/10/15 09:01:07
> 
>   Modified:    java/src/org/apache/axis/transport/http
>                         CommonsHTTPSender.java
>   Log:
>   Fix for AXIS-1611 - CommonsHTTPSender does not add HTTP 
> error code to fault details
>   from Robert H. Pollack (robert_h_pollack@yahoo.com)
>   
>   Revision  Changes    Path
>   1.26      +4 -1      
> ws-axis/java/src/org/apache/axis/transport/http/CommonsHTTPSender.java
>   
>   Index: CommonsHTTPSender.java
>   ===================================================================
>   RCS file: 
> /home/cvs/ws-axis/java/src/org/apache/axis/transport/http/Comm
> onsHTTPSender.java,v
>   retrieving revision 1.25
>   retrieving revision 1.26
>   diff -u -r1.25 -r1.26
>   --- CommonsHTTPSender.java	19 Jun 2004 21:11:26 -0000	1.25
>   +++ CommonsHTTPSender.java	15 Oct 2004 16:01:05 -0000	1.26
>   @@ -18,6 +18,7 @@
>    import org.apache.axis.AxisFault;
>    import org.apache.axis.Message;
>    import org.apache.axis.MessageContext;
>   +import org.apache.axis.Constants;
>    import org.apache.axis.components.logger.LogFactory;
>    import org.apache.axis.components.net.CommonsHTTPClientProperties;
>    import 
> org.apache.axis.components.net.CommonsHTTPClientPropertiesFactory;
>   @@ -201,7 +202,9 @@
>                    
>                    try {
>                        
> fault.setFaultDetailString(Messages.getMessage("return01",
>   -                    "" + returnCode, 
> method.getResponseBodyAsString()));
>   +                            "" + returnCode, 
> method.getResponseBodyAsString()));
>   +                    
> fault.addFaultDetail(Constants.QNAME_FAULTDETAIL_HTTPERRORCODE,
>   +                            Integer.toString(returnCode));
>                        throw fault;
>                    } finally {
>                        method.releaseConnection(); // release 
> connection back to pool.
>   
>   
>   
> 
>