Examples of PersonResponse


Examples of ke.go.moh.oec.PersonResponse

    private PersonResponse requestMpi(Person p, int requestTypeId) {
        PersonRequest personRequest = new PersonRequest();
        personRequest.setPerson(p);
        personRequest.setResponseRequested(true); // Always request a response.
        Mediator mediator = KisumuHdss.getMediator();
        PersonResponse personResponse = (PersonResponse) mediator.getData(requestTypeId, personRequest);
        return personResponse;
    }
View Full Code Here

Examples of org.springbyexample.person.schema.beans.PersonResponse

    @Test
    @DirtiesContext
    public void testPersonServiceClient() {
        assertNotNull("Client is null.", client);
       
        PersonResponse response = client.getPersons(new GetPersonsRequest());
       
        logger.debug("Received response from server.");
       
        assertNotNull("Response is null.", response);
       
        int expectedSize = 2;
        assertEquals("Expected person list to be a size of '" + expectedSize + "'.", expectedSize, response.getPerson().size());
     
        Person person = response.getPerson().get(0);
     
        assertNotNull("Person is null.", person);
     
        assertEquals("Expected id of '" + ID + "'.", ID.intValue(), person.getId());
        assertEquals("Expected first name of '" + FIRST_NAME + "'.", FIRST_NAME, person.getFirstName());
        assertEquals("Expected last name of '" + LAST_NAME + "'.", LAST_NAME, person.getLastName());
   
        Person person2 = response.getPerson().get(1);
     
        assertNotNull("Person is null.", person2);
     
        assertEquals("Expected id of '" + SECOND_ID + "'.", SECOND_ID.intValue(), person2.getId());
        assertEquals("Expected first name of '" + SECOND_FIRST_NAME + "'.", SECOND_FIRST_NAME, person2.getFirstName());
View Full Code Here

Examples of org.springbyexample.person.schema.beans.PersonResponse

    @Test
    @DirtiesContext
    public void testPersonServiceClient() {
        assertNotNull("Client is null.", client);
       
        PersonResponse response = client.getPersons(new GetPersonsRequest());
       
        logger.debug("Received response from server.");
       
        assertNotNull("Response is null.", response);
       
        int expectedSize = 2;
        assertEquals("Expected person list to be a size of '" + expectedSize + "'.", expectedSize, response.getPerson().size());
     
        Person person = response.getPerson().get(0);
     
        assertNotNull("Person is null.", person);
     
        assertEquals("Expected id of '" + ID + "'.", ID.intValue(), person.getId());
        assertEquals("Expected first name of '" + FIRST_NAME + "'.", FIRST_NAME, person.getFirstName());
        assertEquals("Expected last name of '" + LAST_NAME + "'.", LAST_NAME, person.getLastName());
   
        Person person2 = response.getPerson().get(1);
     
        assertNotNull("Person is null.", person2);
     
        assertEquals("Expected id of '" + SECOND_ID + "'.", SECOND_ID.intValue(), person2.getId());
        assertEquals("Expected first name of '" + SECOND_FIRST_NAME + "'.", SECOND_FIRST_NAME, person2.getFirstName());
View Full Code Here

Examples of org.springbyexample.person.schema.beans.PersonResponse

     */
    @Test
    public void testMarshaller() {
        assertNotNull("Marshaller is null.", marshaller);

        PersonResponse personList = new PersonResponse().withPerson(
                new Person().withId(ID).withFirstName(FIRST_NAME).withLastName(LAST_NAME),
                new Person().withId(SECOND_ID).withFirstName(SECOND_FIRST_NAME).withLastName(SECOND_LAST_NAME));
               
        ByteArrayOutputStream out = new ByteArrayOutputStream();
       
View Full Code Here

Examples of org.springbyexample.person.schema.beans.PersonResponse

        Object value = unmarshaller.unmarshal(new StreamSource(in));
       
        assertNotNull("Unmarshalled instance is null.", value);
        assertTrue("Not an instance of Persons.", (value instanceof PersonResponse));
       
        PersonResponse personResponse = (PersonResponse)value;
       
        int expectedSize = 2;
        assertEquals("Expected person list to be a size of '" + expectedSize + "'.", expectedSize, personResponse.getPerson().size());
       
        Person person = personResponse.getPerson().get(0);
       
        assertNotNull("Person is null.", person);
       
        assertEquals("Expected id of '" + ID + "'.", ID.intValue(), person.getId());
        assertEquals("Expected first name of '" + FIRST_NAME + "'.", FIRST_NAME, person.getFirstName());
        assertEquals("Expected last name of '" + LAST_NAME + "'.", LAST_NAME, person.getLastName());

        Person person2 = personResponse.getPerson().get(1);
       
        assertNotNull("Person is null.", person2);
       
        assertEquals("Expected id of '" + SECOND_ID + "'.", SECOND_ID.intValue(), person2.getId());
        assertEquals("Expected first name of '" + SECOND_FIRST_NAME + "'.", SECOND_FIRST_NAME, person2.getFirstName());
View Full Code Here

Examples of org.springbyexample.person.schema.beans.PersonResponse

 
    /**
     * Gets person list.
     */
    public PersonResponse getPersons(GetPersonsRequest request) {
        PersonResponse response =
            (PersonResponse) wsTemplate.marshalSendAndReceive(request);

        return response;
       
    }
View Full Code Here

Examples of org.springbyexample.person.schema.beans.PersonResponse

    /**
     * Gets person list.
     */
    @PayloadRoot(localPart=GET_PERSONS_REQUEST, namespace=NAMESPACE)
    public PersonResponse getPersons(GetPersonsRequest request) {
        return new PersonResponse().withPerson(
                   person,
                   new Person().withId(2).withFirstName("John").withLastName("Jackson"));       
    }
View Full Code Here

Examples of org.springbyexample.person.schema.beans.PersonResponse

    /**
     * Gets person list.
     */
    @PayloadRoot(localPart=GET_PERSONS_REQUEST, namespace=NAMESPACE)
    public PersonResponse getPersons(GetPersonsRequest request) {
        return new PersonResponse().withPerson(
                   new Person().withId(1).withFirstName("Joe").withLastName("Smith"),
                   new Person().withId(2).withFirstName("John").withLastName("Jackson"));       
    }
View Full Code Here

Examples of org.springbyexample.schema.beans.person.PersonResponse

    @Autowired
    private ContactService service;
       
    @Test
    public void testFindById() {
        PersonResponse response = service.findById(FIRST_ID);
        Person person = response.getResults();

        testPersonOne(person);
    }
View Full Code Here

Examples of org.springbyexample.schema.beans.person.PersonResponse

    @Test
    public void testCreate() {
        String firstName = "Jack";
        String lastName = "Johnson";
       
        PersonResponse response = createPerson(firstName, lastName);
        assertNotNull("Person response is null.", response);
       
        Person person = response.getResults();
       
        // test saved person
        testPerson(person,
                   firstName, lastName);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.