axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eran Chinthaka" <chinth...@opensource.lk>
Subject RE: [Axis2] Proposal for adding a method in OMElement API.
Date Sun, 22 May 2005 06:54:16 GMT
Hi,

See my comments below.

> -----Original Message-----
> From: jayachandra [mailto:jayachandra@gmail.com]
> Sent: Friday, May 20, 2005 5:27 PM
> To: axis-dev@ws.apache.org
> Subject: [Axis2] Proposal for adding a method in OMElement API.
> 
> Hi devs,
> 
> In the current OMElement API, a method to remove an existing namespace
> declaration appears missing. It is a basic method to have for the
> purpose of soap content manipulation. A use case I have in mind is in
> 1.x there is a global configuration that can be set whether or not to
> send xsi-type, in the scenario where sendXSIType=false rather than at
> every element creation extensively checking all possible flags and
> appropriately adding attributes and declaring only the needed
> namespaces, we can have the factory quickly return an OMElement which
> contains most general namespace declarations in its scope. 

Didn't get this scenario :(

>And in
> these kind of special cases just before sending we can remove out the
> xsi tagged type attributes and the xsi namespace from the OMElement
> and proceed. So I propose that someone add following method to the API
> 
> public boolean removeNamespaceDeclaration(java.lang.String prefix);
> /* The above method removes the namespace declaration corresponding to
> the given prefix returning true on success, false otherwise*/

Well, I accept the proposal but not the method signature. Uniqueness of a
namespace comes from the URI, but not from the prefix. A URI can contain
more than one prefix.

So I prefer, 

+ removeNamespace(OMNamespace):boolean
+ removeNamespace(String URI) :Boolean


> 
> Now some general review notes...
> Some methods of OMElementImpl that throw OMException are not being
> declared in their signature to throw OMException [example
> addAttribute(string, string, OMNamespace) ]. Clean up so that all such
> method signatures throw OMException.

Since you will be a committer soon :), why don't you go and clean up the
stuff ;).

-- Regards,
Chinthaka

> 
> My codebase is slightly old, apologies if suggested changes already are
> fixed.


> 
> Thank you
> Jayachandra
> --
> -- Jaya
> 




Mime
View raw message