_puller = new ModelPuller<CompositeModel>();
CompositeModel composite = _puller.pull("/HelloSwitchYard.xml", getClass());
composite.assertModelValid();
CompositeServiceModel compositeService = composite.getServices().get(0);
HttpBindingModel config = (HttpBindingModel)compositeService.getBindings().get(0);
// Massive hack for Test Runner. Register both a service and a reference binding.
_domain.registerService(config.getServiceName(), new InOutService(), mockService);
_domain.registerServiceReference(config.getServiceName(), new HelloInterface());
_httpInbound = new InboundHandler(config, _domain);
_httpInbound.start();
compositeService = composite.getServices().get(1);
HttpBindingModel config2 = (HttpBindingModel)compositeService.getBindings().get(0);
_domain.registerService(config2.getServiceName(), new InOnlyService(), new MockHandler());
_domain.registerServiceReference(config2.getServiceName(), new HelloInterface());
_httpInbound2 = new InboundHandler(config2, _domain);
_httpInbound2.start();
CompositeReferenceModel compositeReference = composite.getReferences().get(0);
HttpBindingModel configRef = (HttpBindingModel)compositeReference.getBindings().get(0);
_httpOutbound = new OutboundHandler(configRef, null);
_domain.registerService(configRef.getServiceName(), new HelloInterface(), _httpOutbound);
_httpOutbound.start();
compositeReference = composite.getReferences().get(1);
HttpBindingModel configRef2 = (HttpBindingModel)compositeReference.getBindings().get(0);
_httpOutbound2 = new OutboundHandler(configRef2, null);
_domain.registerService(configRef2.getServiceName(), new HelloInterface(), _httpOutbound2);
_httpOutbound2.start();
compositeReference = composite.getReferences().get(2);
HttpBindingModel configRef3 = (HttpBindingModel)compositeReference.getBindings().get(0);
_httpOutbound3 = new OutboundHandler(configRef3, null);
_domain.registerService(configRef3.getServiceName(), new HelloInterface(), _httpOutbound3);
_httpOutbound3.start();
compositeReference = composite.getReferences().get(3);
HttpBindingModel configRef4 = (HttpBindingModel)compositeReference.getBindings().get(0);
_httpOutbound4 = new OutboundHandler(configRef4, null);
_domain.registerService(configRef4.getServiceName(), new HelloInterface(), _httpOutbound4);
_httpOutbound4.start();
compositeReference = composite.getReferences().get(4);
HttpBindingModel configRef5 = (HttpBindingModel)compositeReference.getBindings().get(0);
_httpOutbound5 = new OutboundHandler(configRef5, null);
_domain.registerService(configRef5.getServiceName(), new HelloInterface(), _httpOutbound5);
_httpOutbound5.start();
}