in jbi/runtime/src/main/java/org/apache/servicemix/jbi/runtime/impl/ComponentContextImpl.java [94:126]
public synchronized ServiceEndpoint activateEndpoint(QName serviceName, String endpointName) throws JBIException {
try {
ServiceEndpoint se = new ServiceEndpointImpl(serviceName, endpointName);
Map<String, Object> props = new HashMap<String, Object>();
props.put(Endpoint.NAME, serviceName.toString() + ":" + endpointName);
props.put(Endpoint.SERVICE_NAME, serviceName.toString());
props.put(Endpoint.ENDPOINT_NAME, endpointName);
props.put(INTERNAL_ENDPOINT, Boolean.TRUE.toString());
Document doc = component.getComponent().getServiceDescription(se);
if (doc != null) {
QName[] interfaceNames = getInterfaces(doc, se);
if (interfaceNames != null) {
StringBuilder sb = new StringBuilder();
for (QName itf : interfaceNames) {
if (sb.length() > 0) {
sb.append(",");
}
sb.append(itf.toString());
}
props.put(Endpoint.INTERFACE_NAME, sb.toString());
}
String data = DOMUtil.asXML(doc);
String url = componentRegistry.getDocumentRepository().register(data.getBytes());
props.put(Endpoint.WSDL_URL, url);
}
EndpointImpl endpoint = new EndpointImpl(props);
endpoint.setQueue(queue);
componentRegistry.getNmr().getEndpointRegistry().register(endpoint, props);
return endpoint;
} catch (TransformerException e) {
throw new JBIException(e);
}
}