You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Adrian Dick <ad...@uk.ibm.com> on 2004/07/21 14:11:19 UTC

Removal of prefix from HeaderBlock




Hi,

Having just moved up to the 1.2 release of the Axis C++ code, we've found
that it is no longer possible to specify a prefix on HeaderBlocks.  This
causes us significant problem, as the backend server (not an Axis C++
server) expects the HeaderBlocks to be of a specific prefix - not the one
generated during serialization.

We are currently using the following 2 methods of adding SOAPHeaderBlocks
   From within the stub
   stub->createSOAPHeaderBlock
   From within a handler
   IHandlerSoapSerializer->createHeaderBlock
For both methods it was previously possible to assign a prefix to the
HeaderBlock either during construction or through the setPrefix method.

Why have the methods to assign a prefix been removed from HeaderBlock, and
in turn the createSOAPHeader methods in Call and Stub?

The only comment I can see on this change is in HeaderBlock.cpp in the
commented out setPrefix method:
   The prefix should be decided by the Serializer at runtime
Surely, this is wrong! It should be decided by the Serializer at runtime,
only if one has not been specified.

As this is affecting us now, we would appreciate a speedy response.

Thanks,
Adrian
_______________________________________
Adrian Dick (adrian.dick@uk.ibm.com)


Re: Removal of prefix from HeaderBlock

Posted by Samisa Abeysinghe <sa...@yahoo.com>.
--- Adrian Dick <ad...@uk.ibm.com> wrote:
> 
> 
> 
> 
> Hi,
> 
> Having just moved up to the 1.2 release of the Axis C++ code, we've found
> that it is no longer possible to specify a prefix on HeaderBlocks.  This
> causes us significant problem, as the backend server (not an Axis C++
> server) expects the HeaderBlocks to be of a specific prefix - not the one
> generated during serialization.
> 
> We are currently using the following 2 methods of adding SOAPHeaderBlocks
>    From within the stub
>    stub->createSOAPHeaderBlock
>    From within a handler
>    IHandlerSoapSerializer->createHeaderBlock
> For both methods it was previously possible to assign a prefix to the
> HeaderBlock either during construction or through the setPrefix method.
> 
> Why have the methods to assign a prefix been removed from HeaderBlock, and
> in turn the createSOAPHeader methods in Call and Stub?
> 
> The only comment I can see on this change is in HeaderBlock.cpp in the
> commented out setPrefix method:
>    The prefix should be decided by the Serializer at runtime
> Surely, this is wrong! It should be decided by the Serializer at runtime,
> only if one has not been specified.
> 

Sounds like the prefix is required as a parameter.
Is it possible to add the older api back to the code?

One idea; As more people are trying to use Axis C++ project, it is not a good idea to drop API
calls all the sudden, even if they have problems. 
Rahter Axis C++ team need to adopt a 'deprecate' methodology where older APIs are phased out
gradually. 
However, in this case it is not a problem of phasing out; rhather keeping it to make the API
flexible enough for developers.

Thanks,
Samisa...

> As this is affecting us now, we would appreciate a speedy response.
> 
> Thanks,
> Adrian
> _______________________________________
> Adrian Dick (adrian.dick@uk.ibm.com)
> 
> 



	
		
__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/

Re: Removal of prefix from HeaderBlock

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
"Susantha Kumara" <su...@opensource.lk> writes:
>
> I explained this API change by 
> 
> http://marc.theaimsgroup.com/?l=axis-c-dev&m=108718759228531&w=2
> 
> But there was no feedback for this mail.

Sorry, my mistake .. you did give advance warning and rationale!

In the future please do an @deprecate for at least one version 
before removing anything; that will inform the users that something
is going to change and give a chance to adapt (or complain loudly).

Sanjiva.

RE: Removal of prefix from HeaderBlock

Posted by Susantha Kumara <su...@opensource.lk>.
I explained this API change by 

http://marc.theaimsgroup.com/?l=axis-c-dev&m=108718759228531&w=2

But there was no feedback for this mail.

