class HelloWorldEndpointImpl implements HelloWorldPortType {

    @Override
    public Greeting sayHello(Person person) {

        String firstName = person.getFirstName();
        LOGGER.debug("firstName={}", firstName);
        String lasttName = person.getLastName();
        LOGGER.debug("lastName={}", lasttName);

        ObjectFactory factory = new ObjectFactory();
        Greeting response = factory.createGreeting();

        String greeting = "Hello " + firstName + " " + lasttName + "!";
        LOGGER.info("greeting={}", greeting);

        response.setText(greeting);
        return response;
    }

}

class HelloWorldEndpointImplTest {

    private static String ENDPOINT_ADDRESS;

    @Test
    public void testSayHelloProxy() {

        Person person = new Person();
        person.setFirstName("John");
        person.setLastName("Watson");

        assertEquals("Hello John Watson!", new HelloWorldClientImplMock(
                ENDPOINT_ADDRESS).sayHello(person));
    }

}