You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by Romualdo Rubens de Freitas <ro...@gmail.com> on 2007/09/30 05:31:50 UTC

### Setters methods ###

Hello all,

I'm trying with XML-RPC 3.0 but having some problems.

I have the following:
<code>
public interface Client implements Serializable {
   // setters and getters
   public Object setId(int id);
   public Object setName(String name);
   public int getId();
   public String getName();
   // CRUD methods
   public Object insert();
   public Object update();
   public Object delete();
   public Object[] select();
}

public class ClientImpl implements Client {
   private int id;
   private String name;
   // all implemented methods from interface
}
</code>

and in the client applicantion I have:
<code>
ClientFactory cf = new ClientFactory(xmlRpcClient);
Client            c  = (Client) cf.newInstance(Client.class);

c.setId(1);
c.setName("John Doe");
c.insert();
</code>

in the insert() method there are some 'sysout' which display the ID
and NAME attributes
before they are inserted into DB. At this point I get 0 (zero) for ID
and 'null' for NAME.

Any help would be appreciate.

TIA
-- 
Romualdo Rubens de Freitas

---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org