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 2003/03/29 23:40:25 UTC

cvs commit: xml-axis/java/src/org/apache/axis/transport/http AxisServlet.java

dims        2003/03/29 14:40:25

  Modified:    java/src/org/apache/axis/transport/http AxisServlet.java
  Log:
  Under some conditions the Response Message is null...Throw an exception if this is the case.
  
  Revision  Changes    Path
  1.159     +4 -0      xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java
  
  Index: AxisServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java,v
  retrieving revision 1.158
  retrieving revision 1.159
  diff -u -r1.158 -r1.159
  --- AxisServlet.java	1 Feb 2003 21:03:01 -0000	1.158
  +++ AxisServlet.java	29 Mar 2003 22:40:25 -0000	1.159
  @@ -857,6 +857,10 @@
                       t2=System.currentTimeMillis();
                   }
                   responseMsg = msgContext.getResponseMessage();
  +                if (responseMsg == null) {
  +                    //tell everyone that something is wrong
  +                    throw new Exception(Messages.getMessage("noResponse01"));
  +                }
               } catch (AxisFault fault) {
                   //log and sanitize
                   processAxisFault(fault);
  
  
  

Re: cvs commit: xml-axis/java/src/org/apache/axis/transport/http AxisServlet.java

Posted by Steve Loughran <st...@iseran.com>.
Davanum Srinivas wrote:
> Steve,
> 
> My scenario was this...I had a client-handler and a server-handler (both JAXRPC handlers). The
> client handler adds some context information in the soap headers and the server handler has a
> check to ensure that the context is present. If the context was absent handleRequest on the server
> handler returns false. In this case there was a NPE thrown because there was no response message. 
> 
> I don't think this was due to developer incompetence :)
> 
> Thanks,
> dims
> 



was the NPE happening server side, here? If so the NPE is a regression 
introduced in the SOAP1.2 patches:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17790

If you skip around the NPE, you end up with the next problem, to wit the 
client doesnt handle it:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18024

I think in your scenario, an exception is the right thing to throw. But 
for one-way messages & WS-routing, we do want to be able to return 'no 
content' happily.


Re: cvs commit: xml-axis/java/src/org/apache/axis/transport/http AxisServlet.java

Posted by Davanum Srinivas <di...@yahoo.com>.
Steve,

My scenario was this...I had a client-handler and a server-handler (both JAXRPC handlers). The
client handler adds some context information in the soap headers and the server handler has a
check to ensure that the context is present. If the context was absent handleRequest on the server
handler returns false. In this case there was a NPE thrown because there was no response message. 

I don't think this was due to developer incompetence :)

Thanks,
dims

--- Steve Loughran <st...@iseran.com> wrote:
> 
> I know right now this only happens in a fit of developer incompetence(*),
> but we may want to permit this. Assuming this is related to the bug I've
> filed on this, I'm happy with it being in Axis1.1, but we may need to do
> something else in axis1.2 for one-way messages.
> 
> -steve
> 
> 
> (*) in my case some proto dispose() methods in things like messagecontext
> kicking in too early.
> 
> ----- Original Message -----
> From: <di...@apache.org>
> To: <xm...@apache.org>
> Sent: Saturday, March 29, 2003 14:40
> Subject: cvs commit: xml-axis/java/src/org/apache/axis/transport/http
> AxisServlet.java
> 
> 
> > dims        2003/03/29 14:40:25
> >
> >   Modified:    java/src/org/apache/axis/transport/http AxisServlet.java
> >   Log:
> >   Under some conditions the Response Message is null...Throw an exception
> if this is the case.
> >
> >   Revision  Changes    Path
> >   1.159     +4 -0
> xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java
> >
> >   Index: AxisServlet.java
> >   ===================================================================
> >   RCS file:
> /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java,
> v
> >   retrieving revision 1.158
> >   retrieving revision 1.159
> >   diff -u -r1.158 -r1.159
> >   --- AxisServlet.java 1 Feb 2003 21:03:01 -0000 1.158
> >   +++ AxisServlet.java 29 Mar 2003 22:40:25 -0000 1.159
> >   @@ -857,6 +857,10 @@
> >                        t2=System.currentTimeMillis();
> >                    }
> >                    responseMsg = msgContext.getResponseMessage();
> >   +                if (responseMsg == null) {
> >   +                    //tell everyone that something is wrong
> >   +                    throw new
> Exception(Messages.getMessage("noResponse01"));
> >   +                }
> >                } catch (AxisFault fault) {
> >                    //log and sanitize
> >                    processAxisFault(fault);
> >
> >
> >
> >
> 


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

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

Re: cvs commit: xml-axis/java/src/org/apache/axis/transport/http AxisServlet.java

Posted by Steve Loughran <st...@iseran.com>.
I know right now this only happens in a fit of developer incompetence(*),
but we may want to permit this. Assuming this is related to the bug I've
filed on this, I'm happy with it being in Axis1.1, but we may need to do
something else in axis1.2 for one-way messages.

-steve


(*) in my case some proto dispose() methods in things like messagecontext
kicking in too early.

----- Original Message -----
From: <di...@apache.org>
To: <xm...@apache.org>
Sent: Saturday, March 29, 2003 14:40
Subject: cvs commit: xml-axis/java/src/org/apache/axis/transport/http
AxisServlet.java


> dims        2003/03/29 14:40:25
>
>   Modified:    java/src/org/apache/axis/transport/http AxisServlet.java
>   Log:
>   Under some conditions the Response Message is null...Throw an exception
if this is the case.
>
>   Revision  Changes    Path
>   1.159     +4 -0
xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java
>
>   Index: AxisServlet.java
>   ===================================================================
>   RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java,
v
>   retrieving revision 1.158
>   retrieving revision 1.159
>   diff -u -r1.158 -r1.159
>   --- AxisServlet.java 1 Feb 2003 21:03:01 -0000 1.158
>   +++ AxisServlet.java 29 Mar 2003 22:40:25 -0000 1.159
>   @@ -857,6 +857,10 @@
>                        t2=System.currentTimeMillis();
>                    }
>                    responseMsg = msgContext.getResponseMessage();
>   +                if (responseMsg == null) {
>   +                    //tell everyone that something is wrong
>   +                    throw new
Exception(Messages.getMessage("noResponse01"));
>   +                }
>                } catch (AxisFault fault) {
>                    //log and sanitize
>                    processAxisFault(fault);
>
>
>
>