BindingInfo bindingInfo = null;
bindingInfo = serviceInfo.getBindings().iterator().next();
QName name = new QName(serviceInfo.getName().getNamespaceURI(), "sayHi");
BindingOperationInfo sayHi = bindingInfo.getOperation(name);
BindingMessageInfo input = sayHi.getInput();
assertNotNull(input);
assertEquals(input.getMessageInfo().getName().getLocalPart(), "sayHiRequest");
assertEquals(input.getMessageInfo().getName().getNamespaceURI(),
"http://apache.org/hello_world_soap_http");
assertEquals(input.getMessageInfo().getMessageParts().size(), 1);
assertEquals(input.getMessageInfo().getMessageParts().get(0).getName().getLocalPart(), "in");
assertEquals(input.getMessageInfo().getMessageParts().get(0).getName().getNamespaceURI(),
"http://apache.org/hello_world_soap_http");
assertTrue(input.getMessageInfo().getMessageParts().get(0).isElement());
QName elementName = input.getMessageInfo().getMessageParts().get(0).getElementQName();
assertEquals(elementName.getLocalPart(), "sayHi");
assertEquals(elementName.getNamespaceURI(), "http://apache.org/hello_world_soap_http/types");
BindingMessageInfo output = sayHi.getOutput();
assertNotNull(output);
assertEquals(output.getMessageInfo().getName().getLocalPart(), "sayHiResponse");
assertEquals(output.getMessageInfo().getName().getNamespaceURI(),
"http://apache.org/hello_world_soap_http");
assertEquals(output.getMessageInfo().getMessageParts().size(), 1);
assertEquals(output.getMessageInfo().getMessageParts().get(0).getName().getLocalPart(), "out");
assertEquals(output.getMessageInfo().getMessageParts().get(0).getName().getNamespaceURI(),
"http://apache.org/hello_world_soap_http");
assertTrue(output.getMessageInfo().getMessageParts().get(0).isElement());
elementName = output.getMessageInfo().getMessageParts().get(0).getElementQName();
assertEquals(elementName.getLocalPart(), "sayHiResponse");
assertEquals(elementName.getNamespaceURI(), "http://apache.org/hello_world_soap_http/types");
assertTrue(sayHi.getFaults().size() == 0);