public class AnnotatedBeanEndpointTest extends SpringTestSupport {
public void testSendingToDynamicEndpointForAnnotatedBeanWithFooOperation() throws Exception {
// now lets make a request on this endpoint
DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
DocumentFragment epr = URIResolver.createWSAEPR("bean:annotatedBean");
ServiceEndpoint se = client.getContext().resolveEndpointReference(epr);
assertNotNull("We should find a service endpoint!", se);
InOnly exchange = client.createInOnlyExchange();
exchange.setEndpoint(se);
exchange.setOperation(new QName("foo"));
exchange.getInMessage().setContent(new StringSource("<hello>world</hello>"));
client.sendSync(exchange);
assertExchangeWorked(exchange);
AnnotatedBean bean = (AnnotatedBean) getBean("annotatedBean");
MessageExchange answer = bean.getMyExchangeMethod();