Return-Path: Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 83872 invoked by uid 500); 9 Apr 2003 23:10:45 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 83711 invoked from network); 9 Apr 2003 23:10:43 -0000 Date: Wed, 9 Apr 2003 16:10:41 -0700 (PDT) From: Chris Haddad To: "'axis-dev@ws.apache.org'" Subject: RE: cvs commit: xml-axis/java/src/org/apache/axis/client Stub.jav a In-Reply-To: Message-ID: <20030409160628.O27431@icarus.apache.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: localhost 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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()){ > > > > > > > > >