public Document getServiceDescription(ServiceEndpoint endpoint) { return component.getServiceDescription(endpoint); }
public Document getServiceDescription(String componentName, ServiceEndpoint endpoint) throws PetalsException { this.log.start(); Installer installer = this.installersByName.get(componentName); if (installer == null) { throw new PetalsException("Cannot find a component '" + componentName + "' in the container"); } Document doc = installer.getComponent().getServiceDescription(endpoint); this.log.end(); return doc; }
Document doc = component.getComponent().getServiceDescription(externalEndpoint); if (doc != null) { String data = DOMUtil.asXML(doc);
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);
/** Facilitates intercomponent meta data queries. */ Document queryDescriptor(ServiceEndpoint ref) { Component component; Document descriptor = null; if (ref instanceof LinkedEndpoint) { ref = mRegistry.resolveLinkedEndpoint((LinkedEndpoint)ref); // return immediately if this is a dead link if (ref == null) { return null; } } component = mComponentManager.getComponentInstance( ((RegisteredEndpoint)ref).getOwnerId()); if (component != null) { descriptor = component.getServiceDescription(ref); } return descriptor; }
/** * Retrieve the service description metadata for the specified endpoint. * <p> * Note that the result can use either the WSDL 1.1 or WSDL 2.0 description language. * * @param endpoint endpoint reference; must be non-null. * @return metadata describing endpoint, or <code>null</code> if metadata is unavailable. * @throws JBIException invalid endpoint reference. */ public Document getEndpointDescriptor(ServiceEndpoint endpoint) throws JBIException { if (!(endpoint instanceof AbstractServiceEndpoint)) { throw new JBIException("Descriptors can not be queried for external endpoints"); } AbstractServiceEndpoint se = (AbstractServiceEndpoint) endpoint; // TODO: what if the endpoint is linked or dynamic ComponentMBeanImpl component = getComponent(se.getComponentNameSpace()); return component.getComponent().getServiceDescription(endpoint); }
final String endpoint = endpointName; Document doc = this.getComponent().getServiceDescription(new ServiceEndpoint() { public QName getServiceName() { return service;
/** * @see org.objectweb.petals.jbi.management.admin.AdminServiceMBean#getServiceDescription(String, * ServiceEndpoint) */ public String getServiceDescription(String componentName, ServiceEndpoint endpoint) throws PetalsException { log.call(); ComponentLifeCycle componentLifeCycle = getComponentLifeCycleByName(componentName); if (componentLifeCycle == null) { log.error("No such component " + componentName + " in the container"); throw new PetalsException("No such component " + componentName + " in the container"); } Document doc = componentLifeCycle.getComponent().getServiceDescription( endpoint); String result = ""; if (doc != null) { try { result = XMLUtil.createStringFromDOMDocument(doc); } catch (TransformerException e) { String msg = "Cannot transform DOM endpoint description" + "into String"; log.error(msg); throw new PetalsException(msg, e); } } return result; }