...
The URIs that don't have a parameter are used in service to service interactions passing JSON strings. For each of these interactions, the simplest way to specify the contract is through a Java class. For example the @POST /cu entry point has the following Java class
Code Block | ||||
---|---|---|---|---|
| ||||
package com.celestial.dbbusinessobjects;
/**
*
* @author Selvyn
*/
public class User
{
private String userID;
private String userPwd;
public User()
{}
public User( String userid, String pwd )
{
this.userID = userid;
this.userPwd = pwd;
}
public String getUserID()
{
return userID;
}
public void setUserID(String itsUserID)
{
this.userID = itsUserID;
}
public String getUserPwd()
{
return userPwd;
}
public void setUserPwd(String itsUserPwd)
{
this.userPwd = itsUserPwd;
}
@Override
public String toString()
{
return new StringBuffer("itsUserID:").append(this.userID)
.append("itsUserPwd:").append(this.userPwd).toString();
}
} |