@Test public void testSayHelloNoCredentials() { Person person = new Person(); person.setFirstName("Marie"); person.setLastName("Hudson"); try { new HelloWorldClientImplMock(ENDPOINT_ADDRESS).sayHello(person); fail("no credentials should fail"); } catch (SOAPFaultException soapFaultException) { assertEquals( "Authentication required but no user or password was supplied", 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);  }