@Test public void testSayHelloIncorrectPassword() { Person person = new Person(); person.setFirstName("Jim"); person.setLastName("Moriarty"); try { new HelloWorldClientImplMock(ENDPOINT_ADDRESS).sayHello(person, "jim.moriarty", "moriarty"); fail("incorrect password should fail"); } catch (SOAPFaultException soapFaultException) { assertEquals( "Authentication failed (details can be found in server log)", soapFaultException.getFault().getFaultString()); } }
@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; }
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; } }
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; }  }
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; }  @Override Greeting sayHello(Person person); }
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; }  @Override Greeting sayHello(Person person);  }