> -----Original Message-----
> From: Sanjiva Weerawarana [mailto:sanjiva@opensource.lk]
> Sent: Thursday, July 22, 2004 10:18 AM
> To: Apache AXIS C Developers List
> Subject: Re: Removal of prefix from HeaderBlock
> 
> "Susantha Kumara" <su...@opensource.lk> writes:
> >
> > IMO if a server is expecting a specific prefix it is wrong. It is
the
> > namespace that is represented by a prefix is important. Please
correct
> > me if I am wrong.
> 
> +1.
> 
> There may be crappy servers that only work with certain prefixes ..
> that server is broken but if you have to interop with it then there
> isn't much choice.
> 
> > The namespace prefixes that are automatically added by the
Serializer
> > are in form ns<n> where n is the sequence number.
> >
> > So if any stub or handler adds a prefix of that kind there can be
> > namespace prefix conflicts. This api change was aimed at avoiding
this
> > kind of conflicts.
> 
> Yes there is indeed such a risk .. the solution is to say that the
> prefix given when registering a namespace is *desired* prefix. If
> that prefix is already in use then an auto generated one can be used.
> If its not in use, then there's no reason not to use it.

We can change the APIs back to enable setting *desired* namespace
prefixes. But this is not a lasting solution because if the namespace
prefix is in use and the Serializer puts dynamically generated prefix
again that particular server will fail.

Susantha.

> 
> In any case, if the API existed before then removing it should be
> done after lots of flags and warnings .. otherwise anyone who depended
> on it is screwed.
> 
> The suggestion Samisa made of "deprecating" old APIs before removing
> is very good. Maybe doxygen supports something like the @deprecated
> tag??
> 
> Sanjiva.


Re: Removal of prefix from HeaderBlock

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
"Susantha Kumara" <su...@opensource.lk> writes:
> 
> IMO if a server is expecting a specific prefix it is wrong. It is the
> namespace that is represented by a prefix is important. Please correct
> me if I am wrong.

+1.

There may be crappy servers that only work with certain prefixes ..
that server is broken but if you have to interop with it then there
isn't much choice.

> The namespace prefixes that are automatically added by the Serializer
> are in form ns<n> where n is the sequence number.
> 
> So if any stub or handler adds a prefix of that kind there can be
> namespace prefix conflicts. This api change was aimed at avoiding this
> kind of conflicts.

Yes there is indeed such a risk .. the solution is to say that the
prefix given when registering a namespace is *desired* prefix. If
that prefix is already in use then an auto generated one can be used.
If its not in use, then there's no reason not to use it.

In any case, if the API existed before then removing it should be
done after lots of flags and warnings .. otherwise anyone who depended
on it is screwed. 

The suggestion Samisa made of "deprecating" old APIs before removing
is very good. Maybe doxygen supports something like the @deprecated
tag??

Sanjiva.

RE: Removal of prefix from HeaderBlock

Posted by Susantha Kumara <su...@opensource.lk>.
Hi Adrian,

IMO if a server is expecting a specific prefix it is wrong. It is the
namespace that is represented by a prefix is important. Please correct
me if I am wrong.

The namespace prefixes that are automatically added by the Serializer
are in form ns<n> where n is the sequence number.

So if any stub or handler adds a prefix of that kind there can be
namespace prefix conflicts. This api change was aimed at avoiding this
kind of conflicts.

Thanks,

Susantha.

> -----Original Message-----
> From: Adrian Dick [mailto:adrian.dick@uk.ibm.com]
> Sent: Wednesday, July 21, 2004 6:11 PM
> To: axis-c-dev@ws.apache.org
> Subject: Removal of prefix from HeaderBlock
> 
> 
> 
> 
> Hi,
> 
> Having just moved up to the 1.2 release of the Axis C++ code, we've
found
> that it is no longer possible to specify a prefix on HeaderBlocks.
This
> causes us significant problem, as the backend server (not an Axis C++
> server) expects the HeaderBlocks to be of a specific prefix - not the
one
> generated during serialization.
> 
> We are currently using the following 2 methods of adding
SOAPHeaderBlocks
>    From within the stub
>    stub->createSOAPHeaderBlock
>    From within a handler
>    IHandlerSoapSerializer->createHeaderBlock
> For both methods it was previously possible to assign a prefix to the
> HeaderBlock either during construction or through the setPrefix
method.
> 
> Why have the methods to assign a prefix been removed from HeaderBlock,
and
> in turn the createSOAPHeader methods in Call and Stub?
> 
> The only comment I can see on this change is in HeaderBlock.cpp in the
> commented out setPrefix method:
>    The prefix should be decided by the Serializer at runtime
> Surely, this is wrong! It should be decided by the Serializer at
runtime,
> only if one has not been specified.
> 
> As this is affecting us now, we would appreciate a speedy response.
> 
> Thanks,
> Adrian
> _______________________________________
> Adrian Dick (adrian.dick@uk.ibm.com)