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

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



    public static void main(String[] args) throws MalformedURLException {
        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 void postPerson(Person person) throws Exception{
        System.out.println("\n### PUT PERSON -> ");
        printPerson(person);

        Person result = personService.putPerson(person);

        System.out.println("\n### PUT PERSON RESPONSE ");
        printPerson(result);
    }
View Full Code Here

        printPerson(result);
    }

    public void getPerson(int id) throws Exception{
        System.out.println("\n### GET PERSON WITH ID "+id);
        Person result = personService.getPerson(id);

        System.out.println("\n### GET PERSON RESPONSE");
        printPerson(result);
    }
View Full Code Here

        printPerson(result);
    }

    public void deletePerson(int id) throws Exception{
        System.out.println("\n### DELETE PERSON WITH ID "+id);
        Person result = personService.deletePerson(id);

        System.out.println("\n### DELETE PERSON RESPONSE");
        printPerson(result);
    }
View Full Code Here

    public static final String ERR_PERSON_X_NOT_FOUND = "Person %s not found";

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

    public void init(){
        Person person = new Person(0,"test",100);
        persons.put(person.getId(), person);
    }
View Full Code Here

        Person person = new Person(0,"test",100);
        persons.put(person.getId(), person);
    }

    public void getPerson(@Body String id,Exchange exchange){
        Person result = persons.get(Integer.parseInt(id));
        checkResult(id, exchange, result);
    }
View Full Code Here

        persons.put(person.getId(), person);
        return person;
    }

    public void deletePerson(@Body String id,Exchange exchange){
        Person result = persons.remove(Integer.parseInt(id));
        checkResult(id, exchange, result);
    }
View Full Code Here

TOP

Related Classes of org.apache.servicemix.examples.camel.soap.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.