axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hawkins <HAWKI...@uk.ibm.com>
Subject IHeaderBlockTest7
Date Tue, 15 Feb 2005 18:41:32 GMT
Hi Folks,


There is a new test called IHeaderBlockTest7. It is currently failing (and 
has done since its creation).

It is failing because of the way we delete the children of the 
SOAPHeaderBlock. The SOAPHeaderBlock simply goes down its list of children 
and deletes them. Unfortunately the test is written such that the same 
child is added to the soap HeaderBlock ->

IHeaderBlock *phb = ws.createSOAPHeaderBlock("TestHeader",
"http://ws.apache.org/"); 
                BasicNode * Bnode1=phb->createChild(CHARACTER_NODE,NULL,
NULL,NULL,"APACHE ");
                phb->addChild(Bnode1);
                phb->addChild(Bnode1);

Now, when we destruct the webservice it deletes anything it created 
including the soapheader which tries to delete its children. Which fails 
because it tries to delete the same child twice. 

Now, we could make the destructor safer by checking to see if the child 
its about to delete has not been deleted already. However, I think this is 
somewhat heavy for a destructor and would prefer to simply comment the API 
for basicNode#addChild with :

@param pBasicNode The child node pointer which is to be added. This child 
must not be a pointer to a previously added child.

Which I think is far more sensible. If the user wishes to add in exactly 
the same header (rare?) then they must create a new child.

If no one has any objections I'll make the changes (including changing the 
test)

thanks,
John.
Mime
View raw message