//This is for the Client
//Testing
        client= new
ClientResource("http://localhost:8182/1234/retrievepatient";);
         try {
            client.get().write(System.out);
            System.out.println(client.get().getText());
        } catch (IOException ex) {
           
Logger.getLogger(CloudMedClient.class.getName()).log(Level.SEVERE, null,
ex);
        }
        client= new
ClientResource("http://localhost:8182/Patient/AddPatient";);
        
             Date d = new Date(1970, 10, 10);
             Patient p = new Patient("123","Ahmed Hassan",d ,"MALE","B",
"Janaklees", Patient.maritalStatus.MARRIED);
              PatientServerInterface patientres = 
client.wrap(PatientServerInterface.class);
             patientres.addPatient(p);
             System.out.println("Patient Added");

--
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/Restlet-Methods-tp7490099p7491159.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2951142

Reply via email to