axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Haddad <hadd...@apache.org>
Subject RE: cvs commit: xml-axis/java/src/org/apache/axis/client Stub.jav a
Date Wed, 09 Apr 2003 23:10:41 GMT
Glen -

If headers should be persisted in the stub across service calls, then we
should be checking for a duplicate element names before we add another
header to the list.

The end-result of the current code is to create two list elements with the
same name.  each call to the service will concatenate more elements onto
the list.

my first thought, which i'll check in if agreed, was to actually check the
list to determine if an element was present containing the same QName as
the response header.   We would then update the item in place rather than
adding a new, duplicate element.

is this the correct approach that you'd like to see?

/Chris




On Wed, 9 Apr 2003, Glen Daniels wrote:

>
> Chris:
>
> Why does clearing the request headers, which we often do want to persist (the user is
free to call clearHeaders() manually), have anything to do with getting the response headers?
>
> -1 to this change.
>
> --G
>
> > -----Original Message-----
> > From: haddadc@apache.org [mailto:haddadc@apache.org]
> > Sent: Wednesday, April 09, 2003 6:04 PM
> > To: xml-axis-cvs@apache.org
> > Subject: cvs commit: xml-axis/java/src/org/apache/axis/client
> > Stub.java
> >
> >
> > haddadc     2003/04/09 15:04:09
> >
> >   Modified:    java/src/org/apache/axis/client Stub.java
> >   Log:
> >   added a call to Stub.clearHeaders() in
> > Stub.getResponseHeaders() to clear out any stale response headers.
> >
> >   PR: 18854
> >
> >   Revision  Changes    Path
> >   1.24      +3 -1
> > xml-axis/java/src/org/apache/axis/client/Stub.java
> >
> >   Index: Stub.java
> >   ===================================================================
> >   RCS file:
> > /home/cvs/xml-axis/java/src/org/apache/axis/client/Stub.java,v
> >   retrieving revision 1.23
> >   retrieving revision 1.24
> >   diff -u -r1.23 -r1.24
> >   --- Stub.java	24 Mar 2003 23:13:01 -0000	1.23
> >   +++ Stub.java	9 Apr 2003 22:04:09 -0000	1.24
> >   @@ -410,7 +410,9 @@
> >        protected void
> > getResponseHeaders(org.apache.axis.client.Call call) throws
> > AxisFault {
> >            org.apache.axis.Message response =
> > call.getMessageContext().getResponseMessage();
> >            org.apache.axis.message.SOAPEnvelope env =
> > response.getSOAPEnvelope();
> >   -
> >   +        // clear out existing headers
> >   +        // this is important because a stub is reused
> > across service calls
> >   +        clearHeaders();
> >            if ( env != null )	{
> >                Iterator iterator = env.getHeaders().iterator();
> >                while(iterator.hasNext()){
> >
> >
> >
> >
>

Mime
View raw message