axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karim <k.yahi...@clipack.com>
Subject Re: return null Object
Date Thu, 21 Oct 2004 08:23:56 GMT
Marco Rossi wrote:

>I try to create a ws with axis and Tomcat 4.
>I want that my ws return a simple object, something like this:
>
>Class SimpleObject{
>	private String name;
>
>	public String getName(){
>		return name;
>}
>
>public void setName(String name){
>	this.name = name;
>}
>}
>
>My start class looks like:
>
>Class SimpleWS{
>	public SimpleObject testWS(){
>		SimpleObject so = new SimpleObject();
>		so.setName("test");
>
>		return so;
>}
>}
>
>When I try to test my client, I fetch a null object (SimpleObject ==
>null), but if I try to return a simple type (i.e. a String field) it
>works.
>
>Thanks in advance,
>Marco
>
>  
>
Are you using the BeanSerializer ?
If so, try to add a default constructor to your SimpleObject  :

public SimpleObject() { }

Mime
View raw message