private void initMessagesMap() { messages = new ConcurrentHashMap<NamedID, MessageInfo>(16, 0.75f, 2); for (OperationInfo operation : getInterface().getOperations()) { if (operation.getInput() != null) { messages.put(operation.getInput().getName(), operation.getInput()); } if (operation.getOutput() != null) { messages.put(operation.getOutput().getName(), operation.getOutput()); } } }
@Test public void testOutput() throws Exception { assertFalse(operationInfo.hasOutput()); MessageInfo outputMessage = operationInfo.createMessage( new QName("http://apache.org/hello_world_soap_http", "testOutputMessage"), MessageInfo.Type.OUTPUT); operationInfo.setOutput("output", outputMessage); assertTrue(operationInfo.hasOutput()); outputMessage = operationInfo.getOutput(); assertEquals("testOutputMessage", outputMessage.getName().getLocalPart()); assertEquals( "http://apache.org/hello_world_soap_http", outputMessage.getName().getNamespaceURI()); assertEquals(operationInfo.getOutputName(), "output"); }