}
}
public void testWithNonStandaloneWsdl() throws Exception {
// Add a receiver component
ActivationSpec asEcho = new ActivationSpec("echo", new EchoComponent() {
public Document getServiceDescription(ServiceEndpoint endpoint) {
try {
Definition def = WSDLFactory.newInstance().newDefinition();
PortType type = def.createPortType();
type.setUndefined(false);
type.setQName(new QName("http://porttype.test", "MyConsumerInterface"));
def.setTargetNamespace("http://porttype.test");
def.addNamespace("tns", "http://porttype.test");
def.addPortType(type);
Document doc = WSDLFactory.newInstance().newWSDLWriter().getDocument(def);
return doc;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
});
asEcho.setEndpoint("myConsumer");
asEcho.setService(new QName("http://test", "MyConsumerService"));
container.activateComponent(asEcho);
// HTTP Component
HttpEndpoint ep = new HttpEndpoint();
ep.setService(new QName("http://test", "MyConsumerService"));