Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 39135 invoked from network); 14 Jan 2005 14:13:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 14 Jan 2005 14:13:48 -0000 Received: (qmail 64076 invoked by uid 500); 14 Jan 2005 14:13:48 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 64056 invoked by uid 500); 14 Jan 2005 14:13:48 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 64043 invoked by uid 99); 14 Jan 2005 14:13:47 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mtagate3.uk.ibm.com (HELO mtagate3.uk.ibm.com) (195.212.29.136) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 14 Jan 2005 06:13:45 -0800 Received: from d06nrmr1407.portsmouth.uk.ibm.com (d06nrmr1407.portsmouth.uk.ibm.com [9.149.38.185]) by mtagate3.uk.ibm.com (8.12.10/8.12.10) with ESMTP id j0EEDf5M297028 for ; Fri, 14 Jan 2005 14:13:41 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1407.portsmouth.uk.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j0EEE4IT128456 for ; Fri, 14 Jan 2005 14:14:04 GMT Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.12.11/8.12.11) with ESMTP id j0EEDfUK029002 for ; Fri, 14 Jan 2005 14:13:41 GMT Received: from d06ml063.portsmouth.uk.ibm.com (d06ml063.portsmouth.uk.ibm.com [9.149.38.83]) by d06av02.portsmouth.uk.ibm.com (8.12.11/8.12.11) with ESMTP id j0EEDfrC028994 for ; Fri, 14 Jan 2005 14:13:41 GMT In-Reply-To: <1105609154.8400.13.camel@localhost.localdomain> Subject: Re: IHandlerSoapSerializer->getHeaderBlock() To: "Apache AXIS C Developers List" X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: From: Andrew Perry2 Date: Fri, 14 Jan 2005 14:18:00 +0000 X-MIMETrack: Serialize by Router on D06ML063/06/M/IBM(Release 6.51HF338 | June 21, 2004) at 14/01/2005 14:13:56 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Roshan, Thanks for creating the new getCurrentHeaderBlock() method as it makes things clearer. The getHeaderBlock(name, namespace) method does not seem to reposition the HeaderBlock iterator and it is not clear from the API documentation what the correct outcome should be. The output of my test is: getFirstHeaderBlock() - hb1:child(1) - Value = Test1 getNextHeaderBlock() - hb2:child(1) - Value = Test2 getNextHeaderBlock() - hb3:child(1) - Value = Test3 getNextHeaderBlock() - HeaderBlock is NULL getHeaderBlock("hb2", namespace) - hb2:child(1) - Value = Test2 getCurrentHeaderBlock() - HeaderBlock is NULL getHeaderBlock("hb3", namespace) - hb3:child(1) - Value = Test3 getHeaderBlock("hb1", namespace) - hb1:child(1) - Value = Test1 getFirstHeaderBlock() - hb1:child(1) - Value = Test1 getNextHeaderBlock() - hb2:child(1) - Value = Test2 getCurrentHeaderBlock() - hb2:child(1) - Value = Test2 As can be seen a call to getHeaderBlock(name, namespace) returns the correct header block, but a call the getCurrentHeaderBlock() does not return the same block just returned. This may be completely valid but the API docs should be updated to say that the HeaderBlock iterator is not effected by this call. Regards, Andrew Perry IBM Web Services Client for C/C++ perryan@uk.ibm.com Mail Point 127 IBM UK Laboratories. Hursley Park, Winchester, Hants. SO21 2JN Tel. Internal 249828 External + 44 (0)1962 819828 Fax. + 44(0)1962 818080 Roshan Weerasuriya wrote on 13/01/2005 09:39:15: > hi Andrew, > > > 2) If getFirstHeaderBlock() has been called and any number of > > > getNextHeaderBlock() calls have been made, getHeaderBlock() always returns > > > the first header block, but doesn't reposition in the list like > > > getFirstHeaderBlock() does. So what's the point of > getHeaderBlock()? Can it > > > be removed? > > Ok, I added a new method called "getCurrentHeaderBlock()". Also I > commented the method "getHeaderBlock()", and put a comment stating that > this method has to be removed. When I checkd I found that > "IHandlerSoapSerializer->getHeaderBlock()" is not used any where in the > code. > > Roshan > > On Thu, 2005-01-13 at 13:11, Roshan Weerasuriya wrote: > > hi Andrew, > > > > 1) If it is called before getFirstHeaderBlock() is called the > > > handler/client just crashes without an exception (SIGSEGV). Should just > > > return NULL. > > > > I tested this in both linux and window just before writing this mail. > > And it works fine. It just returns NULL. The following the code in my > > client handler. > > > > //-----code in my invoke method of the client handler > > .. > > .... > > } else { > > /*this is a request*/ > > > > IHandlerSoapSerializer* pISZ; > > pIMsg->getSoapSerializer(&pISZ); > > > > //---added on 13Jan2005 > > IHeaderBlock* pIHB = pISZ->getHeaderBlock(); > > //----end added > > > > IHeaderBlock* pIHeaderBlock= pISZ->createHeaderBlock(); > > > > pIHeaderBlock->setLocalName("echoMeString"); > > > > pIHeaderBlock->setUri("http://soapinterop.org/echoheader/"); > > > > string tmp; > > > > if (pIHB == NULL) { > > tmp = "is null"; > > } else { > > tmp = "is not null"; > > } > > > > const AxisChar* pachHeaderVal = tmp.c_str(); > > > > BasicNode* pBasicNode = > > pIHeaderBlock->createChild(CHARACTER_NODE); > > pBasicNode->setValue(pachHeaderVal); > > > > pIHeaderBlock->addChild(pBasicNode); > > ..... > > ....... > > //-----end of code in my invoke method of the client handler > > > > It gives me the folloiwng out put > > > > > > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > > xmlns:ns2="http://soapinterop.org/echoheader/">is > > null > > ... > > ..... > > > > So it returns NULL and works fine for me. It doesn't crash both windows > > and linux. > > > > Roshan > > > > On Wed, 2005-01-12 at 22:14, Andrew Perry2 wrote: > > > > > > > > > I'm writing function tests for all the handler and related APIs and was > > > wondering what the IHandlerSoapSerializer->getHeaderBlock() API > is meant to > > > do. This is the method with no parameters. > > > > > > 2 problems. > > > > > > 1) If it is called before getFirstHeaderBlock() is called the > > > handler/client just crashes without an exception (SIGSEGV). Should just > > > return NULL. > > > > > > 2) If getFirstHeaderBlock() has been called and any number of > > > getNextHeaderBlock() calls have been made, getHeaderBlock() always returns > > > the first header block, but doesn't reposition in the list like > > > getFirstHeaderBlock() does. So what's the point of > getHeaderBlock()? Can it > > > be removed? > > > > > > If there is a point to keeping it then I'll raise a jira about problem 1. > > > > > > Comments please. > > > > > > Regards, > > > > > > Andrew Perry > > > IBM C/C++ Web Services Client > > > perryan@uk.ibm.com > > > Mail Point 127 > > > IBM UK Laboratories. Hursley Park, Winchester, Hants. SO21 2JN > > > Tel. Internal 249828 External + 44 (0)1962 819828 > > > Fax. + 44(0)1962 818080 > > > > > > > > > > >