public static JBIConnection create(Element element) { Element consumer = XmlUtils.getChildElement(element, JbiConstants.CONSUMER_TAG); JBIEndpoint consumerEndpoint = JBIEndpoint.create(consumer); Element provider = XmlUtils.getChildElement(element, JbiConstants.PROVIDER_TAG); JBIEndpoint providerEndpoint = JBIEndpoint.create(provider); return create(consumerEndpoint, providerEndpoint); }