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 Glen Daniels <gd...@macromedia.com> on 2003/04/10 16:36:15 UTC

Default behavior for Call/Stub headers

> Should headers set in the Stub be sent for every *request*?
> Example:
>  Stub.setHeader("user", "foo");
>  Stub.myOperation(...);  // header "user" sent
>  Stub.myOtherOp(...); // should the "user" header be sent again?
> 
> I can see a case both ways, but I think I prefer to require 
> request headers be set for each operation.  This doesn't 
> violate the principle of least surprise.  

Yeah, I pretty much agree with you here, Tom.  I think there's a call for an easy to use "Module" or "Extension" object which you can programatically drop in on the client side - that could take care of providing a nice API for dealing with things which have rules about persistent headers.

For now I think it should come down to - the user can set headers manually on Stubs/Calls, and those headers will be sent on only the next request.  If you want to send them again, you either set them again on your client-side object (Stub/Call) or you use a client-side Handler to do the work for you (like the SimpleSessionHandler).

For 1.1, I'd propose we remove the "reflect back the response headers" code to fix the session bug and the potential other ones.  Then we can fix/decide on the right request header behavior post-1.1.  Thoughts?

--Glen

Re: Default behavior for Call/Stub headers

Posted by Steve Loughran <st...@iseran.com>.
Glen Daniels wrote:

> For 1.1, I'd propose we remove the "reflect back the response headers" code to fix the session bug and the potential other ones.  Then we can fix/decide on the right request header behavior post-1.1.  Thoughts?

+1. I agree there is a bug here, but it it is too late to do any 
non-trivial fixes in the code.



Re: Default behavior for Call/Stub headers

Posted by Chris Haddad <ha...@apache.org>.
done.  reponse headers will no longer be automagically reflected back into
the Stub's list of headers.

/Chris


On Fri, 11 Apr 2003, Sanjiva Weerawarana wrote:

> "Glen Daniels" <gd...@macromedia.com> writes:
>
> > For 1.1, I'd propose we remove the "reflect back the response headers"
> code to fix the session bug and the potential other ones.  Then we can
> fix/decide on the right request header behavior post-1.1.  Thoughts?
> >
> > --Glen
>
> +1.
>
> Sanjiva.
>
>

Re: Default behavior for Call/Stub headers

Posted by Sanjiva Weerawarana <sa...@watson.ibm.com>.
"Glen Daniels" <gd...@macromedia.com> writes:

> For 1.1, I'd propose we remove the "reflect back the response headers"
code to fix the session bug and the potential other ones.  Then we can
fix/decide on the right request header behavior post-1.1.  Thoughts?
>
> --Glen

+1.

Sanjiva.