axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Extending the current code and copy constructors
Date Tue, 25 May 2004 11:30:46 GMT
Why dont you pass those header blocks as constant objects ?. If you
delegate implicit object creation to copy constructors of the stub class,
in order to do a deep copy all the header blocks and objects inside it too
should have copy constructors.

But I dont think I have a good understanding of you client application. I
would prefer adding the header block explicitly to every stub object. and
deleting them at the stub level it self explicitly.


> Hi All,
>     As I mentioned earlier, I am in the process of developing a Stub class
> on top of which I could
> set transport properties and SOAP headers.
>     Unfortunately I have run into unexpected difficulties due to the fact
> that some classes do not
> have copy constructors.
>      As an example, if I try to crate a set of Header Blocks and try to
> reapply the same set of
> headers to subsequent calls, only the first call succeds and the client
> segfaults after that. The
> reason is that when I pass the pointer of HeaderBlock to SoapSerializer,
> it owns the pointer and
> deletes it. But I do want to keep my copy as I want to apply the same
> header to all calls.
>      If I were to have copy constructors that does a deep copy of the
> objects, I could have solved
> the problem by passing a copy.
>      Please make sure you write copy constructors for the classes that you
> create in the future,
> so that the code could be made extensible with minimal effort in the
> future.
> Thaka,
> Samisa...
> __________________________________
> Do you Yahoo!?
> Friends.  Fun.  Try the all-new Yahoo! Messenger.

View raw message