axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manohar K Chintala <cmano...@in.ibm.com>
Subject Regarding deleteSOAPHeaderBlock() API
Date Wed, 19 Jan 2005 11:28:08 GMT




Hi Roshan,

I've been writing tests for SOAPHeaderBlock realted APIs in Stub class.  I
have observed that when deleteSOAPHeaderBlock(IHeaderBlock *pHeaderBlock)
is used to delete first soap header block then iterator is pointed to the
next/second header block automatically. Where as  when
deleteSOAPHeaderBlock(IHeaderBlock *pHeaderBlock) is used to delete the
second header block, similarly iterator is not pointed to the first header
block.

As given in the API docs, after using deleteSOAPHeaderBlock(IHeaderBlock
*pHeaderBlock) API if I call  getFirstSOAPHeaderBlock() API the iterator is
reinitialized and points to the first header block and it works fine.

Here is the code which explains this.


code 1

  IHeaderBlock *header = NULL;
   header = ws.getFirstSOAPHeaderBlock();
   ws.deleteSOAPHeaderBlock(ws.getCurrentSOAPHeaderBlock());
   ws.deleteCurrentSOAPHeaderBlock();

As per code 1, iterator is automatically pointed to the second header
block.

code 2
   IHeaderBlock *header = NULL;
   header = ws.getFirstSOAPHeaderBlock();
   header = ws.getNextSOAPHeaderBlock();
   ws.deleteSOAPHeaderBlock(ws.getCurrentSOAPHeaderBlock());
   ws.deleteCurrentSOAPHeaderBlock();

As per code 2, iterator is not pointed back to first header blcok
automatically after deleting the second header block.

My question is, shouldn't the iterator point back to the first header block
automatically after deleting the second header block similar to how  it
gets pointed to the second header block automatically deleting the first
header bolck ?

Regards
Manohar
--------------------------------------------------
Manohar Kumar.Ch
IBM C/C++ Web Services Client
India Software Labs,III floor, Golden Enclave,
Aiport Road, Bangalore-560017
Ph:- 91-80-25094304
internet id: cmanohar@in.ibm.com


Mime
View raw message