You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by dovle <do...@delsyne.ro> on 2001/11/01 09:00:18 UTC

Is this a Bean or not ?!?

Hi ,
I have on the server a class that I suppose it could be considered as a 
javaBean (but for this I need confirmation) . I have mapped to be 
(de)serialized with the BeanSerializer and does not work, throws something 
like NullPointerException . 
the 'bean' looks like this 

class X 
{
	public int x ;
	public String name ;
	
	public void setX( int x ) 
... // all the methods for get/set x and name 
// another methods 
	public int getPropertyCount() ;
	public void setProperty( int index , Object o ) ;
	public Object getProperty( int index ) ;
}

As you can see, there are those three methods that does not respect the 
specs. And when I remove them from the file (as I can see the problem they 
are not necesar) all works fine . 
Is there any way to keep those procs (that in fact are not setters or 
getters) and still deserialize the class with BeanSerializer ? 

A solution could be renaming the methods from "getProperty" to " or 
"gtProperty" or "myGetProperty" . 

Thanks for your answers ,
dovle