public void testExplicitMAPs() throws Exception {
try {
Map<String, Object> requestContext =
((BindingProvider)greeter).getRequestContext();
AddressingProperties maps = new AddressingPropertiesImpl();
AttributedURIType id =
ContextUtils.getAttributedURI("urn:uuid:12345");
maps.setMessageID(id);
requestContext.put(CLIENT_ADDRESSING_PROPERTIES, maps);
String greeting = greeter.greetMe("explicit1");
assertEquals("unexpected response received from service",
"Hello explicit1",
greeting);
checkVerification();
// the previous addition to the request context impacts
// on all subsequent invocations on this proxy => a duplicate
// message ID fault is expected
try {
greeter.greetMe("explicit2");
fail("expected ProtocolException on duplicate message ID");
} catch (ProtocolException pe) {
assertTrue("expected duplicate message ID failure",
"Duplicate Message ID urn:uuid:12345".equals(pe.getMessage()));
checkVerification();
}
// clearing the message ID ensure a duplicate is not sent
maps.setMessageID(null);
maps.setRelatesTo(ContextUtils.getRelatesTo(id.getValue()));
greeting = greeter.greetMe("explicit3");
assertEquals("unexpected response received from service",
"Hello explicit3",
greeting);
} catch (UndeclaredThrowableException ex) {