Package org.apache.servicemix.examples.camel.rest.model

Examples of org.apache.servicemix.examples.camel.rest.model.Person



    public static void main(String[] args) {
        Client client = new Client();
        try {
            client.postPerson(new Person(1,"John Smith",21));
            client.getPerson(1);
            client.deletePerson(1);
        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here


public class ServiceHandler {

    ArrayList<Person> persons = new ArrayList<Person>();

    public void init(){
        add(new Person(0,"test",100));
    }
View Full Code Here

public class ServiceHandler {

    private Map<Integer, Person> persons = new HashMap<Integer, Person>();

    public void init(){
        add(new Person(0, "Test Person", 100));
    }
View Full Code Here

        return Response.created(URI.create("/personservice/person/get/"
                + person.getId())).build();
    }

    private Person get(int id){
        Person person = persons.get(id);
        if (person == null) {
            ResponseBuilder builder = Response.status(Status.NOT_FOUND);
            builder.entity("Person with ID " + id + " not found.");
            throw new WebApplicationException(builder.build());
        }
View Full Code Here

    private static final String PERSON_SERVICE_URL = "http://localhost:8989/rest/personservice/";

    public static void main(String[] args) {
        Client client = new Client();
        try {
            client.postPerson(new Person(1, "John Smith", 21));
            client.getPerson(1);
            client.deletePerson(1);
        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here

TOP

Related Classes of org.apache.servicemix.examples.camel.rest.model.Person

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.